-
Notifications
You must be signed in to change notification settings - Fork 236
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
[Bug] encode_with_signature_fields encodes an invalid transaction when the signature Parity is unexpected #1510
Labels
bug
Something isn't working
Comments
kayabaNerve
added a commit
to serai-dex/serai
that referenced
this issue
Oct 17, 2024
Mainly corrects for alloy-rs/alloy#1510 yet also corrects a missing machete ignore.
prestwich
added a commit
that referenced
this issue
Oct 19, 2024
3 tasks
3 tasks
prestwich
added a commit
that referenced
this issue
Oct 21, 2024
prestwich
added a commit
that referenced
this issue
Oct 23, 2024
2 tasks
mattsse
pushed a commit
that referenced
this issue
Oct 28, 2024
* fix: make a sensible encoding api * fix: k256 test * fix: single doc hidden * fix: missing doc * nit: undo changed list * feat: optimize hash calculation * fix: chain rlp_decode_signed * fix: restore remaining check * refactor: helper trait * feat: add API to Signed for convenience * refactor: add header shortcut functions * feat: impl for some other tx types * refctor: impl RlpEcdsaTx for TxLegacy * lint: clippy * fix: import vec * fix: import Vec * fix: rebase artifacts * fix: correct handling of legacy signatures when encoding (#1510) * lint: clippy * fix: use corrected impls * nit: remove bug comments * refactor: use length_with_payload * fix: legacy network headers are transparent * fix: restore signature v check * fix: check for leftoverbytes * fix: corrected RLP decoding of eip4844 variant * fix: list check in 4844 decoding * fix: add map or
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Component
consensus, eips, genesis
What version of Alloy are you on?
84dfc7a
Operating System
None
Describe the bug
TxLegacy::encode_with_signature_fields
with aSignature
constructed withFrom<Signature<Secp256k1>>::from
used to work in my setup until that (its own bug) was patched with #1305. #1428 corrected this for such signatures whenTxLegacy::into_signed
is used yetencode_with_signature_fields
remains an issue.TxLegacy::encode_with_signature_fields
should either return an error when an incorrect parity is passed or also coerce it asinto_signed
did. I'm happy to implement either solution once informed which would be preferable. I'd assume (and personally recommend) coercion. The other transaction types may have similar issues but I have yet to look.I'll also note I initially raised/misdiagnosed this in foundry-rs/foundry#9046.
The text was updated successfully, but these errors were encountered: