Skip to content
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

Update EIP-7702: add a few clarifications #8795

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

lightclient
Copy link
Member

Making some clarifications based on some discussions on discord. h/t @jochem-brouwer @rakita

@github-actions github-actions bot added c-update Modifies an existing proposal s-review This EIP is in Review t-core labels Aug 12, 2024
@eth-bot
Copy link
Collaborator

eth-bot commented Aug 12, 2024

✅ All reviewers have approved.

@eth-bot eth-bot changed the title 7702: add a few clarifications Update EIP-7702: add a few clarifications Aug 12, 2024
@eth-bot eth-bot enabled auto-merge (squash) August 12, 2024 21:44
Copy link
Collaborator

@eth-bot eth-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All Reviewers Have Approved; Performing Automatic Merge...

@eth-bot eth-bot merged commit 13d2e92 into ethereum:master Aug 12, 2024
15 of 16 checks passed

1. `authority = ecrecover(keccak(MAGIC || rlp([chain_id, address, nonce])), y_parity, r, s]`
2. Verify the chain id is either 0 or the chain's current ID.
3. Add `authority` to `accessed_addresses` (as defined in [EIP-2929](./eip-2929.md).)
4. Verify the code of `authority` is either empty or already delegated.
5. Verify the nonce of `authority` is equal to `nonce`.
6. Refund the sender `PER_EMPTY_ACCOUNT_COST - PER_AUTH_BASE_COST` gas if `authority` exists in the trie.
6. Add `PER_EMPTY_ACCOUNT_COST - PER_AUTH_BASE_COST` gas to the global refund counter if `authority` exists in the trie.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great clarification! This is not how I have coded it right now (I thought the refund should be applied before the execution)

marioevz added a commit to ethereum/execution-spec-tests that referenced this pull request Aug 13, 2024
marioevz added a commit to ethereum/execution-spec-tests that referenced this pull request Aug 13, 2024
marioevz added a commit to ethereum/execution-spec-tests that referenced this pull request Aug 14, 2024
marioevz added a commit to ethereum/execution-spec-tests that referenced this pull request Aug 19, 2024
marioevz added a commit to ethereum/execution-spec-tests that referenced this pull request Aug 22, 2024
marioevz added a commit to ethereum/execution-spec-tests that referenced this pull request Aug 26, 2024
marioevz added a commit to ethereum/execution-spec-tests that referenced this pull request Aug 27, 2024
marioevz added a commit to ethereum/execution-spec-tests that referenced this pull request Aug 27, 2024
marioevz added a commit to ethereum/execution-spec-tests that referenced this pull request Aug 30, 2024
marioevz added a commit to ethereum/execution-spec-tests that referenced this pull request Sep 4, 2024
marioevz added a commit to ethereum/execution-spec-tests that referenced this pull request Sep 5, 2024
* feat(base_types): Add `keccak256` to `Bytes`

* fix(fw): EIP-7702 types update

* fix(types): nonce list logic removal

* feat(types): Calculate signer if v,r,s parameters are in the Auth Tuple

* feat(types/filler): Allow delegation on `pre.fund_eoa`

* feat(types): Add `Literal["Self"]` as option to delegation in `pre.fund_eoa`

* fix(plugins/filler): fix delegation check

* fix(plugins/filler): delegation designation in case of `None`

* feat(evm_transition_tool): `SetCodeDelegation` to transaction receipt

* new(tests): EIP-7702 spec update

* new(tests): EIP-7702 add all invalid auth tuples test

* new(tests): EIP-7702 add multiple valid, self-sponsored test

* fix(tests): EIP-7702 enable skipped tests

* refactor(tests): EIP-7702 rename folder and files

* new(tests): EIP-7702, some failing tests

* fix(tests): EIP-7702 gas test

* fix(tests): EIP-7702 move gas tests

* new(tests): EIP-7702 intrinsic gas tests

* fix(fixtures): tests

* fix(tests): import

* simplify parametrization

* refactor(tests): EIP-7702 gas tests

* new(tests): EIP-7702 more gas tests

* new(tests): EIP-7702 parametrize and add new tests

* fix(tests): EIP-7702 add check

* feat(exceptions): Add two type-4 tx exceptions

* new(tests): EIP-7702 tests

* fix(tests): Update tests according to spec changes

ethereum/EIPs#8795

* fix(tests): EIP-7702, use `named_parametrize`

* fix(tests): EIP-7702 test not following spec

* fix(tests): EIP-7702 test authorization list nonce/gas

* fix(tests): EIP-7702 fix test_ext_code_on_chain_delegating_set_code

* fix(tests): EIP-7702 fix test_set_code_all_invalid_authorization_tuples

* fix(tests): EIP-7702 fix test_set_code_invalid_authorization_tuple

* fix(tests): EIP-7702 system-contract tests

* fix(tests): EIP-7702 tox

* refactor(tests): EIP-7702 `parametrize_with_defaults` rename

* fix(tests): EIP-7702 test_ext_code_on_set_code

* fix(tests): EIP-7702 test_ext_code_on_set_code

* fix(tests): EIP-7702 test_set_code_to_sstore

* fix(tests): EIP-7702, add delegation designation to all expected outputs

* fix(tests): EIP-7702, add delegation designation

* new(tests): EIP-7702, add eoa tx after set code tests

* refactor(tests): EIP-7702 update for parametrize_with_defaults -> extend_with_defaults (#758)

* fix(tests): Marker

* fix(tests): EIP-7702: pre-existing delegation gas tests

* fix(tests): EIP-7702: fix warm costs expectations

* fix(tests): EIP-7702 re-authorization tests

* fix(tests): EIP-7702 warm account logic revamp

* fix(tests): EIP-7702 test fixes

* feat(tests): EIP-7702 add self-delegation warm cost test

* fix(test): EIP-7702, test_call_into_self_delegating_set_code

* fix(tests): EIP-7702 use kwargs on `with_all` markers

* docs: Changelog

* fix(tests): EIP-7702 return code expectations

* fix(tests): EIP-7702 invalid tx on invalid signatures

* Apply suggestions from code review

Co-authored-by: danceratopz <[email protected]>

---------

Co-authored-by: danceratopz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-update Modifies an existing proposal s-review This EIP is in Review t-core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants