ethereumjs-monorepo icon indicating copy to clipboard operation
ethereumjs-monorepo copied to clipboard

EIP-7702 devnet-3 readiness

Open jochem-brouwer opened this issue 1 year ago • 6 comments

Updates the EIP-7702 implementation to this spec: https://github.com/ethereum/EIPs/blob/52de6be37bfb7c134d0a2280f3d5b3d2433dc572/EIPS/eip-7702.md (devnet-3 spec (?))

NOTE for t8ntool to work for state tests, I have disabled throwing on requests.ts if code does not exist, we should carefully review this as a side-effect of this PR. (Will add a blocked label for this one since we should discuss)

jochem-brouwer avatar Aug 12 '24 20:08 jochem-brouwer

Note to self: have to take care of the edge case when a precompile is the delegation address

jochem-brouwer avatar Aug 13 '24 19:08 jochem-brouwer

Failing execution-spec-tests

These tests are likely wrong on the side of execution-spec-tests:

FAILED tests/prague/eip7702_set_code_tx/test_gas.py::test_account_warming[fork_Prague-blockchain_test-single_invalid_nonce_authorization_single_signer] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (callee_address) for key 0x000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_gas.py::test_account_warming[fork_Prague-blockchain_test-multiple_invalid_nonce_authorizations_single_signer] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (callee_address) for key 0x000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_gas.py::test_account_warming[fork_Prague-blockchain_test-multiple_invalid_nonce_authorizations_multiple_signers] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (callee_address) for key 0x000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_gas.py::test_account_warming[fork_Prague-blockchain_test-single_valid_authorization_invalid_contract_authority] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (callee_address) for key 0x000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_gas.py::test_account_warming[fork_Prague-blockchain_test-multiple_authorizations_empty_account_then_contract_authority] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (callee_address) for key 0x000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_gas.py::test_account_warming[fork_Prague-blockchain_test-multiple_authorizations_eoa_then_contract_authority] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (callee_address) for key 0x000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_gas.py::test_account_warming[fork_Prague-blockchain_test-multiple_authorizations_eoa_self_sponsored_then_contract_authority] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (callee_address) for key 0x000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_gas.py::test_account_warming[fork_Prague-blockchain_test_engine-single_invalid_nonce_authorization_single_signer] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (callee_address) for key 0x000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_gas.py::test_account_warming[fork_Prague-blockchain_test_engine-multiple_invalid_nonce_authorizations_single_signer] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (callee_address) for key 0x000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_gas.py::test_account_warming[fork_Prague-blockchain_test_engine-multiple_invalid_nonce_authorizations_multiple_signers] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (callee_address) for key 0x000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_gas.py::test_account_warming[fork_Prague-blockchain_test_engine-single_valid_authorization_invalid_contract_authority] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (callee_address) for key 0x000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_gas.py::test_account_warming[fork_Prague-blockchain_test_engine-multiple_authorizations_empty_account_then_contract_authority] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (callee_address) for key 0x000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_gas.py::test_account_warming[fork_Prague-blockchain_test_engine-multiple_authorizations_eoa_then_contract_authority] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (callee_address) for key 0x000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_gas.py::test_account_warming[fork_Prague-blockchain_test_engine-multiple_authorizations_eoa_self_sponsored_then_contract_authority] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (callee_address) for key 0x000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_gas.py::test_account_warming[fork_Prague-state_test-single_invalid_nonce_authorization_single_signer] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (callee_address) for key 0x000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_gas.py::test_account_warming[fork_Prague-state_test-multiple_invalid_nonce_authorizations_single_signer] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (callee_address) for key 0x000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_gas.py::test_account_warming[fork_Prague-state_test-multiple_invalid_nonce_authorizations_multiple_signers] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (callee_address) for key 0x000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_gas.py::test_account_warming[fork_Prague-state_test-single_valid_authorization_invalid_contract_authority] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (callee_address) for key 0x000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_gas.py::test_account_warming[fork_Prague-state_test-multiple_authorizations_empty_account_then_contract_authority] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (callee_address) for key 0x000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_gas.py::test_account_warming[fork_Prague-state_test-multiple_authorizations_eoa_then_contract_authority] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (callee_address) for key 0x000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_gas.py::test_account_warming[fork_Prague-state_test-multiple_authorizations_eoa_self_sponsored_then_contract_authority] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (callee_address) for key 0x000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_set_code_to_sstore_then_sload[fork_Prague-blockchain_test] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b for key 0x00000000000000000000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_set_code_to_sstore_then_sload[fork_Prague-blockchain_test_engine] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b for key 0x00000000000000000000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_ext_code_on_chain_delegating_set_code[fork_Prague-blockchain_test-balance_0] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (callee_address) for key 0x000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_ext_code_on_chain_delegating_set_code[fork_Prague-blockchain_test-balance_1] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (callee_address) for key 0x000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_ext_code_on_chain_delegating_set_code[fork_Prague-blockchain_test_engine-balance_0] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (callee_address) for key 0x000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_ext_code_on_chain_delegating_set_code[fork_Prague-blockchain_test_engine-balance_1] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (callee_address) for key 0x000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_ext_code_on_chain_delegating_set_code[fork_Prague-state_test-balance_0] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (callee_address) for key 0x000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_ext_code_on_chain_delegating_set_code[fork_Prague-state_test-balance_1] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (callee_address) for key 0x000000000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_set_code_all_invalid_authorization_tuples[fork_Prague-blockchain_test] - ethereum_test_types.types.Alloc.MissingAccount: Account missing from allocation 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b
FAILED tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_set_code_all_invalid_authorization_tuples[fork_Prague-blockchain_test_engine] - ethereum_test_types.types.Alloc.MissingAccount: Account missing from allocation 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b
FAILED tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_set_code_all_invalid_authorization_tuples[fork_Prague-state_test] - ethereum_test_types.types.Alloc.MissingAccount: Account missing from allocation 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b
FAILED tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_set_code_invalid_authorization_tuple[fork_Prague-blockchain_test-invalidity_reason_InvalidityReason.CHAIN_ID-transaction_exception_TransactionException.TYPE_4_EMPTY_AUTHORIZATION_LIST] - Exception: tx expected to fail succeeded: pos=0, nonce=0x0
FAILED tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_set_code_invalid_authorization_tuple[fork_Prague-blockchain_test_engine-invalidity_reason_InvalidityReason.CHAIN_ID-transaction_exception_TransactionException.TYPE_4_EMPTY_AUTHORIZATION_LIST] - Exception: tx expected to fail succeeded: pos=0, nonce=0x0
FAILED tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_set_code_to_system_contract[fork_Prague-call_opcode_CALL-evm_code_type_LEGACY-system_contract_0x00000000219ab540356cbb839cbe05303d7705fa-blockchain_test] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (caller_code_address) for key 0x0000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_set_code_to_system_contract[fork_Prague-call_opcode_CALL-evm_code_type_LEGACY-system_contract_0x00000000219ab540356cbb839cbe05303d7705fa-blockchain_test_engine] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (caller_code_address) for key 0x0000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_set_code_to_system_contract[fork_Prague-call_opcode_CALL-evm_code_type_LEGACY-system_contract_0x00a3ca265ebcb825b45f985a16cefb49958ce017-blockchain_test] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (caller_code_address) for key 0x0000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_set_code_to_system_contract[fork_Prague-call_opcode_CALL-evm_code_type_LEGACY-system_contract_0x00a3ca265ebcb825b45f985a16cefb49958ce017-blockchain_test_engine] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (caller_code_address) for key 0x0000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_set_code_to_system_contract[fork_Prague-call_opcode_CALL-evm_code_type_LEGACY-system_contract_0x00b42dbf2194e931e80326d950320f7d9dbeac02-blockchain_test] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (caller_code_address) for key 0x0000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_set_code_to_system_contract[fork_Prague-call_opcode_CALL-evm_code_type_LEGACY-system_contract_0x00b42dbf2194e931e80326d950320f7d9dbeac02-blockchain_test_engine] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (caller_code_address) for key 0x0000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_set_code_to_system_contract[fork_Prague-call_opcode_CALL-evm_code_type_LEGACY-system_contract_0x0aae40965e6800cd9b1f4b05ff21581047e3f91e-blockchain_test] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (caller_code_address) for key 0x0000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_set_code_to_system_contract[fork_Prague-call_opcode_CALL-evm_code_type_LEGACY-system_contract_0x0aae40965e6800cd9b1f4b05ff21581047e3f91e-blockchain_test_engine] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (caller_code_address) for key 0x0000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_set_code_to_system_contract[fork_Prague-call_opcode_CALL-evm_code_type_LEGACY-system_contract_0x000f3df6d732807ef1319fb7b8bb8522d0beac02-blockchain_test] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (caller_code_address) for key 0x0000000000000000000000000000000...
FAILED tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_set_code_to_system_contract[fork_Prague-call_opcode_CALL-evm_code_type_LEGACY-system_contract_0x000f3df6d732807ef1319fb7b8bb8522d0beac02-blockchain_test_engine] - ethereum_test_base_types.composite_types.Storage.KeyValueMismatch: incorrect value in address 0x0000000000000000000000000000000000001000 (caller_code_address) for key 0x0000000000000000000000000000000...

jochem-brouwer avatar Aug 19 '24 02:08 jochem-brouwer

Ok, have cross-checked all tests! Bugs found are fixed here.

jochem-brouwer avatar Aug 19 '24 04:08 jochem-brouwer

Could you like the tests which are tested here?

holgerd77 avatar Aug 19 '24 12:08 holgerd77

Yes, in order to run the tests, read the instructions here: https://github.com/ethereumjs/ethereumjs-monorepo/pull/3603

jochem-brouwer avatar Aug 19 '24 12:08 jochem-brouwer

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.86%. Comparing base (4470cc3) to head (0d77c3f). Report is 31 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
block ?
blockchain 84.92% <ø> (?)
client ?
common 89.68% <ø> (?)
tx ?
wallet ?

Flags with carried forward coverage won't be shown. Click here to find out more.

codecov[bot] avatar Aug 19 '24 15:08 codecov[bot]

Does devnet-3 have a URL (yet)? If so, can it be added to the PR description? Thanks! 🙂

holgerd77 avatar Sep 02 '24 11:09 holgerd77

I thought there was a devnet-3 spec somewhere, but I can't find it :thinking:

NVM, found it https://notes.ethereum.org/@ethpandaops/pectra-devnet-3. Added to description.

jochem-brouwer avatar Sep 02 '24 12:09 jochem-brouwer