-
Notifications
You must be signed in to change notification settings - Fork 1.1k
pallet-revive: EIP-7702 Set EOA Account Code (continued) #10936
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
Draft
pgherveou
wants to merge
46
commits into
master
Choose a base branch
from
pg/eip-7702
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
…rinsic - Add EIP-7702 authorization list processing to dry_run_eth_transact - Split eth_call into eth_call (9 args) and eth_call_with_authorization_list (10 args) - Update call.rs to dispatch to correct extrinsic based on authorization list - Add eth_call_with_authorization_list to SetWeightLimit implementation - Add builder function for eth_call_with_authorization_list in tests - Refactor eip7702.rs to use WeightMeter for progressive weight charging
…n API - Remove UnsignedAuthorizationListEntry struct, flatten fields into AuthorizationListEntry - Add rlp_encode_unsigned() method to AuthorizationListEntry for signing - Update sign_authorization() to take (signing_key, chain_id, address, nonce) parameters - Update all usages in benchmarks and tests
…ount in benchmark
Move the account existence check from process_authorizations into validate_authorization so its weight is included in the validation benchmark. The function now returns Option<(H160, bool)> where the bool indicates if the account is new.
Remove extraneous formatting changes that were not part of the EIP-7702 implementation: - Revert operator position changes (trailing to leading) - Revert added braces around single-expression match arms - Revert semicolon additions on return statements - Revert | operator position changes
- Use SignedGas::from_weight_fee().to_ethereum_gas() for proper weight-to-gas conversion that accounts for both ref_time and proof_size - Simplify nonce validation in eip7702.rs using try_into() instead of separate bounds check - Compare nonces as u64 directly instead of converting back and forth with U256
b1522d8 to
21967d3
Compare
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.
Summary
This PR continues the work from #10851 implementing EIP-7702 (Set EOA Account Code) for pallet-revive.
Changes in this PR
dry_run_eth_transacteth_callinto two extrinsics:eth_call(9 arguments, call_index 11) - for regular callseth_call_with_authorization_list(10 arguments, call_index 14) - for EIP-7702 transactionseip7702.rsto useWeightMeterfor progressive weight chargingcall.rsto route to correct extrinsic based on authorization list presenceeth_call_with_authorization_list