Closed kpp closed 19 hours ago
This is a bit of a GIGO situation, no? Passing a signature you know to be invalid results in invalid behavior. when the chain id of the signature and the legacy tx disagree, only the signature
we can protect against this better by storing parity only as a boolean instead of trying to capture eip155 status. but for now, I think the best solution is a debug_assert_eq
until we prep that larger refactor
fn into_signed(self, signature: Signature) -> Signed<Self> {
debug_assert_eq!(signature.v().chain_id(), self.chain_id);
Component
consensus, eips, genesis
What version of Alloy are you on?
commit 4157e2664fab0
Operating System
None
Describe the bug
Fails to encode/decode a Legacy TxEnvelope:
Test:
Linked issue: https://github.com/alloy-rs/alloy/pull/893 Linked issue: https://github.com/alloy-rs/alloy/issues/539