fix(anvil): TypedTransaction rlp decode, bump k256#6327
Merged
Conversation
mattsse
approved these changes
Nov 16, 2023
| } | ||
| if first == 0x02 { | ||
| return rlp::decode(s).map(TypedTransaction::EIP1559) | ||
| let [first, s @ ..] = rlp.as_raw() else { |
Member
There was a problem hiding this comment.
still need to get used to this -.-
Member
|
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 |
3 tasks
This was referenced Apr 26, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
RLP decoding is incomplete:
rlp.data()decodes a header and returns the nextheader.numbytes, 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