graphql: encode Long values as hex#26894
Merged
fjl merged 1 commit intoethereum:masterfrom Apr 25, 2023
Merged
Conversation
Contributor
|
Is this ready or waiting for some spec-change or something? |
Contributor
Author
|
Yes it's pending on ethereum/execution-apis#389 |
shekhirin
pushed a commit
to shekhirin/go-ethereum
that referenced
this pull request
Jun 6, 2023
This is a breaking GraphQL API change. All numeric values are now encoded as hex strings. The motivation for this change is matching JSON-RPC outputs more closely. Numbers in query parameters are accepted as both decimal integers and hex strings.
devopsbo3
pushed a commit
to HorizenOfficial/go-ethereum
that referenced
this pull request
Nov 10, 2023
This is a breaking GraphQL API change. All numeric values are now encoded as hex strings. The motivation for this change is matching JSON-RPC outputs more closely. Numbers in query parameters are accepted as both decimal integers and hex strings.
devopsbo3
added a commit
to HorizenOfficial/go-ethereum
that referenced
this pull request
Nov 10, 2023
This reverts commit c228163.
devopsbo3
added a commit
to HorizenOfficial/go-ethereum
that referenced
this pull request
Nov 10, 2023
This reverts commit c228163.
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.
Breaking-change All number fields (Big, or Long) will be hex-formatted for consistency.
We had inconsistent formatting for outputs of
Longfields. Some returned decimal numbers while others returned hex-encoded string. They were initially all hex-encoded and later some but not all were converted to Long: #21883. This prompted #26118.I think we should move back to hex-encoding when returning longs and have created a PR to disambiguate formatting of Long fields in the spec: ethereum/execution-apis#389. Inputs are now more flexible and will take decimal or string. String can be hex or decimal encoded. This will succeed #26730.