-
Notifications
You must be signed in to change notification settings - Fork 390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Data
field from serialized Transactions
#6079
Conversation
- Support during deserialization for compatibility
…deTransactions_param'
// Accept during deserialization, ignore during serialization | ||
// See: https://github.com/NethermindEth/nethermind/pull/6067 | ||
[JsonProperty(nameof(Data))] | ||
private byte[]? Data { set { Input = value; } } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "trick" used to support deserialization but ignore serialization is described here: https://stackoverflow.com/questions/43714050/multiple-jsonproperty-name-assigned-to-single-property/43715009#43715009
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this way of doing it
Context: ethereum/go-ethereum#28077 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good for me if this was merged sooner rather than later; as will be additional merge conflicts 😅
Partially addresses #5161
Changes
Data
field, but use it as alias ofInput
when deserializing.Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing
Documentation
Requires documentation update
Requires explanation in Release Notes
Remarks
While working on #5161 we found that the
Data
field is not part of the spec (https://ethereum.github.io/execution-apis/api-documentation/), so we removed it on #6036.As documented on that PR, this could introduce issues with users that relied on this non-conformant field. During internal testing, we found that the Prysm CL relied on this so we rolled back the change on #6067.
After discussing it with the team, we decided to compromise in the following fashion: we will accept
Data
as an alias forInput
when reading transactions from other applications, but we will not include such field when sending them.