-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Dont append full wrapped blobtx to filters #9471
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
This change looks problematic to me. The unfortunate thing is that we use "wrapped" in two ways:
A) Whether a typed (such as EIP-1559 or blob) transaction, whose serialization starts with its type byte, is additionally wrapped into the RLP string.
B) Whether a blob transactions is "wrapped" to contain blobs/commitments/proofs.
While I agree that with this PR we need "unwrapped" in sense B here, we still need DecodeWrappedTransaction in sense A – otherwise EIP-1559 (type-2) transactions will fail I suspect.
I suggest adding a new parameter to
UnmarshalWrappedTransactionFromBinary
(and henceDecodeWrappedTransaction
) that explicitly controls whether we expect type-3 (blob) transactions with (deserialized intoBlobTxWrapper
) or without (deserialized intoBlobTx
) blobs. CurrentlyUnmarshalWrappedTransactionFromBinary
implicitly does the former.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.
Qq: Wrapped in 2 ways? There is wrapped blobTx, and nothing else that is "wrapped" additionally
Your suggestion for the case B is wrapping of
tx_payload
andblobs, commitment, proofs
into one RLP is whatUnmarshalWrappedTransactionFromBinary
deals with. The rest of the logic is the same.If for any reason type-2 transactions are more wrapped, then the existing logic wouldn't have worked either.
Also here,
OnNewTx
will only process elements fromtxpool
's reply. I am ensuring that the wrapped version of blobTx isn't fed into that.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.
OK, I was confused by the comment of
DecodeWrappedTransaction
. I thought thatDecodeWrappedTransaction
differed fromDecodeTransaction
in how they treat RLP envelops of typed transactions. Take a look atTestEIP2718TransactionEncode
, for example. What is called "binary" representation is its serialization prescribed by EIP-2718. It's used in some places, for example when calculating the transaction root of a block header. However, in other places (e.g. when sent over network in eth/68) this "binary" representation has to be additionally "wrapped" with an RLP prefix to make it a valid RLP. You can see inTestEIP2718TransactionEncode
that the "RLP representation" is the same as the "binary representation" prefixed byb866
. Note that the above is only a concern for typed transactions, not for legacy ones.Anyway, it looks like in reality
DecodeWrappedTransaction
behaves the same asDecodeTransaction
re. the RLP envelope.