Skip to content
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

fix(serde): add alias v for yParity #801

Merged
merged 4 commits into from
Nov 1, 2024
Merged

fix(serde): add alias v for yParity #801

merged 4 commits into from
Nov 1, 2024

Conversation

klkvr
Copy link
Member

@klkvr klkvr commented Nov 1, 2024

Motivation

Geth responds with v for EIP-1559 transactions. This PR updates default serde impl for PrimitiveSignature to accept v in place of yParity. Only 0/1 values for v would get correctly deserialized.

Additionaly, we now always serialize both v and yParity for compatibility as this is done in reth: https://github.com/paradigmxyz/reth/blob/bd8c4eceb20c39c6e501d06cf906469329340bb9/crates/rpc/rpc-types-compat/src/transaction/signature.rs#L29

Solution

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@mattsse mattsse merged commit 17ae00a into main Nov 1, 2024
30 checks passed
@mattsse mattsse deleted the klkvr/y-parity-alias branch November 1, 2024 09:34
ZelionD pushed a commit to ZelionD/core that referenced this pull request Nov 11, 2024
* add alias  for yParity

* fix

* fix

* always serialize v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants