-
Notifications
You must be signed in to change notification settings - Fork 155
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
feat(primitives
): Add y_parity_byte_non_eip155
to Parity
#499
Conversation
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.
defer to @prestwich here
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.
lgtm, any follow up PR needed here to solve the bug in anvil?
Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
yep @onbjerg, we'll need to change how the v value is represented on the signature |
lgtm |
Motivation
In the case of a signature without EIP155 applied, the
y_parity
byte should be returned as 27 or 28.y_parity_byte
only returns it as{0,1}
.Solution
This adds a fn
y_parity_byte_non_eip155
which, when not having an EIP155 parity, we get 27 or 28, orNone
otherwise.PR Checklist