fix(evmrpc): treat id=null as a valid request, not a JSON-RPC notification#3303
Open
amir-deris wants to merge 1 commit intomainfrom
Open
fix(evmrpc): treat id=null as a valid request, not a JSON-RPC notification#3303amir-deris wants to merge 1 commit intomainfrom
amir-deris wants to merge 1 commit intomainfrom
Conversation
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3303 +/- ##
==========================================
- Coverage 58.31% 58.31% -0.01%
==========================================
Files 2085 2085
Lines 209061 209058 -3
==========================================
- Hits 121913 121910 -3
Misses 78355 78355
Partials 8793 8793
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
JSON-RPC 2.0 defines a Notification as a request object with no
idmember. A request with"id": nullis discouraged by the spec but is still a valid call and must receive a response.The previous implementation of
isJSONRPCNotificationIDreturnedtruefor both a missingidand an explicit"id": null, causing requests withnullids to be silently dropped from batch responses.Changes
isJSONRPCNotificationIDnow returnstrueonly when the rawidfield is absent (len(id) == 0), not when it isnullTestWrapSeiLegacyHTTP_BatchNullIDIsNotNotificationto verify that a batch containing"id": nullforwards the request and includes the responseTest plan
go test ./evmrpc/... -run TestWrapSeiLegacyHTTP_Batch