diff --git a/tests/prague/eip7692_eof_v1/eip7069_extcall/__init__.py b/tests/prague/eip7692_eof_v1/eip7069_extcall/__init__.py new file mode 100644 index 0000000000..f4bbcd143f --- /dev/null +++ b/tests/prague/eip7692_eof_v1/eip7069_extcall/__init__.py @@ -0,0 +1,3 @@ +""" +Revamped Call Instructions Tests +""" diff --git a/tests/prague/eip7692_eof_v1/eip7676_address_space_extension/spec.py b/tests/prague/eip7692_eof_v1/eip7069_extcall/spec.py similarity index 100% rename from tests/prague/eip7692_eof_v1/eip7676_address_space_extension/spec.py rename to tests/prague/eip7692_eof_v1/eip7069_extcall/spec.py diff --git a/tests/prague/eip7692_eof_v1/eip7676_address_space_extension/test_ase_opcodes.py b/tests/prague/eip7692_eof_v1/eip7069_extcall/test_address_space_extension.py similarity index 84% rename from tests/prague/eip7692_eof_v1/eip7676_address_space_extension/test_ase_opcodes.py rename to tests/prague/eip7692_eof_v1/eip7069_extcall/test_address_space_extension.py index 3b1df35d76..6278d34905 100644 --- a/tests/prague/eip7692_eof_v1/eip7676_address_space_extension/test_ase_opcodes.py +++ b/tests/prague/eip7692_eof_v1/eip7069_extcall/test_address_space_extension.py @@ -1,5 +1,5 @@ """ -Execution of CALLF, RETF opcodes within EOF V1 containers tests +Tests the "Address Space Extension" aspect of EXT*CALL """ import pytest @@ -19,15 +19,11 @@ from .spec import EOF_FORK_NAME -REFERENCE_SPEC_GIT_PATH = "EIPS/eip-7676.md" -REFERENCE_SPEC_VERSION = ( - "00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" -) +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-7069.md" +REFERENCE_SPEC_VERSION = "1795943aeacc86131d5ab6bb3d65824b3b1d4cad" pytestmark = pytest.mark.valid_from(EOF_FORK_NAME) -# ID_EOF_BALANCE = 0 -# ID_BALANCE = 1 ID_EXTCALL = 2 ID_CALL = 3 ID_EXTDELEGATECALL = 4 @@ -37,8 +33,6 @@ ID_CALLCODE = 8 BASE_ADDRESS = 100000000 -# ADDRESS_EOF_BALANCE = Address(BASE_ADDRESS + ID_EOF_BALANCE) -# ADDRESS_BALANCE = Address(BASE_ADDRESS + ID_BALANCE) ADDRESS_EXTCALL = Address(BASE_ADDRESS + ID_EXTCALL) ADDRESS_CALL = Address(BASE_ADDRESS + ID_CALL) ADDRESS_EXTDELEGATECALL = Address(BASE_ADDRESS + ID_EXTDELEGATECALL) @@ -86,8 +80,6 @@ def test_address_space_extension( Address(0x100): Account( code=( Op.MSTORE(0, Op.PUSH32(address_bytes)) - # + Op.SSTORE(ID_EOF_BALANCE, Op.CALL(50000, ADDRESS_EOF_BALANCE, 0, 0, 32, 0, 0)) - # + Op.SSTORE(ID_BALANCE, Op.CALL(50000, ADDRESS_BALANCE, 0, 0, 32, 0, 0)) + Op.SSTORE(ID_EXTCALL, Op.CALL(50000, ADDRESS_EXTCALL, 0, 0, 32, 0, 0)) + Op.SSTORE(ID_CALL, Op.CALL(50000, ADDRESS_CALL, 0, 0, 32, 0, 0)) + Op.SSTORE( @@ -103,23 +95,6 @@ def test_address_space_extension( ), nonce=1, ), - # ADDRESS_EOF_BALANCE: Account( - # code=Container( - # sections=[ - # Section.Code( - # code=Op.SSTORE(0, Op.BALANCE(Op.CALLDATALOAD(0))) + Op.STOP, - # code_inputs=0, - # code_outputs=NON_RETURNING_SECTION, - # max_stack_height=2, - # ) - # ], - # ), - # nonce=1, - # ), - # ADDRESS_BALANCE: Account( - # code=Op.SSTORE(0, Op.BALANCE(Op.CALLDATALOAD(0))) + Op.STOP, - # nonce=1, - # ), ADDRESS_EXTCALL: Account( code=Container( sections=[ @@ -199,7 +174,6 @@ def test_address_space_extension( post = { Address(0x100): Account( storage={ - # ID_BALANCE: 1, ID_CALL: 1, ID_DELEGATECALL: 1, ID_STATICCALL: 1, @@ -207,8 +181,6 @@ def test_address_space_extension( } if ase_address else { - # ID_EOF_BALANCE: 1, - # ID_BALANCE: 1, ID_EXTCALL: 1, ID_CALL: 1, ID_EXTDELEGATECALL: 1, @@ -225,8 +197,6 @@ def test_address_space_extension( pass case "EOA": pre[Address(stripped_address)] = Account(code="", balance=10**18, nonce=9) - # post[ADDRESS_EOF_BALANCE] = Account(storage={} if ase_address else {0: 10**18}) - # post[ADDRESS_BALANCE] = Account(storage={0: 10**18}) case "Contract": pre[Address(stripped_address)] = Account( code=Op.MSTORE(0, Op.ADDRESS) + Op.RETURN(0, 32), balance=0, nonce=0 diff --git a/tests/prague/eip7692_eof_v1/eip7676_address_space_extension/__init__.py b/tests/prague/eip7692_eof_v1/eip7676_address_space_extension/__init__.py deleted file mode 100644 index 094865f879..0000000000 --- a/tests/prague/eip7692_eof_v1/eip7676_address_space_extension/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -""" -Address Space Extension Tests -"""