-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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(anvil): TypedTransaction rlp decode, bump k256 #6327
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.
gg boss
dbg nits
} | ||
if first == 0x02 { | ||
return rlp::decode(s).map(TypedTransaction::EIP1559) | ||
let [first, s @ ..] = rlp.as_raw() else { |
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.
still need to get used to this -.-
possible that this is broken due to foundry/crates/anvil/src/eth/api.rs Lines 879 to 887 in 5692c5c
I guess we no longer need to ensure the input is rlp now that we don't decode the header |
Motivation
RLP decoding is incomplete:
rlp.data()
decodes a header and returns the nextheader.num
bytes, but this is always 0 if the raw rlp data already starts with a tx typeSee also Reth impl and docs https://github.com/paradigmxyz/reth/blob/0b46e16dcdc9012810726bee410047fea8be7cf9/crates/primitives/src/transaction/mod.rs#L1317C1-L1347C2
Solution