Hint known JSON-RPC error codes on failed mempool submissions - #5006
Merged
Merged
Conversation
Signed-off-by: Aryan Godara <aryangodara03@gmail.com>
Contributor
|
Claude finished @AryanGodara's task in 58s —— View job PR Review: Hint known JSON-RPC error codes on failed mempool submissions
Verdict: LGTM — no changes required. The change is correct and well-scoped:
Nice touch adding the proxyd source link in the comment for the |
MartinquaXD
reviewed
Oct 1, 2026
Comment on lines
+238
to
+242
| Some(-32100) => err.context( | ||
| "transaction rejected upstream (JSON-RPC -32100): the RPC's proxy refused it before \ | ||
| the sequencer", | ||
| ), | ||
| Some(code) => err.context(format!("unexpected error code {code}")), |
Contributor
There was a problem hiding this comment.
IMO error conversion can be quite complicated and it's up to the caller whether they print the full context. I'd err on the side of keeping things simple and obvious by simply emitting a log here and leave the error conversion itself as it was before.
Member
Author
There was a problem hiding this comment.
changed it to log instead 🫡
Signed-off-by: Aryan Godara <aryangodara03@gmail.com>
…or-codes-init Signed-off-by: Aryan Godara <aryangodara03@gmail.com>
MartinquaXD
approved these changes
Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
On Ink, some settlements fail at
eth_sendRawTransactionwith-32100: transaction rejectedfrom every RPC. The error comes from a proxyd-style proxy in front of the sequencer(proxyd). Currently it wasn't obvious as where this error comes from
This PR adds a small mapping on the JSON-RPC code for new codes we come across, and codes we haven't seen before stand out.
Changes
-32000and errors without a code: unchanged-32100: the error now starts withtransaction rejected upstream (JSON-RPC -32100): ...unexpected error code <N>No behaviour change: the error is still
Error::Otherand the tx fails the same way. The hint shows up in the existingsending transaction via mempool failedwarning.How to test
log-only change, so no unit test.