Stricter validation of EIP-7702 transactions#11885
Merged
Conversation
| return txpoolcfg.NoAuthorizations | ||
| } | ||
| for i := 0; i < authorizationLen; i++ { | ||
| if txn.Authorizations[i].S.Gt(crypto.Secp256k1halfN) { |
Member
There was a problem hiding this comment.
should we just use TransactionSignatureIsValid here, as it it used in authority recover, and if it fails there, the entire tx fails. So maybe we can check all aspects of the signature
ref: link
Member
Author
There was a problem hiding this comment.
Makes sense, but I'm holding off until ethereum/EIPs#8865 is merged.
somnergy
approved these changes
Sep 12, 2024
somnergy
pushed a commit
that referenced
this pull request
Sep 12, 2024
Check (in the txpool and in the main code) that an EIP-7702 transaction is [valid](https://eips.ethereum.org/EIPS/eip-7702#set-code-transaction), namely that: - `to != nil` - `len(authorization_list) != 0` - `authorization.chain_id` is `uint256` - `authorization.nonce` is `uint64` - `authorization.address` is `bytes20` - `authorization.y_parity == 0 || authorization.y_parity == 1` - `authorization.r` is `uint256` - `authorization.s` is `uint256` and `authorization.s <= secp256k1n/2` This PR doesn't implement ethereum/EIPs#8865 or ethereum/EIPs#8845
yperbasis
added a commit
that referenced
this pull request
Oct 3, 2024
AskAlexSharov
pushed a commit
that referenced
this pull request
Oct 21, 2024
Closed
revitteth
pushed a commit
to 0xPolygon/cdk-erigon
that referenced
this pull request
Mar 21, 2025
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.
Check (in the txpool and in the main code) that an EIP-7702 transaction is valid, namely that:
to != nillen(authorization_list) != 0authorization.chain_idisuint256authorization.nonceisuint64authorization.addressisbytes20authorization.y_parity == 0 || authorization.y_parity == 1authorization.risuint256authorization.sisuint256andauthorization.s <= secp256k1n/2This PR doesn't implement ethereum/EIPs#8865 or ethereum/EIPs#8845