Add support for EIP-7702#1693
Merged
sorpaas merged 84 commits intopolkadot-evm:masterfrom Jul 22, 2025
Merged
Conversation
librelois
requested changes
Jun 25, 2025
Contributor
Author
|
I am happy to add the BlockWrapper in a separate PR 👍 |
sorpaas
reviewed
Jul 14, 2025
Member
sorpaas
left a comment
There was a problem hiding this comment.
CI is failing due to a typo only triggered in try_runtime cfg. Otherwise LGTM.
sorpaas
approved these changes
Jul 15, 2025
Collaborator
|
Will try to have a final review in the next 2 hours. |
RomarQ
reviewed
Jul 15, 2025
Collaborator
RomarQ
left a comment
There was a problem hiding this comment.
Added a few remarks, the remaining changes look good to me.
RomarQ
reviewed
Jul 16, 2025
RomarQ
reviewed
Jul 16, 2025
RomarQ
requested changes
Jul 16, 2025
Collaborator
RomarQ
left a comment
There was a problem hiding this comment.
We need to validate the signatures in the authorization_list
RomarQ
reviewed
Jul 16, 2025
RomarQ
approved these changes
Jul 16, 2025
Member
|
@librelois Do you still want to do another review or are the issues you mentioned already addressed? |
Member
|
@sorpaas I was just about to respond to your comment today. It appears my comments has been addressed correctly, but I would be grateful if you could allow a bit more time next time. |
l0r1s
pushed a commit
to opentensor/frontier
that referenced
this pull request
Aug 6, 2025
* feat: ✨ add support for EIP-7702 * chore: ⬆️ use temporary fork of ethereum crate * feat: ✨ update to ethereum crate v3 structs * feat: ⬆️ upgrade evm crate * feat: ✨ add EIP-7702 support to RPC * fix: ⬆️ upgrade evm crate * feat: ✨ upgrade evm crate * feat: ✨ add EIP-7702 support to EthDevSigner * test: 🔥 temporarily remove EIP-7702 tests * feat: ⬆️ upgrade ethereum and evm crates * fix: 🐛 properly convert authorization list to evm's data type * fix: 🔥 fix logic * fix: 🐛 fix usage of authorization list throughout the codebase * style: 🎨 fmt * fix: ⬆️ upgrade evm * refactor: 🚨 silence lint error * style: 🎨 fmt * refactor: 🔥 remove unused imports * fix: ⬆️ upgrade config to pectra * fix: 🐛 manage API v6 case in Eth::call * fix: 🐛 manage API v6 case in Eth::estimate_gas * chore: 🔥 remove unused dependencies * test: ✅ add unit tests for EIP-7702 * test: ✅ add integration tests for EIP-7702 * style: 🎨 fmt * refactor: ⬆️ upgrade evm crate * fix: 🐛 propagate std feature to ethereum-ext * refactor: ♻️ use upstream evm crate * refactor: 🔥 remove ethereum-ext temporary dependency * style: 🎨 format TS code * refactor: ♻️ ignore lint warning * feat: ⬆️ upgrade evm/ethereum dependencies * feat: ✨ add validation error for EIP-7702 empty authorization list * style: 🎨 format code * refactor: 🔥 remove unused const * test: 🧪 add failing test for EIP-7702 authoriations * fix: 🐛 fix authorization creation in tests * refactor: ⬆️ use evm release on crates.io * style: 🎨 format code * feat: ✨ record delegation resolution external operation * revert: 🔥 remove old TODOs * fix: 🐛 add missing semicolon * feat: add comprehensive EIP-7702 validation at Substrate level - Add chain ID validation for authorization tuples - Add maximum authorization list size validation (255 items) - Add new error types: InvalidAuthorizationChainId, AuthorizationListTooLarge - Map new validation errors to appropriate EVM pallet errors 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: add documentation for EIP-7702 gas costs and improve error handling - Add documentation about EIP-7702 gas costs in runtime estimation - Add error handling for new validation errors in Ethereum pallet - Add user-friendly error messages for EIP-7702 validation failures in RPC 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: 🐛 add missing case in error conversion * fix: correct authorization signature format in TypeScript tests - Fix EIP-7702 authorization signature creation to use proper spec format - Use magic byte 0x05 and RLP encoding as per EIP-7702 specification - Rust tests already used correct format, only TS tests needed fixing 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * test: add comprehensive EIP-7702 validation tests - Add tests for empty authorization list validation - Add tests for authorization list size limits (max 255 items) - Add tests for chain ID validation (must be 0 or match transaction chain ID) - Add tests for valid authorization list scenarios - Add tests for non-EIP-7702 transaction validation skipping - Add missing InvalidAuthorizationChainId error variant and mapping 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * docs: add comprehensive documentation for EIP-7702 validation functions - Add detailed documentation for with_eip7702_authorization_list function - Document validation rules and responsibilities split between Substrate/EVM levels - Add comprehensive error type documentation with security rationale - Include usage examples and parameter descriptions - Clarify the distinction between Substrate and EVM-level validation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * revert: 🔥 remove InvalidAuthorizationChainId validation error * docs: 📝 digest docs * style: 🎨 format * fix: 🐛 account for authentication list items in the proof size base cost * refactor: ♻️ return error for unsupported API version * refactor: ♻️ refactor TransactionRequest to TransactionMessage conversion * style: 🎨 format * refactor: ♻️ reduce code duplication * fix: 🐛 fix delegation code length in test * test: ✅ actually check gas consumption in EIP-7702 * fix: 🐛 treat DelegationResolution just as a second AddressCodeRead * refactor: 🎨 use serde rename_all directive * docs: 📝 improve AuthorizationListTooLarge docs * fix: 🐛 add EIP7702 variant to TxType * feat: ⬆️ upgrade ethers.js * test: 🐛 first revision of the integration tests for EIP-7702 * fix: 🐛 second revision of the integration tests for EIP-7702 * fix: 🐛 upgrade evm * fix: 🐛 fix authorization nonce in test * feat: ✨ add EthereumBlockWrapper * refactor: 🔥 remove CurrentBlock v0 to v2 migrations * refactor: ♻️ clippy * refactor: ♻️ refactor EthereumBlockWrapper decoding * revert: ⏪ restore block migration functions * Revert "refactor: ♻️ refactor EthereumBlockWrapper decoding" This reverts commit c0923c7. * Revert "refactor: ♻️ clippy" This reverts commit 6521a03. * Revert "feat: ✨ add EthereumBlockWrapper" This reverts commit 88b8fbc. * feat: ✨ add block v2 to v3 migration methods * fix: 🐛 fix typo in post_migrate_block_v3 * refactor: ♻️ rename size_limit to create_contract_limit * fix: 🐛 account for empty authorization list cost in template * fix: 🐛 the base cost for the authorization list is already accounted for in the encoding * revert: ⏪ block v2 is still a valid block v3 * fix: 🔒 validate authorizations signatures on extrinsic call * fix: 🐛 add ethereum/std to std feature * fix: 🔒 properly validate authorization list --------- Co-authored-by: Claude <noreply@anthropic.com>
TarekkMA
added a commit
to moonbeam-foundation/frontier
that referenced
this pull request
Aug 8, 2025
This reverts commit 54140ae
TarekkMA
added a commit
to moonbeam-foundation/frontier
that referenced
this pull request
Aug 27, 2025
This reverts commit 54140ae.
gonzamontiel
pushed a commit
to datahaven-xyz/datahaven
that referenced
this pull request
Mar 26, 2026
## Polkadot upgrade 2503 In this PR, we upgrade form Polkadot SDK 2412 to Polkadot SDK 2503. In order to upgrade the SDK we need to upgrade some dependencies : StorageHub and frontier simultaneously. ## What changes ### Trivial changes * paritytech/polkadot-sdk#7634 -> The new trait is required in all the pallets using scale encoding. * paritytech/polkadot-sdk#7043 -> Remove deprecated `sp-std` and replace with `alloc` or `core`. * paritytech/polkadot-sdk#6140 -> Accurate weight reclaim with frame_system::WeightReclaim ### Breaking changes * paritytech/polkadot-sdk#2072 -> There is a change in `pallet-referenda`. Now, the tracks are retrieved as a list of `Track`s. Also, the names of the tracks might have some trailing null values (`\0`). This means display representation of the tracks' names must be sanitized. * paritytech/polkadot-sdk#5723 -> adds the ability for these pallets to specify their source of the block number. This is useful when these pallets are migrated from the relay chain to a parachain and vice versa. (Not entirely sure it is breaking as it is being marked as backward compatible). * paritytech/polkadot-sdk#6338 -> Update Referenda to Support Block Number Provider ### Notable changes * paritytech/polkadot-sdk#5703 -> Not changes required in the codebase but impact fastSync mode. Should improve testing. * paritytech/polkadot-sdk#5842 -> Removes `libp2p` types in authority-discovery, and replace them with network backend agnostic types from `sc-network-types`. The `sc-network` interface is therefore updated accordingly. ## What changes in Frontier * polkadot-evm/frontier#1693 -> Add support for EIP 7702 which has been enable with Pectra. This EIP add a new field `AuthorizationList` in Ethereum transaction. Changes example : ```rust #[test] fn validate_transaction_fails_on_filtered_call() { ... pallet_evm::Call::<Runtime>::call { source: H160::default(), target: H160::default(), input: Vec::new(), value: sp_core::U256::zero(), gas_limit: 21000, max_fee_per_gas: sp_core::U256::zero(), max_priority_fee_per_gas: Some(sp_core::U256::zero()), nonce: None, access_list: Vec::new(), authorization_list: Vec::new(), } .into(), ``` ##⚠️ Breaking Changes⚠️ * Upgrade to Stirage hub v0.5.1 * Support for Ethereum latest upgrade (txs now have the `authoriation_list` for support EIP 7702) --------- Co-authored-by: Steve Degosserie <723552+stiiifff@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.
Description
Adds support for EIP-7702.