Skip to content

clients/rpcclient: switch to the stellar-experimental/jrpc2 fork - #6020

Closed
cjonas9 wants to merge 11 commits into
mainfrom
jrpc2-fork-import
Closed

cjonas9 wants to merge 11 commits into
mainfrom
jrpc2-fork-import

Conversation

@cjonas9

@cjonas9 cjonas9 commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Note: This branch is made obsolete by stellar-rpc/pull/1037, which does the work of the jrpc2 fork in-tree.

What

Switches clients/rpcclient from creachadair/jrpc2 v1.2.0 to the stellar-experimental/jrpc2 fork, pinned at 4ada2aea (stellar-experimental/jrpc2#1, based on upstream v1.3.5). Only import paths change in main.go and main_test.go, and the client behaves the same:

  • The fork's changes are on the server and bridge side.
  • Its client.go and jhttp/channel.go match v1.3.5 apart from the module path.
  • From v1.2.0 to v1.3.5, the client changed only in doc comments and the sync.WaitGroup.Go rewrite.

Other changes:

  • go.mod: the fork replaces creachadair/jrpc2, and creachadair/mds moves from v0.13.4 to v0.26.1. The go line stays at 1.25.0.
  • CHANGELOG.md: a Breaking Changes entry, because errors from the client are now the fork's *jrpc2.Error. Callers matching them with errors.As must change their import.

Why

stellar/stellar-rpc#1037 moves stellar-rpc to the fork, whose bridge streams large results straight to the socket. A 3 MB result drops from 36 ms to 2.4 ms per call. The fork also lets #1060's memoized handlers return pre-rendered json.RawMessage bodies.

stellar-rpc's integration tests use this rpcclient. While it stays on upstream, stellar-rpc carries both modules, and errors.As against the fork's *jrpc2.Error never matches. #1037 pins a commit from this PR for that.

Notes

🤖 Generated with Claude Code

@socket-security

socket-security Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedgithub.com/​stellar-experimental/​jrpc2@​v0.0.0-20261007183142-4ada2aea5d5699100100100100

View full report

@socket-security

socket-security Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Priority Alert  (click "▶" to expand/collapse) Action
Medium priority
License policy violation: golang github.com/creachadair/mds under BSD-3-Clause-HP

License: BSD-3-Clause-HP - The applicable license policy does not permit this license (5) (LICENSE)

From: go.mod → golang/github.com/stellar-experimental/jrpc2@v0.0.0-20261007183142-4ada2aea5d56 → golang/github.com/creachadair/mds@v0.26.1

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore golang/github.com/creachadair/mds@v0.26.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn

View full report

@cjonas9
cjonas9 marked this pull request as ready for review October 7, 2026 20:03
Copilot AI lite review requested due to automatic review settings October 7, 2026 20:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

It depends on an unreleased fork and introduces a breaking error-type change.

0 open findings

What changed in this PR

Switches rpcclient to the pinned Stellar experimental jrpc2 fork, updates dependencies, stabilizes the CRC32C test, and documents the error-type change.

Changes:

  • Replaces upstream jrpc2 imports and dependency.
  • Updates module checksums and indirect dependencies.
  • Computes CRC32C dynamically.
  • Documents the breaking error-type change.
File Description
support/​datastore/​gcs_test.go Computes CRC32C from generated compressed bytes.
go.sum Updates dependency checksums.
go.mod Switches module dependencies.
clients/​rpcclient/​main.go Uses the forked client and HTTP channel.
clients/​rpcclient/​main_test.go Updates the jrpc2 error-type import.
CHANGELOG.md Documents the changed error type.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI lite review requested due to automatic review settings October 7, 2026 20:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The dependency is pinned to an open fork branch and introduces a breaking error-type change.

0 open findings

🧠 Review effort: Lite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants