diff --git a/tests/ported_static/stArgsZeroOneBalance/test_addmod_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_addmod_non_const.py index fae816dfd1e..a2971bc6532 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_addmod_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_addmod_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -84,20 +81,8 @@ def test_addmod_non_const( address=Address(0x92D2FC80312ACD8C37857696D2224AF18CE6F966), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 0})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_and_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_and_non_const.py index 8eb6f763863..6e097312024 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_and_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_and_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -83,20 +80,12 @@ def test_and_non_const( address=Address(0x4C26357E0D164B702BCEB18690FC742EE1D36913), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1})}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={0: 0})}, + {target: Account(storage={0: 1})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 0, 1): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_balance_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_balance_non_const.py index ae940bbaa03..0f2d8b45e74 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_balance_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_balance_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -84,20 +81,8 @@ def test_balance_non_const( address=Address(0xEE6A324B2ECE5EACDF881ABFDCC62B5361D0FB50), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 0})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_byte_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_byte_non_const.py index 544001d697d..7915dc800f6 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_byte_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_byte_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -83,20 +80,8 @@ def test_byte_non_const( address=Address(0x86D606901085BA78C64D2E0B16831E6AFD89DE2D), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 0})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_call_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_call_non_const.py index a8e915e499a..d075fa707ac 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_call_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_call_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -102,20 +99,12 @@ def test_call_non_const( address=Address(0x7D7E1645AF7DF916DA558F0695E9DEDD23B1215E), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={0: 1})}, + {target: Account(storage={0: 0})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 0, 1): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_callcode_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_callcode_non_const.py index e24b3d5f963..4604f81d00f 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_callcode_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_callcode_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -102,20 +99,12 @@ def test_callcode_non_const( address=Address(0x443A994E18105C3EA686D3931729A1AC3D8FDD93), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={0: 1})}, + {target: Account(storage={0: 0})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 0, 1): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_calldatacopy_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_calldatacopy_non_const.py index 9a0b8f9f9c2..e24e5b1a57e 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_calldatacopy_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_calldatacopy_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -99,20 +96,8 @@ def test_calldatacopy_non_const( address=Address(0x444C2681920E1105C9104FB32249DDBB41CBA4A0), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 0})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_calldataload_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_calldataload_non_const.py index dc0f8b82b2e..cb54dc82a29 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_calldataload_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_calldataload_non_const.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -100,42 +97,27 @@ def test_calldataload_non_const( address=Address(0x148F97630D3668441F1A33A5E509F268B64F998F), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": 1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 0x1122334400000000000000000000000000000000000000000000000000000000, # noqa: E501 - }, - ), - }, - }, - { - "indexes": {"data": 0, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 0x2233440000000000000000000000000000000000000000000000000000000000, # noqa: E501 - }, - ), - }, + target: Account( + storage={ + 0: 0x1122334400000000000000000000000000000000000000000000000000000000, # noqa: E501 + }, + ), }, + {target: Account(storage={0: 0})}, { - "indexes": {"data": 0, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, + target: Account( + storage={ + 0: 0x2233440000000000000000000000000000000000000000000000000000000000, # noqa: E501 + }, + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 1, (0, 0, 1): 1, (1, 0, 0): 0, (1, 0, 1): 2}[d, g, v] + ] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_codecopy_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_codecopy_non_const.py index c097c5f467e..36db2eaa4cd 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_codecopy_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_codecopy_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -87,20 +84,8 @@ def test_codecopy_non_const( address=Address(0xEDD4D7CDACB700CA3E28F8DDBCFB6AAC31F64925), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 0})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_create_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_create_non_const.py index 5106ec78a51..3d54a3556ea 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_create_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_create_non_const.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -92,32 +89,14 @@ def test_create_non_const( address=Address(0x095E7BAEA6A6C7C4C2DFEB977EFAC326AF552D87), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={ - 0: compute_create_address(address=contract_0, nonce=0), - }, - ), - }, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={ - 0: compute_create_address(address=contract_0, nonce=0), - }, - ), + post = { + contract_0: Account( + storage={ + 0: compute_create_address(address=contract_0, nonce=0), }, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + ), + } + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_delegatecall_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_delegatecall_non_const.py index 2fc22d2747d..41e72d19e87 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_delegatecall_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_delegatecall_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -99,20 +96,12 @@ def test_delegatecall_non_const( address=Address(0x365AAE42316E918DA716D904FE31EEA4134112C4), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={0: 1})}, + {target: Account(storage={0: 0})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 0, 1): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_div_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_div_non_const.py index 754da2814ab..63c7954d0aa 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_div_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_div_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -83,20 +80,12 @@ def test_div_non_const( address=Address(0x61FD7E3E20CEEA9426C3021F589E9EB7754D486F), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1})}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={0: 0})}, + {target: Account(storage={0: 1})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 0, 1): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_eq_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_eq_non_const.py index 09c30fc9052..e5afbbdc16e 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_eq_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_eq_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -83,20 +80,8 @@ def test_eq_non_const( address=Address(0x197F978175CEA58C57CFAB837CF028D4C8D12EF3), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 1})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_exp_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_exp_non_const.py index 72f6aace5a0..e7acff881ce 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_exp_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_exp_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -83,20 +80,8 @@ def test_exp_non_const( address=Address(0xCFCD07426079DA1457676DE53F8DBE738C832D7F), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 1})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_extcodecopy_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_extcodecopy_non_const.py index 1b0cd7e9c8c..6fdbe890891 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_extcodecopy_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_extcodecopy_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -90,20 +87,8 @@ def test_extcodecopy_non_const( address=Address(0xF7A7FBF01DBCFEFDFD9AE65E4892C576994F31BF), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 0})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_extcodesize_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_extcodesize_non_const.py index e67e53ea57c..5d789d505a0 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_extcodesize_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_extcodesize_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -84,20 +81,8 @@ def test_extcodesize_non_const( address=Address(0x4CD5F424AC9E070C2A651452C5666CF8A05F27A7), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 0})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_gt_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_gt_non_const.py index d8db68a6f82..94f395c0db1 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_gt_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_gt_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -83,20 +80,8 @@ def test_gt_non_const( address=Address(0xF5176EDE711CCF689D689BFCEBDAE4C04910517E), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 0})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_iszero_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_iszero_non_const.py index dc4585cd190..621cbc80ef3 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_iszero_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_iszero_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -82,20 +79,12 @@ def test_iszero_non_const( address=Address(0x2623813A00DFDC5BC378481671D8D9E38AD9956C), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={0: 1})}, + {target: Account(storage={0: 0})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 0, 1): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_jump_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_jump_non_const.py index a7a6d0ed8b7..9a0ec90990f 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_jump_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_jump_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -79,20 +76,8 @@ def test_jump_non_const( address=Address(0xA82AE24D0D34B26FCB664DACD3E18371C9315E79), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={1: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={1: 0})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={1: 0})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_jumpi_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_jumpi_non_const.py index 8ad626d763f..a80f6dc1fcc 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_jumpi_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_jumpi_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -82,20 +79,8 @@ def test_jumpi_non_const( address=Address(0xEEF87925C20B97E4EE58E24DD39D7C09785362BA), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={1: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={1: 0})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={1: 0})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_log0_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_log0_non_const.py index 365c39eaccf..4a9168f9f16 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_log0_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_log0_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -84,20 +81,8 @@ def test_log0_non_const( address=Address(0x39332A3856E9E6DBAEBCDBD67B72B3E7209FFCB2), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 0})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_log1_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_log1_non_const.py index 83826d6f6b3..12817e39b23 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_log1_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_log1_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -87,20 +84,8 @@ def test_log1_non_const( address=Address(0x99914055ED765EA48582ACC6C8196D07835DA7D7), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 0})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_log2_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_log2_non_const.py index 418cb6e8be0..b1a035283ed 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_log2_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_log2_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -88,20 +85,8 @@ def test_log2_non_const( address=Address(0x007631BF0FC6669FE93C41401498B2612BBF41CF), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 0})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_log3_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_log3_non_const.py index 4a34ed3a76c..66b4b45013b 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_log3_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_log3_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -91,20 +88,8 @@ def test_log3_non_const( address=Address(0x02724F6CB897BBC3E063A03633D2CE4E83DA8678), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 0})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_lt_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_lt_non_const.py index 34354330ff4..a68b508e4f8 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_lt_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_lt_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -83,20 +80,8 @@ def test_lt_non_const( address=Address(0x2538BC735B54983A8F85ED92072DC2D0F07A2797), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 0})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_mload_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_mload_non_const.py index 244fefd710b..aa689cbd7d8 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_mload_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_mload_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -84,20 +81,8 @@ def test_mload_non_const( address=Address(0x14DD543A6D90CE85F819B764F0F38AFC1DF76C48), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 0})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_mod_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_mod_non_const.py index bda76416253..eb3d555c803 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_mod_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_mod_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -83,20 +80,8 @@ def test_mod_non_const( address=Address(0x1FD117CCD0620EDE7967DAF31CDD8926B5B4EF5C), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 0})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_mstore8_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_mstore8_non_const.py index 0447a50df4c..63f35d7676b 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_mstore8_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_mstore8_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -84,20 +81,8 @@ def test_mstore8_non_const( address=Address(0xF9BB7A1F4D45DD4F87D9C94A491CE7606BA41276), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 0})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_mstore_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_mstore_non_const.py index 8b021a9b2cd..160f38bc6bb 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_mstore_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_mstore_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -84,20 +81,8 @@ def test_mstore_non_const( address=Address(0x2737DAE115785244CFD2540FD942DC496B37CB71), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 0})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_mul_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_mul_non_const.py index 76886038831..f807c72d98c 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_mul_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_mul_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -83,20 +80,12 @@ def test_mul_non_const( address=Address(0xB64C7A374E0080660379EBD421077AB5866CC9EF), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1})}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={0: 0})}, + {target: Account(storage={0: 1})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 0, 1): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_mulmod_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_mulmod_non_const.py index cd61591b4c6..b63d0855cfd 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_mulmod_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_mulmod_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -84,20 +81,8 @@ def test_mulmod_non_const( address=Address(0x9793633B7AD5CA376BA862E9D9B098A0EF8E71D8), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 0})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_not_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_not_non_const.py index 5ff4ec0e605..f3bee12844f 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_not_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_not_non_const.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -86,32 +83,24 @@ def test_not_non_const( address=Address(0xCB87599782F7101D77A9B56283A67CD13FA0D97E), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 - }, - ), - }, + target: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 + }, + ), }, { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE, # noqa: E501 - }, - ), - }, + target: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE, # noqa: E501 + }, + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 0, 1): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_or_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_or_non_const.py index 343f19c2fec..37529f1f002 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_or_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_or_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -83,20 +80,12 @@ def test_or_non_const( address=Address(0x60DA449405B736A6920D45831CD6B173520FDF34), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1})}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={0: 0})}, + {target: Account(storage={0: 1})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 0, 1): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_return_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_return_non_const.py index 4e790b391e0..373c2d26ae6 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_return_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_return_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -84,20 +81,8 @@ def test_return_non_const( address=Address(0xC40D7523B9B65560BE87507FD6FF17AB29DFCFF0), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 0})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_sdiv_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_sdiv_non_const.py index fe11f8c49a8..1782611ab59 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_sdiv_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_sdiv_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -83,20 +80,12 @@ def test_sdiv_non_const( address=Address(0xA652FE2C234233D6EB3D62B283D56F67C76635BD), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1})}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={0: 0})}, + {target: Account(storage={0: 1})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 0, 1): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_sgt_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_sgt_non_const.py index 8e955bebd63..fa3a4e0c6a0 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_sgt_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_sgt_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -83,20 +80,8 @@ def test_sgt_non_const( address=Address(0x696E25C48BC937162438ECD7B3CCD13B4EA2B98B), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 0})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_sha3_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_sha3_non_const.py index 6efbe2105b6..30e01e7ce96 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_sha3_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_sha3_non_const.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -91,32 +88,24 @@ def test_sha3_non_const( address=Address(0x8F7ECEEA4B37C6F7FAF5D64D64FBFFBCD14B79A4), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - }, - ), - }, + target: Account( + storage={ + 0: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 + }, + ), }, { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 0xBC36789E7A1E281436464229828F817D6612F7B477D66591FF96A9E064BCC98A, # noqa: E501 - }, - ), - }, + target: Account( + storage={ + 0: 0xBC36789E7A1E281436464229828F817D6612F7B477D66591FF96A9E064BCC98A, # noqa: E501 + }, + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 0, 1): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_signext_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_signext_non_const.py index ca26efca5c8..e44d7f6afbe 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_signext_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_signext_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -83,20 +80,12 @@ def test_signext_non_const( address=Address(0x36325C04EB27ABE09CFFAF61AC7823254B193AC8), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1})}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={0: 0})}, + {target: Account(storage={0: 1})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 0, 1): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_sload_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_sload_non_const.py index 253acce3f33..7355a22d55d 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_sload_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_sload_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -84,20 +81,8 @@ def test_sload_non_const( address=Address(0x14F6D924BBF6563DD087359472133FFE566E60B1), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={3: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={3: 0})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={3: 0})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_slt_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_slt_non_const.py index 4785add59ca..d3b903d5400 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_slt_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_slt_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -83,20 +80,8 @@ def test_slt_non_const( address=Address(0x31D72308BB942D557F1F7AD5987321FB3D75C896), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 0})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_smod_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_smod_non_const.py index 1408d1dbfb2..2a942342faa 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_smod_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_smod_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -83,20 +80,8 @@ def test_smod_non_const( address=Address(0xB5ACE6E2AD4512822412E4E09FA278096CE8C63D), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 0})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_sstore_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_sstore_non_const.py index 8f1e6ba7914..2b203e4fe44 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_sstore_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_sstore_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -82,20 +79,12 @@ def test_sstore_non_const( address=Address(0x82D3D8BE7168E697ED33F2A50810FA614393171E), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={1: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={1: 1})}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={1: 0})}, + {target: Account(storage={1: 1})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 0, 1): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_sub_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_sub_non_const.py index 311cc71bfa2..717bcee3e07 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_sub_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_sub_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -83,20 +80,8 @@ def test_sub_non_const( address=Address(0xF9A85AC17DF3D37B898990AED6481E88D77DFA36), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 0})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stArgsZeroOneBalance/test_xor_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_xor_non_const.py index 1ca082aca84..15960f108ce 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_xor_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_xor_non_const.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -83,20 +80,8 @@ def test_xor_non_const( address=Address(0x49A48E464281CDA5C9CA67F9A29A7CBD7CF86590), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 0})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stBadOpcode/test_measure_gas.py b/tests/ported_static/stBadOpcode/test_measure_gas.py index f100b2b1ea8..3c48fd68d57 100644 --- a/tests/ported_static/stBadOpcode/test_measure_gas.py +++ b/tests/ported_static/stBadOpcode/test_measure_gas.py @@ -27,9 +27,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -392,52 +389,32 @@ def test_measure_gas( - 103 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_12: Account(storage={0: 32089})}, - }, - { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_12: Account(storage={0: 32193})}, - }, - { - "indexes": {"data": [2, 3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_12: Account(storage={0: 144})}, - }, - { - "indexes": {"data": [4, 5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_12: Account(storage={0: 141})}, - }, - { - "indexes": {"data": [6], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_12: Account(storage={0: 8110})}, - }, - { - "indexes": {"data": [8, 7], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_12: Account(storage={0: 8113})}, - }, - { - "indexes": {"data": [10], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_12: Account(storage={0: 221 + warm_extcode_delta}) - }, - }, + expect_posts: list[dict] = [ + {contract_12: Account(storage={0: 32089})}, + {contract_12: Account(storage={0: 32193})}, + {contract_12: Account(storage={0: 144})}, + {contract_12: Account(storage={0: 141})}, + {contract_12: Account(storage={0: 8110})}, + {contract_12: Account(storage={0: 8113})}, + {contract_12: Account(storage={0: 221 + warm_extcode_delta})}, + {contract_12: Account(storage={0: 18348})}, + ] + post = expect_posts[ { - "indexes": {"data": [9], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_12: Account(storage={0: 18348})}, - }, + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 2, + (3, 0, 0): 2, + (4, 0, 0): 3, + (5, 0, 0): 3, + (6, 0, 0): 4, + (7, 0, 0): 5, + (8, 0, 0): 5, + (9, 0, 0): 7, + (10, 0, 0): 6, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(0xF0), diff --git a/tests/ported_static/stBadOpcode/test_operation_diff_gas.py b/tests/ported_static/stBadOpcode/test_operation_diff_gas.py index be3bf8c0559..d29b4cd79f9 100644 --- a/tests/ported_static/stBadOpcode/test_operation_diff_gas.py +++ b/tests/ported_static/stBadOpcode/test_operation_diff_gas.py @@ -28,9 +28,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -389,44 +386,30 @@ def test_operation_diff_gas( - 103 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_12: Account(storage={0: 54200})}, - }, - { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_12: Account(storage={0: 54300})}, - }, - { - "indexes": {"data": [2, 3, 4, 5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_12: Account(storage={0: 2700 + cold_account_delta}) - }, - }, - { - "indexes": {"data": [8, 6, 7], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_12: Account(storage={0: 9200})}, - }, - { - "indexes": {"data": [10], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_12: Account(storage={0: 2800 + extcode_probe_delta}) - }, - }, + expect_posts: list[dict] = [ + {contract_12: Account(storage={0: 54200})}, + {contract_12: Account(storage={0: 54300})}, + {contract_12: Account(storage={0: 2700 + cold_account_delta})}, + {contract_12: Account(storage={0: 9200})}, + {contract_12: Account(storage={0: 2800 + extcode_probe_delta})}, + {contract_12: Account(storage={0: 18400})}, + ] + post = expect_posts[ { - "indexes": {"data": [9], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_12: Account(storage={0: 18400})}, - }, + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 2, + (3, 0, 0): 2, + (4, 0, 0): 2, + (5, 0, 0): 2, + (6, 0, 0): 3, + (7, 0, 0): 3, + (8, 0, 0): 3, + (9, 0, 0): 5, + (10, 0, 0): 4, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("048071d3") + Hash(0xF0) + Hash(0x0) + Hash(0x64), diff --git a/tests/ported_static/stCallCodes/test_callcode_dynamic_code.py b/tests/ported_static/stCallCodes/test_callcode_dynamic_code.py index 516596f0896..e72cffa3d64 100644 --- a/tests/ported_static/stCallCodes/test_callcode_dynamic_code.py +++ b/tests/ported_static/stCallCodes/test_callcode_dynamic_code.py @@ -28,9 +28,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -284,90 +281,66 @@ def test_callcode_dynamic_code( address=Address(0x4000000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_1: Account( - storage={ - 0: 1, - 10: compute_create_address( - address=contract_1, nonce=0 - ), - 11: 1, - 20: contract_1, - 21: sender, - 22: contract_1, - }, - ), - }, + contract_1: Account( + storage={ + 0: 1, + 10: compute_create_address(address=contract_1, nonce=0), + 11: 1, + 20: contract_1, + 21: sender, + 22: contract_1, + }, + ), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_2: Account( - storage={ - 0: 1, - 10: 0x2D39FAD743351D4CF3F4717907D3DDA5E0A689A7, - 11: 1, - 20: contract_2, - 21: sender, - 22: contract_2, - }, - ), - }, + contract_2: Account( + storage={ + 0: 1, + 10: 0x2D39FAD743351D4CF3F4717907D3DDA5E0A689A7, + 11: 1, + 20: contract_2, + 21: sender, + 22: contract_2, + }, + ), }, { - "indexes": {"data": 2, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address(address=contract_3, nonce=0): Account( - storage={ - 0: 1, - 10: 0xBF1676BE6038AB86D66E00824C2E3577858040F6, - 11: 1, - 20: compute_create_address( - address=contract_3, nonce=0 - ), - 21: sender, - 22: compute_create_address( - address=contract_3, nonce=0 - ), - }, - code=b"", - balance=0, - nonce=2, - ), - }, + compute_create_address(address=contract_3, nonce=0): Account( + storage={ + 0: 1, + 10: 0xBF1676BE6038AB86D66E00824C2E3577858040F6, + 11: 1, + 20: compute_create_address(address=contract_3, nonce=0), + 21: sender, + 22: compute_create_address(address=contract_3, nonce=0), + }, + code=b"", + balance=0, + nonce=2, + ), }, { - "indexes": {"data": 3, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address(address=contract_4, nonce=0): Account( - storage={ - 0: 1, - 10: 0xF2D6BF688FAE45DA62AB2DD4F36945BC924CC61, - 11: 1, - 20: compute_create_address( - address=contract_4, nonce=0 - ), - 21: sender, - 22: compute_create_address( - address=contract_4, nonce=0 - ), - }, - code=b"", - balance=0, - nonce=2, - ), - }, + compute_create_address(address=contract_4, nonce=0): Account( + storage={ + 0: 1, + 10: 0xF2D6BF688FAE45DA62AB2DD4F36945BC924CC61, + 11: 1, + 20: compute_create_address(address=contract_4, nonce=0), + 21: sender, + 22: compute_create_address(address=contract_4, nonce=0), + }, + code=b"", + balance=0, + nonce=2, + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 0, (1, 0, 0): 1, (2, 0, 0): 2, (3, 0, 0): 3}[d, g, v] + ] + _exc = None tx_data = [ Hash(contract_1, left_padding=True), diff --git a/tests/ported_static/stCallCodes/test_callcode_dynamic_code2_self_call.py b/tests/ported_static/stCallCodes/test_callcode_dynamic_code2_self_call.py index 0f5363e7c6f..f56f1fb35a5 100644 --- a/tests/ported_static/stCallCodes/test_callcode_dynamic_code2_self_call.py +++ b/tests/ported_static/stCallCodes/test_callcode_dynamic_code2_self_call.py @@ -28,9 +28,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -177,41 +174,31 @@ def test_callcode_dynamic_code2_self_call( address=Address(0x1000000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address(address=contract_1, nonce=0): Account( - storage={11: 1, 12: contract_1}, balance=1 - ), - }, + compute_create_address(address=contract_1, nonce=0): Account( + storage={11: 1, 12: contract_1}, balance=1 + ), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_2: Account( - storage={ - 0: 1, - 10: compute_create_address( - address=contract_2, nonce=0 - ), - 11: 1, - 20: contract_2, - 21: sender, - 22: contract_2, - }, - nonce=1, - ), - compute_create_address(address=contract_2, nonce=0): Account( - storage={122: 1}, nonce=1 - ), - }, + contract_2: Account( + storage={ + 0: 1, + 10: compute_create_address(address=contract_2, nonce=0), + 11: 1, + 20: contract_2, + 21: sender, + 22: contract_2, + }, + nonce=1, + ), + compute_create_address(address=contract_2, nonce=0): Account( + storage={122: 1}, nonce=1 + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(contract_1, left_padding=True), diff --git a/tests/ported_static/stCallCodes/test_callcode_in_initcode_to_empty_contract.py b/tests/ported_static/stCallCodes/test_callcode_in_initcode_to_empty_contract.py index 045972d37f5..26cda674702 100644 --- a/tests/ported_static/stCallCodes/test_callcode_in_initcode_to_empty_contract.py +++ b/tests/ported_static/stCallCodes/test_callcode_in_initcode_to_empty_contract.py @@ -22,9 +22,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -159,28 +156,20 @@ def test_callcode_in_initcode_to_empty_contract( address=Address(0x2000000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address(address=contract_1, nonce=0): Account( - storage={2: 1} - ), - }, + compute_create_address(address=contract_1, nonce=0): Account( + storage={2: 1} + ), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0x9F9F2F99F78BFEDCD1F32D936203BD1C0CB00853): Account( - storage={2: 1} - ), - }, + Address(0x9F9F2F99F78BFEDCD1F32D936203BD1C0CB00853): Account( + storage={2: 1} + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(contract_1, left_padding=True), diff --git a/tests/ported_static/stCallCodes/test_callcode_in_initcode_to_exis_contract_with_v_transfer_ne_money.py b/tests/ported_static/stCallCodes/test_callcode_in_initcode_to_exis_contract_with_v_transfer_ne_money.py index 12715a68d24..477982eb2f1 100644 --- a/tests/ported_static/stCallCodes/test_callcode_in_initcode_to_exis_contract_with_v_transfer_ne_money.py +++ b/tests/ported_static/stCallCodes/test_callcode_in_initcode_to_exis_contract_with_v_transfer_ne_money.py @@ -18,9 +18,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -156,28 +153,20 @@ def test_callcode_in_initcode_to_exis_contract_with_v_transfer_ne_money( address=Address(0x1000000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address(address=contract_1, nonce=0): Account( - storage={1: 0, 2: 0}, balance=0, nonce=1 - ), - }, + compute_create_address(address=contract_1, nonce=0): Account( + storage={1: 0, 2: 0}, balance=0, nonce=1 + ), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0xB0DE090B1E01BD09AC6B1D9224229302ED48FD47): Account( - storage={1: 0, 2: 0}, balance=0, nonce=1 - ), - }, + Address(0xB0DE090B1E01BD09AC6B1D9224229302ED48FD47): Account( + storage={1: 0, 2: 0}, balance=0, nonce=1 + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(contract_1, left_padding=True), diff --git a/tests/ported_static/stCallCodes/test_callcode_in_initcode_to_existing_contract.py b/tests/ported_static/stCallCodes/test_callcode_in_initcode_to_existing_contract.py index 68451f0f3ad..e785c2db708 100644 --- a/tests/ported_static/stCallCodes/test_callcode_in_initcode_to_existing_contract.py +++ b/tests/ported_static/stCallCodes/test_callcode_in_initcode_to_existing_contract.py @@ -18,9 +18,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -158,28 +155,20 @@ def test_callcode_in_initcode_to_existing_contract( address=Address(0x1000000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address(address=contract_1, nonce=0): Account( - storage={1: 1, 2: 1}, balance=1 - ), - }, + compute_create_address(address=contract_1, nonce=0): Account( + storage={1: 1, 2: 1}, balance=1 + ), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0x11B62573BE8F72B4085BAFE5B675B3E7F08ED522): Account( - storage={1: 1, 2: 1}, balance=1 - ), - }, + Address(0x11B62573BE8F72B4085BAFE5B675B3E7F08ED522): Account( + storage={1: 1, 2: 1}, balance=1 + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(contract_1, left_padding=True), diff --git a/tests/ported_static/stCallCreateCallCodeTest/test_call1024_oog.py b/tests/ported_static/stCallCreateCallCodeTest/test_call1024_oog.py index 127b02327fd..85d2673f051 100644 --- a/tests/ported_static/stCallCreateCallCodeTest/test_call1024_oog.py +++ b/tests/ported_static/stCallCreateCallCodeTest/test_call1024_oog.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -109,30 +106,16 @@ def test_call1024_oog( address=Address(0x0878BC1C3D660907B056E31C854A309F7EF1B4C4), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 134, 1: 1, 2: 0x20B71})}, - }, - { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 113, 1: 1, 2: 0x1B969})}, - }, - { - "indexes": {"data": -1, "gas": 2, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 146, 1: 1, 2: 0x23A51})}, - }, - { - "indexes": {"data": -1, "gas": 3, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 124, 1: 1, 2: 0x1E461})}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={0: 134, 1: 1, 2: 0x20B71})}, + {target: Account(storage={0: 113, 1: 1, 2: 0x1B969})}, + {target: Account(storage={0: 146, 1: 1, 2: 0x23A51})}, + {target: Account(storage={0: 124, 1: 1, 2: 0x1E461})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 0, (0, 1, 0): 1, (0, 2, 0): 2, (0, 3, 0): 3}[d, g, v] + ] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stCallCreateCallCodeTest/test_call1024_pre_calls.py b/tests/ported_static/stCallCreateCallCodeTest/test_call1024_pre_calls.py index bece3316ff2..5cbbf735fb0 100644 --- a/tests/ported_static/stCallCreateCallCodeTest/test_call1024_pre_calls.py +++ b/tests/ported_static/stCallCreateCallCodeTest/test_call1024_pre_calls.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -121,20 +118,12 @@ def test_call1024_pre_calls( address=Address(0x48C20CD83DDBD3908712F4D31C51B3CDAAE287CE), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun=Cancun=Cancun"], - "result": { - target: Account( - storage={ - 1: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 - }, - ), - }, + target: Account( + storage={ + 1: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 + }, + ), }, { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 1, - 1: 0x3700FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 - }, - ), - }, + target: Account( + storage={ + 0: 1, + 1: 0x3700FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 + }, + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 0, 1): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stCallCreateCallCodeTest/test_call_with_high_value_and_oo_gat_tx_level.py b/tests/ported_static/stCallCreateCallCodeTest/test_call_with_high_value_and_oo_gat_tx_level.py index d105d652d73..eeec61468e5 100644 --- a/tests/ported_static/stCallCreateCallCodeTest/test_call_with_high_value_and_oo_gat_tx_level.py +++ b/tests/ported_static/stCallCreateCallCodeTest/test_call_with_high_value_and_oo_gat_tx_level.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -100,23 +97,15 @@ def test_call_with_high_value_and_oo_gat_tx_level( nonce=0, ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={})}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={})}, { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 1}), - addr: Account(storage={1: 1}), - }, + target: Account(storage={0: 1}), + addr: Account(storage={1: 1}), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 0, 1): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stCallCreateCallCodeTest/test_callcode1024_oog.py b/tests/ported_static/stCallCreateCallCodeTest/test_callcode1024_oog.py index 2b2f42bd104..30da7858eed 100644 --- a/tests/ported_static/stCallCreateCallCodeTest/test_callcode1024_oog.py +++ b/tests/ported_static/stCallCreateCallCodeTest/test_callcode1024_oog.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -97,20 +94,12 @@ def test_callcode1024_oog( address=Address(0x1B803058288DC00000F98311B059597434253374), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 146, 1: 1, 2: 0x23A51})}, - }, - { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 134, 1: 1, 2: 0x20B71})}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={0: 146, 1: 1, 2: 0x23A51})}, + {target: Account(storage={0: 134, 1: 1, 2: 0x20B71})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 1, 0): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stCallCreateCallCodeTest/test_callcode_lose_gas_oog.py b/tests/ported_static/stCallCreateCallCodeTest/test_callcode_lose_gas_oog.py index a75fb2e2479..d5cc6f8dda0 100644 --- a/tests/ported_static/stCallCreateCallCodeTest/test_callcode_lose_gas_oog.py +++ b/tests/ported_static/stCallCreateCallCodeTest/test_callcode_lose_gas_oog.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -100,25 +97,12 @@ def test_callcode_lose_gas_oog( address=Address(0xB0FAFBE5AA1D6F184EB4BCB79B292E4D3238F4CA), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0, 2: 0})}, - }, - { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0, 2: 0})}, - }, - { - "indexes": {"data": -1, "gas": 2, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1, 2: 1001})}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={0: 0, 2: 0})}, + {target: Account(storage={0: 1, 2: 1001})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 1, 0): 0, (0, 2, 0): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stCallCreateCallCodeTest/test_contract_creation_make_call_that_ask_more_gas_then_transaction_provided.py b/tests/ported_static/stCallCreateCallCodeTest/test_contract_creation_make_call_that_ask_more_gas_then_transaction_provided.py index 8571a26ae45..8c9d8db6e35 100644 --- a/tests/ported_static/stCallCreateCallCodeTest/test_contract_creation_make_call_that_ask_more_gas_then_transaction_provided.py +++ b/tests/ported_static/stCallCreateCallCodeTest/test_contract_creation_make_call_that_ask_more_gas_then_transaction_provided.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -102,30 +99,22 @@ def test_contract_creation_make_call_that_ask_more_gas_then_transaction_provided address=Address(0xB94F5374FCE5EDBC8E2A8697C15331677E6EBF0B), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": [0], "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address(address=sender, nonce=0): Account( - balance=0 - ), - contract_1: Account(storage={1: 1}), - }, + compute_create_address(address=sender, nonce=0): Account( + balance=0 + ), + contract_1: Account(storage={1: 1}), }, { - "indexes": {"data": -1, "gas": [1], "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address(address=sender, nonce=0): Account( - balance=0 - ), - contract_1: Account(storage={1: 0}), - }, + compute_create_address(address=sender, nonce=0): Account( + balance=0 + ), + contract_1: Account(storage={1: 0}), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 1, 0): 1}[d, g, v]] + _exc = None tx_data = [ Op.CALL( diff --git a/tests/ported_static/stCallCreateCallCodeTest/test_create_fail_balance_too_low.py b/tests/ported_static/stCallCreateCallCodeTest/test_create_fail_balance_too_low.py index 89438cb2af2..8ac0818eb51 100644 --- a/tests/ported_static/stCallCreateCallCodeTest/test_create_fail_balance_too_low.py +++ b/tests/ported_static/stCallCreateCallCodeTest/test_create_fail_balance_too_low.py @@ -22,9 +22,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -98,34 +95,26 @@ def test_create_fail_balance_too_low( address=Address(0x095E7BAEA6A6C7C4C2DFEB977EFAC326AF552D87), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": { - Address(0x0000000000000000000000000000000000000000): Account( - storage={} - ), - compute_create_address( - address=contract_0, nonce=0 - ): Account.NONEXISTENT, - }, + Address(0x0000000000000000000000000000000000000000): Account( + storage={} + ), + compute_create_address( + address=contract_0, nonce=0 + ): Account.NONEXISTENT, }, { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": { - Address( - 0x0000000000000000000000000000000000000000 - ): Account.NONEXISTENT, - compute_create_address(address=contract_0, nonce=0): Account( - storage={2: 1} - ), - }, + Address( + 0x0000000000000000000000000000000000000000 + ): Account.NONEXISTENT, + compute_create_address(address=contract_0, nonce=0): Account( + storage={2: 1} + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 0, 1): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stCallCreateCallCodeTest/test_create_init_oo_gfor_create.py b/tests/ported_static/stCallCreateCallCodeTest/test_create_init_oo_gfor_create.py index 7207b0ccaa1..ed62d10e07e 100644 --- a/tests/ported_static/stCallCreateCallCodeTest/test_create_init_oo_gfor_create.py +++ b/tests/ported_static/stCallCreateCallCodeTest/test_create_init_oo_gfor_create.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -80,25 +77,17 @@ def test_create_init_oo_gfor_create( nonce=0, ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_0: Account(nonce=0)}, - }, + expect_posts: list[dict] = [ + {contract_0: Account(nonce=0)}, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(balance=0, nonce=1), - compute_create_address(address=contract_0, nonce=0): Account( - nonce=1 - ), - }, + contract_0: Account(balance=0, nonce=1), + compute_create_address(address=contract_0, nonce=0): Account( + nonce=1 + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 1, 0): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stCallCreateCallCodeTest/test_create_name_registrator_per_txs_not_enough_gas.py b/tests/ported_static/stCallCreateCallCodeTest/test_create_name_registrator_per_txs_not_enough_gas.py index a6159ad7409..3f3902379b4 100644 --- a/tests/ported_static/stCallCreateCallCodeTest/test_create_name_registrator_per_txs_not_enough_gas.py +++ b/tests/ported_static/stCallCreateCallCodeTest/test_create_name_registrator_per_txs_not_enough_gas.py @@ -16,9 +16,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -69,30 +66,22 @@ def test_create_name_registrator_per_txs_not_enough_gas( gas_limit=10000000000, ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - compute_create_address( - address=sender, nonce=0 - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + compute_create_address( + address=sender, nonce=0 + ): Account.NONEXISTENT, }, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - compute_create_address(address=sender, nonce=0): Account( - storage={1: 1} - ), - }, + sender: Account(nonce=1), + compute_create_address(address=sender, nonce=0): Account( + storage={1: 1} + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 1, 0): 1}[d, g, v]] + _exc = None tx_data = [ Op.SSTORE(key=0x1, value=0x1) diff --git a/tests/ported_static/stCodeSizeLimit/test_create2_code_size_limit.py b/tests/ported_static/stCodeSizeLimit/test_create2_code_size_limit.py index 6c865aed2e5..6d58d8ee4e5 100644 --- a/tests/ported_static/stCodeSizeLimit/test_create2_code_size_limit.py +++ b/tests/ported_static/stCodeSizeLimit/test_create2_code_size_limit.py @@ -18,9 +18,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -112,33 +109,25 @@ def test_create2_code_size_limit( opcode=Op.CREATE2, ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account( - storage={ - 0: valid_create2_address, - 1: 1, - }, - ), - valid_create2_address: Account(storage={}, balance=0, nonce=1), - }, + sender: Account(nonce=1), + contract_0: Account( + storage={ + 0: valid_create2_address, + 1: 1, + }, + ), + valid_create2_address: Account(storage={}, balance=0, nonce=1), }, { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account(storage={0: 0, 1: 1}), - valid_create2_address: Account.NONEXISTENT, - }, + sender: Account(nonce=1), + contract_0: Account(storage={0: 0, 1: 1}), + valid_create2_address: Account.NONEXISTENT, }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx = Transaction( sender=sender, diff --git a/tests/ported_static/stCodeSizeLimit/test_create_code_size_limit.py b/tests/ported_static/stCodeSizeLimit/test_create_code_size_limit.py index 82d1b803ba4..fd982fe9a81 100644 --- a/tests/ported_static/stCodeSizeLimit/test_create_code_size_limit.py +++ b/tests/ported_static/stCodeSizeLimit/test_create_code_size_limit.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -89,37 +86,29 @@ def test_create_code_size_limit( nonce=0, ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account( - storage={ - 0: compute_create_address(address=contract_0, nonce=0), - 1: 1, - }, - ), - compute_create_address(address=contract_0, nonce=0): Account( - storage={}, balance=0, nonce=1 - ), - }, + sender: Account(nonce=1), + contract_0: Account( + storage={ + 0: compute_create_address(address=contract_0, nonce=0), + 1: 1, + }, + ), + compute_create_address(address=contract_0, nonce=0): Account( + storage={}, balance=0, nonce=1 + ), }, { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account(storage={0: 0, 1: 1}), - compute_create_address( - address=contract_0, nonce=0 - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + contract_0: Account(storage={0: 0, 1: 1}), + compute_create_address( + address=contract_0, nonce=0 + ): Account.NONEXISTENT, }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None # Initcode: PUSH2 PUSH1 0 RETURN. Sizes scale with # fork.max_code_size() so pre-7954 forks get 0x6000 / 0x6001 and diff --git a/tests/ported_static/stCreate2/test_create2_first_byte_loop.py b/tests/ported_static/stCreate2/test_create2_first_byte_loop.py index cd9a424e273..90aaadfb878 100644 --- a/tests/ported_static/stCreate2/test_create2_first_byte_loop.py +++ b/tests/ported_static/stCreate2/test_create2_first_byte_loop.py @@ -22,9 +22,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -135,49 +132,37 @@ def test_create2_first_byte_loop( address=Address(0x09FDD11D68BE787A4C43F692A0778BEFC011CD35), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - entry: Account(storage={256: 1}, nonce=239), - Address(0x0D03885ED4F051B06AE83D869CD60F8EBDDE37D8): Account( - nonce=1 - ), - Address(0x94B507D001A223D7948119D899358A073FE5E331): Account( - nonce=1 - ), - }, + sender: Account(nonce=1), + entry: Account(storage={256: 1}, nonce=239), + Address(0x0D03885ED4F051B06AE83D869CD60F8EBDDE37D8): Account( + nonce=1 + ), + Address(0x94B507D001A223D7948119D899358A073FE5E331): Account( + nonce=1 + ), }, { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - entry: Account(storage={256: 1}, nonce=16), - Address(0x896E9DC41224489ED98380921EF0AEAC66115D7B): Account( - nonce=1 - ), - Address(0x070DB4FA29B5D139BEDB29347001BB9C3D75DC3A): Account( - nonce=1 - ), - }, + sender: Account(nonce=1), + entry: Account(storage={256: 1}, nonce=16), + Address(0x896E9DC41224489ED98380921EF0AEAC66115D7B): Account( + nonce=1 + ), + Address(0x070DB4FA29B5D139BEDB29347001BB9C3D75DC3A): Account( + nonce=1 + ), }, { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - entry: Account(storage={239: 1, 256: 1}, nonce=1), - Address( - 0xA492678492A13F1031904DE45F26A114234B668D - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + entry: Account(storage={239: 1, 256: 1}, nonce=1), + Address( + 0xA492678492A13F1031904DE45F26A114234B668D + ): Account.NONEXISTENT, }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 2, (2, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Bytes("1a8451e6") + Hash(0x0) + Hash(0xEF), diff --git a/tests/ported_static/stCreate2/test_create2_high_nonce_delegatecall.py b/tests/ported_static/stCreate2/test_create2_high_nonce_delegatecall.py index bccd4bc252a..972a284fe0a 100644 --- a/tests/ported_static/stCreate2/test_create2_high_nonce_delegatecall.py +++ b/tests/ported_static/stCreate2/test_create2_high_nonce_delegatecall.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -453,396 +450,375 @@ def test_create2_high_nonce_delegatecall( address=Address(0xD7D7B37FC131964CD181D47C9B705028776FE3D4), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": [8, 9, 6, 7], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - entry: Account( - storage={1: 0, 2: 0, 65535: 0xFFFFFFFFFFFFFFFF}, - nonce=18446744073709551615, - ), - max_nonce_minus_1: Account( - storage={65535: 0xFFFFFFFFFFFFFFFE}, - nonce=18446744073709551614, - ), - max_nonce: Account( - storage={65535: 0xFFFFFFFFFFFFFFFF}, - nonce=18446744073709551615, - ), - Address( - 0x3689DBE15F5217CDA3865B4158DA57C7A3F9AD88 - ): Account.NONEXISTENT, - Address( - 0xD77662C5102179C42ABBCAFCCC90AB351E7A1E4B - ): Account.NONEXISTENT, - Address( - 0xB840E64C3AA027210A2CEBA09411CF1DD48C56A7 - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + entry: Account( + storage={1: 0, 2: 0, 65535: 0xFFFFFFFFFFFFFFFF}, + nonce=18446744073709551615, + ), + max_nonce_minus_1: Account( + storage={65535: 0xFFFFFFFFFFFFFFFE}, + nonce=18446744073709551614, + ), + max_nonce: Account( + storage={65535: 0xFFFFFFFFFFFFFFFF}, + nonce=18446744073709551615, + ), + Address( + 0x3689DBE15F5217CDA3865B4158DA57C7A3F9AD88 + ): Account.NONEXISTENT, + Address( + 0xD77662C5102179C42ABBCAFCCC90AB351E7A1E4B + ): Account.NONEXISTENT, + Address( + 0xB840E64C3AA027210A2CEBA09411CF1DD48C56A7 + ): Account.NONEXISTENT, }, { - "indexes": {"data": [10], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - entry: Account( - storage={ - 1: 0x99F1BFB202FDF527E07FB8EB682A03C713AEAF11, - 65535: 0xFFFFFFFFFFFFFFFF, - }, - nonce=18446744073709551615, - ), - max_nonce_minus_1: Account( - storage={ - 2: 0x99F1BFB202FDF527E07FB8EB682A03C713AEAF11, - 65535: 0xFFFFFFFFFFFFFFFF, - }, - nonce=18446744073709551615, - ), - max_nonce: Account( - storage={65535: 0xFFFFFFFFFFFFFFFF}, - nonce=18446744073709551615, - ), - Address(0x99F1BFB202FDF527E07FB8EB682A03C713AEAF11): Account( - storage={1: 1}, code=bytes.fromhex("6001600155") - ), - Address( - 0x3689DBE15F5217CDA3865B4158DA57C7A3F9AD88 - ): Account.NONEXISTENT, - Address( - 0xD77662C5102179C42ABBCAFCCC90AB351E7A1E4B - ): Account.NONEXISTENT, - Address( - 0xB840E64C3AA027210A2CEBA09411CF1DD48C56A7 - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + entry: Account( + storage={ + 1: 0x99F1BFB202FDF527E07FB8EB682A03C713AEAF11, + 65535: 0xFFFFFFFFFFFFFFFF, + }, + nonce=18446744073709551615, + ), + max_nonce_minus_1: Account( + storage={ + 2: 0x99F1BFB202FDF527E07FB8EB682A03C713AEAF11, + 65535: 0xFFFFFFFFFFFFFFFF, + }, + nonce=18446744073709551615, + ), + max_nonce: Account( + storage={65535: 0xFFFFFFFFFFFFFFFF}, + nonce=18446744073709551615, + ), + Address(0x99F1BFB202FDF527E07FB8EB682A03C713AEAF11): Account( + storage={1: 1}, code=bytes.fromhex("6001600155") + ), + Address( + 0x3689DBE15F5217CDA3865B4158DA57C7A3F9AD88 + ): Account.NONEXISTENT, + Address( + 0xD77662C5102179C42ABBCAFCCC90AB351E7A1E4B + ): Account.NONEXISTENT, + Address( + 0xB840E64C3AA027210A2CEBA09411CF1DD48C56A7 + ): Account.NONEXISTENT, }, { - "indexes": {"data": [11], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - entry: Account( - storage={1: 0, 65535: 0xFFFFFFFFFFFFFFFF}, - nonce=18446744073709551615, - ), - max_nonce_minus_1: Account( - storage={65535: 0xFFFFFFFFFFFFFFFE}, - nonce=18446744073709551614, - ), - max_nonce: Account( - storage={2: 0, 65535: 0xFFFFFFFFFFFFFFFF}, - nonce=18446744073709551615, - ), - Address( - 0x3689DBE15F5217CDA3865B4158DA57C7A3F9AD88 - ): Account.NONEXISTENT, - Address( - 0xD77662C5102179C42ABBCAFCCC90AB351E7A1E4B - ): Account.NONEXISTENT, - Address( - 0xB840E64C3AA027210A2CEBA09411CF1DD48C56A7 - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + entry: Account( + storage={1: 0, 65535: 0xFFFFFFFFFFFFFFFF}, + nonce=18446744073709551615, + ), + max_nonce_minus_1: Account( + storage={65535: 0xFFFFFFFFFFFFFFFE}, + nonce=18446744073709551614, + ), + max_nonce: Account( + storage={2: 0, 65535: 0xFFFFFFFFFFFFFFFF}, + nonce=18446744073709551615, + ), + Address( + 0x3689DBE15F5217CDA3865B4158DA57C7A3F9AD88 + ): Account.NONEXISTENT, + Address( + 0xD77662C5102179C42ABBCAFCCC90AB351E7A1E4B + ): Account.NONEXISTENT, + Address( + 0xB840E64C3AA027210A2CEBA09411CF1DD48C56A7 + ): Account.NONEXISTENT, }, { - "indexes": {"data": [0, 1, 2, 3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - entry: Account( - storage={ - 1: 0x74F5960E3479218EC095E853ED1FC95E285ADC3B, - 2: 0x74F5960E3479218EC095E853ED1FC95E285ADC3B, - 65535: 0xFFFFFFFFFFFFFFFF, - }, - nonce=18446744073709551615, - ), - max_nonce_minus_1: Account( - storage={65535: 0xFFFFFFFFFFFFFFFE}, - nonce=18446744073709551614, - ), - max_nonce: Account( - storage={65535: 0xFFFFFFFFFFFFFFFF}, - nonce=18446744073709551615, - ), - Address(0x74F5960E3479218EC095E853ED1FC95E285ADC3B): Account( - storage={1: 1}, code=bytes.fromhex("6001600155") - ), - Address( - 0x3689DBE15F5217CDA3865B4158DA57C7A3F9AD88 - ): Account.NONEXISTENT, - Address( - 0xD77662C5102179C42ABBCAFCCC90AB351E7A1E4B - ): Account.NONEXISTENT, - Address( - 0xB840E64C3AA027210A2CEBA09411CF1DD48C56A7 - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + entry: Account( + storage={ + 1: 0x74F5960E3479218EC095E853ED1FC95E285ADC3B, + 2: 0x74F5960E3479218EC095E853ED1FC95E285ADC3B, + 65535: 0xFFFFFFFFFFFFFFFF, + }, + nonce=18446744073709551615, + ), + max_nonce_minus_1: Account( + storage={65535: 0xFFFFFFFFFFFFFFFE}, + nonce=18446744073709551614, + ), + max_nonce: Account( + storage={65535: 0xFFFFFFFFFFFFFFFF}, + nonce=18446744073709551615, + ), + Address(0x74F5960E3479218EC095E853ED1FC95E285ADC3B): Account( + storage={1: 1}, code=bytes.fromhex("6001600155") + ), + Address( + 0x3689DBE15F5217CDA3865B4158DA57C7A3F9AD88 + ): Account.NONEXISTENT, + Address( + 0xD77662C5102179C42ABBCAFCCC90AB351E7A1E4B + ): Account.NONEXISTENT, + Address( + 0xB840E64C3AA027210A2CEBA09411CF1DD48C56A7 + ): Account.NONEXISTENT, }, { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - entry: Account( - storage={ - 1: 0x99F1BFB202FDF527E07FB8EB682A03C713AEAF11, - 65535: 0xFFFFFFFFFFFFFFFE, - }, - nonce=18446744073709551614, - ), - max_nonce_minus_1: Account( - storage={ - 2: 0x99F1BFB202FDF527E07FB8EB682A03C713AEAF11, - 65535: 0xFFFFFFFFFFFFFFFF, - }, - nonce=18446744073709551615, - ), - max_nonce: Account( - storage={65535: 0xFFFFFFFFFFFFFFFF}, - nonce=18446744073709551615, - ), - Address(0x99F1BFB202FDF527E07FB8EB682A03C713AEAF11): Account( - storage={1: 1}, code=bytes.fromhex("6001600155") - ), - Address( - 0x3689DBE15F5217CDA3865B4158DA57C7A3F9AD88 - ): Account.NONEXISTENT, - Address( - 0xD77662C5102179C42ABBCAFCCC90AB351E7A1E4B - ): Account.NONEXISTENT, - Address( - 0xB840E64C3AA027210A2CEBA09411CF1DD48C56A7 - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + entry: Account( + storage={ + 1: 0x99F1BFB202FDF527E07FB8EB682A03C713AEAF11, + 65535: 0xFFFFFFFFFFFFFFFE, + }, + nonce=18446744073709551614, + ), + max_nonce_minus_1: Account( + storage={ + 2: 0x99F1BFB202FDF527E07FB8EB682A03C713AEAF11, + 65535: 0xFFFFFFFFFFFFFFFF, + }, + nonce=18446744073709551615, + ), + max_nonce: Account( + storage={65535: 0xFFFFFFFFFFFFFFFF}, + nonce=18446744073709551615, + ), + Address(0x99F1BFB202FDF527E07FB8EB682A03C713AEAF11): Account( + storage={1: 1}, code=bytes.fromhex("6001600155") + ), + Address( + 0x3689DBE15F5217CDA3865B4158DA57C7A3F9AD88 + ): Account.NONEXISTENT, + Address( + 0xD77662C5102179C42ABBCAFCCC90AB351E7A1E4B + ): Account.NONEXISTENT, + Address( + 0xB840E64C3AA027210A2CEBA09411CF1DD48C56A7 + ): Account.NONEXISTENT, }, { - "indexes": {"data": [5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - entry: Account( - storage={1: 0, 65535: 0xFFFFFFFFFFFFFFFE}, - nonce=18446744073709551614, - ), - max_nonce_minus_1: Account( - storage={65535: 0xFFFFFFFFFFFFFFFE}, - nonce=18446744073709551614, - ), - max_nonce: Account( - storage={2: 0, 65535: 0xFFFFFFFFFFFFFFFF}, - nonce=18446744073709551615, - ), - Address( - 0x3689DBE15F5217CDA3865B4158DA57C7A3F9AD88 - ): Account.NONEXISTENT, - Address( - 0xD77662C5102179C42ABBCAFCCC90AB351E7A1E4B - ): Account.NONEXISTENT, - Address( - 0xB840E64C3AA027210A2CEBA09411CF1DD48C56A7 - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + entry: Account( + storage={1: 0, 65535: 0xFFFFFFFFFFFFFFFE}, + nonce=18446744073709551614, + ), + max_nonce_minus_1: Account( + storage={65535: 0xFFFFFFFFFFFFFFFE}, + nonce=18446744073709551614, + ), + max_nonce: Account( + storage={2: 0, 65535: 0xFFFFFFFFFFFFFFFF}, + nonce=18446744073709551615, + ), + Address( + 0x3689DBE15F5217CDA3865B4158DA57C7A3F9AD88 + ): Account.NONEXISTENT, + Address( + 0xD77662C5102179C42ABBCAFCCC90AB351E7A1E4B + ): Account.NONEXISTENT, + Address( + 0xB840E64C3AA027210A2CEBA09411CF1DD48C56A7 + ): Account.NONEXISTENT, }, { - "indexes": {"data": [18, 19, 20, 21], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - entry: Account( - storage={1: 0, 2: 0, 65535: 0xFFFFFFFFFFFFFFFF}, - nonce=18446744073709551615, - ), - max_nonce_minus_1: Account( - storage={65535: 0xFFFFFFFFFFFFFFFE}, - nonce=18446744073709551614, - ), - max_nonce: Account( - storage={65535: 0xFFFFFFFFFFFFFFFF}, - nonce=18446744073709551615, - ), - Address( - 0x4E060B3A192FD2A082A00259BE2F021AD996D71C - ): Account.NONEXISTENT, - Address( - 0xAA17FC42EF60F987CD7BC803EC28BCC9F0ED1C31 - ): Account.NONEXISTENT, - Address( - 0x76E76DCFBBE7DB1A0A9AB7D6B12E3A309188018A - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + entry: Account( + storage={1: 0, 2: 0, 65535: 0xFFFFFFFFFFFFFFFF}, + nonce=18446744073709551615, + ), + max_nonce_minus_1: Account( + storage={65535: 0xFFFFFFFFFFFFFFFE}, + nonce=18446744073709551614, + ), + max_nonce: Account( + storage={65535: 0xFFFFFFFFFFFFFFFF}, + nonce=18446744073709551615, + ), + Address( + 0x4E060B3A192FD2A082A00259BE2F021AD996D71C + ): Account.NONEXISTENT, + Address( + 0xAA17FC42EF60F987CD7BC803EC28BCC9F0ED1C31 + ): Account.NONEXISTENT, + Address( + 0x76E76DCFBBE7DB1A0A9AB7D6B12E3A309188018A + ): Account.NONEXISTENT, }, { - "indexes": {"data": [22], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - entry: Account( - storage={ - 1: 0x1CFC908BB573719841CAD6A8BC34E7C1CE5EE020, - 65535: 0xFFFFFFFFFFFFFFFF, - }, - nonce=18446744073709551615, - ), - max_nonce_minus_1: Account( - storage={ - 2: 0x1CFC908BB573719841CAD6A8BC34E7C1CE5EE020, - 65535: 0xFFFFFFFFFFFFFFFF, - }, - nonce=18446744073709551615, - ), - max_nonce: Account( - storage={65535: 0xFFFFFFFFFFFFFFFF}, - nonce=18446744073709551615, - ), - Address(0x1CFC908BB573719841CAD6A8BC34E7C1CE5EE020): Account( - storage={1: 1}, code=bytes.fromhex("6001600155") - ), - Address( - 0x4E060B3A192FD2A082A00259BE2F021AD996D71C - ): Account.NONEXISTENT, - Address( - 0xAA17FC42EF60F987CD7BC803EC28BCC9F0ED1C31 - ): Account.NONEXISTENT, - Address( - 0x76E76DCFBBE7DB1A0A9AB7D6B12E3A309188018A - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + entry: Account( + storage={ + 1: 0x1CFC908BB573719841CAD6A8BC34E7C1CE5EE020, + 65535: 0xFFFFFFFFFFFFFFFF, + }, + nonce=18446744073709551615, + ), + max_nonce_minus_1: Account( + storage={ + 2: 0x1CFC908BB573719841CAD6A8BC34E7C1CE5EE020, + 65535: 0xFFFFFFFFFFFFFFFF, + }, + nonce=18446744073709551615, + ), + max_nonce: Account( + storage={65535: 0xFFFFFFFFFFFFFFFF}, + nonce=18446744073709551615, + ), + Address(0x1CFC908BB573719841CAD6A8BC34E7C1CE5EE020): Account( + storage={1: 1}, code=bytes.fromhex("6001600155") + ), + Address( + 0x4E060B3A192FD2A082A00259BE2F021AD996D71C + ): Account.NONEXISTENT, + Address( + 0xAA17FC42EF60F987CD7BC803EC28BCC9F0ED1C31 + ): Account.NONEXISTENT, + Address( + 0x76E76DCFBBE7DB1A0A9AB7D6B12E3A309188018A + ): Account.NONEXISTENT, }, { - "indexes": {"data": [23], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - entry: Account( - storage={1: 0, 65535: 0xFFFFFFFFFFFFFFFF}, - nonce=18446744073709551615, - ), - max_nonce_minus_1: Account( - storage={65535: 0xFFFFFFFFFFFFFFFE}, - nonce=18446744073709551614, - ), - max_nonce: Account( - storage={2: 0, 65535: 0xFFFFFFFFFFFFFFFF}, - nonce=18446744073709551615, - ), - Address( - 0x4E060B3A192FD2A082A00259BE2F021AD996D71C - ): Account.NONEXISTENT, - Address( - 0xAA17FC42EF60F987CD7BC803EC28BCC9F0ED1C31 - ): Account.NONEXISTENT, - Address( - 0x76E76DCFBBE7DB1A0A9AB7D6B12E3A309188018A - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + entry: Account( + storage={1: 0, 65535: 0xFFFFFFFFFFFFFFFF}, + nonce=18446744073709551615, + ), + max_nonce_minus_1: Account( + storage={65535: 0xFFFFFFFFFFFFFFFE}, + nonce=18446744073709551614, + ), + max_nonce: Account( + storage={2: 0, 65535: 0xFFFFFFFFFFFFFFFF}, + nonce=18446744073709551615, + ), + Address( + 0x4E060B3A192FD2A082A00259BE2F021AD996D71C + ): Account.NONEXISTENT, + Address( + 0xAA17FC42EF60F987CD7BC803EC28BCC9F0ED1C31 + ): Account.NONEXISTENT, + Address( + 0x76E76DCFBBE7DB1A0A9AB7D6B12E3A309188018A + ): Account.NONEXISTENT, }, { - "indexes": {"data": [12, 13, 14, 15], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - entry: Account( - storage={ - 1: 0x9F07A698496A643301174853C4F7F1EAAB166BE, - 2: 0x9F07A698496A643301174853C4F7F1EAAB166BE, - 65535: 0xFFFFFFFFFFFFFFFF, - }, - nonce=18446744073709551615, - ), - max_nonce_minus_1: Account( - storage={65535: 0xFFFFFFFFFFFFFFFE}, - nonce=18446744073709551614, - ), - max_nonce: Account( - storage={65535: 0xFFFFFFFFFFFFFFFF}, - nonce=18446744073709551615, - ), - Address(0x09F07A698496A643301174853C4F7F1EAAB166BE): Account( - storage={1: 1}, code=bytes.fromhex("6001600155") - ), - Address( - 0x4E060B3A192FD2A082A00259BE2F021AD996D71C - ): Account.NONEXISTENT, - Address( - 0xAA17FC42EF60F987CD7BC803EC28BCC9F0ED1C31 - ): Account.NONEXISTENT, - Address( - 0x76E76DCFBBE7DB1A0A9AB7D6B12E3A309188018A - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + entry: Account( + storage={ + 1: 0x9F07A698496A643301174853C4F7F1EAAB166BE, + 2: 0x9F07A698496A643301174853C4F7F1EAAB166BE, + 65535: 0xFFFFFFFFFFFFFFFF, + }, + nonce=18446744073709551615, + ), + max_nonce_minus_1: Account( + storage={65535: 0xFFFFFFFFFFFFFFFE}, + nonce=18446744073709551614, + ), + max_nonce: Account( + storage={65535: 0xFFFFFFFFFFFFFFFF}, + nonce=18446744073709551615, + ), + Address(0x09F07A698496A643301174853C4F7F1EAAB166BE): Account( + storage={1: 1}, code=bytes.fromhex("6001600155") + ), + Address( + 0x4E060B3A192FD2A082A00259BE2F021AD996D71C + ): Account.NONEXISTENT, + Address( + 0xAA17FC42EF60F987CD7BC803EC28BCC9F0ED1C31 + ): Account.NONEXISTENT, + Address( + 0x76E76DCFBBE7DB1A0A9AB7D6B12E3A309188018A + ): Account.NONEXISTENT, }, { - "indexes": {"data": [16], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - entry: Account( - storage={ - 1: 0x1CFC908BB573719841CAD6A8BC34E7C1CE5EE020, - 65535: 0xFFFFFFFFFFFFFFFE, - }, - nonce=18446744073709551614, - ), - max_nonce_minus_1: Account( - storage={ - 2: 0x1CFC908BB573719841CAD6A8BC34E7C1CE5EE020, - 65535: 0xFFFFFFFFFFFFFFFF, - }, - nonce=18446744073709551615, - ), - max_nonce: Account( - storage={65535: 0xFFFFFFFFFFFFFFFF}, - nonce=18446744073709551615, - ), - Address(0x1CFC908BB573719841CAD6A8BC34E7C1CE5EE020): Account( - storage={1: 1}, code=bytes.fromhex("6001600155") - ), - Address( - 0x4E060B3A192FD2A082A00259BE2F021AD996D71C - ): Account.NONEXISTENT, - Address( - 0xAA17FC42EF60F987CD7BC803EC28BCC9F0ED1C31 - ): Account.NONEXISTENT, - Address( - 0x76E76DCFBBE7DB1A0A9AB7D6B12E3A309188018A - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + entry: Account( + storage={ + 1: 0x1CFC908BB573719841CAD6A8BC34E7C1CE5EE020, + 65535: 0xFFFFFFFFFFFFFFFE, + }, + nonce=18446744073709551614, + ), + max_nonce_minus_1: Account( + storage={ + 2: 0x1CFC908BB573719841CAD6A8BC34E7C1CE5EE020, + 65535: 0xFFFFFFFFFFFFFFFF, + }, + nonce=18446744073709551615, + ), + max_nonce: Account( + storage={65535: 0xFFFFFFFFFFFFFFFF}, + nonce=18446744073709551615, + ), + Address(0x1CFC908BB573719841CAD6A8BC34E7C1CE5EE020): Account( + storage={1: 1}, code=bytes.fromhex("6001600155") + ), + Address( + 0x4E060B3A192FD2A082A00259BE2F021AD996D71C + ): Account.NONEXISTENT, + Address( + 0xAA17FC42EF60F987CD7BC803EC28BCC9F0ED1C31 + ): Account.NONEXISTENT, + Address( + 0x76E76DCFBBE7DB1A0A9AB7D6B12E3A309188018A + ): Account.NONEXISTENT, }, { - "indexes": {"data": [17], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - entry: Account( - storage={1: 0, 65535: 0xFFFFFFFFFFFFFFFE}, - nonce=18446744073709551614, - ), - max_nonce_minus_1: Account( - storage={65535: 0xFFFFFFFFFFFFFFFE}, - nonce=18446744073709551614, - ), - max_nonce: Account( - storage={2: 0, 65535: 0xFFFFFFFFFFFFFFFF}, - nonce=18446744073709551615, - ), - Address( - 0x4E060B3A192FD2A082A00259BE2F021AD996D71C - ): Account.NONEXISTENT, - Address( - 0xAA17FC42EF60F987CD7BC803EC28BCC9F0ED1C31 - ): Account.NONEXISTENT, - Address( - 0x76E76DCFBBE7DB1A0A9AB7D6B12E3A309188018A - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + entry: Account( + storage={1: 0, 65535: 0xFFFFFFFFFFFFFFFE}, + nonce=18446744073709551614, + ), + max_nonce_minus_1: Account( + storage={65535: 0xFFFFFFFFFFFFFFFE}, + nonce=18446744073709551614, + ), + max_nonce: Account( + storage={2: 0, 65535: 0xFFFFFFFFFFFFFFFF}, + nonce=18446744073709551615, + ), + Address( + 0x4E060B3A192FD2A082A00259BE2F021AD996D71C + ): Account.NONEXISTENT, + Address( + 0xAA17FC42EF60F987CD7BC803EC28BCC9F0ED1C31 + ): Account.NONEXISTENT, + Address( + 0x76E76DCFBBE7DB1A0A9AB7D6B12E3A309188018A + ): Account.NONEXISTENT, }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + { + (0, 0, 0): 3, + (1, 0, 0): 3, + (2, 0, 0): 3, + (3, 0, 0): 3, + (4, 0, 0): 4, + (5, 0, 0): 5, + (6, 0, 0): 0, + (7, 0, 0): 0, + (8, 0, 0): 0, + (9, 0, 0): 0, + (10, 0, 0): 1, + (11, 0, 0): 2, + (12, 0, 0): 9, + (13, 0, 0): 9, + (14, 0, 0): 9, + (15, 0, 0): 9, + (16, 0, 0): 10, + (17, 0, 0): 11, + (18, 0, 0): 6, + (19, 0, 0): 6, + (20, 0, 0): 6, + (21, 0, 0): 6, + (22, 0, 0): 7, + (23, 0, 0): 8, + }[d, g, v] + ] + _exc = None tx_data = [ Bytes("917694f9") diff --git a/tests/ported_static/stCreate2/test_create2_init_codes.py b/tests/ported_static/stCreate2/test_create2_init_codes.py index e1ad5fa965b..c7687e9ed5b 100644 --- a/tests/ported_static/stCreate2/test_create2_init_codes.py +++ b/tests/ported_static/stCreate2/test_create2_init_codes.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -115,98 +112,82 @@ def test_create2_init_codes( pre[sender] = Account(balance=0xDE0B6B3A7640000) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0x9CCB06046C674D1A423C968D7998235BC33D40C1): Account( - nonce=1 - ), - sender: Account(nonce=1), - compute_create_address(address=sender, nonce=0): Account( - storage={0: 0x9CCB06046C674D1A423C968D7998235BC33D40C1}, - ), - }, + Address(0x9CCB06046C674D1A423C968D7998235BC33D40C1): Account( + nonce=1 + ), + sender: Account(nonce=1), + compute_create_address(address=sender, nonce=0): Account( + storage={0: 0x9CCB06046C674D1A423C968D7998235BC33D40C1}, + ), }, { - "indexes": {"data": [1, 2, 3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address(address=sender, nonce=0): Account( - balance=1, nonce=2 - ), - sender: Account(nonce=1), - }, + compute_create_address(address=sender, nonce=0): Account( + balance=1, nonce=2 + ), + sender: Account(nonce=1), }, { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0xD46F8D2A93844FB23D8A2803A615F3D00849B8AB): Account( - storage={1: 1, 2: 1} - ), - sender: Account(nonce=1), - }, + Address(0xD46F8D2A93844FB23D8A2803A615F3D00849B8AB): Account( + storage={1: 1, 2: 1} + ), + sender: Account(nonce=1), }, { - "indexes": {"data": [5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address( - 0xADF52AAFB61364F699F9B15EE605EF82DCA7F53D - ): Account.NONEXISTENT, - sender: Account(nonce=1), - compute_create_address(address=sender, nonce=0): Account( - storage={0: 0xADF52AAFB61364F699F9B15EE605EF82DCA7F53D}, - ), - }, + Address( + 0xADF52AAFB61364F699F9B15EE605EF82DCA7F53D + ): Account.NONEXISTENT, + sender: Account(nonce=1), + compute_create_address(address=sender, nonce=0): Account( + storage={0: 0xADF52AAFB61364F699F9B15EE605EF82DCA7F53D}, + ), }, { - "indexes": {"data": [6], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address( - 0xADF52AAFB61364F699F9B15EE605EF82DCA7F53D - ): Account.NONEXISTENT, - Address(0x0000000000000000000000000000000000000001): Account( - balance=1 - ), - sender: Account(nonce=1), - compute_create_address(address=sender, nonce=0): Account( - storage={0: 0xADF52AAFB61364F699F9B15EE605EF82DCA7F53D}, - ), - }, + Address( + 0xADF52AAFB61364F699F9B15EE605EF82DCA7F53D + ): Account.NONEXISTENT, + Address(0x0000000000000000000000000000000000000001): Account( + balance=1 + ), + sender: Account(nonce=1), + compute_create_address(address=sender, nonce=0): Account( + storage={0: 0xADF52AAFB61364F699F9B15EE605EF82DCA7F53D}, + ), }, { - "indexes": {"data": [7], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0x52B620D9A3FD03486496061138825A08B4DA501F): Account( - nonce=1 - ), - sender: Account(nonce=1), - compute_create_address(address=sender, nonce=0): Account( - storage={0: 0x52B620D9A3FD03486496061138825A08B4DA501F}, - ), - }, + Address(0x52B620D9A3FD03486496061138825A08B4DA501F): Account( + nonce=1 + ), + sender: Account(nonce=1), + compute_create_address(address=sender, nonce=0): Account( + storage={0: 0x52B620D9A3FD03486496061138825A08B4DA501F}, + ), }, { - "indexes": {"data": [8], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0x5210981AE8161A02A1B7E37452AE142AEDC66EA3): Account( - balance=1, nonce=1 - ), - sender: Account(nonce=1), - compute_create_address(address=sender, nonce=0): Account( - storage={0: 0x5210981AE8161A02A1B7E37452AE142AEDC66EA3}, - ), - }, + Address(0x5210981AE8161A02A1B7E37452AE142AEDC66EA3): Account( + balance=1, nonce=1 + ), + sender: Account(nonce=1), + compute_create_address(address=sender, nonce=0): Account( + storage={0: 0x5210981AE8161A02A1B7E37452AE142AEDC66EA3}, + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + { + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 1, + (3, 0, 0): 1, + (4, 0, 0): 2, + (5, 0, 0): 3, + (6, 0, 0): 4, + (7, 0, 0): 5, + (8, 0, 0): 6, + }[d, g, v] + ] + _exc = None tx_data = [ Op.MSTORE8(offset=0x0, value=0x0) diff --git a/tests/ported_static/stCreate2/test_create2_oo_gafter_init_code.py b/tests/ported_static/stCreate2/test_create2_oo_gafter_init_code.py index 08c8f8e8445..cad93eb1abc 100644 --- a/tests/ported_static/stCreate2/test_create2_oo_gafter_init_code.py +++ b/tests/ported_static/stCreate2/test_create2_oo_gafter_init_code.py @@ -26,9 +26,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -91,30 +88,22 @@ def test_create2_oo_gafter_init_code( address=Address(0xB94F5374FCE5EDBC8E2A8697C15331677E6EBF0B), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 0}), - Address( - 0x6878B140F875209C82AB4D5F083B55947299EF6B - ): Account.NONEXISTENT, - }, + contract_0: Account(storage={1: 0}), + Address( + 0x6878B140F875209C82AB4D5F083B55947299EF6B + ): Account.NONEXISTENT, }, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 0}), - Address(0x6878B140F875209C82AB4D5F083B55947299EF6B): Account( - code=bytes.fromhex("6001600155") - ), - }, + contract_0: Account(storage={1: 0}), + Address(0x6878B140F875209C82AB4D5F083B55947299EF6B): Account( + code=bytes.fromhex("6001600155") + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 1, 0): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stCreate2/test_create2_oo_gafter_init_code_returndata2.py b/tests/ported_static/stCreate2/test_create2_oo_gafter_init_code_returndata2.py index b85e078eaf9..a238d56cced 100644 --- a/tests/ported_static/stCreate2/test_create2_oo_gafter_init_code_returndata2.py +++ b/tests/ported_static/stCreate2/test_create2_oo_gafter_init_code_returndata2.py @@ -22,9 +22,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -91,32 +88,24 @@ def test_create2_oo_gafter_init_code_returndata2( address=Address(0xB94F5374FCE5EDBC8E2A8697C15331677E6EBF0B), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 2, 2: 0}), - compute_create_address( - address=contract_0, nonce=0 - ): Account.NONEXISTENT, - }, + contract_0: Account(storage={1: 2, 2: 0}), + compute_create_address( + address=contract_0, nonce=0 + ): Account.NONEXISTENT, }, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={1: 0, 2: 0x6460016001556000526005601BF3} - ), - Address(0x6878B140F875209C82AB4D5F083B55947299EF6B): Account( - code=bytes.fromhex("6001600155") - ), - }, + contract_0: Account( + storage={1: 0, 2: 0x6460016001556000526005601BF3} + ), + Address(0x6878B140F875209C82AB4D5F083B55947299EF6B): Account( + code=bytes.fromhex("6001600155") + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 1, 0): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stCreate2/test_create2_recursive.py b/tests/ported_static/stCreate2/test_create2_recursive.py index 0f9066fe503..96aeb2e5a22 100644 --- a/tests/ported_static/stCreate2/test_create2_recursive.py +++ b/tests/ported_static/stCreate2/test_create2_recursive.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -95,37 +92,25 @@ def test_create2_recursive( address=Address(0xB94F5374FCE5EDBC8E2A8697C15331677E6EBF0B), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun=Cancun=Cancun=Cancun"], - "result": { - Address(0x0000000000000000000000000000000000000001): Account( - balance=1 - ), - contract_0: Account(nonce=2), - }, + Address(0x0000000000000000000000000000000000000001): Account( + balance=1 + ), + contract_0: Account(nonce=2), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_1: Account( - storage={ - 1: 0xD27E800C69122409AC5609FE4DF903745F3988A0, - 2: 0, - }, - ), - Address(0xD27E800C69122409AC5609FE4DF903745F3988A0): Account( - storage={1: 1}, - code=bytes.fromhex("00000000000000000000"), - nonce=1, - ), - }, + contract_1: Account( + storage={ + 1: 0xD27E800C69122409AC5609FE4DF903745F3988A0, + 2: 0, + }, + ), + Address(0xD27E800C69122409AC5609FE4DF903745F3988A0): Account( + storage={1: 1}, + code=bytes.fromhex("00000000000000000000"), + nonce=1, + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(contract_0, left_padding=True), diff --git a/tests/ported_static/stCreate2/test_create2call_precompiles.py b/tests/ported_static/stCreate2/test_create2call_precompiles.py index c187bf94f9e..f7ba5c61ef6 100644 --- a/tests/ported_static/stCreate2/test_create2call_precompiles.py +++ b/tests/ported_static/stCreate2/test_create2call_precompiles.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -182,112 +179,91 @@ def test_create2call_precompiles( address=Address(0xB94F5374FCE5EDBC8E2A8697C15331677E6EBF0B), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - Address(0xF68E26002DB0F9CA9B54367C57C25E474C581622): Account( - storage={0: sender, 1: 1, 2: 1} - ), - }, + sender: Account(nonce=1), + Address(0xF68E26002DB0F9CA9B54367C57C25E474C581622): Account( + storage={0: sender, 1: 1, 2: 1} + ), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - Address(0x3B9EA59B92545BEB727022289665CF38FA462BAE): Account( - storage={ - 0: 0xCB39B3BDE22925B2F931111130C774761D8895E0E08437C9B396C1E97D10F34D, # noqa: E501 - 2: 1, - }, - ), - }, + sender: Account(nonce=1), + Address(0x3B9EA59B92545BEB727022289665CF38FA462BAE): Account( + storage={ + 0: 0xCB39B3BDE22925B2F931111130C774761D8895E0E08437C9B396C1E97D10F34D, # noqa: E501 + 2: 1, + }, + ), }, { - "indexes": {"data": 2, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - Address(0x7525F19E2970539FD2897357777A4C275175BCF5): Account( - storage={ - 0: 0x9C1185A5C5E9FC54612808977EE8F548B2258D31, - 2: 1, - }, - ), - }, + sender: Account(nonce=1), + Address(0x7525F19E2970539FD2897357777A4C275175BCF5): Account( + storage={ + 0: 0x9C1185A5C5E9FC54612808977EE8F548B2258D31, + 2: 1, + }, + ), }, { - "indexes": {"data": 3, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - Address(0x0EE431DB7C48FC10A9A56C909BFEFA87661442FB): Account( - storage={0: 0xF34578907F, 2: 1} - ), - }, + sender: Account(nonce=1), + Address(0x0EE431DB7C48FC10A9A56C909BFEFA87661442FB): Account( + storage={0: 0xF34578907F, 2: 1} + ), }, { - "indexes": {"data": 4, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - Address(0xBBD394930B408DA783EE071CED240ECE997BC8B2): Account( - storage={ - 1: 1, - 2: 0x162EAD82CADEFAEAF6E9283248FDF2F2845F6396F6F17C4D5A39F820B6F6B5F9, # noqa: E501 - }, - ), - }, + sender: Account(nonce=1), + Address(0xBBD394930B408DA783EE071CED240ECE997BC8B2): Account( + storage={ + 1: 1, + 2: 0x162EAD82CADEFAEAF6E9283248FDF2F2845F6396F6F17C4D5A39F820B6F6B5F9, # noqa: E501 + }, + ), }, { - "indexes": {"data": 5, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - Address(0x2E3EC33A50ED32C2FCBEF07A1BAB8643DB4DC670): Account( - storage={0: 1, 2: 0} - ), - }, + sender: Account(nonce=1), + Address(0x2E3EC33A50ED32C2FCBEF07A1BAB8643DB4DC670): Account( + storage={0: 1, 2: 0} + ), }, { - "indexes": {"data": 6, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - Address(0xAA0AB87AA0E27E22E21671040C11F3537CDC7B3E): Account( - storage={ - 0: 1, - 1: 0x1F4D1D80177B1377743D1901F70D7389BE7F7A35A35BFD234A8AAEE615B88C49, # noqa: E501 - 2: 0x18683193AE021A2F8920FED186CDE5D9B1365116865281CCF884C1F28B1DF8F, # noqa: E501 - }, - ), - }, + sender: Account(nonce=1), + Address(0xAA0AB87AA0E27E22E21671040C11F3537CDC7B3E): Account( + storage={ + 0: 1, + 1: 0x1F4D1D80177B1377743D1901F70D7389BE7F7A35A35BFD234A8AAEE615B88C49, # noqa: E501 + 2: 0x18683193AE021A2F8920FED186CDE5D9B1365116865281CCF884C1F28B1DF8F, # noqa: E501 + }, + ), }, { - "indexes": {"data": 7, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - Address(0xAB7CF4E4980432E892FA512EC2B9E8532C23AC15): Account( - storage={ - 0: 1, - 1: 1, - 2: 1, - 3: 1, - 10: 0x1DE49A4B0233273BBA8146AF82042D004F2085EC982397DB0D97DA17204CC286, # noqa: E501 - 11: 0x217327FFC463919BEF80CC166D09C6172639D8589799928761BCD9F22C903D4, # noqa: E501 - 20: 0x1DE49A4B0233273BBA8146AF82042D004F2085EC982397DB0D97DA17204CC286, # noqa: E501 - 21: 0x217327FFC463919BEF80CC166D09C6172639D8589799928761BCD9F22C903D4, # noqa: E501 - }, - ), - }, + sender: Account(nonce=1), + Address(0xAB7CF4E4980432E892FA512EC2B9E8532C23AC15): Account( + storage={ + 0: 1, + 1: 1, + 2: 1, + 3: 1, + 10: 0x1DE49A4B0233273BBA8146AF82042D004F2085EC982397DB0D97DA17204CC286, # noqa: E501 + 11: 0x217327FFC463919BEF80CC166D09C6172639D8589799928761BCD9F22C903D4, # noqa: E501 + 20: 0x1DE49A4B0233273BBA8146AF82042D004F2085EC982397DB0D97DA17204CC286, # noqa: E501 + 21: 0x217327FFC463919BEF80CC166D09C6172639D8589799928761BCD9F22C903D4, # noqa: E501 + }, + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + { + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 2, + (3, 0, 0): 3, + (4, 0, 0): 4, + (5, 0, 0): 5, + (6, 0, 0): 6, + (7, 0, 0): 7, + }[d, g, v] + ] + _exc = None tx_data = [ Op.PUSH1[0x0] diff --git a/tests/ported_static/stCreate2/test_create2check_fields_in_initcode.py b/tests/ported_static/stCreate2/test_create2check_fields_in_initcode.py index 8ee471f590e..cc7e98b017e 100644 --- a/tests/ported_static/stCreate2/test_create2check_fields_in_initcode.py +++ b/tests/ported_static/stCreate2/test_create2check_fields_in_initcode.py @@ -19,9 +19,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -348,120 +345,107 @@ def test_create2check_fields_in_initcode( address=Address(0x4000000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": [0, 4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0xDAF9F53E732F21FE517E624B6DFE92DC8D0E51E0): Account( - storage={ - 0: 0xDAF9F53E732F21FE517E624B6DFE92DC8D0E51E0, - 1: 0, - 2: sender, - 3: contract_9, - 4: 0, - 5: 0, - 6: 35, - 7: 10, - }, - balance=0, - nonce=1, - ), - sender: Account(nonce=1), - }, + Address(0xDAF9F53E732F21FE517E624B6DFE92DC8D0E51E0): Account( + storage={ + 0: 0xDAF9F53E732F21FE517E624B6DFE92DC8D0E51E0, + 1: 0, + 2: sender, + 3: contract_9, + 4: 0, + 5: 0, + 6: 35, + 7: 10, + }, + balance=0, + nonce=1, + ), + sender: Account(nonce=1), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0xDFAD1C567F12D848FABB8D9D8872C42E7AA81E95): Account( - storage={ - 0: 0xDFAD1C567F12D848FABB8D9D8872C42E7AA81E95, - 1: 0, - 2: sender, - 3: contract_3, - 4: 0, - 5: 0, - 6: 35, - 7: 10, - }, - balance=0, - nonce=1, - ), - sender: Account(nonce=1), - }, + Address(0xDFAD1C567F12D848FABB8D9D8872C42E7AA81E95): Account( + storage={ + 0: 0xDFAD1C567F12D848FABB8D9D8872C42E7AA81E95, + 1: 0, + 2: sender, + 3: contract_3, + 4: 0, + 5: 0, + 6: 35, + 7: 10, + }, + balance=0, + nonce=1, + ), + sender: Account(nonce=1), }, { - "indexes": {"data": 2, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0x3FF16480055C6CCC070257C61FA902448F4AE111): Account( - storage={ - 0: 0x3FF16480055C6CCC070257C61FA902448F4AE111, - 1: 0, - 2: sender, - 3: contract_5, - 4: 0, - 5: 0, - 6: 35, - 7: 10, - }, - balance=0, - nonce=1, - ), - sender: Account(nonce=1), - }, + Address(0x3FF16480055C6CCC070257C61FA902448F4AE111): Account( + storage={ + 0: 0x3FF16480055C6CCC070257C61FA902448F4AE111, + 1: 0, + 2: sender, + 3: contract_5, + 4: 0, + 5: 0, + 6: 35, + 7: 10, + }, + balance=0, + nonce=1, + ), + sender: Account(nonce=1), }, + {sender: Account(nonce=1)}, { - "indexes": {"data": [3, 7], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {sender: Account(nonce=1)}, + Address(0x7CE21E3C16D63738CBBB697C919555C910504278): Account( + storage={ + 0: 0x7CE21E3C16D63738CBBB697C919555C910504278, + 1: 0, + 2: sender, + 3: 0x9D25FBABDEB081B9ECD0645B9B6ABA8C7EB3821D, + 4: 0, + 5: 0, + 6: 35, + 7: 10, + }, + balance=0, + nonce=1, + ), + sender: Account(nonce=1), }, { - "indexes": {"data": 5, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0x7CE21E3C16D63738CBBB697C919555C910504278): Account( - storage={ - 0: 0x7CE21E3C16D63738CBBB697C919555C910504278, - 1: 0, - 2: sender, - 3: 0x9D25FBABDEB081B9ECD0645B9B6ABA8C7EB3821D, - 4: 0, - 5: 0, - 6: 35, - 7: 10, - }, - balance=0, - nonce=1, - ), - sender: Account(nonce=1), - }, + Address(0xBB1B88EA45D33397F45583CA612ADEA3EB267318): Account( + storage={ + 0: 0xBB1B88EA45D33397F45583CA612ADEA3EB267318, + 1: 0, + 2: sender, + 3: 0x45DDE7FBF9F1CF09E18C4E584BA93C82E83C8898, + 4: 0, + 5: 0, + 6: 35, + 7: 10, + }, + balance=0, + nonce=1, + ), + sender: Account(nonce=1), }, + ] + post = expect_posts[ { - "indexes": {"data": 6, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0xBB1B88EA45D33397F45583CA612ADEA3EB267318): Account( - storage={ - 0: 0xBB1B88EA45D33397F45583CA612ADEA3EB267318, - 1: 0, - 2: sender, - 3: 0x45DDE7FBF9F1CF09E18C4E584BA93C82E83C8898, - 4: 0, - 5: 0, - 6: 35, - 7: 10, - }, - balance=0, - nonce=1, - ), - sender: Account(nonce=1), - }, - }, + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 2, + (3, 0, 0): 3, + (4, 0, 0): 0, + (5, 0, 0): 4, + (6, 0, 0): 5, + (7, 0, 0): 3, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Hash(contract_1, left_padding=True), diff --git a/tests/ported_static/stCreate2/test_create2collision_balance.py b/tests/ported_static/stCreate2/test_create2collision_balance.py index b5b06b533e8..5c6d96ce011 100644 --- a/tests/ported_static/stCreate2/test_create2collision_balance.py +++ b/tests/ported_static/stCreate2/test_create2collision_balance.py @@ -23,9 +23,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -118,61 +115,45 @@ def test_create2collision_balance( address=Address(0xEC2C6832D00680ECE8FF9254F81FDAB0A5A2AC50), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(balance=1, nonce=1), - compute_create_address(address=sender, nonce=0): Account( - balance=1, nonce=2 - ), - sender: Account(nonce=1), - }, + contract_0: Account(balance=1, nonce=1), + compute_create_address(address=sender, nonce=0): Account( + balance=1, nonce=2 + ), + sender: Account(nonce=1), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_1: Account( - storage={1: 1}, code=b"", balance=1, nonce=1 - ), - compute_create_address(address=sender, nonce=0): Account( - balance=1, nonce=2 - ), - sender: Account(nonce=1), - }, + contract_1: Account(storage={1: 1}, code=b"", balance=1, nonce=1), + compute_create_address(address=sender, nonce=0): Account( + balance=1, nonce=2 + ), + sender: Account(nonce=1), }, { - "indexes": {"data": 2, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_2: Account( - storage={}, - code=bytes.fromhex("6001600155"), - balance=1, - nonce=1, - ), - compute_create_address(address=sender, nonce=0): Account( - balance=1, nonce=2 - ), - sender: Account(nonce=1), - }, + contract_2: Account( + storage={}, + code=bytes.fromhex("6001600155"), + balance=1, + nonce=1, + ), + compute_create_address(address=sender, nonce=0): Account( + balance=1, nonce=2 + ), + sender: Account(nonce=1), }, { - "indexes": {"data": 3, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(balance=2, nonce=1), - compute_create_address(address=sender, nonce=0): Account( - balance=0, nonce=2 - ), - sender: Account(nonce=1), - }, + contract_0: Account(balance=2, nonce=1), + compute_create_address(address=sender, nonce=0): Account( + balance=0, nonce=2 + ), + sender: Account(nonce=1), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 0, (1, 0, 0): 1, (2, 0, 0): 2, (3, 0, 0): 3}[d, g, v] + ] + _exc = None tx_data = [ Op.CREATE2(value=0x0, offset=0x0, size=0x0, salt=0x0) + Op.STOP, diff --git a/tests/ported_static/stCreate2/test_create2collision_code2.py b/tests/ported_static/stCreate2/test_create2collision_code2.py index 6d1bb84bfa3..2301580f9a3 100644 --- a/tests/ported_static/stCreate2/test_create2collision_code2.py +++ b/tests/ported_static/stCreate2/test_create2collision_code2.py @@ -23,9 +23,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -87,36 +84,14 @@ def test_create2collision_code2( address=Address(0xFCE41D047B4A1D4450382DCC29EC7E5FEDC5F9A3), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account( - code=bytes.fromhex("010203"), balance=0, nonce=1 - ), - compute_create_address(address=sender, nonce=0): Account( - code=b"", balance=1, nonce=2 - ), - sender: Account(nonce=1), - }, - }, - { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account( - code=bytes.fromhex("010203"), balance=0, nonce=1 - ), - compute_create_address(address=sender, nonce=0): Account( - code=b"", balance=1, nonce=2 - ), - sender: Account(nonce=1), - }, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = { + contract_0: Account(code=bytes.fromhex("010203"), balance=0, nonce=1), + compute_create_address(address=sender, nonce=0): Account( + code=b"", balance=1, nonce=2 + ), + sender: Account(nonce=1), + } + _exc = None tx_data = [ Op.MSTORE(offset=0x0, value=0x620102036000526003601DF3) diff --git a/tests/ported_static/stCreate2/test_create2collision_selfdestructed.py b/tests/ported_static/stCreate2/test_create2collision_selfdestructed.py index 16263ba244b..fd436e8402c 100644 --- a/tests/ported_static/stCreate2/test_create2collision_selfdestructed.py +++ b/tests/ported_static/stCreate2/test_create2collision_selfdestructed.py @@ -24,9 +24,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -113,52 +110,40 @@ def test_create2collision_selfdestructed( address=Address(0xEC2C6832D00680ECE8FF9254F81FDAB0A5A2AC50), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(balance=0, nonce=0), - Address(0x0000000000000000000000000000000000000010): Account( - balance=1 - ), - compute_create_address(address=sender, nonce=0): Account( - storage={0: 0}, balance=1, nonce=2 - ), - sender: Account(nonce=1), - }, + contract_0: Account(balance=0, nonce=0), + Address(0x0000000000000000000000000000000000000010): Account( + balance=1 + ), + compute_create_address(address=sender, nonce=0): Account( + storage={0: 0}, balance=1, nonce=2 + ), + sender: Account(nonce=1), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_1: Account(balance=0, nonce=0), - Address(0x0000000000000000000000000000000000000010): Account( - balance=1 - ), - compute_create_address(address=sender, nonce=0): Account( - storage={0: 0}, balance=1, nonce=2 - ), - sender: Account(nonce=1), - }, + contract_1: Account(balance=0, nonce=0), + Address(0x0000000000000000000000000000000000000010): Account( + balance=1 + ), + compute_create_address(address=sender, nonce=0): Account( + storage={0: 0}, balance=1, nonce=2 + ), + sender: Account(nonce=1), }, { - "indexes": {"data": 2, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_2: Account(balance=0, nonce=0), - Address(0x0000000000000000000000000000000000000010): Account( - balance=1 - ), - compute_create_address(address=sender, nonce=0): Account( - storage={0: 0}, balance=1, nonce=2 - ), - sender: Account(nonce=1), - }, + contract_2: Account(balance=0, nonce=0), + Address(0x0000000000000000000000000000000000000010): Account( + balance=1 + ), + compute_create_address(address=sender, nonce=0): Account( + storage={0: 0}, balance=1, nonce=2 + ), + sender: Account(nonce=1), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1, (2, 0, 0): 2}[d, g, v]] + _exc = None # EIP-8037 NEW_ACCOUNT state-gas pushes both the outer tx and the # inner CALL over their original budgets on Amsterdam. Pre-EIP-8037 diff --git a/tests/ported_static/stCreate2/test_create2collision_selfdestructed2.py b/tests/ported_static/stCreate2/test_create2collision_selfdestructed2.py index cc5a26cde9a..c4d73e6f01a 100644 --- a/tests/ported_static/stCreate2/test_create2collision_selfdestructed2.py +++ b/tests/ported_static/stCreate2/test_create2collision_selfdestructed2.py @@ -23,9 +23,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -97,37 +94,29 @@ def test_create2collision_selfdestructed2( address=Address(0xCFF64F4C5DF8F436C4F2C1AF4B2E3F9E3004C779), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={}, - code=bytes.fromhex("6010ff00"), - balance=0, - nonce=0, - ), - Address(0x0000000000000000000000000000000000000010): Account( - balance=1 - ), - sender: Account(nonce=1), - }, + contract_0: Account( + storage={}, + code=bytes.fromhex("6010ff00"), + balance=0, + nonce=0, + ), + Address(0x0000000000000000000000000000000000000010): Account( + balance=1 + ), + sender: Account(nonce=1), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_1: Account(balance=0, nonce=1), - Address(0x0000000000000000000000000000000000000010): Account( - balance=1 - ), - sender: Account(nonce=1), - }, + contract_1: Account(balance=0, nonce=1), + Address(0x0000000000000000000000000000000000000010): Account( + balance=1 + ), + sender: Account(nonce=1), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None # EIP-8037 NEW_ACCOUNT state-gas pushes both the outer tx and the # inner CALL over their original budgets on Amsterdam. Pre-EIP-8037 diff --git a/tests/ported_static/stCreate2/test_create2no_cash.py b/tests/ported_static/stCreate2/test_create2no_cash.py index 0d5894a3320..5680123995a 100644 --- a/tests/ported_static/stCreate2/test_create2no_cash.py +++ b/tests/ported_static/stCreate2/test_create2no_cash.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -87,32 +84,24 @@ def test_create2no_cash( address=Address(0xE2B35478FDD26477CC576DD906E6277761246A3C), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": [0, 2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(balance=100), - Address( - 0x12AAEFBC0350A026228076E5369E6CE148CE67BE - ): Account.NONEXISTENT, - sender: Account(nonce=1), - }, + contract_0: Account(balance=100), + Address( + 0x12AAEFBC0350A026228076E5369E6CE148CE67BE + ): Account.NONEXISTENT, + sender: Account(nonce=1), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(balance=0), - Address(0x12AAEFBC0350A026228076E5369E6CE148CE67BE): Account( - balance=101 - ), - sender: Account(nonce=1), - }, + contract_0: Account(balance=0), + Address(0x12AAEFBC0350A026228076E5369E6CE148CE67BE): Account( + balance=101 + ), + sender: Account(nonce=1), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1, (2, 0, 0): 0}[d, g, v]] + _exc = None tx_data = [ Op.CALL( diff --git a/tests/ported_static/stCreate2/test_create_message_reverted.py b/tests/ported_static/stCreate2/test_create_message_reverted.py index 0927af9f824..b3dc9d0c6d1 100644 --- a/tests/ported_static/stCreate2/test_create_message_reverted.py +++ b/tests/ported_static/stCreate2/test_create_message_reverted.py @@ -22,9 +22,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -91,30 +88,22 @@ def test_create_message_reverted( address=Address(0xB94F5374FCE5EDBC8E2A8697C15331677E6EBF0B), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - Address( - 0x244FE9A7867EDCC140245E775071FBFE6EBEDBAE - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + Address( + 0x244FE9A7867EDCC140245E775071FBFE6EBEDBAE + ): Account.NONEXISTENT, }, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - Address(0x244FE9A7867EDCC140245E775071FBFE6EBEDBAE): Account( - storage={0: 12, 1: 13}, balance=0, nonce=1 - ), - }, + sender: Account(nonce=1), + Address(0x244FE9A7867EDCC140245E775071FBFE6EBEDBAE): Account( + storage={0: 12, 1: 13}, balance=0, nonce=1 + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 1, 0): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stCreate2/test_create_message_reverted_oog_in_init2.py b/tests/ported_static/stCreate2/test_create_message_reverted_oog_in_init2.py index 927b3fa082e..7ad38d264c2 100644 --- a/tests/ported_static/stCreate2/test_create_message_reverted_oog_in_init2.py +++ b/tests/ported_static/stCreate2/test_create_message_reverted_oog_in_init2.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -81,30 +78,22 @@ def test_create_message_reverted_oog_in_init2( address=Address(0xB94F5374FCE5EDBC8E2A8697C15331677E6EBF0B), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - Address( - 0xF3059E18A327C662766F6BA11808C400635847EF - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + Address( + 0xF3059E18A327C662766F6BA11808C400635847EF + ): Account.NONEXISTENT, }, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - Address(0xF3059E18A327C662766F6BA11808C400635847EF): Account( - storage={0: 12, 1: 13}, balance=0, nonce=1 - ), - }, + sender: Account(nonce=1), + Address(0xF3059E18A327C662766F6BA11808C400635847EF): Account( + storage={0: 12, 1: 13}, balance=0, nonce=1 + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 1, 0): 1}[d, g, v]] + _exc = None tx_data = [ Op.MSTORE(offset=0x0, value=0x600C600055600D600155) diff --git a/tests/ported_static/stCreate2/test_returndatacopy_following_create.py b/tests/ported_static/stCreate2/test_returndatacopy_following_create.py index 323a9dda6c8..5098ccf505d 100644 --- a/tests/ported_static/stCreate2/test_returndatacopy_following_create.py +++ b/tests/ported_static/stCreate2/test_returndatacopy_following_create.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -131,20 +128,12 @@ def test_returndatacopy_following_create( address=Address(0x1F572E5295C57F15886F9B263E2F6D2D6C7B5EC6), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_1: Account(storage={0: 1})}, - }, - { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={0: 1})}, - }, + expect_posts: list[dict] = [ + {contract_1: Account(storage={0: 1})}, + {contract_2: Account(storage={0: 1})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(contract_1, left_padding=True), diff --git a/tests/ported_static/stCreate2/test_revert_depth_create2_oog.py b/tests/ported_static/stCreate2/test_revert_depth_create2_oog.py index 860237360e1..cd344f8f886 100644 --- a/tests/ported_static/stCreate2/test_revert_depth_create2_oog.py +++ b/tests/ported_static/stCreate2/test_revert_depth_create2_oog.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -142,43 +139,42 @@ def test_revert_depth_create2_oog( address=Address(0xA000000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0x05A28FC366483258507BCF739658573CB47E4FAD): Account( - nonce=1 - ), - contract_0: Account(storage={0: 1, 1: 1, 4: 12}), - contract_1: Account(storage={2: 8, 3: 12}), - }, + Address(0x05A28FC366483258507BCF739658573CB47E4FAD): Account( + nonce=1 + ), + contract_0: Account(storage={0: 1, 1: 1, 4: 12}), + contract_1: Account(storage={2: 8, 3: 12}), }, { - "indexes": {"data": 0, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address( - 0x05A28FC366483258507BCF739658573CB47E4FAD - ): Account.NONEXISTENT, - contract_0: Account(storage={0: 1, 4: 12}), - contract_1: Account(storage={}), - }, + Address( + 0x05A28FC366483258507BCF739658573CB47E4FAD + ): Account.NONEXISTENT, + contract_0: Account(storage={0: 1, 4: 12}), + contract_1: Account(storage={}), }, { - "indexes": {"data": [0, 1], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - Address( - 0x05A28FC366483258507BCF739658573CB47E4FAD - ): Account.NONEXISTENT, - contract_0: Account(storage={}), - contract_1: Account(storage={}), - }, + Address( + 0x05A28FC366483258507BCF739658573CB47E4FAD + ): Account.NONEXISTENT, + contract_0: Account(storage={}), + contract_1: Account(storage={}), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + { + (0, 0, 0): 2, + (0, 0, 1): 2, + (0, 1, 0): 1, + (0, 1, 1): 1, + (1, 0, 0): 2, + (1, 0, 1): 2, + (1, 1, 0): 0, + (1, 1, 1): 0, + }[d, g, v] + ] + _exc = None tx_data = [ Hash(0xEA60), diff --git a/tests/ported_static/stCreate2/test_revert_depth_create2_oog_berlin.py b/tests/ported_static/stCreate2/test_revert_depth_create2_oog_berlin.py index d39042da203..2ecbe34a508 100644 --- a/tests/ported_static/stCreate2/test_revert_depth_create2_oog_berlin.py +++ b/tests/ported_static/stCreate2/test_revert_depth_create2_oog_berlin.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -142,43 +139,42 @@ def test_revert_depth_create2_oog_berlin( address=Address(0xA000000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0x05A28FC366483258507BCF739658573CB47E4FAD): Account( - nonce=1 - ), - contract_0: Account(storage={0: 1, 1: 1, 4: 12}), - contract_1: Account(storage={2: 8, 3: 12}), - }, + Address(0x05A28FC366483258507BCF739658573CB47E4FAD): Account( + nonce=1 + ), + contract_0: Account(storage={0: 1, 1: 1, 4: 12}), + contract_1: Account(storage={2: 8, 3: 12}), }, { - "indexes": {"data": 0, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address( - 0x05A28FC366483258507BCF739658573CB47E4FAD - ): Account.NONEXISTENT, - contract_0: Account(storage={0: 1, 4: 12}), - contract_1: Account(storage={}), - }, + Address( + 0x05A28FC366483258507BCF739658573CB47E4FAD + ): Account.NONEXISTENT, + contract_0: Account(storage={0: 1, 4: 12}), + contract_1: Account(storage={}), }, { - "indexes": {"data": [0, 1], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - Address( - 0x05A28FC366483258507BCF739658573CB47E4FAD - ): Account.NONEXISTENT, - contract_0: Account(storage={}), - contract_1: Account(storage={}), - }, + Address( + 0x05A28FC366483258507BCF739658573CB47E4FAD + ): Account.NONEXISTENT, + contract_0: Account(storage={}), + contract_1: Account(storage={}), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + { + (0, 0, 0): 2, + (0, 0, 1): 2, + (0, 1, 0): 1, + (0, 1, 1): 1, + (1, 0, 0): 2, + (1, 0, 1): 2, + (1, 1, 0): 0, + (1, 1, 1): 0, + }[d, g, v] + ] + _exc = None tx_data = [ Hash(0xEA60), diff --git a/tests/ported_static/stCreate2/test_revert_depth_create_address_collision.py b/tests/ported_static/stCreate2/test_revert_depth_create_address_collision.py index 9ecb01ac432..c02a30cab02 100644 --- a/tests/ported_static/stCreate2/test_revert_depth_create_address_collision.py +++ b/tests/ported_static/stCreate2/test_revert_depth_create_address_collision.py @@ -23,9 +23,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -148,55 +145,50 @@ def test_revert_depth_create_address_collision( address=Address(0x3E180B1862F9D158ABB5E519A6D8605540C23682), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={0: 1, 1: 1, 4: 12}, nonce=54), - contract_1: Account(storage={2: 8, 3: 12}), - }, + contract_0: Account(storage={0: 1, 1: 1, 4: 12}, nonce=54), + contract_1: Account(storage={2: 8, 3: 12}), }, { - "indexes": {"data": 0, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={0: 1, 4: 12}, nonce=54), - contract_1: Account(storage={}), - }, + contract_0: Account(storage={0: 1, 4: 12}, nonce=54), + contract_1: Account(storage={}), }, { - "indexes": {"data": 1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={}, - code=bytes.fromhex( - "60016000556000600060006000600073b000000000000000000000000000000000000000600035f1600155600c60045500" # noqa: E501 - ), - balance=5, - nonce=54, + contract_0: Account( + storage={}, + code=bytes.fromhex( + "60016000556000600060006000600073b000000000000000000000000000000000000000600035f1600155600c60045500" # noqa: E501 ), - contract_1: Account(storage={}), - }, + balance=5, + nonce=54, + ), + contract_1: Account(storage={}), }, { - "indexes": {"data": 0, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={}, - code=bytes.fromhex( - "60016000556000600060006000600073b000000000000000000000000000000000000000600035f1600155600c60045500" # noqa: E501 - ), - nonce=54, + contract_0: Account( + storage={}, + code=bytes.fromhex( + "60016000556000600060006000600073b000000000000000000000000000000000000000600035f1600155600c60045500" # noqa: E501 ), - contract_1: Account(storage={}), - }, + nonce=54, + ), + contract_1: Account(storage={}), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + { + (0, 0, 0): 3, + (0, 0, 1): 3, + (0, 1, 0): 1, + (0, 1, 1): 1, + (1, 0, 0): 2, + (1, 0, 1): 2, + (1, 1, 0): 0, + (1, 1, 1): 0, + }[d, g, v] + ] + _exc = None tx_data = [ Hash(0xEA60), diff --git a/tests/ported_static/stCreate2/test_revert_depth_create_address_collision_berlin.py b/tests/ported_static/stCreate2/test_revert_depth_create_address_collision_berlin.py index 7e8a5f6ff4b..58cd39a1d9f 100644 --- a/tests/ported_static/stCreate2/test_revert_depth_create_address_collision_berlin.py +++ b/tests/ported_static/stCreate2/test_revert_depth_create_address_collision_berlin.py @@ -23,9 +23,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -150,55 +147,50 @@ def test_revert_depth_create_address_collision_berlin( address=Address(0x3E180B1862F9D158ABB5E519A6D8605540C23682), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={0: 1, 1: 1, 4: 12}, nonce=54), - contract_1: Account(storage={2: 8, 3: 12}), - }, + contract_0: Account(storage={0: 1, 1: 1, 4: 12}, nonce=54), + contract_1: Account(storage={2: 8, 3: 12}), }, { - "indexes": {"data": 0, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={0: 1, 4: 12}, nonce=54), - contract_1: Account(storage={}), - }, + contract_0: Account(storage={0: 1, 4: 12}, nonce=54), + contract_1: Account(storage={}), }, { - "indexes": {"data": 1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={}, - code=bytes.fromhex( - "60016000556000600060006000600073b000000000000000000000000000000000000000600035f1600155600c60045500" # noqa: E501 - ), - balance=5, - nonce=54, + contract_0: Account( + storage={}, + code=bytes.fromhex( + "60016000556000600060006000600073b000000000000000000000000000000000000000600035f1600155600c60045500" # noqa: E501 ), - contract_1: Account(storage={}), - }, + balance=5, + nonce=54, + ), + contract_1: Account(storage={}), }, { - "indexes": {"data": 0, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={}, - code=bytes.fromhex( - "60016000556000600060006000600073b000000000000000000000000000000000000000600035f1600155600c60045500" # noqa: E501 - ), - nonce=54, + contract_0: Account( + storage={}, + code=bytes.fromhex( + "60016000556000600060006000600073b000000000000000000000000000000000000000600035f1600155600c60045500" # noqa: E501 ), - contract_1: Account(storage={}), - }, + nonce=54, + ), + contract_1: Account(storage={}), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + { + (0, 0, 0): 3, + (0, 0, 1): 3, + (0, 1, 0): 1, + (0, 1, 1): 1, + (1, 0, 0): 2, + (1, 0, 1): 2, + (1, 1, 0): 0, + (1, 1, 1): 0, + }[d, g, v] + ] + _exc = None tx_data = [ Hash(0xEA60), diff --git a/tests/ported_static/stCreate2/test_revert_opcode_create.py b/tests/ported_static/stCreate2/test_revert_opcode_create.py index 75dd02849b3..f72b5177687 100644 --- a/tests/ported_static/stCreate2/test_revert_opcode_create.py +++ b/tests/ported_static/stCreate2/test_revert_opcode_create.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -82,20 +79,12 @@ def test_revert_opcode_create( nonce=0, ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_0: Account(storage={0: 12, 1: 0}, nonce=1)}, - }, - { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_0: Account(nonce=0)}, - }, + expect_posts: list[dict] = [ + {contract_0: Account(storage={0: 12, 1: 0}, nonce=1)}, + {contract_0: Account(nonce=0)}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 1, 0): 1}[d, g, v]] + _exc = None tx_data = [ Bytes("600160005560016000fe6011600155"), diff --git a/tests/ported_static/stCreateTest/test_code_in_constructor.py b/tests/ported_static/stCreateTest/test_code_in_constructor.py index 9227244b39b..19f5e9b67c2 100644 --- a/tests/ported_static/stCreateTest/test_code_in_constructor.py +++ b/tests/ported_static/stCreateTest/test_code_in_constructor.py @@ -19,9 +19,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -249,46 +246,38 @@ def test_code_in_constructor( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": 0, "value": 0}, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={ - 0: 8, - 1: 10, - 2: compute_create_address(address=contract_1, nonce=0), - 3: 262, - 4: 0, - 5: 0x610100610100610100395861026052600060006020610260600061DA7A62FFFF, # noqa: E501 - 6: 0, - 7: 184, - }, - ), - }, + contract_0: Account( + storage={ + 0: 8, + 1: 10, + 2: compute_create_address(address=contract_1, nonce=0), + 3: 262, + 4: 0, + 5: 0x610100610100610100395861026052600060006020610260600061DA7A62FFFF, # noqa: E501 + 6: 0, + 7: 184, + }, + ), }, { - "indexes": {"data": 1, "gas": 0, "value": 0}, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={ - 0: 8, - 1: 10, - 2: 0x33C409678A4289F0184C95C627BA09DA2DAEAA46, - 3: 262, - 4: 0, - 5: 0x610100610100610100395861026052600060006020610260600061DA7A62FFFF, # noqa: E501 - 6: 0, - 7: 184, - }, - ), - }, + contract_0: Account( + storage={ + 0: 8, + 1: 10, + 2: 0x33C409678A4289F0184C95C627BA09DA2DAEAA46, + 3: 262, + 4: 0, + 5: 0x610100610100610100395861026052600060006020610260600061DA7A62FFFF, # noqa: E501 + 6: 0, + 7: 184, + }, + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Bytes("83c7d758") + Hash(0x1), diff --git a/tests/ported_static/stCreateTest/test_create_address_warm_after_fail.py b/tests/ported_static/stCreateTest/test_create_address_warm_after_fail.py index 358473d4fb0..c7b726159b0 100644 --- a/tests/ported_static/stCreateTest/test_create_address_warm_after_fail.py +++ b/tests/ported_static/stCreateTest/test_create_address_warm_after_fail.py @@ -33,9 +33,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -394,469 +391,410 @@ def test_create_address_warm_after_fail( # Derive the delta from the fork so it is 0 pre-EIP-8037. cold_account_delta = fork.gas_costs().COLD_ACCOUNT_ACCESS - 2600 - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": [0, 2, 11, 4], "gas": -1, "value": [0]}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account( - storage={ - 0: 0, - 2: 1, - 3: 1, - 4: 1, - 5: 1, - 12: 328, - 13: 316, - 14: 2828 + cold_account_delta, - 15: 316, - }, - nonce=1, - ), - compute_create_address( - address=contract_0, nonce=0 - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + contract_0: Account( + storage={ + 0: 0, + 2: 1, + 3: 1, + 4: 1, + 5: 1, + 12: 328, + 13: 316, + 14: 2828 + cold_account_delta, + 15: 316, + }, + nonce=1, + ), + compute_create_address( + address=contract_0, nonce=0 + ): Account.NONEXISTENT, }, { - "indexes": {"data": [0, 2, 11, 4], "gas": -1, "value": [1]}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account( - storage={ - 0: 0, - 2: 1, - 3: 1, - 4: 1, - 5: 1, - 12: 32028, - 13: 7016, - 14: 34528, - 15: 7016, - }, - nonce=1, - ), - compute_create_address(address=contract_0, nonce=0): Account( - code=b"", balance=2, nonce=0 - ), - Address(0xD4E7AE083132925A4927C1F5816238BA17B82A00): Account( - code=b"", balance=2, nonce=0 - ), - }, + sender: Account(nonce=1), + contract_0: Account( + storage={ + 0: 0, + 2: 1, + 3: 1, + 4: 1, + 5: 1, + 12: 32028, + 13: 7016, + 14: 34528, + 15: 7016, + }, + nonce=1, + ), + compute_create_address(address=contract_0, nonce=0): Account( + code=b"", balance=2, nonce=0 + ), + Address(0xD4E7AE083132925A4927C1F5816238BA17B82A00): Account( + code=b"", balance=2, nonce=0 + ), }, { - "indexes": {"data": [1], "gas": -1, "value": [0]}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account( - storage={ - 0: 0, - 2: 1, - 3: 1, - 4: 1, - 5: 1, - 12: 328, - 13: 316, - 14: 2828 + cold_account_delta, - 15: 316, - }, - nonce=1, - ), - compute_create_address( - address=contract_0, nonce=0 - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + contract_0: Account( + storage={ + 0: 0, + 2: 1, + 3: 1, + 4: 1, + 5: 1, + 12: 32028, + 13: 7016, + 14: 34528, + 15: 7016, + }, + nonce=1, + ), + Address(0x43255EE039968E0254887FC8C7172736983D878C): Account( + code=b"", balance=2, nonce=0 + ), + Address(0xD4E7AE083132925A4927C1F5816238BA17B82A00): Account( + code=b"", balance=2, nonce=0 + ), }, { - "indexes": {"data": [1], "gas": -1, "value": [1]}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account( - storage={ - 0: 0, - 2: 1, - 3: 1, - 4: 1, - 5: 1, - 12: 32028, - 13: 7016, - 14: 34528, - 15: 7016, - }, - nonce=1, - ), - Address(0x43255EE039968E0254887FC8C7172736983D878C): Account( - code=b"", balance=2, nonce=0 - ), - Address(0xD4E7AE083132925A4927C1F5816238BA17B82A00): Account( - code=b"", balance=2, nonce=0 - ), - }, + sender: Account(nonce=1), + contract_0: Account( + storage={ + 0: 0, + 2: 1, + 3: 1, + 4: 1, + 5: 1, + 12: 328, + 13: 316, + 14: 2828 + cold_account_delta, + 15: 316, + }, + nonce=1, + ), + Address( + 0x562D97E3E4D6D3C6E791EA64BB73D820871AA219 + ): Account.NONEXISTENT, }, { - "indexes": {"data": [12], "gas": -1, "value": [0]}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account( - storage={ - 0: 0, - 2: 1, - 3: 1, - 4: 1, - 5: 1, - 12: 328, - 13: 316, - 14: 2828 + cold_account_delta, - 15: 316, - }, - nonce=1, - ), - Address( - 0x562D97E3E4D6D3C6E791EA64BB73D820871AA219 - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + contract_0: Account( + storage={ + 0: 0, + 2: 1, + 3: 1, + 4: 1, + 5: 1, + 12: 32028, + 13: 7016, + 14: 34528, + 15: 7016, + }, + nonce=1, + ), + Address(0x562D97E3E4D6D3C6E791EA64BB73D820871AA219): Account( + code=b"", balance=2, nonce=0 + ), + Address(0xD4E7AE083132925A4927C1F5816238BA17B82A00): Account( + code=b"", balance=2, nonce=0 + ), }, { - "indexes": {"data": [12], "gas": -1, "value": [1]}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account( - storage={ - 0: 0, - 2: 1, - 3: 1, - 4: 1, - 5: 1, - 12: 32028, - 13: 7016, - 14: 34528, - 15: 7016, - }, - nonce=1, - ), - Address(0x562D97E3E4D6D3C6E791EA64BB73D820871AA219): Account( - code=b"", balance=2, nonce=0 - ), - Address(0xD4E7AE083132925A4927C1F5816238BA17B82A00): Account( - code=b"", balance=2, nonce=0 - ), - }, + sender: Account(nonce=1), + contract_0: Account( + storage={ + 0: 0, + 2: 1, + 3: 1, + 4: 1, + 5: 1, + 12: 328, + 13: 316, + 14: 2828 + cold_account_delta, + 15: 316, + }, + nonce=1, + ), + Address( + 0x014001FDBEDE82315F4B8C2A7D45E980A8A4A12E + ): Account.NONEXISTENT, }, { - "indexes": {"data": [3], "gas": -1, "value": [0]}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account( - storage={ - 0: 0, - 2: 1, - 3: 1, - 4: 1, - 5: 1, - 12: 328, - 13: 316, - 14: 2828 + cold_account_delta, - 15: 316, - }, - nonce=1, - ), - Address( - 0x014001FDBEDE82315F4B8C2A7D45E980A8A4A12E - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + contract_0: Account( + storage={ + 0: 0, + 2: 1, + 3: 1, + 4: 1, + 5: 1, + 12: 32028, + 13: 7016, + 14: 34528, + 15: 7016, + }, + nonce=1, + ), + Address(0x014001FDBEDE82315F4B8C2A7D45E980A8A4A12E): Account( + code=b"", balance=2, nonce=0 + ), + Address(0xD4E7AE083132925A4927C1F5816238BA17B82A00): Account( + code=b"", balance=2, nonce=0 + ), }, { - "indexes": {"data": [3], "gas": -1, "value": [1]}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account( - storage={ - 0: 0, - 2: 1, - 3: 1, - 4: 1, - 5: 1, - 12: 32028, - 13: 7016, - 14: 34528, - 15: 7016, - }, - nonce=1, - ), - Address(0x014001FDBEDE82315F4B8C2A7D45E980A8A4A12E): Account( - code=b"", balance=2, nonce=0 - ), - Address(0xD4E7AE083132925A4927C1F5816238BA17B82A00): Account( - code=b"", balance=2, nonce=0 - ), - }, + sender: Account(nonce=1), + contract_0: Account( + storage={ + 0: 0, + 2: 1, + 3: 1, + 4: 1, + 5: 1, + 12: 328, + 13: 316, + 14: 2828 + cold_account_delta, + 15: 316, + }, + nonce=1, + ), + Address( + 0xA13D43586820E5D97A3FD1960625D537C86DC4E7 + ): Account.NONEXISTENT, }, { - "indexes": {"data": [5], "gas": -1, "value": [0]}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account( - storage={ - 0: 0, - 2: 1, - 3: 1, - 4: 1, - 5: 1, - 12: 328, - 13: 316, - 14: 2828 + cold_account_delta, - 15: 316, - }, - nonce=1, - ), - Address( - 0xA13D43586820E5D97A3FD1960625D537C86DC4E7 - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + contract_0: Account( + storage={ + 0: 0, + 2: 1, + 3: 1, + 4: 1, + 5: 1, + 12: 32028, + 13: 7016, + 14: 34528, + 15: 7016, + }, + nonce=1, + ), + Address(0xA13D43586820E5D97A3FD1960625D537C86DC4E7): Account( + code=b"", balance=2, nonce=0 + ), + Address(0xD4E7AE083132925A4927C1F5816238BA17B82A00): Account( + code=b"", balance=2, nonce=0 + ), }, { - "indexes": {"data": [5], "gas": -1, "value": [1]}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account( - storage={ - 0: 0, - 2: 1, - 3: 1, - 4: 1, - 5: 1, - 12: 32028, - 13: 7016, - 14: 34528, - 15: 7016, - }, - nonce=1, - ), - Address(0xA13D43586820E5D97A3FD1960625D537C86DC4E7): Account( - code=b"", balance=2, nonce=0 - ), - Address(0xD4E7AE083132925A4927C1F5816238BA17B82A00): Account( - code=b"", balance=2, nonce=0 - ), - }, + sender: Account(nonce=1), + contract_0: Account( + storage={ + 0: 1, + 2: 1, + 3: 1, + 4: 1, + 5: 1, + 12: 2828 + cold_account_delta, + 13: 316, + 14: 2828 + cold_account_delta, + 15: 316, + }, + nonce=0, + ), + Address( + 0xB2050FC27AB6D6D42DC0CE6F7C0BF9481A4C3FC3 + ): Account.NONEXISTENT, + Address( + 0xD4E7AE083132925A4927C1F5816238BA17B82A00 + ): Account.NONEXISTENT, }, { - "indexes": {"data": [10], "gas": -1, "value": [0]}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account( - storage={ - 0: 1, - 2: 1, - 3: 1, - 4: 1, - 5: 1, - 12: 2828 + cold_account_delta, - 13: 316, - 14: 2828 + cold_account_delta, - 15: 316, - }, - nonce=0, - ), - Address( - 0xB2050FC27AB6D6D42DC0CE6F7C0BF9481A4C3FC3 - ): Account.NONEXISTENT, - Address( - 0xD4E7AE083132925A4927C1F5816238BA17B82A00 - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + contract_0: Account( + storage={ + 0: 1, + 2: 1, + 3: 1, + 4: 1, + 5: 1, + 12: 34528, + 13: 7016, + 14: 34528, + 15: 7016, + }, + nonce=0, + ), + Address(0xD4E7AE083132925A4927C1F5816238BA17B82A00): Account( + code=b"", balance=2, nonce=0 + ), + Address(0xB2050FC27AB6D6D42DC0CE6F7C0BF9481A4C3FC3): Account( + code=b"", balance=2, nonce=0 + ), }, { - "indexes": {"data": [10], "gas": -1, "value": [1]}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account( - storage={ - 0: 1, - 2: 1, - 3: 1, - 4: 1, - 5: 1, - 12: 34528, - 13: 7016, - 14: 34528, - 15: 7016, - }, - nonce=0, - ), - Address(0xD4E7AE083132925A4927C1F5816238BA17B82A00): Account( - code=b"", balance=2, nonce=0 - ), - Address(0xB2050FC27AB6D6D42DC0CE6F7C0BF9481A4C3FC3): Account( - code=b"", balance=2, nonce=0 - ), - }, + sender: Account(nonce=1), + contract_0: Account( + storage={ + 0: 0, + 2: 1, + 3: 1, + 4: 1, + 5: 1, + 12: 2828 + cold_account_delta, + 13: 316, + 14: 2828 + cold_account_delta, + 15: 316, + }, + nonce=0, + ), + compute_create_address( + address=contract_0, nonce=0 + ): Account.NONEXISTENT, }, { - "indexes": {"data": [8, 9, 6, 7], "gas": -1, "value": [0]}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account( - storage={ - 0: 0, - 2: 1, - 3: 1, - 4: 1, - 5: 1, - 12: 2828 + cold_account_delta, - 13: 316, - 14: 2828 + cold_account_delta, - 15: 316, - }, - nonce=0, - ), - compute_create_address( - address=contract_0, nonce=0 - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + contract_0: Account( + storage={ + 0: 0, + 2: 1, + 3: 1, + 4: 1, + 5: 1, + 12: 34528, + 13: 7016, + 14: 34528, + 15: 7016, + }, + nonce=0, + ), + Address(0xD4E7AE083132925A4927C1F5816238BA17B82A00): Account( + code=b"", balance=2, nonce=0 + ), }, { - "indexes": {"data": [8, 9, 6, 7], "gas": -1, "value": [1]}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account( - storage={ - 0: 0, - 2: 1, - 3: 1, - 4: 1, - 5: 1, - 12: 34528, - 13: 7016, - 14: 34528, - 15: 7016, - }, - nonce=0, - ), - Address(0xD4E7AE083132925A4927C1F5816238BA17B82A00): Account( - code=b"", balance=2, nonce=0 - ), - }, + sender: Account(nonce=1), + contract_0: Account( + storage={ + 0: compute_create_address(address=contract_0, nonce=0), + 2: 1, + 3: 1, + 4: 1, + 5: 1, + 12: 328, + 13: 316, + 14: 2828 + cold_account_delta, + 15: 316, + }, + nonce=1, + ), + compute_create_address(address=contract_0, nonce=0): Account( + code=bytes.fromhex("00") + ), }, { - "indexes": {"data": [13], "gas": -1, "value": [0]}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account( - storage={ - 0: compute_create_address(address=contract_0, nonce=0), - 2: 1, - 3: 1, - 4: 1, - 5: 1, - 12: 328, - 13: 316, - 14: 2828 + cold_account_delta, - 15: 316, - }, - nonce=1, - ), - compute_create_address(address=contract_0, nonce=0): Account( - code=bytes.fromhex("00") - ), - }, + sender: Account(nonce=1), + contract_0: Account( + storage={ + 0: compute_create_address(address=contract_0, nonce=0), + 2: 1, + 3: 1, + 4: 1, + 5: 1, + 12: 7028, + 13: 7016, + 14: 34528, + 15: 7016, + }, + nonce=1, + ), + compute_create_address(address=contract_0, nonce=0): Account( + code=bytes.fromhex("00"), balance=2, nonce=1 + ), + Address(0xD4E7AE083132925A4927C1F5816238BA17B82A00): Account( + code=b"", balance=2, nonce=0 + ), }, { - "indexes": {"data": [13], "gas": -1, "value": [1]}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account( - storage={ - 0: compute_create_address(address=contract_0, nonce=0), - 2: 1, - 3: 1, - 4: 1, - 5: 1, - 12: 7028, - 13: 7016, - 14: 34528, - 15: 7016, - }, - nonce=1, - ), - compute_create_address(address=contract_0, nonce=0): Account( - code=bytes.fromhex("00"), balance=2, nonce=1 - ), - Address(0xD4E7AE083132925A4927C1F5816238BA17B82A00): Account( - code=b"", balance=2, nonce=0 - ), - }, + sender: Account(nonce=1), + contract_0: Account( + storage={ + 0: 0xF7FEF4B66B1570A057D7D5CEC5C58846BEFA5B5C, + 2: 1, + 3: 1, + 4: 1, + 5: 1, + 12: 328, + 13: 316, + 14: 2828 + cold_account_delta, + 15: 316, + }, + nonce=1, + ), + Address(0xF7FEF4B66B1570A057D7D5CEC5C58846BEFA5B5C): Account( + code=bytes.fromhex("00"), nonce=1 + ), }, { - "indexes": {"data": [14], "gas": -1, "value": [0]}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account( - storage={ - 0: 0xF7FEF4B66B1570A057D7D5CEC5C58846BEFA5B5C, - 2: 1, - 3: 1, - 4: 1, - 5: 1, - 12: 328, - 13: 316, - 14: 2828 + cold_account_delta, - 15: 316, - }, - nonce=1, - ), - Address(0xF7FEF4B66B1570A057D7D5CEC5C58846BEFA5B5C): Account( - code=bytes.fromhex("00"), nonce=1 - ), - }, + sender: Account(nonce=1), + contract_0: Account( + storage={ + 0: 0xF7FEF4B66B1570A057D7D5CEC5C58846BEFA5B5C, + 2: 1, + 3: 1, + 4: 1, + 5: 1, + 12: 7028, + 13: 7016, + 14: 34528, + 15: 7016, + }, + nonce=1, + ), + Address(0xF7FEF4B66B1570A057D7D5CEC5C58846BEFA5B5C): Account( + code=bytes.fromhex("00"), balance=2, nonce=1 + ), + Address(0xD4E7AE083132925A4927C1F5816238BA17B82A00): Account( + code=b"", balance=2, nonce=0 + ), }, + ] + post = expect_posts[ { - "indexes": {"data": [14], "gas": -1, "value": [1]}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account( - storage={ - 0: 0xF7FEF4B66B1570A057D7D5CEC5C58846BEFA5B5C, - 2: 1, - 3: 1, - 4: 1, - 5: 1, - 12: 7028, - 13: 7016, - 14: 34528, - 15: 7016, - }, - nonce=1, - ), - Address(0xF7FEF4B66B1570A057D7D5CEC5C58846BEFA5B5C): Account( - code=bytes.fromhex("00"), balance=2, nonce=1 - ), - Address(0xD4E7AE083132925A4927C1F5816238BA17B82A00): Account( - code=b"", balance=2, nonce=0 - ), - }, - }, + (0, 0, 0): 0, + (0, 0, 1): 1, + (1, 0, 0): 0, + (1, 0, 1): 2, + (2, 0, 0): 0, + (2, 0, 1): 1, + (3, 0, 0): 5, + (3, 0, 1): 6, + (4, 0, 0): 0, + (4, 0, 1): 1, + (5, 0, 0): 7, + (5, 0, 1): 8, + (6, 0, 0): 11, + (6, 0, 1): 12, + (7, 0, 0): 11, + (7, 0, 1): 12, + (8, 0, 0): 11, + (8, 0, 1): 12, + (9, 0, 0): 11, + (9, 0, 1): 12, + (10, 0, 0): 9, + (10, 0, 1): 10, + (11, 0, 0): 0, + (11, 0, 1): 1, + (12, 0, 0): 3, + (12, 0, 1): 4, + (13, 0, 0): 13, + (13, 0, 1): 14, + (14, 0, 0): 15, + (14, 0, 1): 16, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("52c3fd24") + Hash(0x0), diff --git a/tests/ported_static/stCreateTest/test_create_collision_to_empty2.py b/tests/ported_static/stCreateTest/test_create_collision_to_empty2.py index 06f61cbd121..f9e7b970ce0 100644 --- a/tests/ported_static/stCreateTest/test_create_collision_to_empty2.py +++ b/tests/ported_static/stCreateTest/test_create_collision_to_empty2.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -191,61 +188,49 @@ def test_create_collision_to_empty2( address=Address(0x4B86C4ED99B87F0F396BC0C76885453C343916ED), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_1: Account(storage={}, nonce=0), - contract_4: Account(storage={}, code=b"", balance=10, nonce=0), - }, + sender: Account(nonce=1), + contract_1: Account(storage={}, nonce=0), + contract_4: Account(storage={}, code=b"", balance=10, nonce=0), }, { - "indexes": {"data": 0, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_1: Account(storage={1: contract_4}, nonce=1), - contract_4: Account( - storage={1: 1}, code=b"", balance=10, nonce=1 - ), - }, + sender: Account(nonce=1), + contract_1: Account(storage={1: contract_4}, nonce=1), + contract_4: Account(storage={1: 1}, code=b"", balance=10, nonce=1), }, { - "indexes": {"data": [1, 2], "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_2: Account(storage={1: 0}, nonce=0), - contract_5: Account(storage={}, code=b"", nonce=2), - }, + sender: Account(nonce=1), + contract_2: Account(storage={1: 0}, nonce=0), + contract_5: Account(storage={}, code=b"", nonce=2), }, { - "indexes": {"data": 1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_2: Account(storage={1: 0}, nonce=0), - contract_5: Account(storage={}, code=b"", nonce=2), - }, + sender: Account(nonce=1), + contract_3: Account(storage={1: 0}, nonce=0), + contract_6: Account( + storage={}, + code=bytes.fromhex("1122334455"), + nonce=0, + ), }, + ] + post = expect_posts[ { - "indexes": {"data": 2, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_3: Account(storage={1: 0}, nonce=0), - contract_6: Account( - storage={}, - code=bytes.fromhex("1122334455"), - nonce=0, - ), - }, - }, + (0, 0, 0): 1, + (0, 0, 1): 1, + (0, 1, 0): 0, + (0, 1, 1): 0, + (1, 0, 0): 2, + (1, 0, 1): 2, + (1, 1, 0): 2, + (1, 1, 1): 2, + (2, 0, 0): 3, + (2, 0, 1): 3, + (2, 1, 0): 2, + (2, 1, 1): 2, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Hash(contract_1, left_padding=True), diff --git a/tests/ported_static/stCreateTest/test_create_e_contract_create_ne_contract_in_init_oog_tr.py b/tests/ported_static/stCreateTest/test_create_e_contract_create_ne_contract_in_init_oog_tr.py index c5b2fbd670f..7f78b97d257 100644 --- a/tests/ported_static/stCreateTest/test_create_e_contract_create_ne_contract_in_init_oog_tr.py +++ b/tests/ported_static/stCreateTest/test_create_e_contract_create_ne_contract_in_init_oog_tr.py @@ -16,9 +16,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -79,38 +76,28 @@ def test_create_e_contract_create_ne_contract_in_init_oog_tr( nonce=0, ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 12}), - compute_create_address(address=sender, nonce=0): Account( - nonce=2 - ), - compute_create_address( - address=compute_create_address(address=sender, nonce=0), - nonce=0, - ): Account.NONEXISTENT, - }, + contract_0: Account(storage={1: 12}), + compute_create_address(address=sender, nonce=0): Account(nonce=2), + compute_create_address( + address=compute_create_address(address=sender, nonce=0), + nonce=0, + ): Account.NONEXISTENT, }, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 0}), - compute_create_address( - address=sender, nonce=0 - ): Account.NONEXISTENT, - compute_create_address( - address=compute_create_address(address=sender, nonce=0), - nonce=0, - ): Account.NONEXISTENT, - }, + contract_0: Account(storage={1: 0}), + compute_create_address( + address=sender, nonce=0 + ): Account.NONEXISTENT, + compute_create_address( + address=compute_create_address(address=sender, nonce=0), + nonce=0, + ): Account.NONEXISTENT, }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 1, 0): 1}[d, g, v]] + _exc = None tx_data = [ Op.POP( diff --git a/tests/ported_static/stCreateTest/test_create_fail_result.py b/tests/ported_static/stCreateTest/test_create_fail_result.py index c87f3c0ec2d..e440bdf3223 100644 --- a/tests/ported_static/stCreateTest/test_create_fail_result.py +++ b/tests/ported_static/stCreateTest/test_create_fail_result.py @@ -19,9 +19,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -526,161 +523,114 @@ def test_create_fail_result( address=Address(0x000000000000000000000000000000000000600D), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0, 1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_10: Account( - storage={ - 0: 0, - 1: 0, - 2: 0, - 16: 1, - 17: 64, - 18: 0xDEADBEEF, - 19: 24743, - }, - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_3: Account( - storage={ - 0: compute_create_address(address=contract_3, nonce=1), - 1: 0, - 2: 0, - 3: 0, - 16: 1, - 17: 64, - 18: 0xDEADBEEF, - 19: 24743, - }, - ), - }, + contract_10: Account( + storage={ + 0: 0, + 1: 0, + 2: 0, + 16: 1, + 17: 64, + 18: 0xDEADBEEF, + 19: 24743, + }, + ), }, { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_4: Account( - storage={ - 0: 0x65EE26A034447B6AC64ABDCA1CCCB7B747E4A231, - 1: 0, - 2: 0, - 3: 0, - 16: 1, - 17: 64, - 18: 0xDEADBEEF, - 19: 24743, - }, - ), - }, + contract_3: Account( + storage={ + 0: compute_create_address(address=contract_3, nonce=1), + 1: 0, + 2: 0, + 3: 0, + 16: 1, + 17: 64, + 18: 0xDEADBEEF, + 19: 24743, + }, + ), }, { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_3: Account( - storage={ - 0: 0, - 1: 32, - 2: 0xBAD0BAD0BAD, - 16: 1, - 17: 64, - 18: 0xDEADBEEF, - 19: 24743, - }, - ), - }, + contract_4: Account( + storage={ + 0: 0x65EE26A034447B6AC64ABDCA1CCCB7B747E4A231, + 1: 0, + 2: 0, + 3: 0, + 16: 1, + 17: 64, + 18: 0xDEADBEEF, + 19: 24743, + }, + ), }, { - "indexes": {"data": [5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_4: Account( - storage={ - 0: 0, - 1: 32, - 2: 0xBAD0BAD0BAD, - 16: 1, - 17: 64, - 18: 0xDEADBEEF, - 19: 24743, - }, - ), - }, + contract_3: Account( + storage={ + 0: 0, + 1: 32, + 2: 0xBAD0BAD0BAD, + 16: 1, + 17: 64, + 18: 0xDEADBEEF, + 19: 24743, + }, + ), }, { - "indexes": {"data": [6], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_5: Account( - storage={ - 0: 0, - 1: 0, - 16: 1, - 17: 64, - 18: 0xDEADBEEF, - 19: 24743, - }, - ), - }, + contract_4: Account( + storage={ + 0: 0, + 1: 32, + 2: 0xBAD0BAD0BAD, + 16: 1, + 17: 64, + 18: 0xDEADBEEF, + 19: 24743, + }, + ), }, { - "indexes": {"data": [7], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_5: Account( - storage={ - 0: 0, - 1: 0, - 16: 1, - 17: 64, - 18: 0xDEADBEEF, - 19: 24743, - }, - ), - }, + contract_5: Account( + storage={ + 0: 0, + 1: 0, + 16: 1, + 17: 64, + 18: 0xDEADBEEF, + 19: 24743, + }, + ), }, { - "indexes": {"data": [8], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_8: Account( - storage={ - 0: 0, - 1: 0, - 16: 1, - 17: 64, - 18: 0xDEADBEEF, - 19: 24743, - }, - ), - }, + contract_8: Account( + storage={ + 0: 0, + 1: 0, + 16: 1, + 17: 64, + 18: 0xDEADBEEF, + 19: 24743, + }, + ), }, + ] + post = expect_posts[ { - "indexes": {"data": [9], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_8: Account( - storage={ - 0: 0, - 1: 0, - 16: 1, - 17: 64, - 18: 0xDEADBEEF, - 19: 24743, - }, - ), - }, - }, + (0, 0, 0): 0, + (1, 0, 0): 0, + (2, 0, 0): 1, + (3, 0, 0): 2, + (4, 0, 0): 3, + (5, 0, 0): 4, + (6, 0, 0): 5, + (7, 0, 0): 5, + (8, 0, 0): 6, + (9, 0, 0): 6, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("1a8451e6") + Hash(0xF0) + Hash(0x6), diff --git a/tests/ported_static/stCreateTest/test_create_large_result.py b/tests/ported_static/stCreateTest/test_create_large_result.py index 936dde89a2a..6bd32897e8f 100644 --- a/tests/ported_static/stCreateTest/test_create_large_result.py +++ b/tests/ported_static/stCreateTest/test_create_large_result.py @@ -19,9 +19,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -251,130 +248,77 @@ def test_create_large_result( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun"], - "result": { - contract_0: Account(storage={1: 0}), - compute_create_address( - address=contract_0, nonce=0 - ): Account.NONEXISTENT, - }, + contract_0: Account(storage={1: 0}), + compute_create_address( + address=contract_0, nonce=0 + ): Account.NONEXISTENT, }, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 0}), - compute_create_address(address=contract_0, nonce=0): Account( - code=bytes.fromhex("6001600155") - ), - }, + contract_0: Account(storage={1: 0}), + compute_create_address(address=contract_0, nonce=0): Account( + code=bytes.fromhex("6001600155") + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 1, 0): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stCreateTest/test_create_oo_gafter_init_code_returndata2.py b/tests/ported_static/stCreateTest/test_create_oo_gafter_init_code_returndata2.py index 8b4ef73a768..58d82df7f8d 100644 --- a/tests/ported_static/stCreateTest/test_create_oo_gafter_init_code_returndata2.py +++ b/tests/ported_static/stCreateTest/test_create_oo_gafter_init_code_returndata2.py @@ -22,9 +22,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -90,32 +87,24 @@ def test_create_oo_gafter_init_code_returndata2( address=Address(0xB94F5374FCE5EDBC8E2A8697C15331677E6EBF0B), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 0}), - compute_create_address( - address=contract_0, nonce=0 - ): Account.NONEXISTENT, - }, + contract_0: Account(storage={1: 0}), + compute_create_address( + address=contract_0, nonce=0 + ): Account.NONEXISTENT, }, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={1: 0, 2: 0x6460016001556000526005601BF3} - ), - compute_create_address(address=contract_0, nonce=0): Account( - code=bytes.fromhex("6001600155") - ), - }, + contract_0: Account( + storage={1: 0, 2: 0x6460016001556000526005601BF3} + ), + compute_create_address(address=contract_0, nonce=0): Account( + code=bytes.fromhex("6001600155") + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 1, 0): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stCreateTest/test_create_oo_gafter_init_code_revert2.py b/tests/ported_static/stCreateTest/test_create_oo_gafter_init_code_revert2.py index b0099e00d23..bee7f34283a 100644 --- a/tests/ported_static/stCreateTest/test_create_oo_gafter_init_code_revert2.py +++ b/tests/ported_static/stCreateTest/test_create_oo_gafter_init_code_revert2.py @@ -18,9 +18,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -155,32 +152,22 @@ def test_create_oo_gafter_init_code_revert2( address=Address(0xD94F5374FCE5EDBC8E2A8697C15331677E6EBF0B), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_1: Account( - storage={1: 0x6460016001556000526005601BF3} - ), - compute_create_address( - address=contract_3, nonce=0 - ): Account.NONEXISTENT, - }, + contract_1: Account(storage={1: 0x6460016001556000526005601BF3}), + compute_create_address( + address=contract_3, nonce=0 + ): Account.NONEXISTENT, }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_2: Account(storage={1: 0}), - compute_create_address( - address=contract_3, nonce=0 - ): Account.NONEXISTENT, - }, + contract_2: Account(storage={1: 0}), + compute_create_address( + address=contract_3, nonce=0 + ): Account.NONEXISTENT, }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(contract_1, left_padding=True), diff --git a/tests/ported_static/stCreateTest/test_create_oo_gafter_max_codesize.py b/tests/ported_static/stCreateTest/test_create_oo_gafter_max_codesize.py index 4cd22b226bc..8b3f94e0bd1 100644 --- a/tests/ported_static/stCreateTest/test_create_oo_gafter_max_codesize.py +++ b/tests/ported_static/stCreateTest/test_create_oo_gafter_max_codesize.py @@ -18,9 +18,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -314,154 +311,139 @@ def test_create_oo_gafter_max_codesize( nonce=1, ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun"], - "result": { - contract_0: Account(storage={32: 295, 33: 551}), - contract_1: Account(storage={0: contract_1}), - }, + contract_0: Account(storage={32: 295, 33: 551}), + contract_1: Account(storage={0: contract_1}), }, + {contract_0: Account(storage={32: 295, 33: 551})}, { - "indexes": {"data": [3, 7], "gas": 0, "value": 0}, - "network": [">=Cancun"], - "result": {contract_0: Account(storage={32: 295, 33: 551})}, + contract_0: Account( + storage={ + 18: 18, + 19: 0x600060006000600060006160A761FFFFF1000000000000000000000000000000, # noqa: E501 + 20: contract_1, + 21: contract_1, + 32: 295, + 33: 551, + }, + ), }, { - "indexes": { - "data": [8, 9, 10, 11, 12, 13, 14, 15], - "gas": 0, - "value": 0, - }, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={ - 18: 18, - 19: 0x600060006000600060006160A761FFFFF1000000000000000000000000000000, # noqa: E501 - 20: contract_1, - 21: contract_1, - 32: 295, - 33: 551, - }, - ), - }, + contract_0: Account( + storage={ + 16: 32, + 17: contract_1, + 18: 18, + 19: 0x600060006000600060006160A761FFFFF1000000000000000000000000000000, # noqa: E501 + 20: contract_1, + 21: contract_1, + 32: 295, + 33: 551, + }, + ), }, { - "indexes": {"data": [16, 17], "gas": 0, "value": 0}, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={ - 16: 32, - 17: contract_1, - 18: 18, - 19: 0x600060006000600060006160A761FFFFF1000000000000000000000000000000, # noqa: E501 - 20: contract_1, - 21: contract_1, - 32: 295, - 33: 551, - }, - ), - }, + contract_0: Account( + storage={ + 16: contract_1, + 17: 0, + 18: contract_1, + 19: contract_1, + 20: contract_1, + 21: contract_1, + 32: contract_1, + 33: contract_1, + }, + ), }, + ] + post = expect_posts[ { - "indexes": { - "data": [18, 19, 20, 21, 22, 23, 24, 25], - "gas": 0, - "value": 0, - }, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={ - 16: contract_1, - 17: 0, - 18: contract_1, - 19: contract_1, - 20: contract_1, - 21: contract_1, - 32: contract_1, - 33: contract_1, - }, - ), - }, - }, + (0, 0, 0): 0, + (1, 0, 0): 0, + (2, 0, 0): 0, + (3, 0, 0): 1, + (4, 0, 0): 0, + (5, 0, 0): 0, + (6, 0, 0): 0, + (7, 0, 0): 1, + (8, 0, 0): 2, + (9, 0, 0): 2, + (10, 0, 0): 2, + (11, 0, 0): 2, + (12, 0, 0): 2, + (13, 0, 0): 2, + (14, 0, 0): 2, + (15, 0, 0): 2, + (16, 0, 0): 3, + (17, 0, 0): 3, + (18, 0, 0): 4, + (19, 0, 0): 4, + (20, 0, 0): 4, + (21, 0, 0): 4, + (22, 0, 0): 4, + (23, 0, 0): 4, + (24, 0, 0): 4, + (25, 0, 0): 4, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("048071d3") + Hash(0x1) + Hash(0x1) + Hash(0x0), diff --git a/tests/ported_static/stCreateTest/test_transaction_collision_to_empty2.py b/tests/ported_static/stCreateTest/test_transaction_collision_to_empty2.py index 2e85f6b9b3c..7c94b67eb8f 100644 --- a/tests/ported_static/stCreateTest/test_transaction_collision_to_empty2.py +++ b/tests/ported_static/stCreateTest/test_transaction_collision_to_empty2.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -86,34 +83,24 @@ def test_transaction_collision_to_empty2( pre[sender] = Account(balance=0xE8D4A51000) pre[contract_0] = Account(balance=10) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": 0, "value": 0}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account(storage={1: 1}, balance=10, nonce=1), - }, + sender: Account(nonce=1), + contract_0: Account(storage={1: 1}, balance=10, nonce=1), }, { - "indexes": {"data": -1, "gas": 0, "value": 1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account(storage={1: 1}, balance=11, nonce=1), - }, + sender: Account(nonce=1), + contract_0: Account(storage={1: 1}, balance=11, nonce=1), }, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account(storage={}, balance=10, nonce=0), - }, + sender: Account(nonce=1), + contract_0: Account(storage={}, balance=10, nonce=0), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 0, (0, 0, 1): 1, (0, 1, 0): 2, (0, 1, 1): 2}[d, g, v] + ] + _exc = None tx_data = [ Op.SSTORE(key=0x1, value=0x1), diff --git a/tests/ported_static/stCreateTest/test_transaction_collision_to_empty_but_code.py b/tests/ported_static/stCreateTest/test_transaction_collision_to_empty_but_code.py index ab1aedcd0b5..06409908f75 100644 --- a/tests/ported_static/stCreateTest/test_transaction_collision_to_empty_but_code.py +++ b/tests/ported_static/stCreateTest/test_transaction_collision_to_empty_but_code.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -93,34 +90,28 @@ def test_transaction_collision_to_empty_but_code( address=Address(0x6295EE1B4F6DD65047762F924ECD367C17EABF8F), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account( - storage={1: 0}, - code=bytes.fromhex("1122334455"), - nonce=0, - ), - }, + sender: Account(nonce=1), + contract_0: Account( + storage={1: 0}, + code=bytes.fromhex("1122334455"), + nonce=0, + ), }, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account( - storage={}, - code=bytes.fromhex("1122334455"), - nonce=0, - ), - }, + sender: Account(nonce=1), + contract_0: Account( + storage={}, + code=bytes.fromhex("1122334455"), + nonce=0, + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 0, (0, 0, 1): 0, (0, 1, 0): 1, (0, 1, 1): 1}[d, g, v] + ] + _exc = None tx_data = [ Op.SSTORE(key=0x1, value=0x1), diff --git a/tests/ported_static/stDelegatecallTestHomestead/test_call1024_oog.py b/tests/ported_static/stDelegatecallTestHomestead/test_call1024_oog.py index 2eb7e09753e..de6c621464e 100644 --- a/tests/ported_static/stDelegatecallTestHomestead/test_call1024_oog.py +++ b/tests/ported_static/stDelegatecallTestHomestead/test_call1024_oog.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -96,20 +93,12 @@ def test_call1024_oog( address=Address(0x62C5C9278DA01E6594D6FEDE061838CF5E597F2B), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 134, 1: 1, 2: 0x20B71})}, - }, - { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 146, 1: 1, 2: 0x23A51})}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={0: 134, 1: 1, 2: 0x20B71})}, + {target: Account(storage={0: 146, 1: 1, 2: 0x23A51})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 1, 0): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stDelegatecallTestHomestead/test_call1024_pre_calls.py b/tests/ported_static/stDelegatecallTestHomestead/test_call1024_pre_calls.py index 79dc8d66b56..94499cbe22c 100644 --- a/tests/ported_static/stDelegatecallTestHomestead/test_call1024_pre_calls.py +++ b/tests/ported_static/stDelegatecallTestHomestead/test_call1024_pre_calls.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -126,25 +123,13 @@ def test_call1024_pre_calls( address=Address(0x515E9A6500C10F0DB92754D10136694BB188153B), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun=Cancun=Cancun=Cancun"], - "result": {target: Account(storage={0: 0, 2: 0})}, - }, - { - "indexes": {"data": -1, "gas": 2, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1, 2: 1001})}, - }, - { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0, 2: 0})}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={0: 0, 2: 0})}, + {target: Account(storage={0: 1, 2: 1001})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 1, 0): 0, (0, 2, 0): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stEIP1153_transientStorage/test_trans_storage_ok.py b/tests/ported_static/stEIP1153_transientStorage/test_trans_storage_ok.py index 818e6e4d756..83d57567205 100644 --- a/tests/ported_static/stEIP1153_transientStorage/test_trans_storage_ok.py +++ b/tests/ported_static/stEIP1153_transientStorage/test_trans_storage_ok.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -1313,108 +1310,79 @@ def test_trans_storage_ok( address=Address(0x000000000000000000000000000000005D7935DF), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: contract_0, 1: 1}), - contract_0: Account(storage={1: 16, 2: 1, 3: 136}), - }, + target: Account(storage={0: contract_0, 1: 1}), + contract_0: Account(storage={1: 16, 2: 1, 3: 136}), }, { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: contract_1, 1: 1}), - contract_1: Account(storage={1: 16, 2: 1, 3: 136}), - }, + target: Account(storage={0: contract_1, 1: 1}), + contract_1: Account(storage={1: 16, 2: 1, 3: 136}), }, { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: contract_2, 1: 1}), - contract_2: Account(storage={1: 16, 2: 1, 3: 136}), - }, + target: Account(storage={0: contract_2, 1: 1}), + contract_2: Account(storage={1: 16, 2: 1, 3: 136}), }, { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: contract_0, 1: 1}), - contract_0: Account(storage={1: 256, 2: 1, 3: 32896}), - }, + target: Account(storage={0: contract_0, 1: 1}), + contract_0: Account(storage={1: 256, 2: 1, 3: 32896}), }, { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: contract_4, 1: 1}), - contract_4: Account(storage={1: 10, 2: 1, 3: 55}), - contract_3: Account(storage={0: 0, 1: 0}), - }, + target: Account(storage={0: contract_4, 1: 1}), + contract_4: Account(storage={1: 10, 2: 1, 3: 55}), + contract_3: Account(storage={0: 0, 1: 0}), }, { - "indexes": {"data": [5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: contract_4, 1: 1}), - contract_4: Account(storage={1: 50, 2: 1, 3: 1275}), - contract_3: Account(storage={0: 0, 1: 0}), - }, + target: Account(storage={0: contract_4, 1: 1}), + contract_4: Account(storage={1: 50, 2: 1, 3: 1275}), + contract_3: Account(storage={0: 0, 1: 0}), }, { - "indexes": {"data": [6], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: contract_5, 1: 1}), - contract_5: Account(storage={1: 6, 2: 1, 3: 63}), - }, + target: Account(storage={0: contract_5, 1: 1}), + contract_5: Account(storage={1: 6, 2: 1, 3: 63}), }, { - "indexes": {"data": [7], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: contract_6, 1: 1}), - contract_6: Account(storage={1: 6, 2: 1, 3: 63}), - }, + target: Account(storage={0: contract_6, 1: 1}), + contract_6: Account(storage={1: 6, 2: 1, 3: 63}), }, { - "indexes": {"data": [8], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: contract_8, 1: 1}), - contract_8: Account( - storage={0: 0, 1: 1, 2: 2, 3: 2, 17: 1, 18: 1, 19: 1}, - ), - }, + target: Account(storage={0: contract_8, 1: 1}), + contract_8: Account( + storage={0: 0, 1: 1, 2: 2, 3: 2, 17: 1, 18: 1, 19: 1}, + ), }, { - "indexes": { - "data": [9, 10, 11, 12, 13, 14], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: contract_9, 1: 1}), - contract_9: Account(storage={0: 2}), - }, + target: Account(storage={0: contract_9, 1: 1}), + contract_9: Account(storage={0: 2}), }, { - "indexes": {"data": [15], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: contract_11, 1: 1}), - contract_11: Account( - storage={0: 24743, 1: 24743, 2: 0, 16: 1, 17: 1, 18: 0}, - ), - }, + target: Account(storage={0: contract_11, 1: 1}), + contract_11: Account( + storage={0: 24743, 1: 24743, 2: 0, 16: 1, 17: 1, 18: 0}, + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + { + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 2, + (3, 0, 0): 3, + (4, 0, 0): 4, + (5, 0, 0): 5, + (6, 0, 0): 6, + (7, 0, 0): 7, + (8, 0, 0): 8, + (9, 0, 0): 9, + (10, 0, 0): 9, + (11, 0, 0): 9, + (12, 0, 0): 9, + (13, 0, 0): 9, + (14, 0, 0): 9, + (15, 0, 0): 10, + }[d, g, v] + ] + _exc = None tx_data = [ Bytes("ebd141d5") + Hash(0x10), diff --git a/tests/ported_static/stEIP1153_transientStorage/test_trans_storage_reset.py b/tests/ported_static/stEIP1153_transientStorage/test_trans_storage_reset.py index de1ad618dd6..e618de7cb6e 100644 --- a/tests/ported_static/stEIP1153_transientStorage/test_trans_storage_reset.py +++ b/tests/ported_static/stEIP1153_transientStorage/test_trans_storage_reset.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -525,78 +522,66 @@ def test_trans_storage_reset( nonce=1, ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: reverter, 1: 1}), - reverter: Account(storage={0: 48879, 1: 1}), - dead: Account(storage={16: 1}), - }, + target: Account(storage={0: reverter, 1: 1}), + reverter: Account(storage={0: 48879, 1: 1}), + dead: Account(storage={16: 1}), }, { - "indexes": {"data": [3, 6, 9, 12, 15, 18], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: reverter, 1: 1}), - reverter: Account(storage={0: 48879, 1: 1, 16: 1}), - }, + target: Account(storage={0: reverter, 1: 1}), + reverter: Account(storage={0: 48879, 1: 1, 16: 1}), }, { - "indexes": {"data": [24, 27], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: reverter, 1: 1}), - reverter: Account(storage={0: 0xBAD0BEEF, 1: 1, 16: 32343}), - }, + target: Account(storage={0: reverter, 1: 1}), + reverter: Account(storage={0: 0xBAD0BEEF, 1: 1, 16: 32343}), }, { - "indexes": { - "data": [ - 1, - 2, - 4, - 5, - 7, - 8, - 10, - 11, - 13, - 14, - 16, - 17, - 19, - 20, - 22, - 23, - 25, - 26, - 28, - 29, - ], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: reverter, 1: 1}), - reverter: Account(storage={0: 24743, 1: 0}), - dead: Account(storage={16: 24743}), - }, + target: Account(storage={0: reverter, 1: 1}), + reverter: Account(storage={0: 24743, 1: 0}), + dead: Account(storage={16: 24743}), }, { - "indexes": {"data": [21], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: reverter, 1: 1}), - reverter: Account(storage={0: 24743, 1: 1}), - dead: Account(storage={16: 32343}), - }, + target: Account(storage={0: reverter, 1: 1}), + reverter: Account(storage={0: 24743, 1: 1}), + dead: Account(storage={16: 32343}), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + { + (0, 0, 0): 0, + (1, 0, 0): 3, + (2, 0, 0): 3, + (3, 0, 0): 1, + (4, 0, 0): 3, + (5, 0, 0): 3, + (6, 0, 0): 1, + (7, 0, 0): 3, + (8, 0, 0): 3, + (9, 0, 0): 1, + (10, 0, 0): 3, + (11, 0, 0): 3, + (12, 0, 0): 1, + (13, 0, 0): 3, + (14, 0, 0): 3, + (15, 0, 0): 1, + (16, 0, 0): 3, + (17, 0, 0): 3, + (18, 0, 0): 1, + (19, 0, 0): 3, + (20, 0, 0): 3, + (21, 0, 0): 4, + (22, 0, 0): 3, + (23, 0, 0): 3, + (24, 0, 0): 2, + (25, 0, 0): 3, + (26, 0, 0): 3, + (27, 0, 0): 2, + (28, 0, 0): 3, + (29, 0, 0): 3, + }[d, g, v] + ] + _exc = None tx_data = [ Bytes("d6c2107a") diff --git a/tests/ported_static/stEIP150singleCodeGasPrices/test_eip2929_minus_ff.py b/tests/ported_static/stEIP150singleCodeGasPrices/test_eip2929_minus_ff.py index fbba23d97e0..e25b2727265 100644 --- a/tests/ported_static/stEIP150singleCodeGasPrices/test_eip2929_minus_ff.py +++ b/tests/ported_static/stEIP150singleCodeGasPrices/test_eip2929_minus_ff.py @@ -26,9 +26,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -322,28 +319,24 @@ def test_eip2929_minus_ff( nonce=0, ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_2: Account( - storage={0: 7726 + cold_account_delta, 1: 105} - ) - }, - }, + expect_posts: list[dict] = [ + {contract_2: Account(storage={0: 7726 + cold_account_delta, 1: 105})}, + {contract_2: Account(storage={0: 5126, 1: 105})}, + ] + post = expect_posts[ { - "indexes": { - "data": [1, 2, 3, 4, 5, 6, 7, 8], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={0: 5126, 1: 105})}, - }, + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 1, + (3, 0, 0): 1, + (4, 0, 0): 1, + (5, 0, 0): 1, + (6, 0, 0): 1, + (7, 0, 0): 1, + (8, 0, 0): 1, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/stEIP150singleCodeGasPrices/test_gas_cost.py b/tests/ported_static/stEIP150singleCodeGasPrices/test_gas_cost.py index d539c14f735..322eea05095 100644 --- a/tests/ported_static/stEIP150singleCodeGasPrices/test_gas_cost.py +++ b/tests/ported_static/stEIP150singleCodeGasPrices/test_gas_cost.py @@ -29,9 +29,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -872,279 +869,154 @@ def test_gas_cost( address=Address(0xCCDCF3FF42C8382ABEEF05BB8949F975A6BC345C), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": { - "data": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 41, - 42, - 43, - 44, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97, - 98, - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135, - 136, - 137, - 138, - 139, - 140, - 141, - 142, - 143, - 144, - 145, - 146, - 147, - 148, - 149, - 150, - 151, - 152, - 153, - 154, - 155, - 156, - 157, - 158, - 159, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 174, - 175, - 176, - 177, - 178, - 179, - 180, - 181, - 182, - 183, - 184, - 185, - 186, - 187, - 188, - 189, - 190, - 191, - 192, - 193, - 194, - 195, - 196, - 197, - 198, - 199, - 200, - ], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": { - addr: Account( - storage=_storage_with_any( - { - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDA8, # noqa: E501 - }, - [1], - ), + addr: Account( + storage=_storage_with_any( + { + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDA8, # noqa: E501 + }, + [1], ), - }, + ), }, { - # SSTORE to a cold fresh slot: cold storage repricing. - "indexes": {"data": [39], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr: Account( - storage=_storage_with_any( - {0: 700 + cold_storage_delta}, [1] - ) - ) - }, + addr: Account( + storage=_storage_with_any({0: 700 + cold_storage_delta}, [1]) + ) }, + {addr: Account(storage=_storage_with_any({0: 1500}, [1]))}, { - "indexes": {"data": [40], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr: Account(storage=_storage_with_any({0: 1500}, [1])) - }, + addr: Account( + storage=_storage_with_any({0: 2000 + cold_account_delta}, [1]) + ) }, { - # SELFDESTRUCT to a cold (zero) beneficiary: cold account. - "indexes": {"data": [45], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr: Account( - storage=_storage_with_any( - {0: 2000 + cold_account_delta}, [1] - ) - ) - }, + addr: Account( + storage=_storage_with_any({0: 1300 + cold_account_delta}, [1]) + ) }, { - # BALANCE on a cold (zero) address: cold account. - "indexes": {"data": [23], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr: Account( - storage=_storage_with_any( - {0: 1300 + cold_account_delta}, [1] - ) - ) - }, + addr: Account( + storage=_storage_with_any({0: 1300 + code_read_delta}, [1]) + ) }, + ] + post = expect_posts[ { - # EXTCODESIZE on a cold (zero) address: cold account plus the - # extra warm access for the opcode's code read. - "indexes": {"data": [31], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr: Account( - storage=_storage_with_any({0: 1300 + code_read_delta}, [1]) - ) - }, - }, + (0, 0, 0): 0, + (1, 0, 0): 0, + (2, 0, 0): 0, + (3, 0, 0): 0, + (4, 0, 0): 0, + (5, 0, 0): 0, + (6, 0, 0): 0, + (7, 0, 0): 0, + (8, 0, 0): 0, + (9, 0, 0): 0, + (10, 0, 0): 0, + (11, 0, 0): 0, + (12, 0, 0): 0, + (13, 0, 0): 0, + (14, 0, 0): 0, + (15, 0, 0): 0, + (16, 0, 0): 0, + (17, 0, 0): 0, + (18, 0, 0): 0, + (19, 0, 0): 0, + (20, 0, 0): 0, + (21, 0, 0): 0, + (22, 0, 0): 0, + (23, 0, 0): 4, + (24, 0, 0): 0, + (25, 0, 0): 0, + (26, 0, 0): 0, + (27, 0, 0): 0, + (28, 0, 0): 0, + (29, 0, 0): 0, + (30, 0, 0): 0, + (31, 0, 0): 5, + (32, 0, 0): 0, + (33, 0, 0): 0, + (34, 0, 0): 0, + (35, 0, 0): 0, + (36, 0, 0): 0, + (37, 0, 0): 0, + (38, 0, 0): 0, + (39, 0, 0): 1, + (40, 0, 0): 2, + (41, 0, 0): 0, + (42, 0, 0): 0, + (43, 0, 0): 0, + (44, 0, 0): 0, + (45, 0, 0): 3, + (46, 0, 0): 0, + (47, 0, 0): 0, + (48, 0, 0): 0, + (49, 0, 0): 0, + (50, 0, 0): 0, + (51, 0, 0): 0, + (52, 0, 0): 0, + (53, 0, 0): 0, + (54, 0, 0): 0, + (55, 0, 0): 0, + (56, 0, 0): 0, + (57, 0, 0): 0, + (58, 0, 0): 0, + (59, 0, 0): 0, + (60, 0, 0): 0, + (61, 0, 0): 0, + (62, 0, 0): 0, + (63, 0, 0): 0, + (64, 0, 0): 0, + (65, 0, 0): 0, + (66, 0, 0): 0, + (67, 0, 0): 0, + (68, 0, 0): 0, + (69, 0, 0): 0, + (70, 0, 0): 0, + (71, 0, 0): 0, + (72, 0, 0): 0, + (73, 0, 0): 0, + (74, 0, 0): 0, + (75, 0, 0): 0, + (76, 0, 0): 0, + (77, 0, 0): 0, + (78, 0, 0): 0, + (79, 0, 0): 0, + (80, 0, 0): 0, + (81, 0, 0): 0, + (82, 0, 0): 0, + (83, 0, 0): 0, + (84, 0, 0): 0, + (85, 0, 0): 0, + (86, 0, 0): 0, + (87, 0, 0): 0, + (88, 0, 0): 0, + (89, 0, 0): 0, + (90, 0, 0): 0, + (91, 0, 0): 0, + (92, 0, 0): 0, + (93, 0, 0): 0, + (94, 0, 0): 0, + (95, 0, 0): 0, + (96, 0, 0): 0, + (97, 0, 0): 0, + (98, 0, 0): 0, + (99, 0, 0): 0, + (100, 0, 0): 0, + (101, 0, 0): 0, + (102, 0, 0): 0, + (103, 0, 0): 0, + (104, 0, 0): 0, + (105, 0, 0): 0, + (106, 0, 0): 0, + (107, 0, 0): 0, + (108, 0, 0): 0, + (109, 0, 0): 0, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("000000"), diff --git a/tests/ported_static/stEIP150singleCodeGasPrices/test_gas_cost_memory.py b/tests/ported_static/stEIP150singleCodeGasPrices/test_gas_cost_memory.py index ba5c6ac4b67..c77fa03983c 100644 --- a/tests/ported_static/stEIP150singleCodeGasPrices/test_gas_cost_memory.py +++ b/tests/ported_static/stEIP150singleCodeGasPrices/test_gas_cost_memory.py @@ -26,9 +26,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -777,93 +774,90 @@ def test_gas_cost_memory( nonce=0, ) - expect_entries_: list[dict] = [ - { - "indexes": { - "data": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - ], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": {contract_3: Account(storage={0: 0})}, - }, + expect_posts: list[dict] = [ + {contract_3: Account(storage={0: 0})}, + {contract_3: Account(storage={0: 1900 + cold_account_delta})}, + ] + post = expect_posts[ { - "indexes": { - "data": [36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": { - contract_3: Account(storage={0: 1900 + cold_account_delta}) - }, - }, + (0, 0, 0): 0, + (1, 0, 0): 0, + (2, 0, 0): 0, + (3, 0, 0): 0, + (4, 0, 0): 0, + (5, 0, 0): 0, + (6, 0, 0): 0, + (7, 0, 0): 0, + (8, 0, 0): 0, + (9, 0, 0): 0, + (10, 0, 0): 0, + (11, 0, 0): 0, + (12, 0, 0): 0, + (13, 0, 0): 0, + (14, 0, 0): 0, + (15, 0, 0): 0, + (16, 0, 0): 0, + (17, 0, 0): 0, + (18, 0, 0): 0, + (19, 0, 0): 0, + (20, 0, 0): 0, + (21, 0, 0): 0, + (22, 0, 0): 0, + (23, 0, 0): 0, + (24, 0, 0): 0, + (25, 0, 0): 0, + (26, 0, 0): 0, + (27, 0, 0): 0, + (28, 0, 0): 0, + (29, 0, 0): 0, + (30, 0, 0): 0, + (31, 0, 0): 0, + (32, 0, 0): 0, + (33, 0, 0): 0, + (34, 0, 0): 0, + (35, 0, 0): 0, + (36, 0, 0): 1, + (37, 0, 0): 1, + (38, 0, 0): 1, + (39, 0, 0): 1, + (40, 0, 0): 1, + (41, 0, 0): 1, + (42, 0, 0): 1, + (43, 0, 0): 1, + (44, 0, 0): 1, + (45, 0, 0): 1, + (46, 0, 0): 1, + (47, 0, 0): 1, + (48, 0, 0): 1, + (49, 0, 0): 0, + (50, 0, 0): 0, + (51, 0, 0): 0, + (52, 0, 0): 0, + (53, 0, 0): 0, + (54, 0, 0): 0, + (55, 0, 0): 0, + (56, 0, 0): 0, + (57, 0, 0): 0, + (58, 0, 0): 0, + (59, 0, 0): 0, + (60, 0, 0): 0, + (61, 0, 0): 0, + (62, 0, 0): 0, + (63, 0, 0): 0, + (64, 0, 0): 0, + (65, 0, 0): 0, + (66, 0, 0): 0, + (67, 0, 0): 0, + (68, 0, 0): 0, + (69, 0, 0): 0, + (70, 0, 0): 0, + (71, 0, 0): 0, + (72, 0, 0): 0, + (73, 0, 0): 0, + (74, 0, 0): 0, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("d086d23d") + Hash(0x0) + Hash(0x100) + Hash(0x25), diff --git a/tests/ported_static/stEIP1559/test_low_gas_limit.py b/tests/ported_static/stEIP1559/test_low_gas_limit.py index 9e42e627208..490699763c5 100644 --- a/tests/ported_static/stEIP1559/test_low_gas_limit.py +++ b/tests/ported_static/stEIP1559/test_low_gas_limit.py @@ -24,9 +24,6 @@ TransactionException, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -102,36 +99,18 @@ def test_low_gas_limit( nonce=0, ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {}, - "expect_exception": { - ">=Cancun": TransactionException.GAS_ALLOWANCE_EXCEEDED - }, - }, - { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 2})}, - }, - { - "indexes": {"data": -1, "gas": 2, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 24743})}, - }, - { - "indexes": {"data": -1, "gas": 3, "value": -1}, - "network": [">=Cancun"], - "result": {}, - "expect_exception": { - ">=Cancun": TransactionException.INTRINSIC_GAS_TOO_LOW - }, - }, + expect_posts: list[dict] = [ + {}, + {target: Account(storage={0: 2})}, + {target: Account(storage={0: 24743})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 0, (0, 1, 0): 1, (0, 2, 0): 2, (0, 3, 0): 0}[d, g, v] + ] + _exc = { + (0, 0, 0): TransactionException.GAS_ALLOWANCE_EXCEEDED, + (0, 3, 0): TransactionException.INTRINSIC_GAS_TOO_LOW, + }.get((d, g, v)) tx_data = [ Bytes("00"), diff --git a/tests/ported_static/stEIP1559/test_out_of_funds.py b/tests/ported_static/stEIP1559/test_out_of_funds.py index 8684ccdbf0d..064cbe04f98 100644 --- a/tests/ported_static/stEIP1559/test_out_of_funds.py +++ b/tests/ported_static/stEIP1559/test_out_of_funds.py @@ -16,9 +16,6 @@ TransactionException, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -93,31 +90,12 @@ def test_out_of_funds( nonce=0, ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {}, - "expect_exception": { - ">=Cancun": TransactionException.INSUFFICIENT_ACCOUNT_FUNDS - }, - }, - { - "indexes": {"data": -1, "gas": 1, "value": 0}, - "network": [">=Cancun"], - "result": {}, - }, - { - "indexes": {"data": -1, "gas": 1, "value": 1}, - "network": [">=Cancun"], - "result": {}, - "expect_exception": { - ">=Cancun": TransactionException.INSUFFICIENT_ACCOUNT_FUNDS - }, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post: dict = {} + _exc = { + (0, 0, 0): TransactionException.INSUFFICIENT_ACCOUNT_FUNDS, + (0, 0, 1): TransactionException.INSUFFICIENT_ACCOUNT_FUNDS, + (0, 1, 1): TransactionException.INSUFFICIENT_ACCOUNT_FUNDS, + }.get((d, g, v)) tx_data = [ Bytes("00"), diff --git a/tests/ported_static/stEIP1559/test_out_of_funds_old_types.py b/tests/ported_static/stEIP1559/test_out_of_funds_old_types.py index faa5538f101..a7c17b1b4ec 100644 --- a/tests/ported_static/stEIP1559/test_out_of_funds_old_types.py +++ b/tests/ported_static/stEIP1559/test_out_of_funds_old_types.py @@ -16,9 +16,6 @@ TransactionException, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -120,31 +117,15 @@ def test_out_of_funds_old_types( nonce=0, ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {}, - "expect_exception": { - ">=Cancun": TransactionException.INSUFFICIENT_ACCOUNT_FUNDS - }, - }, - { - "indexes": {"data": -1, "gas": 1, "value": 0}, - "network": [">=Cancun"], - "result": {}, - }, - { - "indexes": {"data": -1, "gas": 1, "value": 1}, - "network": [">=Cancun"], - "result": {}, - "expect_exception": { - ">=Cancun": TransactionException.INSUFFICIENT_ACCOUNT_FUNDS - }, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post: dict = {} + _exc = { + (0, 0, 0): TransactionException.INSUFFICIENT_ACCOUNT_FUNDS, + (0, 0, 1): TransactionException.INSUFFICIENT_ACCOUNT_FUNDS, + (0, 1, 1): TransactionException.INSUFFICIENT_ACCOUNT_FUNDS, + (1, 0, 0): TransactionException.INSUFFICIENT_ACCOUNT_FUNDS, + (1, 0, 1): TransactionException.INSUFFICIENT_ACCOUNT_FUNDS, + (1, 1, 1): TransactionException.INSUFFICIENT_ACCOUNT_FUNDS, + }.get((d, g, v)) tx_data = [ Bytes("00"), diff --git a/tests/ported_static/stEIP1559/test_val_causes_oof.py b/tests/ported_static/stEIP1559/test_val_causes_oof.py index dfbb5a3e162..00f9bb2b42a 100644 --- a/tests/ported_static/stEIP1559/test_val_causes_oof.py +++ b/tests/ported_static/stEIP1559/test_val_causes_oof.py @@ -17,9 +17,6 @@ TransactionException, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -158,36 +155,15 @@ def test_val_causes_oof( nonce=0, ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": [0, 1], "value": 0}, - "network": [">=Cancun"], - "result": {}, - }, - { - "indexes": {"data": -1, "gas": 0, "value": 1}, - "network": [">=Cancun"], - "result": {}, - "expect_exception": { - ">=Cancun": TransactionException.INSUFFICIENT_ACCOUNT_FUNDS - }, - }, - { - "indexes": {"data": -1, "gas": 1, "value": 1}, - "network": [">=Cancun"], - "result": {}, - }, - { - "indexes": {"data": -1, "gas": 2, "value": -1}, - "network": [">=Cancun"], - "result": {}, - "expect_exception": { - ">=Cancun": TransactionException.INSUFFICIENT_ACCOUNT_FUNDS - }, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post: dict = {} + _exc = { + (0, 0, 1): TransactionException.INSUFFICIENT_ACCOUNT_FUNDS, + (0, 2, 0): TransactionException.INSUFFICIENT_ACCOUNT_FUNDS, + (0, 2, 1): TransactionException.INSUFFICIENT_ACCOUNT_FUNDS, + (1, 0, 1): TransactionException.INSUFFICIENT_ACCOUNT_FUNDS, + (1, 2, 0): TransactionException.INSUFFICIENT_ACCOUNT_FUNDS, + (1, 2, 1): TransactionException.INSUFFICIENT_ACCOUNT_FUNDS, + }.get((d, g, v)) tx_data = [ Bytes("693c6139") + Hash(0x1), diff --git a/tests/ported_static/stEIP2930/test_address_opcodes.py b/tests/ported_static/stEIP2930/test_address_opcodes.py index 38279bf7408..27e896f9323 100644 --- a/tests/ported_static/stEIP2930/test_address_opcodes.py +++ b/tests/ported_static/stEIP2930/test_address_opcodes.py @@ -30,9 +30,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op, Opcode REFERENCE_SPEC_GIT_PATH = "N/A" @@ -586,129 +583,130 @@ def _account_delta(op: Opcode, warm: bool, base: int, **meta: int) -> int: # Slot 0 holds the first access (pre-warmed in the valid cases, cold # in the invalid cases); slot 1 holds the always-warm second access. - expect_entries_: list[dict] = [ - # valid (pre-warmed first access): both slots measure a warm - # access; only EXTCODESIZE/EXTCODECOPY shift. + + expect_posts: list[dict] = [ { - "indexes": { - "data": [0, 1, 4, 5, 6, 7, 8, 9, 10, 11], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={ - 0: 97 + balance_warm_d, - 1: 97 + balance_warm_d, - } - ) - }, + contract_0: Account( + storage={ + 0: 97 + balance_warm_d, + 1: 97 + balance_warm_d, + } + ) }, { - "indexes": { - "data": [12, 13, 16, 17, 18, 19, 20, 21, 22, 23], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={ - 0: 97 + extcodesize_warm_d, - 1: 97 + extcodesize_warm_d, - } - ) - }, + contract_0: Account( + storage={ + 0: 97 + extcodesize_warm_d, + 1: 97 + extcodesize_warm_d, + } + ) }, { - "indexes": { - "data": [24, 25, 28, 29, 30, 31, 32, 33, 34, 35], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={ - 0: 97 + extcodehash_warm_d, - 1: 97 + extcodehash_warm_d, - } - ) - }, + contract_0: Account( + storage={ + 0: 97 + extcodehash_warm_d, + 1: 97 + extcodehash_warm_d, + } + ) }, { - "indexes": { - "data": [36, 37, 40, 41, 42, 43, 44, 45, 46, 47], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={ - 0: 97 + extcodecopy_warm_d, - 1: 97 + extcodecopy_warm_d, - } - ) - }, + contract_0: Account( + storage={ + 0: 97 + extcodecopy_warm_d, + 1: 97 + extcodecopy_warm_d, + } + ) }, - # invalid (cold first access): slot 0 cold, slot 1 warm. { - "indexes": {"data": [2, 3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={ - 0: 2597 + balance_cold_d, - 1: 97 + balance_warm_d, - 2: 0, - } - ) - }, + contract_0: Account( + storage={ + 0: 2597 + balance_cold_d, + 1: 97 + balance_warm_d, + 2: 0, + } + ) }, { - "indexes": {"data": [14, 15], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={ - 0: 2597 + extcodesize_cold_d, - 1: 97 + extcodesize_warm_d, - 2: 0, - } - ) - }, + contract_0: Account( + storage={ + 0: 2597 + extcodesize_cold_d, + 1: 97 + extcodesize_warm_d, + 2: 0, + } + ) }, { - "indexes": {"data": [26, 27], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={ - 0: 2597 + extcodehash_cold_d, - 1: 97 + extcodehash_warm_d, - 2: 0, - } - ) - }, + contract_0: Account( + storage={ + 0: 2597 + extcodehash_cold_d, + 1: 97 + extcodehash_warm_d, + 2: 0, + } + ) }, { - "indexes": {"data": [38, 39], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={ - 0: 2597 + extcodecopy_cold_d, - 1: 97 + extcodecopy_warm_d, - 2: 0, - } - ) - }, + contract_0: Account( + storage={ + 0: 2597 + extcodecopy_cold_d, + 1: 97 + extcodecopy_warm_d, + 2: 0, + } + ) }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + { + (0, 0, 0): 0, + (1, 0, 0): 0, + (2, 0, 0): 4, + (3, 0, 0): 4, + (4, 0, 0): 0, + (5, 0, 0): 0, + (6, 0, 0): 0, + (7, 0, 0): 0, + (8, 0, 0): 0, + (9, 0, 0): 0, + (10, 0, 0): 0, + (11, 0, 0): 0, + (12, 0, 0): 1, + (13, 0, 0): 1, + (14, 0, 0): 5, + (15, 0, 0): 5, + (16, 0, 0): 1, + (17, 0, 0): 1, + (18, 0, 0): 1, + (19, 0, 0): 1, + (20, 0, 0): 1, + (21, 0, 0): 1, + (22, 0, 0): 1, + (23, 0, 0): 1, + (24, 0, 0): 2, + (25, 0, 0): 2, + (26, 0, 0): 6, + (27, 0, 0): 6, + (28, 0, 0): 2, + (29, 0, 0): 2, + (30, 0, 0): 2, + (31, 0, 0): 2, + (32, 0, 0): 2, + (33, 0, 0): 2, + (34, 0, 0): 2, + (35, 0, 0): 2, + (36, 0, 0): 3, + (37, 0, 0): 3, + (38, 0, 0): 7, + (39, 0, 0): 7, + (40, 0, 0): 3, + (41, 0, 0): 3, + (42, 0, 0): 3, + (43, 0, 0): 3, + (44, 0, 0): 3, + (45, 0, 0): 3, + (46, 0, 0): 3, + (47, 0, 0): 3, + }[d, g, v] + ] + _exc = None tx_data = [ Bytes("1a8451e6") + Hash(0x0) + Hash(0x0), diff --git a/tests/ported_static/stEIP2930/test_coinbase_t01.py b/tests/ported_static/stEIP2930/test_coinbase_t01.py index 754f52c4628..d6f916baa7c 100644 --- a/tests/ported_static/stEIP2930/test_coinbase_t01.py +++ b/tests/ported_static/stEIP2930/test_coinbase_t01.py @@ -26,9 +26,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -125,20 +122,8 @@ def test_coinbase_t01( # is 0 before EIP-8038. call_value_delta = fork.gas_costs().CALL_VALUE - 9000 - expect_entries_: list[dict] = [ - { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 6800 + call_value_delta})}, - }, - { - "indexes": {"data": [0, 2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 6800 + call_value_delta})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 6800 + call_value_delta})} + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/stEIP2930/test_coinbase_t2.py b/tests/ported_static/stEIP2930/test_coinbase_t2.py index 5e8924e0b17..b04eb227e17 100644 --- a/tests/ported_static/stEIP2930/test_coinbase_t2.py +++ b/tests/ported_static/stEIP2930/test_coinbase_t2.py @@ -26,9 +26,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -119,20 +116,8 @@ def test_coinbase_t2( # is 0 before EIP-8038. call_value_delta = fork.gas_costs().CALL_VALUE - 9000 - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 6800 + call_value_delta})}, - }, - { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 6800 + call_value_delta})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 6800 + call_value_delta})} + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/stEIP2930/test_manual_create.py b/tests/ported_static/stEIP2930/test_manual_create.py index 6bf26e1228a..71da47c1c99 100644 --- a/tests/ported_static/stEIP2930/test_manual_create.py +++ b/tests/ported_static/stEIP2930/test_manual_create.py @@ -29,9 +29,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -105,28 +102,20 @@ def _sstore_delta(cancun_cost: int, **metadata: int) -> int: 22100, key_warm=False, current_value=0, new_value=2 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address(address=sender, nonce=1): Account( - storage={0: 20008 + warm_set_delta, 1: 106} - ), - }, + compute_create_address(address=sender, nonce=1): Account( + storage={0: 20008 + warm_set_delta, 1: 106} + ), }, { - "indexes": {"data": [0, 1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address(address=sender, nonce=1): Account( - storage={0: 22108 + cold_set_delta, 1: 106} - ), - }, + compute_create_address(address=sender, nonce=1): Account( + storage={0: 22108 + cold_set_delta, 1: 106} + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 1, (1, 0, 0): 1, (2, 0, 0): 0}[d, g, v]] + _exc = None tx_data = [ Op.GAS diff --git a/tests/ported_static/stEIP2930/test_storage_costs.py b/tests/ported_static/stEIP2930/test_storage_costs.py index 5e588d94abe..fb3ff7c8ff8 100644 --- a/tests/ported_static/stEIP2930/test_storage_costs.py +++ b/tests/ported_static/stEIP2930/test_storage_costs.py @@ -32,9 +32,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -691,152 +688,85 @@ def _sstore_delta(cancun_cost: int, **metadata: int) -> int: ) d_cold_read = fork.gas_costs().COLD_STORAGE_ACCESS - 2100 - expect_entries_: list[dict] = [ - # declaredKeyWrite: warm fresh SSTORE-set. - { - "indexes": {"data": [0, 35], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={0: 2, 1: 20003 + d_warm_set}) - }, - }, - # undeclaredKeyWrite: cold fresh SSTORE-set. - { - "indexes": {"data": [6, 12, 18], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={0: 2, 1: 22103 + d_cold_set}) - }, - }, - # declaredKeyUpdate: warm SSTORE-reset (nonzero -> nonzero). - { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_3: Account(storage={0: 48879, 1: 2903 + d_warm_write}) - }, - }, - # undeclaredKeyUpdate: cold SSTORE-reset (nonzero -> nonzero). - { - "indexes": {"data": [9, 15, 21], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_3: Account(storage={0: 48879, 1: 5003 + d_cold_write}) - }, - }, - # declaredKeyNOP: warm value-unchanged SSTORE (no write). - { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_4: Account(storage={0: 24743, 1: 103})}, - }, - # undeclaredKeyNOP: cold value-unchanged SSTORE. - { - "indexes": {"data": [10, 16, 22], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_4: Account(storage={0: 24743, 1: 2203 + d_cold_noop}) - }, - }, - # declaredKeyNOP0: warm value-unchanged SSTORE (no write). - { - "indexes": {"data": [5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_5: Account(storage={1: 103})}, - }, - # undeclaredKeyNOP0: cold value-unchanged SSTORE. - { - "indexes": {"data": [11, 17, 23], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_5: Account(storage={1: 2203 + d_cold_noop})}, - }, - # declaredKeyDel: warm SSTORE-clear (nonzero -> 0). - { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_2: Account(storage={0: 0, 1: 2903 + d_warm_write}) - }, - }, - # undeclaredKeyDel: cold SSTORE-clear (nonzero -> 0). - { - "indexes": {"data": [8, 14, 20], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_2: Account(storage={0: 0, 1: 5003 + d_cold_write}) - }, - }, - # declaredKeyRead: warm SLOAD. - { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_1: Account(storage={1: 100})}, - }, - # undeclaredKeyRead: cold SLOAD. - { - "indexes": {"data": [7, 13, 19], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_1: Account(storage={1: 2100 + d_cold_read})}, - }, - # postSSTORE write: key already warm/dirty, no fresh-set spill. - { - "indexes": {"data": [24, 25], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_6: Account(storage={0: 2, 1: 103})}, - }, - # postSSTORE read: key already warm. + expect_posts: list[dict] = [ + {contract_0: Account(storage={0: 2, 1: 20003 + d_warm_set})}, + {contract_0: Account(storage={0: 2, 1: 22103 + d_cold_set})}, + {contract_3: Account(storage={0: 48879, 1: 2903 + d_warm_write})}, + {contract_3: Account(storage={0: 48879, 1: 5003 + d_cold_write})}, + {contract_4: Account(storage={0: 24743, 1: 103})}, + {contract_4: Account(storage={0: 24743, 1: 2203 + d_cold_noop})}, + {contract_5: Account(storage={1: 103})}, + {contract_5: Account(storage={1: 2203 + d_cold_noop})}, + {contract_2: Account(storage={0: 0, 1: 2903 + d_warm_write})}, + {contract_2: Account(storage={0: 0, 1: 5003 + d_cold_write})}, + {contract_1: Account(storage={1: 100})}, + {contract_1: Account(storage={1: 2100 + d_cold_read})}, + {contract_6: Account(storage={0: 2, 1: 103})}, + {contract_7: Account(storage={0: 24743, 1: 100})}, + {contract_8: Account(storage={0: 2, 1: 20000 + d_warm_set})}, + {contract_9: Account(storage={1: 97})}, { - "indexes": {"data": [26, 27], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_7: Account(storage={0: 24743, 1: 100})}, - }, - # postSLOAD write: SLOAD warms the key, then warm fresh SSTORE-set. - { - "indexes": {"data": [28, 29], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_8: Account(storage={0: 2, 1: 20000 + d_warm_set}) - }, - }, - # postSLOAD read: key already warm. - { - "indexes": {"data": [30, 31], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_9: Account(storage={1: 97})}, + contract_10: Account( + storage={ + 0: 2, + 1: 100, + 2: 20000 + d_warm_set, + 24743: 57005, + } + ) }, - # declaredTo: warm SLOAD (slot 1) + warm fresh SSTORE-set (slot 2). { - "indexes": {"data": [32], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_10: Account( - storage={ - 0: 2, - 1: 100, - 2: 20000 + d_warm_set, - 24743: 57005, - } - ) - }, + contract_10: Account( + storage={ + 0: 2, + 1: 2100 + d_cold_read, + 2: 22100 + d_cold_set, + 24743: 57005, + } + ), }, - # undeclaredTo: cold SLOAD (slot 1) + cold fresh SSTORE-set (slot 2). + ] + post = expect_posts[ { - "indexes": {"data": [33, 34], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_10: Account( - storage={ - 0: 2, - 1: 2100 + d_cold_read, - 2: 22100 + d_cold_set, - 24743: 57005, - } - ), - }, - }, + (0, 0, 0): 0, + (1, 0, 0): 10, + (2, 0, 0): 8, + (3, 0, 0): 2, + (4, 0, 0): 4, + (5, 0, 0): 6, + (6, 0, 0): 1, + (7, 0, 0): 11, + (8, 0, 0): 9, + (9, 0, 0): 3, + (10, 0, 0): 5, + (11, 0, 0): 7, + (12, 0, 0): 1, + (13, 0, 0): 11, + (14, 0, 0): 9, + (15, 0, 0): 3, + (16, 0, 0): 5, + (17, 0, 0): 7, + (18, 0, 0): 1, + (19, 0, 0): 11, + (20, 0, 0): 9, + (21, 0, 0): 3, + (22, 0, 0): 5, + (23, 0, 0): 7, + (24, 0, 0): 12, + (25, 0, 0): 12, + (26, 0, 0): 13, + (27, 0, 0): 13, + (28, 0, 0): 14, + (29, 0, 0): 14, + (30, 0, 0): 15, + (31, 0, 0): 15, + (32, 0, 0): 16, + (33, 0, 0): 17, + (34, 0, 0): 17, + (35, 0, 0): 0, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/stEIP2930/test_varied_context.py b/tests/ported_static/stEIP2930/test_varied_context.py index 705de655138..f50910502fb 100644 --- a/tests/ported_static/stEIP2930/test_varied_context.py +++ b/tests/ported_static/stEIP2930/test_varied_context.py @@ -36,9 +36,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -1388,496 +1385,385 @@ def _sstore_delta(cancun_cost: int, **metadata: int) -> int: # callWriteSuicide measures a warm SSTORE-set then that SELFDESTRUCT. suicide_write_delta = warm_set_delta + suicide_new_delta - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={0: 2, 1: (20003 + warm_set_delta), 2: 107} - ) - }, - }, - { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={ - 0: 2, - 1: (22103 + cold_set_delta), - 2: 2107 + cold_storage_delta, - } - ) - }, - }, - { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_2: Account( - storage={0: 2, 1: (20003 + warm_set_delta), 2: 107} - ) - }, - }, - { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_2: Account( - storage={ - 0: 2, - 1: (22103 + cold_set_delta), - 2: 2107 + cold_storage_delta, - } - ) - }, - }, - { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_3: Account( - storage={ - 0: 2, - 1: (22103 + cold_set_delta), - 2: 2107 + cold_storage_delta, - 24743: 57005, - } - ) - }, - }, - { - "indexes": {"data": [5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_3: Account( - storage={ - 0: 2, - 1: (20003 + warm_set_delta), - 2: 107, - 24743: 57005, - } - ) - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": [6], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_4: Account(storage={0: 2107 + cold_storage_delta}) - }, + contract_0: Account( + storage={0: 2, 1: (20003 + warm_set_delta), 2: 107} + ) }, { - "indexes": {"data": [7], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_4: Account(storage={0: 107})}, + contract_0: Account( + storage={ + 0: 2, + 1: (22103 + cold_set_delta), + 2: 2107 + cold_storage_delta, + } + ) }, { - "indexes": {"data": [8], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_26: Account( - storage={0: (20003 + warm_set_delta), 1: 100} - ) - }, + contract_2: Account( + storage={0: 2, 1: (20003 + warm_set_delta), 2: 107} + ) }, { - "indexes": {"data": [9], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_26: Account( - storage={ - 0: (22103 + cold_set_delta), - 1: 2100 + cold_storage_delta, - } - ) - }, + contract_2: Account( + storage={ + 0: 2, + 1: (22103 + cold_set_delta), + 2: 2107 + cold_storage_delta, + } + ) }, { - "indexes": {"data": [10], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_7: Account(storage={0: (20001 + suicide_write_delta)}) - }, + contract_3: Account( + storage={ + 0: 2, + 1: (22103 + cold_set_delta), + 2: 2107 + cold_storage_delta, + 24743: 57005, + } + ) }, { - "indexes": {"data": [11], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_7: Account( - storage={ - 0: ( - 24601 - + cold_set_delta - + suicide_new_delta - + cold_account_delta - ) - } - ) - }, + contract_3: Account( + storage={ + 0: 2, + 1: (20003 + warm_set_delta), + 2: 107, + 24743: 57005, + } + ) }, + {contract_4: Account(storage={0: 2107 + cold_storage_delta})}, + {contract_4: Account(storage={0: 107})}, + {contract_26: Account(storage={0: (20003 + warm_set_delta), 1: 100})}, { - "indexes": {"data": [12], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_9: Account(storage={0: 100 + suicide_new_delta}) - }, + contract_26: Account( + storage={ + 0: (22103 + cold_set_delta), + 1: 2100 + cold_storage_delta, + } + ) }, + {contract_7: Account(storage={0: (20001 + suicide_write_delta)})}, { - "indexes": {"data": [13], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_9: Account( - storage={ - 0: 4600 + contract_7: Account( + storage={ + 0: ( + 24601 + + cold_set_delta + suicide_new_delta + cold_account_delta - + cold_storage_delta - } - ) - }, - }, - { - "indexes": {"data": [14, 15], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_11: Account(storage={0: 2989})}, - }, - { - "indexes": {"data": [16], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_14: Account(storage={0: 24589})}, - }, - { - "indexes": {"data": [17], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_14: Account(storage={0: 2989})}, + ) + } + ) }, + {contract_9: Account(storage={0: 100 + suicide_new_delta})}, { - "indexes": {"data": [18], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_16: Account(storage={0: 24589, 24743: 57005})}, + contract_9: Account( + storage={ + 0: 4600 + + suicide_new_delta + + cold_account_delta + + cold_storage_delta + } + ) }, + {contract_11: Account(storage={0: 2989})}, + {contract_14: Account(storage={0: 24589})}, + {contract_14: Account(storage={0: 2989})}, + {contract_16: Account(storage={0: 24589, 24743: 57005})}, + {contract_16: Account(storage={0: 2989, 24743: 57005})}, { - "indexes": {"data": [19], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_16: Account(storage={0: 2989, 24743: 57005})}, + contract_17: Account( + storage={ + 0: 0, + 256: 103, + 257: 103, + 258: 103, + 259: 103, + 260: 103, + 261: 103, + 262: 103, + 263: 103, + 264: 103, + 265: 103, + 266: 103, + 267: 103, + 268: 103, + 269: 103, + 270: 103, + 271: (20003 + warm_set_delta), + 512: 100, + 513: 100, + 514: 100, + 515: 100, + 516: 100, + 517: 100, + 518: 100, + 519: 100, + 520: 100, + 521: 100, + 522: 100, + 523: 100, + 524: 100, + 525: 100, + 526: 100, + 527: 100, + 768: (20003 + warm_set_delta), + 769: (20003 + warm_set_delta), + 770: (20003 + warm_set_delta), + 771: (20003 + warm_set_delta), + 772: (20003 + warm_set_delta), + 773: (20003 + warm_set_delta), + 774: (20003 + warm_set_delta), + 775: (20003 + warm_set_delta), + 776: (20003 + warm_set_delta), + 777: (20003 + warm_set_delta), + 778: (20003 + warm_set_delta), + 779: (20003 + warm_set_delta), + 780: (20003 + warm_set_delta), + 781: (20003 + warm_set_delta), + 782: (20003 + warm_set_delta), + 783: (20003 + warm_set_delta), + 1024: 100, + 1025: 100, + 1026: 100, + 1027: 100, + 1028: 100, + 1029: 100, + 1030: 100, + 1031: 100, + 1032: 100, + 1033: 100, + 1034: 100, + 1035: 100, + 1036: 100, + 1037: 100, + 1038: 100, + 1039: 100, + 24743: 57005, + 48879: 2, + 61440: 48879, + 61441: 48879, + 61442: 48879, + 61443: 48879, + 61444: 48879, + 61445: 48879, + 61446: 48879, + 61447: 48879, + 61448: 48879, + 61449: 48879, + 61450: 48879, + 61451: 48879, + 61452: 48879, + 61453: 48879, + 61454: 48879, + 61455: 48879, + }, + ), }, { - "indexes": {"data": [20], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_17: Account( - storage={ - 0: 0, - 256: 103, - 257: 103, - 258: 103, - 259: 103, - 260: 103, - 261: 103, - 262: 103, - 263: 103, - 264: 103, - 265: 103, - 266: 103, - 267: 103, - 268: 103, - 269: 103, - 270: 103, - 271: (20003 + warm_set_delta), - 512: 100, - 513: 100, - 514: 100, - 515: 100, - 516: 100, - 517: 100, - 518: 100, - 519: 100, - 520: 100, - 521: 100, - 522: 100, - 523: 100, - 524: 100, - 525: 100, - 526: 100, - 527: 100, - 768: (20003 + warm_set_delta), - 769: (20003 + warm_set_delta), - 770: (20003 + warm_set_delta), - 771: (20003 + warm_set_delta), - 772: (20003 + warm_set_delta), - 773: (20003 + warm_set_delta), - 774: (20003 + warm_set_delta), - 775: (20003 + warm_set_delta), - 776: (20003 + warm_set_delta), - 777: (20003 + warm_set_delta), - 778: (20003 + warm_set_delta), - 779: (20003 + warm_set_delta), - 780: (20003 + warm_set_delta), - 781: (20003 + warm_set_delta), - 782: (20003 + warm_set_delta), - 783: (20003 + warm_set_delta), - 1024: 100, - 1025: 100, - 1026: 100, - 1027: 100, - 1028: 100, - 1029: 100, - 1030: 100, - 1031: 100, - 1032: 100, - 1033: 100, - 1034: 100, - 1035: 100, - 1036: 100, - 1037: 100, - 1038: 100, - 1039: 100, - 24743: 57005, - 48879: 2, - 61440: 48879, - 61441: 48879, - 61442: 48879, - 61443: 48879, - 61444: 48879, - 61445: 48879, - 61446: 48879, - 61447: 48879, - 61448: 48879, - 61449: 48879, - 61450: 48879, - 61451: 48879, - 61452: 48879, - 61453: 48879, - 61454: 48879, - 61455: 48879, - }, - ), - }, + contract_17: Account( + storage={ + 0: 0, + 256: 103, + 257: 103, + 258: 103, + 259: 103, + 260: 103, + 261: 103, + 262: 103, + 263: 103, + 264: 103, + 265: 103, + 266: 103, + 267: 103, + 268: 103, + 269: 103, + 270: 103, + 271: (22103 + cold_set_delta), + 512: 100, + 513: 100, + 514: 100, + 515: 100, + 516: 100, + 517: 100, + 518: 100, + 519: 100, + 520: 100, + 521: 100, + 522: 100, + 523: 100, + 524: 100, + 525: 100, + 526: 100, + 527: 2100 + cold_storage_delta, + 768: (22103 + cold_set_delta), + 769: (22103 + cold_set_delta), + 770: (22103 + cold_set_delta), + 771: (22103 + cold_set_delta), + 772: (22103 + cold_set_delta), + 773: (22103 + cold_set_delta), + 774: (22103 + cold_set_delta), + 775: (22103 + cold_set_delta), + 776: (22103 + cold_set_delta), + 777: (22103 + cold_set_delta), + 778: (22103 + cold_set_delta), + 779: (22103 + cold_set_delta), + 780: (22103 + cold_set_delta), + 781: (22103 + cold_set_delta), + 782: (22103 + cold_set_delta), + 783: (22103 + cold_set_delta), + 1024: 2100 + cold_storage_delta, + 1025: 2100 + cold_storage_delta, + 1026: 2100 + cold_storage_delta, + 1027: 2100 + cold_storage_delta, + 1028: 2100 + cold_storage_delta, + 1029: 2100 + cold_storage_delta, + 1030: 2100 + cold_storage_delta, + 1031: 2100 + cold_storage_delta, + 1032: 2100 + cold_storage_delta, + 1033: 2100 + cold_storage_delta, + 1034: 2100 + cold_storage_delta, + 1035: 2100 + cold_storage_delta, + 1036: 2100 + cold_storage_delta, + 1037: 2100 + cold_storage_delta, + 1038: 2100 + cold_storage_delta, + 1039: 2100 + cold_storage_delta, + 24743: 57005, + 48879: 2, + 61440: 48879, + 61441: 48879, + 61442: 48879, + 61443: 48879, + 61444: 48879, + 61445: 48879, + 61446: 48879, + 61447: 48879, + 61448: 48879, + 61449: 48879, + 61450: 48879, + 61451: 48879, + 61452: 48879, + 61453: 48879, + 61454: 48879, + 61455: 48879, + }, + ), }, { - "indexes": {"data": [21], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_17: Account( - storage={ - 0: 0, - 256: 103, - 257: 103, - 258: 103, - 259: 103, - 260: 103, - 261: 103, - 262: 103, - 263: 103, - 264: 103, - 265: 103, - 266: 103, - 267: 103, - 268: 103, - 269: 103, - 270: 103, - 271: (22103 + cold_set_delta), - 512: 100, - 513: 100, - 514: 100, - 515: 100, - 516: 100, - 517: 100, - 518: 100, - 519: 100, - 520: 100, - 521: 100, - 522: 100, - 523: 100, - 524: 100, - 525: 100, - 526: 100, - 527: 2100 + cold_storage_delta, - 768: (22103 + cold_set_delta), - 769: (22103 + cold_set_delta), - 770: (22103 + cold_set_delta), - 771: (22103 + cold_set_delta), - 772: (22103 + cold_set_delta), - 773: (22103 + cold_set_delta), - 774: (22103 + cold_set_delta), - 775: (22103 + cold_set_delta), - 776: (22103 + cold_set_delta), - 777: (22103 + cold_set_delta), - 778: (22103 + cold_set_delta), - 779: (22103 + cold_set_delta), - 780: (22103 + cold_set_delta), - 781: (22103 + cold_set_delta), - 782: (22103 + cold_set_delta), - 783: (22103 + cold_set_delta), - 1024: 2100 + cold_storage_delta, - 1025: 2100 + cold_storage_delta, - 1026: 2100 + cold_storage_delta, - 1027: 2100 + cold_storage_delta, - 1028: 2100 + cold_storage_delta, - 1029: 2100 + cold_storage_delta, - 1030: 2100 + cold_storage_delta, - 1031: 2100 + cold_storage_delta, - 1032: 2100 + cold_storage_delta, - 1033: 2100 + cold_storage_delta, - 1034: 2100 + cold_storage_delta, - 1035: 2100 + cold_storage_delta, - 1036: 2100 + cold_storage_delta, - 1037: 2100 + cold_storage_delta, - 1038: 2100 + cold_storage_delta, - 1039: 2100 + cold_storage_delta, - 24743: 57005, - 48879: 2, - 61440: 48879, - 61441: 48879, - 61442: 48879, - 61443: 48879, - 61444: 48879, - 61445: 48879, - 61446: 48879, - 61447: 48879, - 61448: 48879, - 61449: 48879, - 61450: 48879, - 61451: 48879, - 61452: 48879, - 61453: 48879, - 61454: 48879, - 61455: 48879, - }, - ), - }, + compute_create_address(address=contract_18, nonce=0): Account( + storage={0: 65535, 1: (20017 + warm_set_delta)} + ), }, { - "indexes": {"data": [22], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address(address=contract_18, nonce=0): Account( - storage={0: 65535, 1: (20017 + warm_set_delta)} - ), - }, + compute_create_address(address=contract_18, nonce=0): Account( + storage={0: 65535, 1: (22117 + cold_set_delta)} + ), }, { - "indexes": {"data": [23], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address(address=contract_18, nonce=0): Account( - storage={0: 65535, 1: (22117 + cold_set_delta)} - ), - }, + Address(0xD82F21135ED7D7D833A9F2A0F1CF6C3DA214B8E3): Account( + storage={0: 65535, 1: (20017 + warm_set_delta)} + ), }, { - "indexes": {"data": [24], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0xD82F21135ED7D7D833A9F2A0F1CF6C3DA214B8E3): Account( - storage={0: 65535, 1: (20017 + warm_set_delta)} - ), - }, + Address(0xD82F21135ED7D7D833A9F2A0F1CF6C3DA214B8E3): Account( + storage={0: 65535, 1: (22117 + cold_set_delta)} + ), }, { - "indexes": {"data": [25], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0xD82F21135ED7D7D833A9F2A0F1CF6C3DA214B8E3): Account( - storage={0: 65535, 1: (22117 + cold_set_delta)} - ), - }, + compute_create_address(address=contract_20, nonce=0): Account( + storage={0: 65535, 1: (20017 + warm_set_delta)} + ), }, { - "indexes": {"data": [26], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address(address=contract_20, nonce=0): Account( - storage={0: 65535, 1: (20017 + warm_set_delta)} - ), - }, + compute_create_address(address=contract_20, nonce=0): Account( + storage={0: 65535, 1: (22117 + cold_set_delta)} + ), }, { - "indexes": {"data": [27], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address(address=contract_20, nonce=0): Account( - storage={0: 65535, 1: (22117 + cold_set_delta)} - ), - }, + Address(0x530508498D2AA75D8E591612809FEC3D37A45615): Account( + storage={0: 65535, 1: (20017 + warm_set_delta)} + ), }, { - "indexes": {"data": [28], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0x530508498D2AA75D8E591612809FEC3D37A45615): Account( - storage={0: 65535, 1: (20017 + warm_set_delta)} - ), - }, + Address(0x530508498D2AA75D8E591612809FEC3D37A45615): Account( + storage={0: 65535, 1: (22117 + cold_set_delta)} + ), }, { - "indexes": {"data": [29], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0x530508498D2AA75D8E591612809FEC3D37A45615): Account( - storage={0: 65535, 1: (22117 + cold_set_delta)} - ), - }, + compute_create_address(address=contract_22, nonce=0): Account( + storage={0: 65535, 1: (20017 + warm_set_delta), 2: 117} + ), }, { - "indexes": {"data": [30], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address(address=contract_22, nonce=0): Account( - storage={0: 65535, 1: (20017 + warm_set_delta), 2: 117} - ), - }, + compute_create_address(address=contract_22, nonce=0): Account( + storage={0: 65535, 1: (22117 + cold_set_delta), 2: 117} + ), }, { - "indexes": {"data": [31], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address(address=contract_22, nonce=0): Account( - storage={0: 65535, 1: (22117 + cold_set_delta), 2: 117} - ), - }, + Address(0x83FBDAE70258AC0FA837B701CC63CEDF48D4B6BF): Account( + storage={0: 65535, 1: (20017 + warm_set_delta), 2: 117} + ), }, { - "indexes": {"data": [32], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0x83FBDAE70258AC0FA837B701CC63CEDF48D4B6BF): Account( - storage={0: 65535, 1: (20017 + warm_set_delta), 2: 117} - ), - }, + Address(0x83FBDAE70258AC0FA837B701CC63CEDF48D4B6BF): Account( + storage={0: 65535, 1: (22117 + cold_set_delta), 2: 117} + ), }, { - "indexes": {"data": [33], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0x83FBDAE70258AC0FA837B701CC63CEDF48D4B6BF): Account( - storage={0: 65535, 1: (22117 + cold_set_delta), 2: 117} - ), - }, + contract_25: Account( + storage={0: 24743, 1: (20017 + warm_set_delta), 2: 117} + ) }, { - "indexes": {"data": [34], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_25: Account( - storage={0: 24743, 1: (20017 + warm_set_delta), 2: 117} - ) - }, + contract_25: Account( + storage={0: 24743, 1: (22117 + cold_set_delta), 2: 117} + ) }, + ] + post = expect_posts[ { - "indexes": {"data": [35], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_25: Account( - storage={0: 24743, 1: (22117 + cold_set_delta), 2: 117} - ) - }, - }, + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 2, + (3, 0, 0): 3, + (4, 0, 0): 4, + (5, 0, 0): 5, + (6, 0, 0): 6, + (7, 0, 0): 7, + (8, 0, 0): 8, + (9, 0, 0): 9, + (10, 0, 0): 10, + (11, 0, 0): 11, + (12, 0, 0): 12, + (13, 0, 0): 13, + (14, 0, 0): 14, + (15, 0, 0): 14, + (16, 0, 0): 15, + (17, 0, 0): 16, + (18, 0, 0): 17, + (19, 0, 0): 18, + (20, 0, 0): 19, + (21, 0, 0): 20, + (22, 0, 0): 21, + (23, 0, 0): 22, + (24, 0, 0): 23, + (25, 0, 0): 24, + (26, 0, 0): 25, + (27, 0, 0): 26, + (28, 0, 0): 27, + (29, 0, 0): 28, + (30, 0, 0): 29, + (31, 0, 0): 30, + (32, 0, 0): 31, + (33, 0, 0): 32, + (34, 0, 0): 33, + (35, 0, 0): 34, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/stEIP3855_push0/test_push0.py b/tests/ported_static/stEIP3855_push0/test_push0.py index 9bc2c28c7de..a1ce3c0cd4c 100644 --- a/tests/ported_static/stEIP3855_push0/test_push0.py +++ b/tests/ported_static/stEIP3855_push0/test_push0.py @@ -19,9 +19,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -216,56 +213,41 @@ def test_push0( address=Address(0x0000000000000000000000000000000000000500), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_1: Account(storage={0: 1}), - contract_0: Account(storage={0: 1, 1: 1}), - }, + contract_1: Account(storage={0: 1}), + contract_0: Account(storage={0: 1, 1: 1}), }, { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_2: Account(storage={0: 1}), - contract_0: Account(storage={0: 1, 1: 1}), - }, + contract_2: Account(storage={0: 1}), + contract_0: Account(storage={0: 1, 1: 1}), }, + {contract_0: Account(storage={1: 1})}, { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_0: Account(storage={1: 1})}, + contract_4: Account(storage={0: 2, 1: 0}), + contract_0: Account(storage={0: 1, 1: 1}), }, { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_4: Account(storage={0: 2, 1: 0}), - contract_0: Account(storage={0: 1, 1: 1}), - }, + contract_5: Account(storage={0: 1, 1: 1, 2: 255}), + contract_6: Account(storage={}), + contract_0: Account(storage={0: 1, 1: 1}), }, { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_5: Account(storage={0: 1, 1: 1, 2: 255}), - contract_6: Account(storage={}), - contract_0: Account(storage={0: 1, 1: 1}), - }, + contract_7: Account(storage={0: 1}), + contract_0: Account(storage={0: 1, 1: 1}), }, + ] + post = expect_posts[ { - "indexes": {"data": [5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_7: Account(storage={0: 1}), - contract_0: Account(storage={0: 1, 1: 1}), - }, - }, + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 2, + (3, 0, 0): 3, + (4, 0, 0): 4, + (5, 0, 0): 5, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ contract_1, diff --git a/tests/ported_static/stEIP3860_limitmeterinitcode/test_create2_init_code_size_limit.py b/tests/ported_static/stEIP3860_limitmeterinitcode/test_create2_init_code_size_limit.py index 006e46e0616..925ab5c9192 100644 --- a/tests/ported_static/stEIP3860_limitmeterinitcode/test_create2_init_code_size_limit.py +++ b/tests/ported_static/stEIP3860_limitmeterinitcode/test_create2_init_code_size_limit.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -140,42 +137,34 @@ def test_create2_init_code_size_limit( address=Address(0xB94F5374FCE5EDBC8E2A8697C15331677E6EBF0B), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account(storage={0: 1, 1: 1}), - contract_1: Account( - storage={ - 0: 0x9E7A3337D18C31FE4C1FE51AB2DA6CFD3629923D, - 10: 55539, - }, - ), - Address(0x9E7A3337D18C31FE4C1FE51AB2DA6CFD3629923D): Account( - storage={}, - code=bytes.fromhex("600a80600080396000f3"), - balance=0, - nonce=1, - ), - }, + sender: Account(nonce=1), + contract_0: Account(storage={0: 1, 1: 1}), + contract_1: Account( + storage={ + 0: 0x9E7A3337D18C31FE4C1FE51AB2DA6CFD3629923D, + 10: 55539, + }, + ), + Address(0x9E7A3337D18C31FE4C1FE51AB2DA6CFD3629923D): Account( + storage={}, + code=bytes.fromhex("600a80600080396000f3"), + balance=0, + nonce=1, + ), }, { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account(storage={0: 0, 1: 1}, nonce=0), - contract_1: Account(storage={}), - Address( - 0x67D49AE27E912B3B508D62CE1E463298DB6EDF32 - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + contract_0: Account(storage={0: 0, 1: 1}, nonce=0), + contract_1: Account(storage={}), + Address( + 0x67D49AE27E912B3B508D62CE1E463298DB6EDF32 + ): Account.NONEXISTENT, }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(0xC000), diff --git a/tests/ported_static/stEIP3860_limitmeterinitcode/test_create_init_code_size_limit.py b/tests/ported_static/stEIP3860_limitmeterinitcode/test_create_init_code_size_limit.py index dd3acfc9717..558ed4f1a88 100644 --- a/tests/ported_static/stEIP3860_limitmeterinitcode/test_create_init_code_size_limit.py +++ b/tests/ported_static/stEIP3860_limitmeterinitcode/test_create_init_code_size_limit.py @@ -18,9 +18,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -140,42 +137,34 @@ def test_create_init_code_size_limit( address=Address(0xBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=2), - contract_0: Account(storage={0: 1, 1: 1}), - contract_1: Account( - storage={ - 0: compute_create_address(address=contract_1, nonce=1), - 10: 46323, - }, - ), - compute_create_address(address=contract_1, nonce=1): Account( - storage={}, - code=bytes.fromhex("600a80600080396000f3"), - balance=0, - nonce=1, - ), - }, + sender: Account(nonce=2), + contract_0: Account(storage={0: 1, 1: 1}), + contract_1: Account( + storage={ + 0: compute_create_address(address=contract_1, nonce=1), + 10: 46323, + }, + ), + compute_create_address(address=contract_1, nonce=1): Account( + storage={}, + code=bytes.fromhex("600a80600080396000f3"), + balance=0, + nonce=1, + ), }, { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=2), - contract_0: Account(storage={0: 0, 1: 1}, nonce=1), - contract_1: Account(storage={}), - Address( - 0x682327124C5D2DC0CD2158BA65D37AC3D2140C91 - ): Account.NONEXISTENT, - }, + sender: Account(nonce=2), + contract_0: Account(storage={0: 0, 1: 1}, nonce=1), + contract_1: Account(storage={}), + Address( + 0x682327124C5D2DC0CD2158BA65D37AC3D2140C91 + ): Account.NONEXISTENT, }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(0xC000), diff --git a/tests/ported_static/stEIP5656_MCOPY/test_mcopy.py b/tests/ported_static/stEIP5656_MCOPY/test_mcopy.py index acae638389f..a51a17145ba 100644 --- a/tests/ported_static/stEIP5656_MCOPY/test_mcopy.py +++ b/tests/ported_static/stEIP5656_MCOPY/test_mcopy.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -221,183 +218,150 @@ def test_mcopy( address=Address(0xBFD584EC9DC8FBADCEA812C707E1765B4DF8FA6C), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": { - "data": [0, 1, 2, 3, 4, 5, 18, 19], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 0xA0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF, # noqa: E501 - 1: 0xC0C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF, # noqa: E501 - 2: 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF, # noqa: E501 - }, - ), - }, + target: Account( + storage={ + 0: 0xA0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF, # noqa: E501 + 1: 0xC0C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF, # noqa: E501 + 2: 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF, # noqa: E501 + }, + ), }, { - "indexes": {"data": [6], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 0xA0A0A1A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF, # noqa: E501 - 1: 0xC0C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF, # noqa: E501 - 2: 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF, # noqa: E501 - }, - ), - }, + target: Account( + storage={ + 0: 0xA0A0A1A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF, # noqa: E501 + 1: 0xC0C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF, # noqa: E501 + 2: 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF, # noqa: E501 + }, + ), }, { - "indexes": {"data": [7], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 0xA0A1A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBE, # noqa: E501 - 1: 0xBFC1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF, # noqa: E501 - 2: 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF, # noqa: E501 - }, - ), - }, + target: Account( + storage={ + 0: 0xA0A1A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBE, # noqa: E501 + 1: 0xBFC1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF, # noqa: E501 + 2: 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF, # noqa: E501 + }, + ), }, { - "indexes": {"data": [8], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 0xA0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF, # noqa: E501 - 1: 0xA0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEDF, # noqa: E501 - 2: 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF, # noqa: E501 - }, - ), - }, + target: Account( + storage={ + 0: 0xA0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF, # noqa: E501 + 1: 0xA0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEDF, # noqa: E501 + 2: 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF, # noqa: E501 + }, + ), }, { - "indexes": {"data": [9], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 0xA0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF, # noqa: E501 - 1: 0xA1A2C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF, # noqa: E501 - 2: 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF, # noqa: E501 - }, - ), - }, + target: Account( + storage={ + 0: 0xA0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF, # noqa: E501 + 1: 0xA1A2C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF, # noqa: E501 + 2: 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF, # noqa: E501 + }, + ), }, { - "indexes": {"data": [10], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 0xA0A1A0A1A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF, # noqa: E501 - 1: 0xC0C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF, # noqa: E501 - 2: 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF, # noqa: E501 - }, - ), - }, + target: Account( + storage={ + 0: 0xA0A1A0A1A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF, # noqa: E501 + 1: 0xC0C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF, # noqa: E501 + 2: 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF, # noqa: E501 + }, + ), }, { - "indexes": {"data": [11], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 0xA0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF, # noqa: E501 - 1: 0xBFC1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF, # noqa: E501 - 2: 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF, # noqa: E501 - }, - ), - }, + target: Account( + storage={ + 0: 0xA0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF, # noqa: E501 + 1: 0xBFC1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF, # noqa: E501 + 2: 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF, # noqa: E501 + }, + ), }, { - "indexes": {"data": [12], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 0xBFC0C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDE, # noqa: E501 - 1: 0xDFC1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF, # noqa: E501 - 2: 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF, # noqa: E501 - }, - ), - }, + target: Account( + storage={ + 0: 0xBFC0C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDE, # noqa: E501 + 1: 0xDFC1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF, # noqa: E501 + 2: 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF, # noqa: E501 + }, + ), }, { - "indexes": {"data": [13], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 0xA0A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBFC0, # noqa: E501 - 1: 0xC1C2C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF, # noqa: E501 - 2: 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF, # noqa: E501 - }, - ), - }, + target: Account( + storage={ + 0: 0xA0A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBFC0, # noqa: E501 + 1: 0xC1C2C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF, # noqa: E501 + 2: 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF, # noqa: E501 + }, + ), }, { - "indexes": {"data": [14], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 0xC1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDFE0, # noqa: E501 - 1: 0xC0C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF, # noqa: E501 - 2: 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF, # noqa: E501 - }, - ), - }, + target: Account( + storage={ + 0: 0xC1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDFE0, # noqa: E501 + 1: 0xC0C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF, # noqa: E501 + 2: 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF, # noqa: E501 + }, + ), }, { - "indexes": {"data": [15], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 0xA0A1C1A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF, # noqa: E501 - 1: 0xC0C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF, # noqa: E501 - 2: 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF, # noqa: E501 - }, - ), - }, + target: Account( + storage={ + 0: 0xA0A1C1A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF, # noqa: E501 + 1: 0xC0C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF, # noqa: E501 + 2: 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF, # noqa: E501 + }, + ), }, { - "indexes": {"data": [16], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 0xC0C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF, # noqa: E501 - 1: 0xC0C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF, # noqa: E501 - 2: 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF, # noqa: E501 - }, - ), - }, + target: Account( + storage={ + 0: 0xC0C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF, # noqa: E501 + 1: 0xC0C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF, # noqa: E501 + 2: 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF, # noqa: E501 + }, + ), }, { - "indexes": {"data": [17], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 0xA0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF, # noqa: E501 - 1: 0xC1C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF, # noqa: E501 - 2: 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF, # noqa: E501 - }, - ), - }, + target: Account( + storage={ + 0: 0xA0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF, # noqa: E501 + 1: 0xC1C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF, # noqa: E501 + 2: 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF, # noqa: E501 + }, + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + { + (0, 0, 0): 0, + (1, 0, 0): 0, + (2, 0, 0): 0, + (3, 0, 0): 0, + (4, 0, 0): 0, + (5, 0, 0): 0, + (6, 0, 0): 1, + (7, 0, 0): 2, + (8, 0, 0): 3, + (9, 0, 0): 4, + (10, 0, 0): 5, + (11, 0, 0): 6, + (12, 0, 0): 7, + (13, 0, 0): 8, + (14, 0, 0): 9, + (15, 0, 0): 10, + (16, 0, 0): 11, + (17, 0, 0): 12, + (18, 0, 0): 0, + (19, 0, 0): 0, + }[d, g, v] + ] + _exc = None tx_data = [ Hash(0x2) + Hash(0x0) + Hash(0x0), diff --git a/tests/ported_static/stEIP5656_MCOPY/test_mcopy_memory_expansion_cost.py b/tests/ported_static/stEIP5656_MCOPY/test_mcopy_memory_expansion_cost.py index c6b1b90837d..81a16b0b182 100644 --- a/tests/ported_static/stEIP5656_MCOPY/test_mcopy_memory_expansion_cost.py +++ b/tests/ported_static/stEIP5656_MCOPY/test_mcopy_memory_expansion_cost.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -213,38 +210,39 @@ def test_mcopy_memory_expansion_cost( nonce=1, ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0, 14], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, - { - "indexes": {"data": [1, 2, 3, 4, 5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 768})}, - }, - { - "indexes": { - "data": [6, 7, 8, 9, 10, 11, 12, 13], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1408})}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={0: 0})}, + {target: Account(storage={0: 768})}, + {target: Account(storage={0: 1408})}, + {target: Account(storage={0: 0xFA11ED})}, + ] + post = expect_posts[ { - "indexes": { - "data": [15, 16, 17, 18, 19, 20, 21], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0xFA11ED})}, - }, + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 1, + (3, 0, 0): 1, + (4, 0, 0): 1, + (5, 0, 0): 1, + (6, 0, 0): 2, + (7, 0, 0): 2, + (8, 0, 0): 2, + (9, 0, 0): 2, + (10, 0, 0): 2, + (11, 0, 0): 2, + (12, 0, 0): 2, + (13, 0, 0): 2, + (14, 0, 0): 0, + (15, 0, 0): 3, + (16, 0, 0): 3, + (17, 0, 0): 3, + (18, 0, 0): 3, + (19, 0, 0): 3, + (20, 0, 0): 3, + (21, 0, 0): 3, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Hash(0x0) + Hash(0x0) + Hash(0x0), diff --git a/tests/ported_static/stExample/test_labels_example.py b/tests/ported_static/stExample/test_labels_example.py index f78d807ae82..7643c3b96e9 100644 --- a/tests/ported_static/stExample/test_labels_example.py +++ b/tests/ported_static/stExample/test_labels_example.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -94,43 +91,33 @@ def test_labels_example( address=Address(0xA054BC58F204030CBC0EC558A5B88AC9BD5ADED2), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": [0], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 0x100000000000000000000000000000000000000000000000000000000000000, # noqa: E501 - }, - ), - }, + target: Account( + storage={ + 0: 0x100000000000000000000000000000000000000000000000000000000000000, # noqa: E501 + }, + ), }, { - "indexes": {"data": [1], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 0x200000000000000000000000000000000000000000000000000000000000000, # noqa: E501 - }, - ), - }, + target: Account( + storage={ + 0: 0x200000000000000000000000000000000000000000000000000000000000000, # noqa: E501 + }, + ), }, { - "indexes": {"data": [2, 3], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 0x300000000000000000000000000000000000000000000000000000000000000, # noqa: E501 - }, - ), - }, + target: Account( + storage={ + 0: 0x300000000000000000000000000000000000000000000000000000000000000, # noqa: E501 + }, + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 0, (1, 0, 0): 1, (2, 0, 0): 2, (3, 0, 0): 2}[d, g, v] + ] + _exc = None tx_data = [ Bytes("01"), diff --git a/tests/ported_static/stExample/test_ranges_example.py b/tests/ported_static/stExample/test_ranges_example.py index 25cf6aa2ded..45e9689f072 100644 --- a/tests/ported_static/stExample/test_ranges_example.py +++ b/tests/ported_static/stExample/test_ranges_example.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -214,43 +211,51 @@ def test_ranges_example( address=Address(0xA054BC58F204030CBC0EC558A5B88AC9BD5ADED2), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": [0, 1, 2], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 0x100000000000000000000000000000000000000000000000000000000000000, # noqa: E501 - }, - ), - }, + target: Account( + storage={ + 0: 0x100000000000000000000000000000000000000000000000000000000000000, # noqa: E501 + }, + ), }, { - "indexes": {"data": [0, 1, 2], "gas": [1, 2], "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 0x100000000000000000000000000000000000000000000000000000000000000, # noqa: E501 - }, - ), - }, + target: Account( + storage={ + 0: 0x400000000000000000000000000000000000000000000000000000000000000, # noqa: E501 + }, + ), }, + ] + post = expect_posts[ { - "indexes": {"data": 3, "gas": [0, 1, 2], "value": [0, 1]}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 0x400000000000000000000000000000000000000000000000000000000000000, # noqa: E501 - }, - ), - }, - }, + (0, 0, 0): 0, + (0, 0, 1): 0, + (0, 1, 0): 0, + (0, 1, 1): 0, + (0, 2, 0): 0, + (0, 2, 1): 0, + (1, 0, 0): 0, + (1, 0, 1): 0, + (1, 1, 0): 0, + (1, 1, 1): 0, + (1, 2, 0): 0, + (1, 2, 1): 0, + (2, 0, 0): 0, + (2, 0, 1): 0, + (2, 1, 0): 0, + (2, 1, 1): 0, + (2, 2, 0): 0, + (2, 2, 1): 0, + (3, 0, 0): 1, + (3, 0, 1): 1, + (3, 1, 0): 1, + (3, 1, 1): 1, + (3, 2, 0): 1, + (3, 2, 1): 1, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("01"), diff --git a/tests/ported_static/stInitCodeTest/test_out_of_gas_contract_creation.py b/tests/ported_static/stInitCodeTest/test_out_of_gas_contract_creation.py index 9525495cff9..634bc5646ca 100644 --- a/tests/ported_static/stInitCodeTest/test_out_of_gas_contract_creation.py +++ b/tests/ported_static/stInitCodeTest/test_out_of_gas_contract_creation.py @@ -16,9 +16,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -81,40 +78,22 @@ def test_out_of_gas_contract_creation( gas_limit=100000000000000, ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": 0, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - compute_create_address( - address=sender, nonce=0 - ): Account.NONEXISTENT, - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - compute_create_address(address=sender, nonce=0): Account( - nonce=1 - ), - }, + sender: Account(nonce=1), + compute_create_address( + address=sender, nonce=0 + ): Account.NONEXISTENT, }, { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - compute_create_address( - address=sender, nonce=0 - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + compute_create_address(address=sender, nonce=0): Account(nonce=1), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 0, (0, 1, 0): 0, (1, 0, 0): 0, (1, 1, 0): 1}[d, g, v] + ] + _exc = None tx_data = [ Op.PUSH1[0xA] diff --git a/tests/ported_static/stInitCodeTest/test_out_of_gas_prefunded_contract_creation.py b/tests/ported_static/stInitCodeTest/test_out_of_gas_prefunded_contract_creation.py index 51dd0b6725e..b838035f71e 100644 --- a/tests/ported_static/stInitCodeTest/test_out_of_gas_prefunded_contract_creation.py +++ b/tests/ported_static/stInitCodeTest/test_out_of_gas_prefunded_contract_creation.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -89,26 +86,18 @@ def test_out_of_gas_prefunded_contract_creation( address=Address(0x6295EE1B4F6DD65047762F924ECD367C17EABF8F), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": [0, 1], "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account(balance=1), - }, + sender: Account(nonce=1), + contract_0: Account(balance=1), }, { - "indexes": {"data": -1, "gas": [2], "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account(balance=2), - }, + sender: Account(nonce=1), + contract_0: Account(balance=2), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 1, 0): 0, (0, 2, 0): 1}[d, g, v]] + _exc = None tx_data = [ Op.PUSH1[0x9] diff --git a/tests/ported_static/stMemExpandingEIP150Calls/test_oo_gin_return.py b/tests/ported_static/stMemExpandingEIP150Calls/test_oo_gin_return.py index 145e2b341e1..a49919aff0a 100644 --- a/tests/ported_static/stMemExpandingEIP150Calls/test_oo_gin_return.py +++ b/tests/ported_static/stMemExpandingEIP150Calls/test_oo_gin_return.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -173,22 +170,21 @@ def test_oo_gin_return( address=Address(0xEBD3191DD8150F47E30F87927DB4592163EE9224), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0, 1], "gas": 0, "value": 0}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 0xDEAD60A7, 1: 0xDEAD60A7}) - }, - }, + expect_posts: list[dict] = [ + {target: Account(storage={0: 0xDEAD60A7, 1: 0xDEAD60A7})}, + {target: Account(storage={0: 0x60A760A7})}, + ] + post = expect_posts[ { - "indexes": {"data": [2, 3, 4, 5], "gas": 0, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0x60A760A7})}, - }, + (0, 0, 0): 0, + (1, 0, 0): 0, + (2, 0, 0): 1, + (3, 0, 0): 1, + (4, 0, 0): 1, + (5, 0, 0): 1, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("1a8451e6") + Hash(return_, left_padding=True) + Hash(0x36), diff --git a/tests/ported_static/stMemoryStressTest/test_fill_stack.py b/tests/ported_static/stMemoryStressTest/test_fill_stack.py index ecb5ba40c04..b61d72305ae 100644 --- a/tests/ported_static/stMemoryStressTest/test_fill_stack.py +++ b/tests/ported_static/stMemoryStressTest/test_fill_stack.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -110,50 +107,23 @@ def test_fill_stack( address=Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={}, - code=bytes.fromhex( - "5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe457f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000000000000000000000000000000000000000c3504357155320803a975560005155" # noqa: E501 - ), - balance=0, - nonce=0, - ), - coinbase: Account( - storage={}, - code=bytes.fromhex("6000355415600957005b60203560003555"), - nonce=0, - ), - sender: Account(storage={}, code=b"", nonce=1), - }, - }, - { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={}, - code=bytes.fromhex( - "5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe457f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000000000000000000000000000000000000000c3504357155320803a975560005155" # noqa: E501 - ), - balance=0, - nonce=0, - ), - coinbase: Account( - storage={}, - code=bytes.fromhex("6000355415600957005b60203560003555"), - nonce=0, - ), - sender: Account(storage={}, code=b"", nonce=1), - }, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = { + target: Account( + storage={}, + code=bytes.fromhex( + "5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe457f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000000000000000000000000000000000000000c3504357155320803a975560005155" # noqa: E501 + ), + balance=0, + nonce=0, + ), + coinbase: Account( + storage={}, + code=bytes.fromhex("6000355415600957005b60203560003555"), + nonce=0, + ), + sender: Account(storage={}, code=b"", nonce=1), + } + _exc = None tx_data = [ Bytes( diff --git a/tests/ported_static/stMemoryStressTest/test_mload32bit_bound.py b/tests/ported_static/stMemoryStressTest/test_mload32bit_bound.py index 5763dad5154..7272eb06919 100644 --- a/tests/ported_static/stMemoryStressTest/test_mload32bit_bound.py +++ b/tests/ported_static/stMemoryStressTest/test_mload32bit_bound.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -76,34 +73,15 @@ def test_mload32bit_bound( nonce=0, ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={}, - code=bytes.fromhex("6401000000005160015500"), - nonce=0, - ), - sender: Account(storage={}, code=b"", nonce=1), - }, - }, - { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={}, - code=bytes.fromhex("6401000000005160015500"), - nonce=0, - ), - sender: Account(storage={}, code=b"", nonce=1), - }, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = { + target: Account( + storage={}, + code=bytes.fromhex("6401000000005160015500"), + nonce=0, + ), + sender: Account(storage={}, code=b"", nonce=1), + } + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stMemoryStressTest/test_mload32bit_bound2.py b/tests/ported_static/stMemoryStressTest/test_mload32bit_bound2.py index 322e11428e8..d79f31f45c9 100644 --- a/tests/ported_static/stMemoryStressTest/test_mload32bit_bound2.py +++ b/tests/ported_static/stMemoryStressTest/test_mload32bit_bound2.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -76,34 +73,15 @@ def test_mload32bit_bound2( nonce=0, ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={}, - code=bytes.fromhex("6401773594005160015500"), - nonce=0, - ), - sender: Account(storage={}, code=b"", nonce=1), - }, - }, - { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={}, - code=bytes.fromhex("6401773594005160015500"), - nonce=0, - ), - sender: Account(storage={}, code=b"", nonce=1), - }, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = { + target: Account( + storage={}, + code=bytes.fromhex("6401773594005160015500"), + nonce=0, + ), + sender: Account(storage={}, code=b"", nonce=1), + } + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stMemoryStressTest/test_mload32bit_bound_msize.py b/tests/ported_static/stMemoryStressTest/test_mload32bit_bound_msize.py index ccff8e7bdf2..2fccafa9574 100644 --- a/tests/ported_static/stMemoryStressTest/test_mload32bit_bound_msize.py +++ b/tests/ported_static/stMemoryStressTest/test_mload32bit_bound_msize.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -78,34 +75,15 @@ def test_mload32bit_bound_msize( nonce=0, ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={0: 0}, - code=bytes.fromhex("600163ffffffff525960005500"), - nonce=0, - ), - sender: Account(storage={}, code=b"", nonce=1), - }, - }, - { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={0: 0}, - code=bytes.fromhex("600163ffffffff525960005500"), - nonce=0, - ), - sender: Account(storage={}, code=b"", nonce=1), - }, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = { + target: Account( + storage={0: 0}, + code=bytes.fromhex("600163ffffffff525960005500"), + nonce=0, + ), + sender: Account(storage={}, code=b"", nonce=1), + } + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stMemoryStressTest/test_mstore_bounds2a.py b/tests/ported_static/stMemoryStressTest/test_mstore_bounds2a.py index 82cbcebb094..8151adf9bb6 100644 --- a/tests/ported_static/stMemoryStressTest/test_mstore_bounds2a.py +++ b/tests/ported_static/stMemoryStressTest/test_mstore_bounds2a.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -78,20 +75,12 @@ def test_mstore_bounds2a( nonce=0, ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun=Cancun=Cancun"], - "result": {target: Account(storage={}, balance=0)}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={}, balance=0)}, { - "indexes": {"data": -1, "gas": [1, 2], "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 1: 1, - 2: 1, - 3: 1, - 4: 1, - 5: 1, - 6: 1, - 7: 1, - 8: 1, - 9: 1, - 10: 1, - 11: 1, - 12: 1, - 13: 1, - 14: 1, - 15: 1, - 16: 1, - }, - balance=1, - ), - }, + target: Account( + storage={ + 1: 1, + 2: 1, + 3: 1, + 4: 1, + 5: 1, + 6: 1, + 7: 1, + 8: 1, + 9: 1, + 10: 1, + 11: 1, + 12: 1, + 13: 1, + 14: 1, + 15: 1, + 16: 1, + }, + balance=1, + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 1, 0): 1, (0, 2, 0): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stMemoryStressTest/test_sstore_bounds.py b/tests/ported_static/stMemoryStressTest/test_sstore_bounds.py index 702dd94aeb5..cb877f784e7 100644 --- a/tests/ported_static/stMemoryStressTest/test_sstore_bounds.py +++ b/tests/ported_static/stMemoryStressTest/test_sstore_bounds.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -93,34 +90,26 @@ def test_sstore_bounds( address=Address(0x1F2AEE312C3C47BDEB27FF5275FDDB33C543E394), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 32: 0xFFFFFFFF, - 64: 0xFFFFFFFFFFFFFFFF, - 128: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, - 256: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 - 0xFFFFFFFF: 1, - 0xFFFFFFFFFFFFFFFF: 1, - 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF: 1, - 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF: 1, # noqa: E501 - }, - balance=1, - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={}, balance=0)}, + target: Account( + storage={ + 32: 0xFFFFFFFF, + 64: 0xFFFFFFFFFFFFFFFF, + 128: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, + 256: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 + 0xFFFFFFFF: 1, + 0xFFFFFFFFFFFFFFFF: 1, + 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF: 1, + 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF: 1, # noqa: E501 + }, + balance=1, + ), }, + {target: Account(storage={}, balance=0)}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 1, (0, 1, 0): 0}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stMemoryTest/test_buffer.py b/tests/ported_static/stMemoryTest/test_buffer.py index e8eb1086eaf..1ed2a86a832 100644 --- a/tests/ported_static/stMemoryTest/test_buffer.py +++ b/tests/ported_static/stMemoryTest/test_buffer.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -2737,402 +2734,367 @@ def test_buffer( nonce=0, ) - expect_entries_: list[dict] = [ - { - "indexes": { - "data": [ - 0, - 1, - 3, - 4, - 6, - 16, - 17, - 19, - 20, - 31, - 32, - 34, - 35, - 46, - 47, - 49, - 50, - 62, - 65, - 76, - 77, - 79, - 80, - 93, - 94, - 96, - 97, - 108, - 109, - 111, - 112, - 123, - 124, - 126, - 127, - 138, - 139, - 141, - 142, - 153, - 154, - 156, - 157, - 168, - 169, - 171, - 172, - 183, - 184, - 186, - 187, - 198, - 199, - 201, - 202, - 213, - 214, - 216, - 217, - 228, - 229, - 231, - 232, - 243, - 244, - 246, - 247, - 258, - 259, - 261, - 262, - 273, - 274, - 276, - 277, - 288, - 289, - 291, - 292, - 303, - 304, - 306, - 307, - ], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": {contract_3: Account(storage={256: 0})}, - }, - { - "indexes": { - "data": [ - 2, - 5, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 18, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 33, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 48, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 63, - 64, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 78, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 95, - 98, - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 110, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 125, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135, - 136, - 137, - 140, - 143, - 144, - 145, - 146, - 147, - 148, - 149, - 150, - 151, - 152, - 155, - 158, - 159, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 170, - 173, - 174, - 175, - 176, - 177, - 178, - 179, - 180, - 181, - 182, - 185, - 188, - 189, - 190, - 191, - 192, - 193, - 194, - 195, - 196, - 197, - 200, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 210, - 211, - 212, - 215, - 218, - 219, - 220, - 221, - 222, - 223, - 224, - 225, - 226, - 227, - 230, - 233, - 234, - 235, - 236, - 237, - 238, - 239, - 240, - 241, - 242, - 245, - 248, - 249, - 250, - 251, - 252, - 253, - 254, - 255, - 256, - 257, - 260, - 263, - 264, - 265, - 266, - 267, - 268, - 269, - 270, - 271, - 272, - 275, - 278, - 279, - 280, - 281, - 282, - 283, - 284, - 285, - 286, - 287, - 290, - 293, - 294, - 295, - 296, - 297, - 298, - 299, - 300, - 301, - 302, - 305, - 308, - 309, - 310, - 311, - 312, - 313, - 314, - 315, - 316, - 317, - ], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": {contract_3: Account(storage={256: 24743})}, - }, - { - "indexes": {"data": [318, 319, 321, 322], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_1: Account(storage={0: 0})}, - }, - { - "indexes": { - "data": [ - 320, - 323, - 324, - 325, - 326, - 327, - 328, - 329, - 330, - 331, - 332, - ], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": {contract_1: Account(storage={0: 24743})}, - }, - { - "indexes": {"data": [333, 336], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_3: Account(storage={0: 10})}, - }, + expect_posts: list[dict] = [ + {contract_3: Account(storage={256: 0})}, + {contract_3: Account(storage={256: 24743})}, + {contract_1: Account(storage={0: 0})}, + {contract_1: Account(storage={0: 24743})}, + {contract_3: Account(storage={0: 10})}, + {contract_3: Account(storage={0: 0})}, + ] + post = expect_posts[ { - "indexes": { - "data": [ - 334, - 335, - 337, - 338, - 339, - 340, - 341, - 342, - 343, - 344, - 345, - 346, - 347, - ], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": {contract_3: Account(storage={0: 0})}, - }, + (0, 0, 0): 0, + (1, 0, 0): 0, + (2, 0, 0): 1, + (3, 0, 0): 0, + (4, 0, 0): 0, + (5, 0, 0): 1, + (6, 0, 0): 0, + (7, 0, 0): 1, + (8, 0, 0): 1, + (9, 0, 0): 1, + (10, 0, 0): 1, + (11, 0, 0): 1, + (12, 0, 0): 1, + (13, 0, 0): 1, + (14, 0, 0): 1, + (15, 0, 0): 1, + (16, 0, 0): 0, + (17, 0, 0): 0, + (18, 0, 0): 1, + (19, 0, 0): 0, + (20, 0, 0): 0, + (21, 0, 0): 1, + (22, 0, 0): 1, + (23, 0, 0): 1, + (24, 0, 0): 1, + (25, 0, 0): 1, + (26, 0, 0): 1, + (27, 0, 0): 1, + (28, 0, 0): 1, + (29, 0, 0): 1, + (30, 0, 0): 1, + (31, 0, 0): 0, + (32, 0, 0): 0, + (33, 0, 0): 1, + (34, 0, 0): 0, + (35, 0, 0): 0, + (36, 0, 0): 1, + (37, 0, 0): 1, + (38, 0, 0): 1, + (39, 0, 0): 1, + (40, 0, 0): 1, + (41, 0, 0): 1, + (42, 0, 0): 1, + (43, 0, 0): 1, + (44, 0, 0): 1, + (45, 0, 0): 1, + (46, 0, 0): 0, + (47, 0, 0): 0, + (48, 0, 0): 1, + (49, 0, 0): 0, + (50, 0, 0): 0, + (51, 0, 0): 1, + (52, 0, 0): 1, + (53, 0, 0): 1, + (54, 0, 0): 1, + (55, 0, 0): 1, + (56, 0, 0): 1, + (57, 0, 0): 1, + (58, 0, 0): 1, + (59, 0, 0): 1, + (60, 0, 0): 1, + (61, 0, 0): 1, + (62, 0, 0): 0, + (63, 0, 0): 1, + (64, 0, 0): 1, + (65, 0, 0): 0, + (66, 0, 0): 1, + (67, 0, 0): 1, + (68, 0, 0): 1, + (69, 0, 0): 1, + (70, 0, 0): 1, + (71, 0, 0): 1, + (72, 0, 0): 1, + (73, 0, 0): 1, + (74, 0, 0): 1, + (75, 0, 0): 1, + (76, 0, 0): 0, + (77, 0, 0): 0, + (78, 0, 0): 1, + (79, 0, 0): 0, + (80, 0, 0): 0, + (81, 0, 0): 1, + (82, 0, 0): 1, + (83, 0, 0): 1, + (84, 0, 0): 1, + (85, 0, 0): 1, + (86, 0, 0): 1, + (87, 0, 0): 1, + (88, 0, 0): 1, + (89, 0, 0): 1, + (90, 0, 0): 1, + (91, 0, 0): 1, + (92, 0, 0): 1, + (93, 0, 0): 0, + (94, 0, 0): 0, + (95, 0, 0): 1, + (96, 0, 0): 0, + (97, 0, 0): 0, + (98, 0, 0): 1, + (99, 0, 0): 1, + (100, 0, 0): 1, + (101, 0, 0): 1, + (102, 0, 0): 1, + (103, 0, 0): 1, + (104, 0, 0): 1, + (105, 0, 0): 1, + (106, 0, 0): 1, + (107, 0, 0): 1, + (108, 0, 0): 0, + (109, 0, 0): 0, + (110, 0, 0): 1, + (111, 0, 0): 0, + (112, 0, 0): 0, + (113, 0, 0): 1, + (114, 0, 0): 1, + (115, 0, 0): 1, + (116, 0, 0): 1, + (117, 0, 0): 1, + (118, 0, 0): 1, + (119, 0, 0): 1, + (120, 0, 0): 1, + (121, 0, 0): 1, + (122, 0, 0): 1, + (123, 0, 0): 0, + (124, 0, 0): 0, + (125, 0, 0): 1, + (126, 0, 0): 0, + (127, 0, 0): 0, + (128, 0, 0): 1, + (129, 0, 0): 1, + (130, 0, 0): 1, + (131, 0, 0): 1, + (132, 0, 0): 1, + (133, 0, 0): 1, + (134, 0, 0): 1, + (135, 0, 0): 1, + (136, 0, 0): 1, + (137, 0, 0): 1, + (138, 0, 0): 0, + (139, 0, 0): 0, + (140, 0, 0): 1, + (141, 0, 0): 0, + (142, 0, 0): 0, + (143, 0, 0): 1, + (144, 0, 0): 1, + (145, 0, 0): 1, + (146, 0, 0): 1, + (147, 0, 0): 1, + (148, 0, 0): 1, + (149, 0, 0): 1, + (150, 0, 0): 1, + (151, 0, 0): 1, + (152, 0, 0): 1, + (153, 0, 0): 0, + (154, 0, 0): 0, + (155, 0, 0): 1, + (156, 0, 0): 0, + (157, 0, 0): 0, + (158, 0, 0): 1, + (159, 0, 0): 1, + (160, 0, 0): 1, + (161, 0, 0): 1, + (162, 0, 0): 1, + (163, 0, 0): 1, + (164, 0, 0): 1, + (165, 0, 0): 1, + (166, 0, 0): 1, + (167, 0, 0): 1, + (168, 0, 0): 0, + (169, 0, 0): 0, + (170, 0, 0): 1, + (171, 0, 0): 0, + (172, 0, 0): 0, + (173, 0, 0): 1, + (174, 0, 0): 1, + (175, 0, 0): 1, + (176, 0, 0): 1, + (177, 0, 0): 1, + (178, 0, 0): 1, + (179, 0, 0): 1, + (180, 0, 0): 1, + (181, 0, 0): 1, + (182, 0, 0): 1, + (183, 0, 0): 0, + (184, 0, 0): 0, + (185, 0, 0): 1, + (186, 0, 0): 0, + (187, 0, 0): 0, + (188, 0, 0): 1, + (189, 0, 0): 1, + (190, 0, 0): 1, + (191, 0, 0): 1, + (192, 0, 0): 1, + (193, 0, 0): 1, + (194, 0, 0): 1, + (195, 0, 0): 1, + (196, 0, 0): 1, + (197, 0, 0): 1, + (198, 0, 0): 0, + (199, 0, 0): 0, + (200, 0, 0): 1, + (201, 0, 0): 0, + (202, 0, 0): 0, + (203, 0, 0): 1, + (204, 0, 0): 1, + (205, 0, 0): 1, + (206, 0, 0): 1, + (207, 0, 0): 1, + (208, 0, 0): 1, + (209, 0, 0): 1, + (210, 0, 0): 1, + (211, 0, 0): 1, + (212, 0, 0): 1, + (213, 0, 0): 0, + (214, 0, 0): 0, + (215, 0, 0): 1, + (216, 0, 0): 0, + (217, 0, 0): 0, + (218, 0, 0): 1, + (219, 0, 0): 1, + (220, 0, 0): 1, + (221, 0, 0): 1, + (222, 0, 0): 1, + (223, 0, 0): 1, + (224, 0, 0): 1, + (225, 0, 0): 1, + (226, 0, 0): 1, + (227, 0, 0): 1, + (228, 0, 0): 0, + (229, 0, 0): 0, + (230, 0, 0): 1, + (231, 0, 0): 0, + (232, 0, 0): 0, + (233, 0, 0): 1, + (234, 0, 0): 1, + (235, 0, 0): 1, + (236, 0, 0): 1, + (237, 0, 0): 1, + (238, 0, 0): 1, + (239, 0, 0): 1, + (240, 0, 0): 1, + (241, 0, 0): 1, + (242, 0, 0): 1, + (243, 0, 0): 0, + (244, 0, 0): 0, + (245, 0, 0): 1, + (246, 0, 0): 0, + (247, 0, 0): 0, + (248, 0, 0): 1, + (249, 0, 0): 1, + (250, 0, 0): 1, + (251, 0, 0): 1, + (252, 0, 0): 1, + (253, 0, 0): 1, + (254, 0, 0): 1, + (255, 0, 0): 1, + (256, 0, 0): 1, + (257, 0, 0): 1, + (258, 0, 0): 0, + (259, 0, 0): 0, + (260, 0, 0): 1, + (261, 0, 0): 0, + (262, 0, 0): 0, + (263, 0, 0): 1, + (264, 0, 0): 1, + (265, 0, 0): 1, + (266, 0, 0): 1, + (267, 0, 0): 1, + (268, 0, 0): 1, + (269, 0, 0): 1, + (270, 0, 0): 1, + (271, 0, 0): 1, + (272, 0, 0): 1, + (273, 0, 0): 0, + (274, 0, 0): 0, + (275, 0, 0): 1, + (276, 0, 0): 0, + (277, 0, 0): 0, + (278, 0, 0): 1, + (279, 0, 0): 1, + (280, 0, 0): 1, + (281, 0, 0): 1, + (282, 0, 0): 1, + (283, 0, 0): 1, + (284, 0, 0): 1, + (285, 0, 0): 1, + (286, 0, 0): 1, + (287, 0, 0): 1, + (288, 0, 0): 0, + (289, 0, 0): 0, + (290, 0, 0): 1, + (291, 0, 0): 0, + (292, 0, 0): 0, + (293, 0, 0): 1, + (294, 0, 0): 1, + (295, 0, 0): 1, + (296, 0, 0): 1, + (297, 0, 0): 1, + (298, 0, 0): 1, + (299, 0, 0): 1, + (300, 0, 0): 1, + (301, 0, 0): 1, + (302, 0, 0): 1, + (303, 0, 0): 0, + (304, 0, 0): 0, + (305, 0, 0): 1, + (306, 0, 0): 0, + (307, 0, 0): 0, + (308, 0, 0): 1, + (309, 0, 0): 1, + (310, 0, 0): 1, + (311, 0, 0): 1, + (312, 0, 0): 1, + (313, 0, 0): 1, + (314, 0, 0): 1, + (315, 0, 0): 1, + (316, 0, 0): 1, + (317, 0, 0): 1, + (318, 0, 0): 2, + (319, 0, 0): 2, + (320, 0, 0): 3, + (321, 0, 0): 2, + (322, 0, 0): 2, + (323, 0, 0): 3, + (324, 0, 0): 3, + (325, 0, 0): 3, + (326, 0, 0): 3, + (327, 0, 0): 3, + (328, 0, 0): 3, + (329, 0, 0): 3, + (330, 0, 0): 3, + (331, 0, 0): 3, + (332, 0, 0): 3, + (333, 0, 0): 4, + (334, 0, 0): 5, + (335, 0, 0): 5, + (336, 0, 0): 4, + (337, 0, 0): 5, + (338, 0, 0): 5, + (339, 0, 0): 5, + (340, 0, 0): 5, + (341, 0, 0): 5, + (342, 0, 0): 5, + (343, 0, 0): 5, + (344, 0, 0): 5, + (345, 0, 0): 5, + (346, 0, 0): 5, + (347, 0, 0): 5, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("1a8451e6") + Hash(0x20) + Hash(0x0), diff --git a/tests/ported_static/stMemoryTest/test_buffer_src_offset.py b/tests/ported_static/stMemoryTest/test_buffer_src_offset.py index 1a644f966f1..26095b02d06 100644 --- a/tests/ported_static/stMemoryTest/test_buffer_src_offset.py +++ b/tests/ported_static/stMemoryTest/test_buffer_src_offset.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -1049,150 +1046,135 @@ def test_buffer_src_offset( nonce=0, ) - expect_entries_: list[dict] = [ - { - "indexes": { - "data": [ - 0, - 1, - 2, - 4, - 5, - 6, - 8, - 9, - 10, - 12, - 13, - 14, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 28, - 29, - 30, - 32, - 33, - 34, - 36, - 37, - 38, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 52, - 53, - 54, - 56, - 57, - 58, - 60, - 61, - 62, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 96, - 97, - 100, - 101, - ], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": {contract_1: Account(storage={0: 0, 1: 0, 256: 0})}, - }, + expect_posts: list[dict] = [ + {contract_1: Account(storage={0: 0, 1: 0, 256: 0})}, + {contract_1: Account(storage={256: 24743})}, + ] + post = expect_posts[ { - "indexes": { - "data": [ - 3, - 7, - 11, - 15, - 27, - 31, - 35, - 39, - 51, - 55, - 59, - 63, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 98, - 99, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - ], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": {contract_1: Account(storage={256: 24743})}, - }, + (0, 0, 0): 0, + (1, 0, 0): 0, + (2, 0, 0): 0, + (3, 0, 0): 1, + (4, 0, 0): 0, + (5, 0, 0): 0, + (6, 0, 0): 0, + (7, 0, 0): 1, + (8, 0, 0): 0, + (9, 0, 0): 0, + (10, 0, 0): 0, + (11, 0, 0): 1, + (12, 0, 0): 0, + (13, 0, 0): 0, + (14, 0, 0): 0, + (15, 0, 0): 1, + (16, 0, 0): 0, + (17, 0, 0): 0, + (18, 0, 0): 0, + (19, 0, 0): 0, + (20, 0, 0): 0, + (21, 0, 0): 0, + (22, 0, 0): 0, + (23, 0, 0): 0, + (24, 0, 0): 0, + (25, 0, 0): 0, + (26, 0, 0): 0, + (27, 0, 0): 1, + (28, 0, 0): 0, + (29, 0, 0): 0, + (30, 0, 0): 0, + (31, 0, 0): 1, + (32, 0, 0): 0, + (33, 0, 0): 0, + (34, 0, 0): 0, + (35, 0, 0): 1, + (36, 0, 0): 0, + (37, 0, 0): 0, + (38, 0, 0): 0, + (39, 0, 0): 1, + (40, 0, 0): 0, + (41, 0, 0): 0, + (42, 0, 0): 0, + (43, 0, 0): 0, + (44, 0, 0): 0, + (45, 0, 0): 0, + (46, 0, 0): 0, + (47, 0, 0): 0, + (48, 0, 0): 0, + (49, 0, 0): 0, + (50, 0, 0): 0, + (51, 0, 0): 1, + (52, 0, 0): 0, + (53, 0, 0): 0, + (54, 0, 0): 0, + (55, 0, 0): 1, + (56, 0, 0): 0, + (57, 0, 0): 0, + (58, 0, 0): 0, + (59, 0, 0): 1, + (60, 0, 0): 0, + (61, 0, 0): 0, + (62, 0, 0): 0, + (63, 0, 0): 1, + (64, 0, 0): 0, + (65, 0, 0): 0, + (66, 0, 0): 0, + (67, 0, 0): 0, + (68, 0, 0): 0, + (69, 0, 0): 0, + (70, 0, 0): 0, + (71, 0, 0): 0, + (72, 0, 0): 0, + (73, 0, 0): 1, + (74, 0, 0): 1, + (75, 0, 0): 1, + (76, 0, 0): 1, + (77, 0, 0): 1, + (78, 0, 0): 1, + (79, 0, 0): 1, + (80, 0, 0): 1, + (81, 0, 0): 1, + (82, 0, 0): 1, + (83, 0, 0): 1, + (84, 0, 0): 1, + (85, 0, 0): 1, + (86, 0, 0): 1, + (87, 0, 0): 1, + (88, 0, 0): 1, + (89, 0, 0): 1, + (90, 0, 0): 1, + (91, 0, 0): 1, + (92, 0, 0): 1, + (93, 0, 0): 1, + (94, 0, 0): 1, + (95, 0, 0): 1, + (96, 0, 0): 0, + (97, 0, 0): 0, + (98, 0, 0): 1, + (99, 0, 0): 1, + (100, 0, 0): 0, + (101, 0, 0): 0, + (102, 0, 0): 1, + (103, 0, 0): 1, + (104, 0, 0): 1, + (105, 0, 0): 1, + (106, 0, 0): 1, + (107, 0, 0): 1, + (108, 0, 0): 1, + (109, 0, 0): 1, + (110, 0, 0): 1, + (111, 0, 0): 1, + (112, 0, 0): 1, + (113, 0, 0): 1, + (114, 0, 0): 1, + (115, 0, 0): 1, + (116, 0, 0): 1, + (117, 0, 0): 1, + (118, 0, 0): 1, + (119, 0, 0): 1, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("048071d3") + Hash(0x37) + Hash(0x0) + Hash(0x0), diff --git a/tests/ported_static/stMemoryTest/test_oog.py b/tests/ported_static/stMemoryTest/test_oog.py index cd47deb6687..24cfad0f0bd 100644 --- a/tests/ported_static/stMemoryTest/test_oog.py +++ b/tests/ported_static/stMemoryTest/test_oog.py @@ -26,9 +26,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -690,72 +687,57 @@ def test_oog( address=Address(0x00000000000000000000000000000000000100F2), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": { - "data": [ - 0, - 2, - 4, - 6, - 8, - 9, - 12, - 14, - 16, - 18, - 20, - 22, - 24, - 26, - 28, - 30, - 32, - 34, - 36, - 38, - 40, - ], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": {contract_22: Account(storage={0: 1})}, - }, + expect_posts: list[dict] = [ + {contract_22: Account(storage={0: 1})}, + {contract_22: Account(storage={0: 0})}, + ] + post = expect_posts[ { - "indexes": { - "data": [ - 1, - 3, - 5, - 7, - 10, - 11, - 13, - 15, - 17, - 19, - 21, - 23, - 25, - 27, - 29, - 31, - 33, - 35, - 37, - 39, - 41, - ], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": {contract_22: Account(storage={0: 0})}, - }, + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 0, + (3, 0, 0): 1, + (4, 0, 0): 0, + (5, 0, 0): 1, + (6, 0, 0): 0, + (7, 0, 0): 1, + (8, 0, 0): 0, + (9, 0, 0): 0, + (10, 0, 0): 1, + (11, 0, 0): 1, + (12, 0, 0): 0, + (13, 0, 0): 1, + (14, 0, 0): 0, + (15, 0, 0): 1, + (16, 0, 0): 0, + (17, 0, 0): 1, + (18, 0, 0): 0, + (19, 0, 0): 1, + (20, 0, 0): 0, + (21, 0, 0): 1, + (22, 0, 0): 0, + (23, 0, 0): 1, + (24, 0, 0): 0, + (25, 0, 0): 1, + (26, 0, 0): 0, + (27, 0, 0): 1, + (28, 0, 0): 0, + (29, 0, 0): 1, + (30, 0, 0): 0, + (31, 0, 0): 1, + (32, 0, 0): 0, + (33, 0, 0): 1, + (34, 0, 0): 0, + (35, 0, 0): 1, + (36, 0, 0): 0, + (37, 0, 0): 1, + (38, 0, 0): 0, + (39, 0, 0): 1, + (40, 0, 0): 0, + (41, 0, 0): 1, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("1a8451e6") + Hash(0x20) + Hash(0xFFFF), diff --git a/tests/ported_static/stPreCompiledContracts/test_modexp.py b/tests/ported_static/stPreCompiledContracts/test_modexp.py index 982a98231e2..3f496e771ae 100644 --- a/tests/ported_static/stPreCompiledContracts/test_modexp.py +++ b/tests/ported_static/stPreCompiledContracts/test_modexp.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -996,158 +993,231 @@ def test_modexp( address=Address(0x2D06AD61919840E4E00F80782DEDCE12ADA1E859), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0, 6, 7], "gas": -1, "value": -1}, - "network": [">=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun"], - "result": {target: Account(storage={0: 1, 1: 0})}, + target: Account( + storage={ + 0: 1, + 1: 0x2182DA748249A933BF737586B80212DF19B8F829, + }, + ), }, { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 1, - 1: 0x2182DA748249A933BF737586B80212DF19B8F829, - }, - ), - }, + target: Account( + storage={ + 0: 1, + 1: 0x1B85AC3C9B09DE43659C5D04A2D9C75457D9ABF4, + }, + ), }, { - "indexes": {"data": [6], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 1, - 1: 0x1B85AC3C9B09DE43659C5D04A2D9C75457D9ABF4, - }, - ), - }, + target: Account( + storage={ + 0: 1, + 1: 0xD0277C8A3ECCD462A313FC60161BAC36B16E8699, + }, + ), }, + ] + post = expect_posts[ { - "indexes": {"data": [7], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 1, - 1: 0xD0277C8A3ECCD462A313FC60161BAC36B16E8699, - }, - ), - }, - }, + (0, 0, 0): 0, + (1, 0, 0): 0, + (2, 0, 0): 0, + (3, 0, 0): 1, + (4, 0, 0): 0, + (5, 0, 0): 0, + (6, 0, 0): 2, + (7, 0, 0): 3, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("917694f9") diff --git a/tests/ported_static/stPreCompiledContracts2/test_ecrecover_weird_v.py b/tests/ported_static/stPreCompiledContracts2/test_ecrecover_weird_v.py index 3a607960508..7bed8a9fb61 100644 --- a/tests/ported_static/stPreCompiledContracts2/test_ecrecover_weird_v.py +++ b/tests/ported_static/stPreCompiledContracts2/test_ecrecover_weird_v.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -317,66 +314,59 @@ def test_ecrecover_weird_v( address=Address(0x9121BB12ADE6BF12796E6007B21A204E05B1BD49), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ + {target: Account(storage={0: 1, 1: 0, 2: 0})}, { - "indexes": { - "data": [ - 0, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - ], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1, 1: 0, 2: 0})}, + target: Account( + storage={ + 0: 1, + 1: 0xB957B0DA344F6A17F0081D63BE7345A860E5B7A2, + 2: 0, + }, + ), }, + ] + post = expect_posts[ { - "indexes": {"data": [1, 2, 3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 1, - 1: 0xB957B0DA344F6A17F0081D63BE7345A860E5B7A2, - 2: 0, - }, - ), - }, - }, + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 1, + (3, 0, 0): 1, + (4, 0, 0): 0, + (5, 0, 0): 0, + (6, 0, 0): 0, + (7, 0, 0): 0, + (8, 0, 0): 0, + (9, 0, 0): 0, + (10, 0, 0): 0, + (11, 0, 0): 0, + (12, 0, 0): 0, + (13, 0, 0): 0, + (14, 0, 0): 0, + (15, 0, 0): 0, + (16, 0, 0): 0, + (17, 0, 0): 0, + (18, 0, 0): 0, + (19, 0, 0): 0, + (20, 0, 0): 0, + (21, 0, 0): 0, + (22, 0, 0): 0, + (23, 0, 0): 0, + (24, 0, 0): 0, + (25, 0, 0): 0, + (26, 0, 0): 0, + (27, 0, 0): 0, + (28, 0, 0): 0, + (29, 0, 0): 0, + (30, 0, 0): 0, + (31, 0, 0): 0, + (32, 0, 0): 0, + (33, 0, 0): 0, + (34, 0, 0): 0, + (35, 0, 0): 0, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("917694f9") diff --git a/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_20500.py b/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_20500.py index 9d30c32379d..ce7152058ae 100644 --- a/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_20500.py +++ b/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_20500.py @@ -21,9 +21,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -265,60 +262,54 @@ def test_modexp_0_0_0_20500( address=Address(0xC305C901078781C232A2A521C2AF7980F8385EE9), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": 0, "value": 0}, - "network": [">=Cancun"], - "result": { - contract_1: Account(storage={}, code=b"", balance=1, nonce=0), - contract_0: Account( - storage={}, - code=bytes.fromhex( - "600035601c52740100000000000000000000000000000000000000006020526fffffffffffffffffffffffffffffffff6040527fffffffffffffffffffffffffffffffff000000000000000000000000000000016060527402540be3fffffffffffffffffffffffffdabf41c006080527ffffffffffffffffffffffffdabf41c00000000000000000000000002540be40060a0526330c8d1da600051141561012b5760846004356004013511151558576004356004013560200160043560040161014037600161024061014051610160600060056305f5e0fff11558576001610220526102206021806102808284600060046015f150505061028080516020820120905060005561028060206020820352604081510160206001820306601f820103905060208203f350005b" # noqa: E501 - ), - balance=0, - nonce=1, + contract_1: Account(storage={}, code=b"", balance=1, nonce=0), + contract_0: Account( + storage={}, + code=bytes.fromhex( + "600035601c52740100000000000000000000000000000000000000006020526fffffffffffffffffffffffffffffffff6040527fffffffffffffffffffffffffffffffff000000000000000000000000000000016060527402540be3fffffffffffffffffffffffffdabf41c006080527ffffffffffffffffffffffffdabf41c00000000000000000000000002540be40060a0526330c8d1da600051141561012b5760846004356004013511151558576004356004013560200160043560040161014037600161024061014051610160600060056305f5e0fff11558576001610220526102206021806102808284600060046015f150505061028080516020820120905060005561028060206020820352604081510160206001820306601f820103905060208203f350005b" # noqa: E501 ), - contract_2: Account(storage={}, code=b"", balance=1, nonce=0), - contract_3: Account(storage={}, code=b"", balance=1, nonce=0), - contract_4: Account(storage={}, code=b"", balance=1, nonce=0), - sender: Account(storage={}, code=b"", nonce=2), - contract_5: Account(storage={}, code=b"", balance=1, nonce=0), - contract_6: Account(storage={}, code=b"", balance=1, nonce=0), - contract_7: Account(storage={}, code=b"", balance=1, nonce=0), - coinbase: Account(storage={}, code=b"", nonce=0), - contract_8: Account(storage={}, code=b"", balance=1, nonce=0), - }, + balance=0, + nonce=1, + ), + contract_2: Account(storage={}, code=b"", balance=1, nonce=0), + contract_3: Account(storage={}, code=b"", balance=1, nonce=0), + contract_4: Account(storage={}, code=b"", balance=1, nonce=0), + sender: Account(storage={}, code=b"", nonce=2), + contract_5: Account(storage={}, code=b"", balance=1, nonce=0), + contract_6: Account(storage={}, code=b"", balance=1, nonce=0), + contract_7: Account(storage={}, code=b"", balance=1, nonce=0), + coinbase: Account(storage={}, code=b"", nonce=0), + contract_8: Account(storage={}, code=b"", balance=1, nonce=0), }, { - "indexes": {"data": 0, "gas": [1, 2, 3], "value": 0}, - "network": [">=Cancun"], - "result": { - contract_1: Account(storage={}, code=b"", balance=1, nonce=0), - contract_0: Account( - storage={ - 0: 0xBC36789E7A1E281436464229828F817D6612F7B477D66591FF96A9E064BCC98A, # noqa: E501 - }, - code=bytes.fromhex( - "600035601c52740100000000000000000000000000000000000000006020526fffffffffffffffffffffffffffffffff6040527fffffffffffffffffffffffffffffffff000000000000000000000000000000016060527402540be3fffffffffffffffffffffffffdabf41c006080527ffffffffffffffffffffffffdabf41c00000000000000000000000002540be40060a0526330c8d1da600051141561012b5760846004356004013511151558576004356004013560200160043560040161014037600161024061014051610160600060056305f5e0fff11558576001610220526102206021806102808284600060046015f150505061028080516020820120905060005561028060206020820352604081510160206001820306601f820103905060208203f350005b" # noqa: E501 - ), - balance=0, - nonce=1, + contract_1: Account(storage={}, code=b"", balance=1, nonce=0), + contract_0: Account( + storage={ + 0: 0xBC36789E7A1E281436464229828F817D6612F7B477D66591FF96A9E064BCC98A, # noqa: E501 + }, + code=bytes.fromhex( + "600035601c52740100000000000000000000000000000000000000006020526fffffffffffffffffffffffffffffffff6040527fffffffffffffffffffffffffffffffff000000000000000000000000000000016060527402540be3fffffffffffffffffffffffffdabf41c006080527ffffffffffffffffffffffffdabf41c00000000000000000000000002540be40060a0526330c8d1da600051141561012b5760846004356004013511151558576004356004013560200160043560040161014037600161024061014051610160600060056305f5e0fff11558576001610220526102206021806102808284600060046015f150505061028080516020820120905060005561028060206020820352604081510160206001820306601f820103905060208203f350005b" # noqa: E501 ), - contract_2: Account(storage={}, code=b"", balance=1, nonce=0), - contract_3: Account(storage={}, code=b"", balance=1, nonce=0), - contract_4: Account(storage={}, code=b"", balance=1, nonce=0), - sender: Account(storage={}, code=b"", nonce=2), - contract_5: Account(storage={}, code=b"", balance=1, nonce=0), - contract_6: Account(storage={}, code=b"", balance=1, nonce=0), - contract_7: Account(storage={}, code=b"", balance=1, nonce=0), - coinbase: Account(storage={}, code=b"", nonce=0), - contract_8: Account(storage={}, code=b"", balance=1, nonce=0), - }, + balance=0, + nonce=1, + ), + contract_2: Account(storage={}, code=b"", balance=1, nonce=0), + contract_3: Account(storage={}, code=b"", balance=1, nonce=0), + contract_4: Account(storage={}, code=b"", balance=1, nonce=0), + sender: Account(storage={}, code=b"", nonce=2), + contract_5: Account(storage={}, code=b"", balance=1, nonce=0), + contract_6: Account(storage={}, code=b"", balance=1, nonce=0), + contract_7: Account(storage={}, code=b"", balance=1, nonce=0), + coinbase: Account(storage={}, code=b"", nonce=0), + contract_8: Account(storage={}, code=b"", balance=1, nonce=0), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 0, (0, 1, 0): 1, (0, 2, 0): 1, (0, 3, 0): 1}[d, g, v] + ] + _exc = None tx_data = [ Bytes("30c8d1da") diff --git a/tests/ported_static/stQuadraticComplexityTest/test_call1_mb1024_calldepth.py b/tests/ported_static/stQuadraticComplexityTest/test_call1_mb1024_calldepth.py index 228828eea8c..c70b81c8a3a 100644 --- a/tests/ported_static/stQuadraticComplexityTest/test_call1_mb1024_calldepth.py +++ b/tests/ported_static/stQuadraticComplexityTest/test_call1_mb1024_calldepth.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -98,28 +95,20 @@ def test_call1_mb1024_calldepth( address=Address(0x9D15232F6851F9F3A88F88A3B358ED1579977A5A), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun=Cancun=Cancun"], - "result": { - sender: Account(storage={}, code=b"", nonce=1), - addr: Account(storage={0: 3728}, nonce=0), - target: Account(storage={0: 1, 1: 50}, nonce=0), - }, + sender: Account(storage={}, code=b"", nonce=1), + addr: Account(storage={0: 3728}, nonce=0), + target: Account(storage={0: 1, 1: 50}, nonce=0), }, { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(storage={}, code=b"", nonce=1), - addr: Account(storage={}, nonce=0), - target: Account(storage={}, nonce=0), - }, + sender: Account(storage={}, code=b"", nonce=1), + addr: Account(storage={}, nonce=0), + target: Account(storage={}, nonce=0), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 1, (0, 1, 0): 0}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stQuadraticComplexityTest/test_call20_kbytes_contract50_2.py b/tests/ported_static/stQuadraticComplexityTest/test_call20_kbytes_contract50_2.py index 00f12488c0a..3ae3542aba3 100644 --- a/tests/ported_static/stQuadraticComplexityTest/test_call20_kbytes_contract50_2.py +++ b/tests/ported_static/stQuadraticComplexityTest/test_call20_kbytes_contract50_2.py @@ -19,9 +19,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -116,32 +113,24 @@ def test_call20_kbytes_contract50_2( nonce=0, ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun"], - "result": { - sender: Account(storage={}, code=b"", nonce=1), - addr: Account( - storage={}, - code=bytes.fromhex("600161c34f35f300"), - nonce=0, - ), - target: Account(storage={0: 1, 1: 50000}, nonce=0), - }, + sender: Account(storage={}, code=b"", nonce=1), + addr: Account( + storage={}, + code=bytes.fromhex("600161c34f35f300"), + nonce=0, + ), + target: Account(storage={0: 1, 1: 50000}, nonce=0), }, { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(storage={}, code=b"", nonce=1), - addr: Account( - storage={}, - code=bytes.fromhex("600161c34f35f300"), - nonce=0, - ), - target: Account( - storage={}, - code=bytes.fromhex( - "5b61c3506080511015603f576000600061c3506000600073aab87d565dd96e58089e1dff410fbdac4529065861061cf16000556001608051016080526000565b60805160015500" # noqa: E501 - ), - nonce=0, + sender: Account(storage={}, code=b"", nonce=1), + addr: Account( + storage={}, + code=bytes.fromhex("600161c34f35f300"), + nonce=0, + ), + target: Account( + storage={}, + code=bytes.fromhex( + "5b61c3506080511015603f576000600061c3506000600073aab87d565dd96e58089e1dff410fbdac4529065861061cf16000556001608051016080526000565b60805160015500" # noqa: E501 ), - }, + nonce=0, + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 1, (0, 1, 0): 0}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stQuadraticComplexityTest/test_return50000_2.py b/tests/ported_static/stQuadraticComplexityTest/test_return50000_2.py index d8f060e96a9..e5e7ea475dc 100644 --- a/tests/ported_static/stQuadraticComplexityTest/test_return50000_2.py +++ b/tests/ported_static/stQuadraticComplexityTest/test_return50000_2.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -111,48 +108,40 @@ def test_return50000_2( address=Address(0x6123B8B3E245B90F39ED7418D320A60ABB365B9F), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(storage={}, code=b"", nonce=1), - addr: Account( - storage={}, - code=bytes.fromhex("61c34f356000526001600051f300"), - nonce=0, - ), - target: Account( - storage={0: 1, 1: 50000}, - code=bytes.fromhex( - "5b61c3506080511015603f576000600061c3506000600073f2c82ca2413a9f3f06781db577400ddb6c76767d61061cf16000556001608051016080526000565b60805160015500" # noqa: E501 - ), - nonce=0, + sender: Account(storage={}, code=b"", nonce=1), + addr: Account( + storage={}, + code=bytes.fromhex("61c34f356000526001600051f300"), + nonce=0, + ), + target: Account( + storage={0: 1, 1: 50000}, + code=bytes.fromhex( + "5b61c3506080511015603f576000600061c3506000600073f2c82ca2413a9f3f06781db577400ddb6c76767d61061cf16000556001608051016080526000565b60805160015500" # noqa: E501 ), - }, + nonce=0, + ), }, { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(storage={}, code=b"", nonce=1), - addr: Account( - storage={}, - code=bytes.fromhex("61c34f356000526001600051f300"), - nonce=0, - ), - target: Account( - storage={}, - code=bytes.fromhex( - "5b61c3506080511015603f576000600061c3506000600073f2c82ca2413a9f3f06781db577400ddb6c76767d61061cf16000556001608051016080526000565b60805160015500" # noqa: E501 - ), - nonce=0, + sender: Account(storage={}, code=b"", nonce=1), + addr: Account( + storage={}, + code=bytes.fromhex("61c34f356000526001600051f300"), + nonce=0, + ), + target: Account( + storage={}, + code=bytes.fromhex( + "5b61c3506080511015603f576000600061c3506000600073f2c82ca2413a9f3f06781db577400ddb6c76767d61061cf16000556001608051016080526000565b60805160015500" # noqa: E501 ), - }, + nonce=0, + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 1, (0, 1, 0): 0}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stRefundTest/test_refund_call_to_suicide_no_storage.py b/tests/ported_static/stRefundTest/test_refund_call_to_suicide_no_storage.py index a374d190c0b..870e4047d6d 100644 --- a/tests/ported_static/stRefundTest/test_refund_call_to_suicide_no_storage.py +++ b/tests/ported_static/stRefundTest/test_refund_call_to_suicide_no_storage.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -101,30 +98,18 @@ def test_refund_call_to_suicide_no_storage( address=Address(0x4FF65047CE9C85F968689E4369C10003026A41A9), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={0: 0, 1: 1}, balance=0xDE0B6B3A764000A - ), - sender: Account(nonce=1), - }, + target: Account(storage={0: 0, 1: 1}, balance=0xDE0B6B3A764000A), + sender: Account(nonce=1), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={0: 1, 1: 1}, balance=0x1BC16D674EC8000A - ), - sender: Account(nonce=1), - }, + target: Account(storage={0: 1, 1: 1}, balance=0x1BC16D674EC8000A), + sender: Account(nonce=1), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(0x1F4), diff --git a/tests/ported_static/stRefundTest/test_refund_call_to_suicide_storage.py b/tests/ported_static/stRefundTest/test_refund_call_to_suicide_storage.py index ebc41bce622..5b797f0aa88 100644 --- a/tests/ported_static/stRefundTest/test_refund_call_to_suicide_storage.py +++ b/tests/ported_static/stRefundTest/test_refund_call_to_suicide_storage.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -102,32 +99,20 @@ def test_refund_call_to_suicide_storage( address=Address(0x9DEA1AD5123F3D8B91CFC830B1C602597883E97C), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={0: 0, 1: 1}, balance=0xDE0B6B3A764000A - ), - sender: Account(nonce=1), - addr: Account(storage={0: 0, 1: 1}), - }, + target: Account(storage={0: 0, 1: 1}, balance=0xDE0B6B3A764000A), + sender: Account(nonce=1), + addr: Account(storage={0: 0, 1: 1}), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={0: 1, 1: 1}, balance=0x1BC16D674EC8000A - ), - sender: Account(nonce=1), - addr: Account(storage={1: 1}, balance=0, nonce=0), - }, + target: Account(storage={0: 1, 1: 1}, balance=0x1BC16D674EC8000A), + sender: Account(nonce=1), + addr: Account(storage={1: 1}, balance=0, nonce=0), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(0x1F4), diff --git a/tests/ported_static/stRefundTest/test_refund_call_to_suicide_twice.py b/tests/ported_static/stRefundTest/test_refund_call_to_suicide_twice.py index bbcce3a6ed0..71708a95cb9 100644 --- a/tests/ported_static/stRefundTest/test_refund_call_to_suicide_twice.py +++ b/tests/ported_static/stRefundTest/test_refund_call_to_suicide_twice.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -111,32 +108,20 @@ def test_refund_call_to_suicide_twice( address=Address(0x9DEA1AD5123F3D8B91CFC830B1C602597883E97C), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={0: 0, 1: 1}, balance=0xDE0B6B3A764000A - ), - sender: Account(nonce=1), - addr: Account(storage={1: 1}), - }, + target: Account(storage={0: 0, 1: 1}, balance=0xDE0B6B3A764000A), + sender: Account(nonce=1), + addr: Account(storage={1: 1}), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={0: 1, 1: 1}, balance=0x1BC16D674EC8000A - ), - sender: Account(nonce=1), - addr: Account(storage={1: 1}, balance=0, nonce=0), - }, + target: Account(storage={0: 1, 1: 1}, balance=0x1BC16D674EC8000A), + sender: Account(nonce=1), + addr: Account(storage={1: 1}, balance=0, nonce=0), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(0x1F4), diff --git a/tests/ported_static/stRefundTest/test_refund_suicide50procent_cap.py b/tests/ported_static/stRefundTest/test_refund_suicide50procent_cap.py index 2fc32dac534..1736b55c631 100644 --- a/tests/ported_static/stRefundTest/test_refund_suicide50procent_cap.py +++ b/tests/ported_static/stRefundTest/test_refund_suicide50procent_cap.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -113,32 +110,24 @@ def test_refund_suicide50procent_cap( address=Address(0x4FF65047CE9C85F968689E4369C10003026A41A9), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={10: 1, 11: 0, 23: 0x107A7}, - balance=0xDE0B6B3A7640000, - ), - sender: Account(nonce=1), - }, + target: Account( + storage={10: 1, 11: 0, 23: 0x107A7}, + balance=0xDE0B6B3A7640000, + ), + sender: Account(nonce=1), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={10: 1, 11: 1, 23: 0x166FA}, - balance=0x1BC16D674EC80000, - ), - sender: Account(nonce=1), - }, + target: Account( + storage={10: 1, 11: 1, 23: 0x166FA}, + balance=0x1BC16D674EC80000, + ), + sender: Account(nonce=1), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(0x1F4), diff --git a/tests/ported_static/stReturnDataTest/test_modexp_modsize0_returndatasize.py b/tests/ported_static/stReturnDataTest/test_modexp_modsize0_returndatasize.py index 28bc4574fc5..b8b965ce901 100644 --- a/tests/ported_static/stReturnDataTest/test_modexp_modsize0_returndatasize.py +++ b/tests/ported_static/stReturnDataTest/test_modexp_modsize0_returndatasize.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -109,35 +106,19 @@ def test_modexp_modsize0_returndatasize( nonce=0, ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": 0, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={1: 1, 2: 0, 3: 0})}, - }, - { - "indexes": {"data": 1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={1: 1, 2: 0, 3: 1})}, - }, - { - "indexes": {"data": 2, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={1: 1, 2: 0, 3: 100})}, - }, - { - "indexes": {"data": 3, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={1: 1, 2: 0, 3: 256})}, - }, - { - "indexes": {"data": 4, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={})}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={1: 1, 2: 0, 3: 0})}, + {target: Account(storage={1: 1, 2: 0, 3: 1})}, + {target: Account(storage={1: 1, 2: 0, 3: 100})}, + {target: Account(storage={1: 1, 2: 0, 3: 256})}, + {target: Account(storage={})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 0, (1, 0, 0): 1, (2, 0, 0): 2, (3, 0, 0): 3, (4, 0, 0): 4}[ + d, g, v + ] + ] + _exc = None tx_data = [ Bytes( diff --git a/tests/ported_static/stReturnDataTest/test_too_long_return_data_copy.py b/tests/ported_static/stReturnDataTest/test_too_long_return_data_copy.py index 2d9ba21d3a9..bd8bc44d02f 100644 --- a/tests/ported_static/stReturnDataTest/test_too_long_return_data_copy.py +++ b/tests/ported_static/stReturnDataTest/test_too_long_return_data_copy.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -319,28 +316,39 @@ def test_too_long_return_data_copy( nonce=1, ) - expect_entries_: list[dict] = [ - { - "indexes": { - "data": [1, 4, 6, 8, 9, 10, 11, 13, 16, 18, 20, 21, 22, 23], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 24743})}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={0: 24743})}, + {target: Account(storage={0: 57005})}, + ] + post = expect_posts[ { - "indexes": { - "data": [0, 2, 3, 5, 7, 12, 14, 15, 17, 19], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 57005})}, - }, + (0, 0, 0): 1, + (1, 0, 0): 0, + (2, 0, 0): 1, + (3, 0, 0): 1, + (4, 0, 0): 0, + (5, 0, 0): 1, + (6, 0, 0): 0, + (7, 0, 0): 1, + (8, 0, 0): 0, + (9, 0, 0): 0, + (10, 0, 0): 0, + (11, 0, 0): 0, + (12, 0, 0): 1, + (13, 0, 0): 0, + (14, 0, 0): 1, + (15, 0, 0): 1, + (16, 0, 0): 0, + (17, 0, 0): 1, + (18, 0, 0): 0, + (19, 0, 0): 1, + (20, 0, 0): 0, + (21, 0, 0): 0, + (22, 0, 0): 0, + (23, 0, 0): 0, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("917694f9") diff --git a/tests/ported_static/stRevertTest/test_cost_revert.py b/tests/ported_static/stRevertTest/test_cost_revert.py index 7c6fddec42c..9aff7787092 100644 --- a/tests/ported_static/stRevertTest/test_cost_revert.py +++ b/tests/ported_static/stRevertTest/test_cost_revert.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -471,49 +468,43 @@ def test_cost_revert( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0, 21, 14, 7], "gas": -1, "value": -1}, - "network": [">=Cancun=Cancun=Cancun"], - "result": { - target: Account( - storage={}, - code=bytes.fromhex( - "60016000556000600060006000600073b1b49241a4ecf7860872e686090781c906b1b437600035f1600155600c60045500" # noqa: E501 - ), - nonce=54, + target: Account( + storage={}, + code=bytes.fromhex( + "60016000556000600060006000600073b1b49241a4ecf7860872e686090781c906b1b437600035f1600155600c60045500" # noqa: E501 ), - addr: Account(storage={}), - }, + nonce=54, + ), + addr: Account(storage={}), }, { - "indexes": {"data": 0, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={0: 1, 4: 12}, - code=bytes.fromhex( - "60016000556000600060006000600073b1b49241a4ecf7860872e686090781c906b1b437600035f1600155600c60045500" # noqa: E501 - ), - nonce=54, + target: Account( + storage={0: 1, 4: 12}, + code=bytes.fromhex( + "60016000556000600060006000600073b1b49241a4ecf7860872e686090781c906b1b437600035f1600155600c60045500" # noqa: E501 ), - addr: Account(storage={}), - }, + nonce=54, + ), + addr: Account(storage={}), }, { - "indexes": {"data": 1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={}, - code=bytes.fromhex( - "60016000556000600060006000600073b1b49241a4ecf7860872e686090781c906b1b437600035f1600155600c60045500" # noqa: E501 - ), - balance=5, - nonce=54, + target: Account( + storage={}, + code=bytes.fromhex( + "60016000556000600060006000600073b1b49241a4ecf7860872e686090781c906b1b437600035f1600155600c60045500" # noqa: E501 ), - addr: Account(storage={}), - }, + balance=5, + nonce=54, + ), + addr: Account(storage={}), }, + ] + post = expect_posts[ { - "indexes": {"data": 0, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={}, - code=bytes.fromhex( - "60016000556000600060006000600073b1b49241a4ecf7860872e686090781c906b1b437600035f1600155600c60045500" # noqa: E501 - ), - nonce=54, - ), - addr: Account(storage={}), - }, - }, + (0, 0, 0): 0, + (0, 0, 1): 0, + (0, 1, 0): 1, + (0, 1, 1): 1, + (1, 0, 0): 2, + (1, 0, 1): 2, + (1, 1, 0): 0, + (1, 1, 1): 0, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Hash(0xEA60), diff --git a/tests/ported_static/stRevertTest/test_revert_depth_create_oog.py b/tests/ported_static/stRevertTest/test_revert_depth_create_oog.py index 8f3fa8594eb..9fff15ad1f1 100644 --- a/tests/ported_static/stRevertTest/test_revert_depth_create_oog.py +++ b/tests/ported_static/stRevertTest/test_revert_depth_create_oog.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -137,43 +134,42 @@ def test_revert_depth_create_oog( nonce=54, ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address(address=contract_1, nonce=0): Account( - nonce=1 - ), - contract_0: Account(storage={0: 1, 1: 1, 4: 12}), - contract_1: Account(storage={2: 8, 3: 12}), - }, + compute_create_address(address=contract_1, nonce=0): Account( + nonce=1 + ), + contract_0: Account(storage={0: 1, 1: 1, 4: 12}), + contract_1: Account(storage={2: 8, 3: 12}), }, { - "indexes": {"data": 0, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address( - address=contract_1, nonce=0 - ): Account.NONEXISTENT, - contract_0: Account(storage={0: 1, 4: 12}), - contract_1: Account(storage={}), - }, + compute_create_address( + address=contract_1, nonce=0 + ): Account.NONEXISTENT, + contract_0: Account(storage={0: 1, 4: 12}), + contract_1: Account(storage={}), }, { - "indexes": {"data": [0, 1], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address( - address=contract_1, nonce=0 - ): Account.NONEXISTENT, - contract_0: Account(storage={}), - contract_1: Account(storage={}), - }, + compute_create_address( + address=contract_1, nonce=0 + ): Account.NONEXISTENT, + contract_0: Account(storage={}), + contract_1: Account(storage={}), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + { + (0, 0, 0): 2, + (0, 0, 1): 2, + (0, 1, 0): 1, + (0, 1, 1): 1, + (1, 0, 0): 2, + (1, 0, 1): 2, + (1, 1, 0): 0, + (1, 1, 1): 0, + }[d, g, v] + ] + _exc = None tx_data = [ Hash(0xEA60), diff --git a/tests/ported_static/stRevertTest/test_revert_opcode.py b/tests/ported_static/stRevertTest/test_revert_opcode.py index e76a7ee25f2..9d754cce6e7 100644 --- a/tests/ported_static/stRevertTest/test_revert_opcode.py +++ b/tests/ported_static/stRevertTest/test_revert_opcode.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -89,26 +86,11 @@ def test_revert_opcode( nonce=0, ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - target: Account(storage={}, balance=0), - }, - }, - { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - target: Account(storage={}, balance=0), - }, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = { + sender: Account(nonce=1), + target: Account(storage={}, balance=0), + } + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stRevertTest/test_revert_opcode_calls.py b/tests/ported_static/stRevertTest/test_revert_opcode_calls.py index e8dd0e77288..ed9ad6378d3 100644 --- a/tests/ported_static/stRevertTest/test_revert_opcode_calls.py +++ b/tests/ported_static/stRevertTest/test_revert_opcode_calls.py @@ -26,9 +26,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -258,81 +255,60 @@ def test_revert_opcode_calls( address=Address(0xBF3FC188D9C8D699FFA12F0369E3B2BCF8428F7C), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_6: Account(storage={}), - target: Account(storage={10: 1}), - addr: Account(storage={0: 0, 2: 14}, nonce=0), - }, + addr_6: Account(storage={}), + target: Account(storage={10: 1}), + addr: Account(storage={0: 0, 2: 14}, nonce=0), }, { - "indexes": {"data": 0, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_6: Account(storage={}), - addr: Account(storage={}), - }, + addr_6: Account(storage={}), + addr: Account(storage={}), }, { - "indexes": {"data": 1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_6: Account(storage={}), - target: Account(storage={10: 1}), - addr_2: Account(storage={0: 0, 2: 14}, nonce=0), - }, + addr_6: Account(storage={}), + target: Account(storage={10: 1}), + addr_2: Account(storage={0: 0, 2: 14}, nonce=0), }, { - "indexes": {"data": 1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_6: Account(storage={}), - addr_2: Account(storage={}), - }, + addr_6: Account(storage={}), + addr_2: Account(storage={}), }, { - "indexes": {"data": 2, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_6: Account(storage={}), - target: Account(storage={10: 1}), - addr_3: Account(storage={0: 0, 2: 14}, nonce=0), - }, + addr_6: Account(storage={}), + target: Account(storage={10: 1}), + addr_3: Account(storage={0: 0, 2: 14}, nonce=0), }, { - "indexes": {"data": 2, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_6: Account(storage={}), - addr_3: Account(storage={}), - }, + addr_6: Account(storage={}), + addr_3: Account(storage={}), }, { - "indexes": {"data": 3, "gas": [0], "value": -1}, - "network": [">=Cancun"], - "result": { - addr_6: Account(storage={}), - target: Account(storage={10: 1}), - addr_4: Account(storage={0: 1, 2: 14}, nonce=0), - addr_5: Account(storage={4: 0, 5: 14}, nonce=0), - }, + addr_6: Account(storage={}), + target: Account(storage={10: 1}), + addr_4: Account(storage={0: 1, 2: 14}, nonce=0), + addr_5: Account(storage={4: 0, 5: 14}, nonce=0), }, { - "indexes": {"data": 3, "gas": [1], "value": -1}, - "network": [">=Cancun"], - "result": { - addr_6: Account(storage={}), - target: Account(storage={10: 0}), - addr_4: Account(storage={0: 0, 2: 0}, nonce=0), - addr_5: Account(storage={4: 0, 5: 0}, nonce=0), - }, + addr_6: Account(storage={}), + target: Account(storage={10: 0}), + addr_4: Account(storage={0: 0, 2: 0}, nonce=0), + addr_5: Account(storage={4: 0, 5: 0}, nonce=0), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + { + (0, 0, 0): 0, + (0, 1, 0): 1, + (1, 0, 0): 2, + (1, 1, 0): 3, + (2, 0, 0): 4, + (2, 1, 0): 5, + (3, 0, 0): 6, + (3, 1, 0): 7, + }[d, g, v] + ] + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stRevertTest/test_revert_opcode_create.py b/tests/ported_static/stRevertTest/test_revert_opcode_create.py index 3ac33f19c11..d40498d4563 100644 --- a/tests/ported_static/stRevertTest/test_revert_opcode_create.py +++ b/tests/ported_static/stRevertTest/test_revert_opcode_create.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -80,30 +77,22 @@ def test_revert_opcode_create( nonce=0, ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address( - address=contract_0, nonce=0 - ): Account.NONEXISTENT, - contract_0: Account(storage={0: 12, 1: 0}, nonce=1), - }, + compute_create_address( + address=contract_0, nonce=0 + ): Account.NONEXISTENT, + contract_0: Account(storage={0: 12, 1: 0}, nonce=1), }, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address( - address=contract_0, nonce=0 - ): Account.NONEXISTENT, - contract_0: Account(nonce=0), - }, + compute_create_address( + address=contract_0, nonce=0 + ): Account.NONEXISTENT, + contract_0: Account(nonce=0), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 1, 0): 1}[d, g, v]] + _exc = None tx_data = [ Bytes("600160005560016000fe6011600155"), diff --git a/tests/ported_static/stRevertTest/test_revert_opcode_direct_call.py b/tests/ported_static/stRevertTest/test_revert_opcode_direct_call.py index e653efdc770..ed5cb589b08 100644 --- a/tests/ported_static/stRevertTest/test_revert_opcode_direct_call.py +++ b/tests/ported_static/stRevertTest/test_revert_opcode_direct_call.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -120,26 +117,18 @@ def test_revert_opcode_direct_call( address=Address(0xCEB48D108C874B5B014ACDD1A2466D65A3D01DE6), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_2: Account(storage={}), - target: Account(storage={0: 0, 2: 14}, nonce=0), - }, + addr_2: Account(storage={}), + target: Account(storage={0: 0, 2: 14}, nonce=0), }, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_2: Account(storage={}), - target: Account(storage={}), - }, + addr_2: Account(storage={}), + target: Account(storage={}), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 1, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(target, left_padding=True), diff --git a/tests/ported_static/stRevertTest/test_revert_opcode_in_calls_on_non_empty_return_data.py b/tests/ported_static/stRevertTest/test_revert_opcode_in_calls_on_non_empty_return_data.py index 6079b5cf452..b384895ea1d 100644 --- a/tests/ported_static/stRevertTest/test_revert_opcode_in_calls_on_non_empty_return_data.py +++ b/tests/ported_static/stRevertTest/test_revert_opcode_in_calls_on_non_empty_return_data.py @@ -21,9 +21,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -337,81 +334,60 @@ def test_revert_opcode_in_calls_on_non_empty_return_data( address=Address(0x6BACDFA8216DBB2A09819F8739E57AE3574C9FFF), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_6: Account(storage={}), - target: Account(storage={10: 1}), - addr: Account(storage={2: 1}, nonce=0), - }, + addr_6: Account(storage={}), + target: Account(storage={10: 1}), + addr: Account(storage={2: 1}, nonce=0), }, { - "indexes": {"data": 0, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_6: Account(storage={}), - addr: Account(storage={}), - }, + addr_6: Account(storage={}), + addr: Account(storage={}), }, { - "indexes": {"data": 1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_6: Account(storage={}), - target: Account(storage={10: 1}), - addr_2: Account(storage={2: 1}, nonce=0), - }, + addr_6: Account(storage={}), + target: Account(storage={10: 1}), + addr_2: Account(storage={2: 1}, nonce=0), }, { - "indexes": {"data": 1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_6: Account(storage={}), - addr_2: Account(storage={}), - }, + addr_6: Account(storage={}), + addr_2: Account(storage={}), }, { - "indexes": {"data": 2, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_6: Account(storage={}), - target: Account(storage={10: 1}), - addr_3: Account(storage={2: 1}, nonce=0), - }, + addr_6: Account(storage={}), + target: Account(storage={10: 1}), + addr_3: Account(storage={2: 1}, nonce=0), }, { - "indexes": {"data": 2, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_6: Account(storage={}), - addr_3: Account(storage={}), - }, + addr_6: Account(storage={}), + addr_3: Account(storage={}), }, { - "indexes": {"data": 3, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_6: Account(storage={}), - target: Account(storage={10: 1}), - addr_4: Account(storage={0: 1}, nonce=0), - addr_5: Account(storage={5: 1}, nonce=0), - }, + addr_6: Account(storage={}), + target: Account(storage={10: 1}), + addr_4: Account(storage={0: 1}, nonce=0), + addr_5: Account(storage={5: 1}, nonce=0), }, { - "indexes": {"data": 3, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_6: Account(storage={}), - target: Account(storage={10: 255}), - addr_4: Account(storage={0: 0}, nonce=0), - addr_5: Account(storage={5: 0}, nonce=0), - }, + addr_6: Account(storage={}), + target: Account(storage={10: 255}), + addr_4: Account(storage={0: 0}, nonce=0), + addr_5: Account(storage={5: 0}, nonce=0), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + { + (0, 0, 0): 0, + (0, 1, 0): 1, + (1, 0, 0): 2, + (1, 1, 0): 3, + (2, 0, 0): 4, + (2, 1, 0): 5, + (3, 0, 0): 6, + (3, 1, 0): 7, + }[d, g, v] + ] + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stRevertTest/test_revert_opcode_multiple_sub_calls.py b/tests/ported_static/stRevertTest/test_revert_opcode_multiple_sub_calls.py index b91a3a76eb5..e0ff8a9e13d 100644 --- a/tests/ported_static/stRevertTest/test_revert_opcode_multiple_sub_calls.py +++ b/tests/ported_static/stRevertTest/test_revert_opcode_multiple_sub_calls.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -471,112 +468,117 @@ def test_revert_opcode_multiple_sub_calls( address=Address(0xD7E294F032A5CC430E9E6C4148220867E9704DCD), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - addr: Account( - storage={4: 12, 5: 12, 10: 0, 11: 0, 12: 0}, - nonce=0, - ), - addr_5: Account(storage={1: 0, 2: 0, 3: 0}), - addr_6: Account(storage={1: 0, 2: 0, 3: 0}), - addr_7: Account(storage={1: 0, 2: 0, 3: 0}), - }, + sender: Account(nonce=1), + addr: Account( + storage={4: 12, 5: 12, 10: 0, 11: 0, 12: 0}, + nonce=0, + ), + addr_5: Account(storage={1: 0, 2: 0, 3: 0}), + addr_6: Account(storage={1: 0, 2: 0, 3: 0}), + addr_7: Account(storage={1: 0, 2: 0, 3: 0}), }, { - "indexes": {"data": 1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - addr_2: Account( - storage={4: 12, 5: 12, 10: 0, 11: 0, 12: 0}, - nonce=0, - ), - addr_5: Account(storage={1: 0, 2: 0, 3: 0}), - addr_6: Account(storage={1: 0, 2: 0, 3: 0}), - addr_7: Account(storage={1: 0, 2: 0, 3: 0}), - }, + sender: Account(nonce=1), + addr_2: Account( + storage={4: 12, 5: 12, 10: 0, 11: 0, 12: 0}, + nonce=0, + ), + addr_5: Account(storage={1: 0, 2: 0, 3: 0}), + addr_6: Account(storage={1: 0, 2: 0, 3: 0}), + addr_7: Account(storage={1: 0, 2: 0, 3: 0}), }, { - "indexes": {"data": 2, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - addr_3: Account( - storage={4: 12, 5: 12, 10: 0, 11: 0, 12: 0}, - nonce=0, - ), - addr_5: Account(storage={1: 0, 2: 0, 3: 0}), - addr_6: Account(storage={1: 0, 2: 0, 3: 0}), - addr_7: Account(storage={1: 0, 2: 0, 3: 0}), - }, + sender: Account(nonce=1), + addr_3: Account( + storage={4: 12, 5: 12, 10: 0, 11: 0, 12: 0}, + nonce=0, + ), + addr_5: Account(storage={1: 0, 2: 0, 3: 0}), + addr_6: Account(storage={1: 0, 2: 0, 3: 0}), + addr_7: Account(storage={1: 0, 2: 0, 3: 0}), }, { - "indexes": {"data": 3, "gas": [0, 2], "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - addr_4: Account( - storage={4: 12, 5: 12, 10: 0, 11: 0, 12: 0}, - nonce=0, - ), - addr_5: Account(storage={1: 0, 2: 0, 3: 0}), - addr_6: Account(storage={1: 0, 2: 0, 3: 0}), - addr_7: Account(storage={1: 0, 2: 0, 3: 0}), - }, + sender: Account(nonce=1), + addr_4: Account( + storage={4: 12, 5: 12, 10: 0, 11: 0, 12: 0}, + nonce=0, + ), + addr_5: Account(storage={1: 0, 2: 0, 3: 0}), + addr_6: Account(storage={1: 0, 2: 0, 3: 0}), + addr_7: Account(storage={1: 0, 2: 0, 3: 0}), }, { - "indexes": {"data": [1, 2], "gas": 2, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - addr_4: Account( - storage={4: 0, 5: 0, 10: 0, 11: 0, 12: 0}, nonce=0 - ), - addr_5: Account(storage={1: 0, 2: 0, 3: 0}), - addr_6: Account(storage={1: 0, 2: 0, 3: 0}), - addr_7: Account(storage={1: 0, 2: 0, 3: 0}), - }, + sender: Account(nonce=1), + addr_4: Account( + storage={4: 0, 5: 0, 10: 0, 11: 0, 12: 0}, nonce=0 + ), + addr_5: Account(storage={1: 0, 2: 0, 3: 0}), + addr_6: Account(storage={1: 0, 2: 0, 3: 0}), + addr_7: Account(storage={1: 0, 2: 0, 3: 0}), }, { - "indexes": {"data": 0, "gas": [2], "value": [0, 1]}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - addr: Account( - storage={4: 12, 5: 12, 10: 0, 11: 0, 12: 0}, - nonce=0, - ), - addr_2: Account(storage={}, nonce=0), - addr_3: Account(storage={}, nonce=0), - addr_4: Account(storage={}, nonce=0), - addr_5: Account(storage={1: 0, 2: 0, 3: 0}), - addr_6: Account(storage={1: 0, 2: 0, 3: 0}), - addr_7: Account(storage={1: 0, 2: 0, 3: 0}), - }, + sender: Account(nonce=1), + addr: Account( + storage={4: 12, 5: 12, 10: 0, 11: 0, 12: 0}, + nonce=0, + ), + addr_2: Account(storage={}, nonce=0), + addr_3: Account(storage={}, nonce=0), + addr_4: Account(storage={}, nonce=0), + addr_5: Account(storage={1: 0, 2: 0, 3: 0}), + addr_6: Account(storage={1: 0, 2: 0, 3: 0}), + addr_7: Account(storage={1: 0, 2: 0, 3: 0}), }, { - "indexes": {"data": -1, "gas": [1, 3], "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - addr: Account( - storage={4: 0, 5: 0, 10: 0, 11: 0, 12: 0}, nonce=0 - ), - addr_2: Account(storage={}, nonce=0), - addr_3: Account(storage={}, nonce=0), - addr_4: Account(storage={}, nonce=0), - addr_5: Account(storage={1: 0, 2: 0, 3: 0}), - addr_6: Account(storage={1: 0, 2: 0, 3: 0}), - addr_7: Account(storage={1: 0, 2: 0, 3: 0}), - }, + sender: Account(nonce=1), + addr: Account(storage={4: 0, 5: 0, 10: 0, 11: 0, 12: 0}, nonce=0), + addr_2: Account(storage={}, nonce=0), + addr_3: Account(storage={}, nonce=0), + addr_4: Account(storage={}, nonce=0), + addr_5: Account(storage={1: 0, 2: 0, 3: 0}), + addr_6: Account(storage={1: 0, 2: 0, 3: 0}), + addr_7: Account(storage={1: 0, 2: 0, 3: 0}), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + { + (0, 0, 0): 0, + (0, 0, 1): 0, + (0, 1, 0): 6, + (0, 1, 1): 6, + (0, 2, 0): 5, + (0, 2, 1): 5, + (0, 3, 0): 6, + (0, 3, 1): 6, + (1, 0, 0): 1, + (1, 0, 1): 1, + (1, 1, 0): 6, + (1, 1, 1): 6, + (1, 2, 0): 4, + (1, 2, 1): 4, + (1, 3, 0): 6, + (1, 3, 1): 6, + (2, 0, 0): 2, + (2, 0, 1): 2, + (2, 1, 0): 6, + (2, 1, 1): 6, + (2, 2, 0): 4, + (2, 2, 1): 4, + (2, 3, 0): 6, + (2, 3, 1): 6, + (3, 0, 0): 3, + (3, 0, 1): 3, + (3, 1, 0): 6, + (3, 1, 1): 6, + (3, 2, 0): 3, + (3, 2, 1): 3, + (3, 3, 0): 6, + (3, 3, 1): 6, + }[d, g, v] + ] + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stRevertTest/test_revert_opcode_return.py b/tests/ported_static/stRevertTest/test_revert_opcode_return.py index 325f7568164..f898750dd4a 100644 --- a/tests/ported_static/stRevertTest/test_revert_opcode_return.py +++ b/tests/ported_static/stRevertTest/test_revert_opcode_return.py @@ -21,9 +21,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -217,30 +214,35 @@ def test_revert_opcode_return( address=Address(0x858F82BBFD84FC9EB91291458511DF77311DBD0D), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - target: Account( - storage={1: 0, 2: 0x726576657274206D657373616765} - ), - addr: Account(storage={}), - }, + sender: Account(nonce=1), + target: Account(storage={1: 0, 2: 0x726576657274206D657373616765}), + addr: Account(storage={}), }, { - "indexes": {"data": [1, 2, 3, 4, 5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - target: Account(storage={1: 0, 2: 0}), - addr: Account(storage={}), - }, + sender: Account(nonce=1), + target: Account(storage={1: 0, 2: 0}), + addr: Account(storage={}), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + { + (0, 0, 0): 0, + (0, 1, 0): 0, + (1, 0, 0): 1, + (1, 1, 0): 1, + (2, 0, 0): 1, + (2, 1, 0): 1, + (3, 0, 0): 1, + (3, 1, 0): 1, + (4, 0, 0): 1, + (4, 1, 0): 1, + (5, 0, 0): 1, + (5, 1, 0): 1, + }[d, g, v] + ] + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stRevertTest/test_revert_precompiled_touch_exact_oog_paris.py b/tests/ported_static/stRevertTest/test_revert_precompiled_touch_exact_oog_paris.py index 936a3505eb0..f1fe9a597f4 100644 --- a/tests/ported_static/stRevertTest/test_revert_precompiled_touch_exact_oog_paris.py +++ b/tests/ported_static/stRevertTest/test_revert_precompiled_touch_exact_oog_paris.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork, Prague -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -729,135 +726,117 @@ def test_revert_precompiled_touch_exact_oog_paris( address=Address(0xC02FFF115E5EEE4FF4420EBA1CB7CB8772E0598E), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0, 8, 16, 24], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {addr_5: Account(nonce=0)}, - }, - { - "indexes": {"data": [1, 25, 9, 17], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {addr_6: Account(nonce=0)}, - }, - { - "indexes": {"data": [18, 26, 2, 10], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {addr_7: Account(nonce=0)}, - }, - { - "indexes": {"data": [11, 19, 3, 27], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {addr_8: Account(nonce=0)}, - }, - { - "indexes": {"data": [20, 28, 4, 12], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {addr_9: Account(nonce=0)}, - }, - { - "indexes": {"data": [29, 13, 21, 5], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {addr_10: Account(nonce=0)}, - }, - { - "indexes": {"data": [22, 30, 6, 14], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {addr_11: Account(nonce=0)}, - }, - { - "indexes": {"data": [31, 15, 23, 7], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {addr_12: Account(nonce=0)}, - }, - { - "indexes": {"data": [8, 16], "gas": [1, 2], "value": -1}, - "network": [">=Cancun"], - "result": {addr_5: Account(nonce=0)}, - }, - { - "indexes": {"data": [0, 24], "gas": [1, 2], "value": -1}, - "network": [">=Cancun"], - "result": {addr_5: Account(nonce=0)}, - }, - { - "indexes": {"data": [9, 17], "gas": [1, 2], "value": -1}, - "network": [">=Cancun"], - "result": {addr_6: Account(nonce=0)}, - }, - { - "indexes": {"data": [1, 25], "gas": [1, 2], "value": -1}, - "network": [">=Cancun"], - "result": {addr_6: Account(nonce=0)}, - }, - { - "indexes": {"data": [10, 18], "gas": [1, 2], "value": -1}, - "network": [">=Cancun"], - "result": {addr_7: Account(nonce=0)}, - }, - { - "indexes": {"data": [2, 26], "gas": [1, 2], "value": -1}, - "network": [">=Cancun"], - "result": {addr_7: Account(nonce=0)}, - }, - { - "indexes": {"data": [19, 11], "gas": [1, 2], "value": -1}, - "network": [">=Cancun"], - "result": {addr_8: Account(nonce=0)}, - }, - { - "indexes": {"data": [27, 3], "gas": [1, 2], "value": -1}, - "network": [">=Cancun"], - "result": {addr_8: Account(nonce=0)}, - }, - { - "indexes": {"data": [12, 20], "gas": [1, 2], "value": -1}, - "network": [">=Cancun"], - "result": {addr_9: Account(nonce=0)}, - }, - { - "indexes": {"data": [4, 28], "gas": [1, 2], "value": -1}, - "network": [">=Cancun"], - "result": {addr_9: Account(nonce=0)}, - }, - { - "indexes": {"data": [21, 13], "gas": [1, 2], "value": -1}, - "network": [">=Cancun"], - "result": {addr_10: Account(nonce=0)}, - }, - { - "indexes": {"data": [29, 5], "gas": [1, 2], "value": -1}, - "network": [">=Cancun"], - "result": {addr_10: Account(nonce=0)}, - }, - { - "indexes": {"data": [14, 22], "gas": [1, 2], "value": -1}, - "network": [">=Cancun"], - "result": {addr_11: Account(nonce=0)}, - }, - { - "indexes": {"data": [6, 30], "gas": [1, 2], "value": -1}, - "network": [">=Cancun"], - "result": {addr_11: Account(nonce=0)}, - }, - { - "indexes": {"data": [23, 15], "gas": [1, 2], "value": -1}, - "network": [">=Cancun"], - "result": {addr_12: Account(nonce=0)}, - }, - { - "indexes": {"data": [31, 7], "gas": 2, "value": -1}, - "network": [">=Cancun"], - "result": {addr_12: Account(nonce=0)}, - }, + expect_posts: list[dict] = [ + {addr_5: Account(nonce=0)}, + {addr_6: Account(nonce=0)}, + {addr_7: Account(nonce=0)}, + {addr_8: Account(nonce=0)}, + {addr_9: Account(nonce=0)}, + {addr_10: Account(nonce=0)}, + {addr_11: Account(nonce=0)}, + {addr_12: Account(nonce=0)}, + ] + post = expect_posts[ { - "indexes": {"data": [31, 7], "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {addr_12: Account(nonce=0)}, - }, + (0, 0, 0): 0, + (0, 1, 0): 0, + (0, 2, 0): 0, + (1, 0, 0): 1, + (1, 1, 0): 1, + (1, 2, 0): 1, + (2, 0, 0): 2, + (2, 1, 0): 2, + (2, 2, 0): 2, + (3, 0, 0): 3, + (3, 1, 0): 3, + (3, 2, 0): 3, + (4, 0, 0): 4, + (4, 1, 0): 4, + (4, 2, 0): 4, + (5, 0, 0): 5, + (5, 1, 0): 5, + (5, 2, 0): 5, + (6, 0, 0): 6, + (6, 1, 0): 6, + (6, 2, 0): 6, + (7, 0, 0): 7, + (7, 1, 0): 7, + (7, 2, 0): 7, + (8, 0, 0): 0, + (8, 1, 0): 0, + (8, 2, 0): 0, + (9, 0, 0): 1, + (9, 1, 0): 1, + (9, 2, 0): 1, + (10, 0, 0): 2, + (10, 1, 0): 2, + (10, 2, 0): 2, + (11, 0, 0): 3, + (11, 1, 0): 3, + (11, 2, 0): 3, + (12, 0, 0): 4, + (12, 1, 0): 4, + (12, 2, 0): 4, + (13, 0, 0): 5, + (13, 1, 0): 5, + (13, 2, 0): 5, + (14, 0, 0): 6, + (14, 1, 0): 6, + (14, 2, 0): 6, + (15, 0, 0): 7, + (15, 1, 0): 7, + (15, 2, 0): 7, + (16, 0, 0): 0, + (16, 1, 0): 0, + (16, 2, 0): 0, + (17, 0, 0): 1, + (17, 1, 0): 1, + (17, 2, 0): 1, + (18, 0, 0): 2, + (18, 1, 0): 2, + (18, 2, 0): 2, + (19, 0, 0): 3, + (19, 1, 0): 3, + (19, 2, 0): 3, + (20, 0, 0): 4, + (20, 1, 0): 4, + (20, 2, 0): 4, + (21, 0, 0): 5, + (21, 1, 0): 5, + (21, 2, 0): 5, + (22, 0, 0): 6, + (22, 1, 0): 6, + (22, 2, 0): 6, + (23, 0, 0): 7, + (23, 1, 0): 7, + (23, 2, 0): 7, + (24, 0, 0): 0, + (24, 1, 0): 0, + (24, 2, 0): 0, + (25, 0, 0): 1, + (25, 1, 0): 1, + (25, 2, 0): 1, + (26, 0, 0): 2, + (26, 1, 0): 2, + (26, 2, 0): 2, + (27, 0, 0): 3, + (27, 1, 0): 3, + (27, 2, 0): 3, + (28, 0, 0): 4, + (28, 1, 0): 4, + (28, 2, 0): 4, + (29, 0, 0): 5, + (29, 1, 0): 5, + (29, 2, 0): 5, + (30, 0, 0): 6, + (30, 1, 0): 6, + (30, 2, 0): 6, + (31, 0, 0): 7, + (31, 1, 0): 7, + (31, 2, 0): 7, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Hash(0x1000000000000000000000000000000000000000) diff --git a/tests/ported_static/stRevertTest/test_revert_precompiled_touch_paris.py b/tests/ported_static/stRevertTest/test_revert_precompiled_touch_paris.py index 5e3ebc1ede5..46365c3ab2a 100644 --- a/tests/ported_static/stRevertTest/test_revert_precompiled_touch_paris.py +++ b/tests/ported_static/stRevertTest/test_revert_precompiled_touch_paris.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -493,38 +490,17 @@ def test_revert_precompiled_touch_paris( address=Address(0x10EF6D6218ADA53728683CEC4D5160C8C72159BD), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0, 3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_5: Account(nonce=0), - addr_6: Account(nonce=0), - addr_7: Account(nonce=0), - addr_8: Account(nonce=0), - addr_9: Account(nonce=0), - addr_10: Account(nonce=0), - addr_11: Account(nonce=0), - addr_12: Account(nonce=0), - }, - }, - { - "indexes": {"data": [1, 2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_5: Account(nonce=0), - addr_6: Account(nonce=0), - addr_7: Account(nonce=0), - addr_8: Account(nonce=0), - addr_9: Account(nonce=0), - addr_10: Account(nonce=0), - addr_11: Account(nonce=0), - addr_12: Account(nonce=0), - }, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = { + addr_5: Account(nonce=0), + addr_6: Account(nonce=0), + addr_7: Account(nonce=0), + addr_8: Account(nonce=0), + addr_9: Account(nonce=0), + addr_10: Account(nonce=0), + addr_11: Account(nonce=0), + addr_12: Account(nonce=0), + } + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stRevertTest/test_revert_precompiled_touch_storage_paris.py b/tests/ported_static/stRevertTest/test_revert_precompiled_touch_storage_paris.py index 25d6fe6394e..e977275fd85 100644 --- a/tests/ported_static/stRevertTest/test_revert_precompiled_touch_storage_paris.py +++ b/tests/ported_static/stRevertTest/test_revert_precompiled_touch_storage_paris.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -491,38 +488,32 @@ def test_revert_precompiled_touch_storage_paris( address=Address(0x10EF6D6218ADA53728683CEC4D5160C8C72159BD), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": [0, 3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_5: Account(storage={0: addr_5}), - addr_6: Account(storage={0: addr_5}), - addr_7: Account(balance=10), - addr_8: Account(storage={0: addr_5}), - addr_9: Account(storage={0: addr_5}), - addr_10: Account(storage={0: addr_5}), - addr_11: Account(storage={0: addr_5}), - addr_12: Account(storage={0: addr_5}), - }, + addr_5: Account(storage={0: addr_5}), + addr_6: Account(storage={0: addr_5}), + addr_7: Account(balance=10), + addr_8: Account(storage={0: addr_5}), + addr_9: Account(storage={0: addr_5}), + addr_10: Account(storage={0: addr_5}), + addr_11: Account(storage={0: addr_5}), + addr_12: Account(storage={0: addr_5}), }, { - "indexes": {"data": [1, 2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_5: Account(storage={0: addr_5}), - addr_6: Account(storage={0: addr_5}), - addr_7: Account(storage={0: addr_5}), - addr_8: Account(storage={0: addr_5}), - addr_9: Account(storage={0: addr_5}), - addr_10: Account(storage={0: addr_5}), - addr_11: Account(storage={0: addr_5}), - addr_12: Account(storage={0: addr_5}), - }, + addr_5: Account(storage={0: addr_5}), + addr_6: Account(storage={0: addr_5}), + addr_7: Account(storage={0: addr_5}), + addr_8: Account(storage={0: addr_5}), + addr_9: Account(storage={0: addr_5}), + addr_10: Account(storage={0: addr_5}), + addr_11: Account(storage={0: addr_5}), + addr_12: Account(storage={0: addr_5}), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 0, (1, 0, 0): 1, (2, 0, 0): 1, (3, 0, 0): 0}[d, g, v] + ] + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stRevertTest/test_revert_sub_call_storage_oog.py b/tests/ported_static/stRevertTest/test_revert_sub_call_storage_oog.py index 9ba23f0660e..262c4b46f6f 100644 --- a/tests/ported_static/stRevertTest/test_revert_sub_call_storage_oog.py +++ b/tests/ported_static/stRevertTest/test_revert_sub_call_storage_oog.py @@ -19,9 +19,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) REFERENCE_SPEC_GIT_PATH = "N/A" REFERENCE_SPEC_VERSION = "N/A" @@ -91,29 +88,14 @@ def test_revert_sub_call_storage_oog( nonce=0, ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": 0, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(storage={}, balance=1, nonce=0)}, - }, - { - "indexes": {"data": -1, "gas": 1, "value": 0}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={0: 12, 1: 13, 2: 14}, balance=1, nonce=0 - ) - }, - }, - { - "indexes": {"data": -1, "gas": [0, 1], "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={}, balance=1, nonce=0)}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={}, balance=1, nonce=0)}, + {target: Account(storage={0: 12, 1: 13, 2: 14}, balance=1, nonce=0)}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 0, (0, 0, 1): 0, (0, 1, 0): 1, (0, 1, 1): 0}[d, g, v] + ] + _exc = None tx_data = [ Bytes("c0406226"), diff --git a/tests/ported_static/stRevertTest/test_revert_sub_call_storage_oog2.py b/tests/ported_static/stRevertTest/test_revert_sub_call_storage_oog2.py index dd3958fe322..fa00b0e13b0 100644 --- a/tests/ported_static/stRevertTest/test_revert_sub_call_storage_oog2.py +++ b/tests/ported_static/stRevertTest/test_revert_sub_call_storage_oog2.py @@ -19,9 +19,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) REFERENCE_SPEC_GIT_PATH = "N/A" REFERENCE_SPEC_VERSION = "N/A" @@ -91,27 +88,14 @@ def test_revert_sub_call_storage_oog2( nonce=0, ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={}, balance=1, nonce=0)}, - }, - { - "indexes": {"data": -1, "gas": 1, "value": 0}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 13, 1: 14}, balance=1, nonce=0) - }, - }, - { - "indexes": {"data": -1, "gas": 1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(storage={}, balance=1, nonce=0)}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={}, balance=1, nonce=0)}, + {target: Account(storage={0: 13, 1: 14}, balance=1, nonce=0)}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 0, (0, 0, 1): 0, (0, 1, 0): 1, (0, 1, 1): 0}[d, g, v] + ] + _exc = None tx_data = [ Bytes("c0406226"), diff --git a/tests/ported_static/stSStoreTest/test_sstore_0to0.py b/tests/ported_static/stSStoreTest/test_sstore_0to0.py index a600afc7370..2e4bad8c1d9 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_0to0.py +++ b/tests/ported_static/stSStoreTest/test_sstore_0to0.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -237,57 +234,48 @@ def test_sstore_0to0( address=Address(0xDEA0000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, - { - "indexes": {"data": [1, 2], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 3, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 1})}, + contract_0: Account(storage={}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={}, nonce=1 + ), }, + {contract_2: Account(storage={1: 1})}, { - "indexes": {"data": 4, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0xCD47252107CE09AD27592121F5B5E3E30C4CE2DB): Account( - storage={1: 1} - ), - contract_2: Account(storage={1: 1}), - }, - }, - { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, + Address(0xCD47252107CE09AD27592121F5B5E3E30C4CE2DB): Account( + storage={1: 1} + ), + contract_2: Account(storage={1: 1}), }, + {contract_2: Account(storage={1: 0})}, + ] + post = expect_posts[ { - "indexes": {"data": [5, 6, 7, 8, 9], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, - }, + (0, 0, 0): 0, + (0, 1, 0): 3, + (1, 0, 0): 0, + (1, 1, 0): 3, + (2, 0, 0): 0, + (2, 1, 0): 3, + (3, 0, 0): 1, + (3, 1, 0): 3, + (4, 0, 0): 2, + (4, 1, 0): 3, + (5, 0, 0): 3, + (5, 1, 0): 3, + (6, 0, 0): 3, + (6, 1, 0): 3, + (7, 0, 0): 3, + (7, 1, 0): 3, + (8, 0, 0): 3, + (8, 1, 0): 3, + (9, 0, 0): 3, + (9, 1, 0): 3, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Op.POP( diff --git a/tests/ported_static/stSStoreTest/test_sstore_0to0to0.py b/tests/ported_static/stSStoreTest/test_sstore_0to0to0.py index e7244014c13..d95a271c7d6 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_0to0to0.py +++ b/tests/ported_static/stSStoreTest/test_sstore_0to0to0.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -237,57 +234,48 @@ def test_sstore_0to0to0( address=Address(0xDEA0000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, - { - "indexes": {"data": [1, 2], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 3, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 1})}, + contract_0: Account(storage={}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={}, nonce=1 + ), }, + {contract_2: Account(storage={1: 1})}, { - "indexes": {"data": 4, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0x0BDFB5BB25DE41DF5EF3E68904843C7A7B92D35F): Account( - storage={1: 1} - ), - contract_2: Account(storage={1: 1}), - }, - }, - { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, + Address(0x0BDFB5BB25DE41DF5EF3E68904843C7A7B92D35F): Account( + storage={1: 1} + ), + contract_2: Account(storage={1: 1}), }, + {contract_2: Account(storage={1: 0})}, + ] + post = expect_posts[ { - "indexes": {"data": [5, 6, 7, 8, 9], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, - }, + (0, 0, 0): 0, + (0, 1, 0): 3, + (1, 0, 0): 0, + (1, 1, 0): 3, + (2, 0, 0): 0, + (2, 1, 0): 3, + (3, 0, 0): 1, + (3, 1, 0): 3, + (4, 0, 0): 2, + (4, 1, 0): 3, + (5, 0, 0): 3, + (5, 1, 0): 3, + (6, 0, 0): 3, + (6, 1, 0): 3, + (7, 0, 0): 3, + (7, 1, 0): 3, + (8, 0, 0): 3, + (8, 1, 0): 3, + (9, 0, 0): 3, + (9, 1, 0): 3, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Op.POP( diff --git a/tests/ported_static/stSStoreTest/test_sstore_0to0to_x.py b/tests/ported_static/stSStoreTest/test_sstore_0to0to_x.py index 9d6cf9ea9e6..e2e8a38d4f2 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_0to0to_x.py +++ b/tests/ported_static/stSStoreTest/test_sstore_0to0to_x.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -241,57 +238,55 @@ def test_sstore_0to0to_x( address=Address(0xDEA0000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 1}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, - { - "indexes": {"data": [1, 2], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={1: 1}, nonce=1 - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 3, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 1})}, + contract_0: Account(storage={1: 1}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={}, nonce=1 + ), }, { - "indexes": {"data": 4, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0x4B7E4A91B95B23146401605D2ADCE6AB6FFD64E1): Account( - storage={0: 1, 1: 1} - ), - contract_2: Account(storage={1: 1}), - }, + contract_0: Account(storage={}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={1: 1}, nonce=1 + ), }, + {contract_2: Account(storage={1: 1})}, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, + Address(0x4B7E4A91B95B23146401605D2ADCE6AB6FFD64E1): Account( + storage={0: 1, 1: 1} + ), + contract_2: Account(storage={1: 1}), }, + {contract_2: Account(storage={1: 0})}, + ] + post = expect_posts[ { - "indexes": {"data": [5, 6, 7, 8, 9], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, - }, + (0, 0, 0): 0, + (0, 1, 0): 4, + (1, 0, 0): 1, + (1, 1, 0): 4, + (2, 0, 0): 1, + (2, 1, 0): 4, + (3, 0, 0): 2, + (3, 1, 0): 4, + (4, 0, 0): 3, + (4, 1, 0): 4, + (5, 0, 0): 4, + (5, 1, 0): 4, + (6, 0, 0): 4, + (6, 1, 0): 4, + (7, 0, 0): 4, + (7, 1, 0): 4, + (8, 0, 0): 4, + (8, 1, 0): 4, + (9, 0, 0): 4, + (9, 1, 0): 4, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Op.POP( diff --git a/tests/ported_static/stSStoreTest/test_sstore_0to_x.py b/tests/ported_static/stSStoreTest/test_sstore_0to_x.py index 797483aee1e..d293604a12a 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_0to_x.py +++ b/tests/ported_static/stSStoreTest/test_sstore_0to_x.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -237,57 +234,55 @@ def test_sstore_0to_x( address=Address(0xDEA0000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 1}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, - { - "indexes": {"data": [1, 2], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={1: 1}, nonce=1 - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 3, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 1})}, + contract_0: Account(storage={1: 1}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={}, nonce=1 + ), }, { - "indexes": {"data": 4, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0xCD47252107CE09AD27592121F5B5E3E30C4CE2DB): Account( - storage={1: 1} - ), - contract_2: Account(storage={1: 1}), - }, + contract_0: Account(storage={}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={1: 1}, nonce=1 + ), }, + {contract_2: Account(storage={1: 1})}, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, + Address(0xCD47252107CE09AD27592121F5B5E3E30C4CE2DB): Account( + storage={1: 1} + ), + contract_2: Account(storage={1: 1}), }, + {contract_2: Account(storage={1: 0})}, + ] + post = expect_posts[ { - "indexes": {"data": [5, 6, 7, 8, 9], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, - }, + (0, 0, 0): 0, + (0, 1, 0): 4, + (1, 0, 0): 1, + (1, 1, 0): 4, + (2, 0, 0): 1, + (2, 1, 0): 4, + (3, 0, 0): 2, + (3, 1, 0): 4, + (4, 0, 0): 3, + (4, 1, 0): 4, + (5, 0, 0): 4, + (5, 1, 0): 4, + (6, 0, 0): 4, + (6, 1, 0): 4, + (7, 0, 0): 4, + (7, 1, 0): 4, + (8, 0, 0): 4, + (8, 1, 0): 4, + (9, 0, 0): 4, + (9, 1, 0): 4, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Op.POP( diff --git a/tests/ported_static/stSStoreTest/test_sstore_0to_xto0.py b/tests/ported_static/stSStoreTest/test_sstore_0to_xto0.py index aa8728ba931..4062c890f0c 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_0to_xto0.py +++ b/tests/ported_static/stSStoreTest/test_sstore_0to_xto0.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -241,57 +238,48 @@ def test_sstore_0to_xto0( address=Address(0xDEA0000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, - { - "indexes": {"data": [1, 2], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 3, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 1})}, + contract_0: Account(storage={}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={}, nonce=1 + ), }, + {contract_2: Account(storage={1: 1})}, { - "indexes": {"data": 4, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0x7564C2D690AB324D8FA20707F2BBDCFF4367BB92): Account( - storage={1: 1} - ), - contract_2: Account(storage={1: 1}), - }, - }, - { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, + Address(0x7564C2D690AB324D8FA20707F2BBDCFF4367BB92): Account( + storage={1: 1} + ), + contract_2: Account(storage={1: 1}), }, + {contract_2: Account(storage={1: 0})}, + ] + post = expect_posts[ { - "indexes": {"data": [5, 6, 7, 8, 9], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, - }, + (0, 0, 0): 0, + (0, 1, 0): 3, + (1, 0, 0): 0, + (1, 1, 0): 3, + (2, 0, 0): 0, + (2, 1, 0): 3, + (3, 0, 0): 1, + (3, 1, 0): 3, + (4, 0, 0): 2, + (4, 1, 0): 3, + (5, 0, 0): 3, + (5, 1, 0): 3, + (6, 0, 0): 3, + (6, 1, 0): 3, + (7, 0, 0): 3, + (7, 1, 0): 3, + (8, 0, 0): 3, + (8, 1, 0): 3, + (9, 0, 0): 3, + (9, 1, 0): 3, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Op.POP( diff --git a/tests/ported_static/stSStoreTest/test_sstore_0to_xto0to_x.py b/tests/ported_static/stSStoreTest/test_sstore_0to_xto0to_x.py index ff9254c1ebf..5af200006f8 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_0to_xto0to_x.py +++ b/tests/ported_static/stSStoreTest/test_sstore_0to_xto0to_x.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -243,57 +240,55 @@ def test_sstore_0to_xto0to_x( address=Address(0xDEA0000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 1}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, - { - "indexes": {"data": [1, 2], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={1: 1}, nonce=1 - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 3, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 1})}, + contract_0: Account(storage={1: 1}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={}, nonce=1 + ), }, { - "indexes": {"data": 4, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0xCACDB18E817DCDF3677F6F905A75474AF3B8693C): Account( - storage={0: 1, 1: 1} - ), - contract_2: Account(storage={1: 1}), - }, + contract_0: Account(storage={}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={1: 1}, nonce=1 + ), }, + {contract_2: Account(storage={1: 1})}, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, + Address(0xCACDB18E817DCDF3677F6F905A75474AF3B8693C): Account( + storage={0: 1, 1: 1} + ), + contract_2: Account(storage={1: 1}), }, + {contract_2: Account(storage={1: 0})}, + ] + post = expect_posts[ { - "indexes": {"data": [5, 6, 7, 8, 9], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, - }, + (0, 0, 0): 0, + (0, 1, 0): 4, + (1, 0, 0): 1, + (1, 1, 0): 4, + (2, 0, 0): 1, + (2, 1, 0): 4, + (3, 0, 0): 2, + (3, 1, 0): 4, + (4, 0, 0): 3, + (4, 1, 0): 4, + (5, 0, 0): 4, + (5, 1, 0): 4, + (6, 0, 0): 4, + (6, 1, 0): 4, + (7, 0, 0): 4, + (7, 1, 0): 4, + (8, 0, 0): 4, + (8, 1, 0): 4, + (9, 0, 0): 4, + (9, 1, 0): 4, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Op.POP( diff --git a/tests/ported_static/stSStoreTest/test_sstore_0to_xto_x.py b/tests/ported_static/stSStoreTest/test_sstore_0to_xto_x.py index 0b28bdfd8c8..ccbebbcf1f5 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_0to_xto_x.py +++ b/tests/ported_static/stSStoreTest/test_sstore_0to_xto_x.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -237,57 +234,55 @@ def test_sstore_0to_xto_x( address=Address(0xDEA0000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 1}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, - { - "indexes": {"data": [1, 2], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={1: 1}, nonce=1 - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 3, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 1})}, + contract_0: Account(storage={1: 1}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={}, nonce=1 + ), }, { - "indexes": {"data": 4, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0xF797D87EB948007FD777404EF459196B099D3EBE): Account( - storage={0: 1, 1: 1} - ), - contract_2: Account(storage={1: 1}), - }, + contract_0: Account(storage={}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={1: 1}, nonce=1 + ), }, + {contract_2: Account(storage={1: 1})}, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, + Address(0xF797D87EB948007FD777404EF459196B099D3EBE): Account( + storage={0: 1, 1: 1} + ), + contract_2: Account(storage={1: 1}), }, + {contract_2: Account(storage={1: 0})}, + ] + post = expect_posts[ { - "indexes": {"data": [5, 6, 7, 8, 9], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, - }, + (0, 0, 0): 0, + (0, 1, 0): 4, + (1, 0, 0): 1, + (1, 1, 0): 4, + (2, 0, 0): 1, + (2, 1, 0): 4, + (3, 0, 0): 2, + (3, 1, 0): 4, + (4, 0, 0): 3, + (4, 1, 0): 4, + (5, 0, 0): 4, + (5, 1, 0): 4, + (6, 0, 0): 4, + (6, 1, 0): 4, + (7, 0, 0): 4, + (7, 1, 0): 4, + (8, 0, 0): 4, + (8, 1, 0): 4, + (9, 0, 0): 4, + (9, 1, 0): 4, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Op.POP( diff --git a/tests/ported_static/stSStoreTest/test_sstore_0to_xto_y.py b/tests/ported_static/stSStoreTest/test_sstore_0to_xto_y.py index 0c06be05a9e..e72be5a0480 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_0to_xto_y.py +++ b/tests/ported_static/stSStoreTest/test_sstore_0to_xto_y.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -241,57 +238,55 @@ def test_sstore_0to_xto_y( address=Address(0xDEA0000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 1}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, - { - "indexes": {"data": [1, 2], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={1: 1}, nonce=1 - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 3, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 1})}, + contract_0: Account(storage={1: 1}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={}, nonce=1 + ), }, { - "indexes": {"data": 4, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0xEF24BE216C6EAAADE3B2496281D7B66FC2669F03): Account( - storage={0: 1, 1: 1} - ), - contract_2: Account(storage={1: 1}), - }, + contract_0: Account(storage={}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={1: 1}, nonce=1 + ), }, + {contract_2: Account(storage={1: 1})}, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, + Address(0xEF24BE216C6EAAADE3B2496281D7B66FC2669F03): Account( + storage={0: 1, 1: 1} + ), + contract_2: Account(storage={1: 1}), }, + {contract_2: Account(storage={1: 0})}, + ] + post = expect_posts[ { - "indexes": {"data": [5, 6, 7, 8, 9], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, - }, + (0, 0, 0): 0, + (0, 1, 0): 4, + (1, 0, 0): 1, + (1, 1, 0): 4, + (2, 0, 0): 1, + (2, 1, 0): 4, + (3, 0, 0): 2, + (3, 1, 0): 4, + (4, 0, 0): 3, + (4, 1, 0): 4, + (5, 0, 0): 4, + (5, 1, 0): 4, + (6, 0, 0): 4, + (6, 1, 0): 4, + (7, 0, 0): 4, + (7, 1, 0): 4, + (8, 0, 0): 4, + (8, 1, 0): 4, + (9, 0, 0): 4, + (9, 1, 0): 4, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Op.POP( diff --git a/tests/ported_static/stSStoreTest/test_sstore_change_from_external_call_in_init_code.py b/tests/ported_static/stSStoreTest/test_sstore_change_from_external_call_in_init_code.py index b73e6cd6c83..31ba02457fe 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_change_from_external_call_in_init_code.py +++ b/tests/ported_static/stSStoreTest/test_sstore_change_from_external_call_in_init_code.py @@ -25,9 +25,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -219,49 +216,48 @@ def test_sstore_change_from_external_call_in_init_code( address=Address(0xDEA0000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ + {contract_0: Account(storage={0: 1, 1: 1}, nonce=0)}, { - "indexes": {"data": [0, 1, 3], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_0: Account(storage={0: 1, 1: 1}, nonce=0)}, + contract_0: Account(storage={0: 0, 1: 1}, nonce=0), + Address( + 0x6602CFC925BE62BF18470598A98F72812A1EBEF2 + ): Account.NONEXISTENT, }, { - "indexes": { - "data": [2, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16], - "gas": 0, - "value": -1, - }, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={0: 0, 1: 1}, nonce=0), - Address( - 0x6602CFC925BE62BF18470598A98F72812A1EBEF2 - ): Account.NONEXISTENT, - }, + contract_0: Account(storage={0: 0, 1: 1}, nonce=0), + compute_create_address(address=sender, nonce=0): Account( + storage={0: 1, 1: 1}, nonce=1 + ), }, { - "indexes": {"data": [4], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={0: 0, 1: 1}, nonce=0), - compute_create_address(address=sender, nonce=0): Account( - storage={0: 1, 1: 1}, nonce=1 - ), - }, + contract_0: Account(storage={0: 0, 1: 1}, nonce=0), + Address(0x0F446E1BD7A5DA68B5E3A305C7030E3AA8EFC293): Account( + storage={0: 1, 1: 1}, nonce=1 + ), }, + ] + post = expect_posts[ { - "indexes": {"data": [5, 7], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={0: 0, 1: 1}, nonce=0), - Address(0x0F446E1BD7A5DA68B5E3A305C7030E3AA8EFC293): Account( - storage={0: 1, 1: 1}, nonce=1 - ), - }, - }, + (0, 0, 0): 0, + (1, 0, 0): 0, + (2, 0, 0): 1, + (3, 0, 0): 0, + (4, 0, 0): 2, + (5, 0, 0): 3, + (6, 0, 0): 1, + (7, 0, 0): 3, + (8, 0, 0): 1, + (9, 0, 0): 1, + (10, 0, 0): 1, + (11, 0, 0): 1, + (12, 0, 0): 1, + (13, 0, 0): 1, + (14, 0, 0): 1, + (15, 0, 0): 1, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Op.CALL( diff --git a/tests/ported_static/stSStoreTest/test_sstore_gas_left.py b/tests/ported_static/stSStoreTest/test_sstore_gas_left.py index 4c4bf0c54c0..81acf064e53 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_gas_left.py +++ b/tests/ported_static/stSStoreTest/test_sstore_gas_left.py @@ -24,9 +24,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -137,20 +134,24 @@ def test_sstore_gas_left( address=Address(0x4092B3905CFEA2485EA53222F41EB26E67587802), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0, 1, 3, 4, 6, 7], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {addr_2: Account(storage={1: 0})}, - }, + expect_posts: list[dict] = [ + {addr_2: Account(storage={1: 0})}, + {addr_2: Account(storage={1: 1})}, + ] + post = expect_posts[ { - "indexes": {"data": [8, 2, 5], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {addr_2: Account(storage={1: 1})}, - }, + (0, 0, 0): 0, + (1, 0, 0): 0, + (2, 0, 0): 1, + (3, 0, 0): 0, + (4, 0, 0): 0, + (5, 0, 0): 1, + (6, 0, 0): 0, + (7, 0, 0): 0, + (8, 0, 0): 1, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Op.JUMPI( diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto0.py b/tests/ported_static/stSStoreTest/test_sstore_xto0.py index 3c1e74378c0..92629400aa6 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto0.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto0.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -239,57 +236,55 @@ def test_sstore_xto0( address=Address(0xDEA0000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 0}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, - { - "indexes": {"data": [1, 2], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 1}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={1: 0}, nonce=1 - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 3, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 1})}, + contract_0: Account(storage={1: 0}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={}, nonce=1 + ), }, { - "indexes": {"data": 4, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0x7564C2D690AB324D8FA20707F2BBDCFF4367BB92): Account( - storage={0: 0, 1: 1} - ), - contract_2: Account(storage={1: 1}), - }, + contract_0: Account(storage={1: 1}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={1: 0}, nonce=1 + ), }, + {contract_2: Account(storage={1: 1})}, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, + Address(0x7564C2D690AB324D8FA20707F2BBDCFF4367BB92): Account( + storage={0: 0, 1: 1} + ), + contract_2: Account(storage={1: 1}), }, + {contract_2: Account(storage={1: 0})}, + ] + post = expect_posts[ { - "indexes": {"data": [5, 6, 7, 8, 9], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, - }, + (0, 0, 0): 0, + (0, 1, 0): 4, + (1, 0, 0): 1, + (1, 1, 0): 4, + (2, 0, 0): 1, + (2, 1, 0): 4, + (3, 0, 0): 2, + (3, 1, 0): 4, + (4, 0, 0): 3, + (4, 1, 0): 4, + (5, 0, 0): 4, + (5, 1, 0): 4, + (6, 0, 0): 4, + (6, 1, 0): 4, + (7, 0, 0): 4, + (7, 1, 0): 4, + (8, 0, 0): 4, + (8, 1, 0): 4, + (9, 0, 0): 4, + (9, 1, 0): 4, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Op.POP( diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto0to0.py b/tests/ported_static/stSStoreTest/test_sstore_xto0to0.py index b3857446a9a..5cd3031517e 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto0to0.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto0to0.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -239,57 +236,55 @@ def test_sstore_xto0to0( address=Address(0xDEA0000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, - { - "indexes": {"data": [1, 2], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 1}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 3, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 1})}, + contract_0: Account(storage={}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={}, nonce=1 + ), }, { - "indexes": {"data": 4, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0xA3FEBBC9C8C7E91BA2C2BC7CD8B426240C8D6D95): Account( - storage={1: 1} - ), - contract_2: Account(storage={1: 1}), - }, + contract_0: Account(storage={1: 1}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={}, nonce=1 + ), }, + {contract_2: Account(storage={1: 1})}, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, + Address(0xA3FEBBC9C8C7E91BA2C2BC7CD8B426240C8D6D95): Account( + storage={1: 1} + ), + contract_2: Account(storage={1: 1}), }, + {contract_2: Account(storage={1: 0})}, + ] + post = expect_posts[ { - "indexes": {"data": [5, 6, 7, 8, 9], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, - }, + (0, 0, 0): 0, + (0, 1, 0): 4, + (1, 0, 0): 1, + (1, 1, 0): 4, + (2, 0, 0): 1, + (2, 1, 0): 4, + (3, 0, 0): 2, + (3, 1, 0): 4, + (4, 0, 0): 3, + (4, 1, 0): 4, + (5, 0, 0): 4, + (5, 1, 0): 4, + (6, 0, 0): 4, + (6, 1, 0): 4, + (7, 0, 0): 4, + (7, 1, 0): 4, + (8, 0, 0): 4, + (8, 1, 0): 4, + (9, 0, 0): 4, + (9, 1, 0): 4, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Op.POP( diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto0to_x.py b/tests/ported_static/stSStoreTest/test_sstore_xto0to_x.py index 6aafce6dbf1..6538f5f68a6 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto0to_x.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto0to_x.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -243,57 +240,55 @@ def test_sstore_xto0to_x( address=Address(0xDEA0000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 1}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, - { - "indexes": {"data": [1, 2], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 1}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={1: 1}, nonce=1 - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 3, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 1})}, + contract_0: Account(storage={1: 1}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={}, nonce=1 + ), }, { - "indexes": {"data": 4, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0xEEDFCF2CF4289FF428DE4801D7CB0554E27809F3): Account( - storage={0: 1, 1: 1} - ), - contract_2: Account(storage={1: 1}), - }, + contract_0: Account(storage={1: 1}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={1: 1}, nonce=1 + ), }, + {contract_2: Account(storage={1: 1})}, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, + Address(0xEEDFCF2CF4289FF428DE4801D7CB0554E27809F3): Account( + storage={0: 1, 1: 1} + ), + contract_2: Account(storage={1: 1}), }, + {contract_2: Account(storage={1: 0})}, + ] + post = expect_posts[ { - "indexes": {"data": [5, 6, 7, 8, 9], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, - }, + (0, 0, 0): 0, + (0, 1, 0): 4, + (1, 0, 0): 1, + (1, 1, 0): 4, + (2, 0, 0): 1, + (2, 1, 0): 4, + (3, 0, 0): 2, + (3, 1, 0): 4, + (4, 0, 0): 3, + (4, 1, 0): 4, + (5, 0, 0): 4, + (5, 1, 0): 4, + (6, 0, 0): 4, + (6, 1, 0): 4, + (7, 0, 0): 4, + (7, 1, 0): 4, + (8, 0, 0): 4, + (8, 1, 0): 4, + (9, 0, 0): 4, + (9, 1, 0): 4, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Op.POP( diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto0to_xto0.py b/tests/ported_static/stSStoreTest/test_sstore_xto0to_xto0.py index f497142216d..7450c675977 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto0to_xto0.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto0to_xto0.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -245,57 +242,55 @@ def test_sstore_xto0to_xto0( address=Address(0xDEA0000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 0}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, - { - "indexes": {"data": [1, 2], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 1}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={1: 0}, nonce=1 - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 3, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 1})}, + contract_0: Account(storage={1: 0}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={}, nonce=1 + ), }, { - "indexes": {"data": 4, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0xA26B643C4BA8272D24F60806A37B20F255620586): Account( - storage={0: 0, 1: 1} - ), - contract_2: Account(storage={1: 1}), - }, + contract_0: Account(storage={1: 1}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={1: 0}, nonce=1 + ), }, + {contract_2: Account(storage={1: 1})}, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, + Address(0xA26B643C4BA8272D24F60806A37B20F255620586): Account( + storage={0: 0, 1: 1} + ), + contract_2: Account(storage={1: 1}), }, + {contract_2: Account(storage={1: 0})}, + ] + post = expect_posts[ { - "indexes": {"data": [5, 6, 7, 8, 9], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, - }, + (0, 0, 0): 0, + (0, 1, 0): 4, + (1, 0, 0): 1, + (1, 1, 0): 4, + (2, 0, 0): 1, + (2, 1, 0): 4, + (3, 0, 0): 2, + (3, 1, 0): 4, + (4, 0, 0): 3, + (4, 1, 0): 4, + (5, 0, 0): 4, + (5, 1, 0): 4, + (6, 0, 0): 4, + (6, 1, 0): 4, + (7, 0, 0): 4, + (7, 1, 0): 4, + (8, 0, 0): 4, + (8, 1, 0): 4, + (9, 0, 0): 4, + (9, 1, 0): 4, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Op.POP( diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto0to_y.py b/tests/ported_static/stSStoreTest/test_sstore_xto0to_y.py index 2e64a0bc108..bdb9a5b5a59 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto0to_y.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto0to_y.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -243,57 +240,55 @@ def test_sstore_xto0to_y( address=Address(0xDEA0000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 1}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, - { - "indexes": {"data": [1, 2], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 2}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={1: 1}, nonce=1 - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 3, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 1})}, + contract_0: Account(storage={1: 1}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={}, nonce=1 + ), }, { - "indexes": {"data": 4, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0x7123AFCD1C327C946E05B4FB8AEA10AD0F85CB52): Account( - storage={0: 1, 1: 1} - ), - contract_2: Account(storage={1: 1}), - }, + contract_0: Account(storage={1: 2}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={1: 1}, nonce=1 + ), }, + {contract_2: Account(storage={1: 1})}, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, + Address(0x7123AFCD1C327C946E05B4FB8AEA10AD0F85CB52): Account( + storage={0: 1, 1: 1} + ), + contract_2: Account(storage={1: 1}), }, + {contract_2: Account(storage={1: 0})}, + ] + post = expect_posts[ { - "indexes": {"data": [5, 6, 7, 8, 9], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, - }, + (0, 0, 0): 0, + (0, 1, 0): 4, + (1, 0, 0): 1, + (1, 1, 0): 4, + (2, 0, 0): 1, + (2, 1, 0): 4, + (3, 0, 0): 2, + (3, 1, 0): 4, + (4, 0, 0): 3, + (4, 1, 0): 4, + (5, 0, 0): 4, + (5, 1, 0): 4, + (6, 0, 0): 4, + (6, 1, 0): 4, + (7, 0, 0): 4, + (7, 1, 0): 4, + (8, 0, 0): 4, + (8, 1, 0): 4, + (9, 0, 0): 4, + (9, 1, 0): 4, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Op.POP( diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto_x.py b/tests/ported_static/stSStoreTest/test_sstore_xto_x.py index 5f39f313acb..e1f31e999c8 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto_x.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto_x.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -239,57 +236,55 @@ def test_sstore_xto_x( address=Address(0xDEA0000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 1}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, - { - "indexes": {"data": [1, 2], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 1}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={1: 1}, nonce=1 - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 3, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 1})}, + contract_0: Account(storage={1: 1}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={}, nonce=1 + ), }, { - "indexes": {"data": 4, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0xF797D87EB948007FD777404EF459196B099D3EBE): Account( - storage={0: 1, 1: 1} - ), - contract_2: Account(storage={1: 1}), - }, + contract_0: Account(storage={1: 1}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={1: 1}, nonce=1 + ), }, + {contract_2: Account(storage={1: 1})}, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, + Address(0xF797D87EB948007FD777404EF459196B099D3EBE): Account( + storage={0: 1, 1: 1} + ), + contract_2: Account(storage={1: 1}), }, + {contract_2: Account(storage={1: 0})}, + ] + post = expect_posts[ { - "indexes": {"data": [5, 6, 7, 8, 9], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, - }, + (0, 0, 0): 0, + (0, 1, 0): 4, + (1, 0, 0): 1, + (1, 1, 0): 4, + (2, 0, 0): 1, + (2, 1, 0): 4, + (3, 0, 0): 2, + (3, 1, 0): 4, + (4, 0, 0): 3, + (4, 1, 0): 4, + (5, 0, 0): 4, + (5, 1, 0): 4, + (6, 0, 0): 4, + (6, 1, 0): 4, + (7, 0, 0): 4, + (7, 1, 0): 4, + (8, 0, 0): 4, + (8, 1, 0): 4, + (9, 0, 0): 4, + (9, 1, 0): 4, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Op.POP( diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto_xto0.py b/tests/ported_static/stSStoreTest/test_sstore_xto_xto0.py index c7d245e5a27..c0ed48c87f6 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto_xto0.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto_xto0.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -243,57 +240,55 @@ def test_sstore_xto_xto0( address=Address(0xDEA0000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, - { - "indexes": {"data": [1, 2], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 1}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 3, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 1})}, + contract_0: Account(storage={}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={}, nonce=1 + ), }, { - "indexes": {"data": 4, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0x01B59DB2B74B93797420B1A86A28FE35F1E7D0DD): Account( - storage={1: 1} - ), - contract_2: Account(storage={1: 1}), - }, + contract_0: Account(storage={1: 1}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={}, nonce=1 + ), }, + {contract_2: Account(storage={1: 1})}, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, + Address(0x01B59DB2B74B93797420B1A86A28FE35F1E7D0DD): Account( + storage={1: 1} + ), + contract_2: Account(storage={1: 1}), }, + {contract_2: Account(storage={1: 0})}, + ] + post = expect_posts[ { - "indexes": {"data": [5, 6, 7, 8, 9], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, - }, + (0, 0, 0): 0, + (0, 1, 0): 4, + (1, 0, 0): 1, + (1, 1, 0): 4, + (2, 0, 0): 1, + (2, 1, 0): 4, + (3, 0, 0): 2, + (3, 1, 0): 4, + (4, 0, 0): 3, + (4, 1, 0): 4, + (5, 0, 0): 4, + (5, 1, 0): 4, + (6, 0, 0): 4, + (6, 1, 0): 4, + (7, 0, 0): 4, + (7, 1, 0): 4, + (8, 0, 0): 4, + (8, 1, 0): 4, + (9, 0, 0): 4, + (9, 1, 0): 4, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Op.POP( diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto_xto_x.py b/tests/ported_static/stSStoreTest/test_sstore_xto_xto_x.py index 9bc83904c33..4dde7374fae 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto_xto_x.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto_xto_x.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -239,57 +236,55 @@ def test_sstore_xto_xto_x( address=Address(0xDEA0000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 1}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, - { - "indexes": {"data": [1, 2], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 1}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={1: 1}, nonce=1 - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 3, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 1})}, + contract_0: Account(storage={1: 1}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={}, nonce=1 + ), }, { - "indexes": {"data": 4, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0xBA3394A0586B8419B4CF72C7D0F7E75A55A703F8): Account( - storage={0: 1, 1: 1} - ), - contract_2: Account(storage={1: 1}), - }, + contract_0: Account(storage={1: 1}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={1: 1}, nonce=1 + ), }, + {contract_2: Account(storage={1: 1})}, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, + Address(0xBA3394A0586B8419B4CF72C7D0F7E75A55A703F8): Account( + storage={0: 1, 1: 1} + ), + contract_2: Account(storage={1: 1}), }, + {contract_2: Account(storage={1: 0})}, + ] + post = expect_posts[ { - "indexes": {"data": [5, 6, 7, 8, 9], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, - }, + (0, 0, 0): 0, + (0, 1, 0): 4, + (1, 0, 0): 1, + (1, 1, 0): 4, + (2, 0, 0): 1, + (2, 1, 0): 4, + (3, 0, 0): 2, + (3, 1, 0): 4, + (4, 0, 0): 3, + (4, 1, 0): 4, + (5, 0, 0): 4, + (5, 1, 0): 4, + (6, 0, 0): 4, + (6, 1, 0): 4, + (7, 0, 0): 4, + (7, 1, 0): 4, + (8, 0, 0): 4, + (8, 1, 0): 4, + (9, 0, 0): 4, + (9, 1, 0): 4, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Op.POP( diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto_xto_y.py b/tests/ported_static/stSStoreTest/test_sstore_xto_xto_y.py index ea56e7f589e..8ad7de7f332 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto_xto_y.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto_xto_y.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -243,57 +240,55 @@ def test_sstore_xto_xto_y( address=Address(0xDEA0000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 1}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, - { - "indexes": {"data": [1, 2], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 2}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={1: 1}, nonce=1 - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 3, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 1})}, + contract_0: Account(storage={1: 1}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={}, nonce=1 + ), }, { - "indexes": {"data": 4, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0x6AB22377D181D9F2D8B5BFFC62AC497ABBD7CFC5): Account( - storage={0: 1, 1: 1} - ), - contract_2: Account(storage={1: 1}), - }, + contract_0: Account(storage={1: 2}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={1: 1}, nonce=1 + ), }, + {contract_2: Account(storage={1: 1})}, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, + Address(0x6AB22377D181D9F2D8B5BFFC62AC497ABBD7CFC5): Account( + storage={0: 1, 1: 1} + ), + contract_2: Account(storage={1: 1}), }, + {contract_2: Account(storage={1: 0})}, + ] + post = expect_posts[ { - "indexes": {"data": [5, 6, 7, 8, 9], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, - }, + (0, 0, 0): 0, + (0, 1, 0): 4, + (1, 0, 0): 1, + (1, 1, 0): 4, + (2, 0, 0): 1, + (2, 1, 0): 4, + (3, 0, 0): 2, + (3, 1, 0): 4, + (4, 0, 0): 3, + (4, 1, 0): 4, + (5, 0, 0): 4, + (5, 1, 0): 4, + (6, 0, 0): 4, + (6, 1, 0): 4, + (7, 0, 0): 4, + (7, 1, 0): 4, + (8, 0, 0): 4, + (8, 1, 0): 4, + (9, 0, 0): 4, + (9, 1, 0): 4, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Op.POP( diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto_y.py b/tests/ported_static/stSStoreTest/test_sstore_xto_y.py index d65925fd123..66783dc13cc 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto_y.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto_y.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -239,57 +236,55 @@ def test_sstore_xto_y( address=Address(0xDEA0000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 2}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, - { - "indexes": {"data": [1, 2], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 1}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={1: 2}, nonce=1 - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 3, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 1})}, + contract_0: Account(storage={1: 2}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={}, nonce=1 + ), }, { - "indexes": {"data": 4, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0x7E6EF1EFBE92AD9ADCFD8C92BA7932C904D03735): Account( - storage={0: 2, 1: 1} - ), - contract_2: Account(storage={1: 1}), - }, + contract_0: Account(storage={1: 1}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={1: 2}, nonce=1 + ), }, + {contract_2: Account(storage={1: 1})}, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, + Address(0x7E6EF1EFBE92AD9ADCFD8C92BA7932C904D03735): Account( + storage={0: 2, 1: 1} + ), + contract_2: Account(storage={1: 1}), }, + {contract_2: Account(storage={1: 0})}, + ] + post = expect_posts[ { - "indexes": {"data": [5, 6, 7, 8, 9], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, - }, + (0, 0, 0): 0, + (0, 1, 0): 4, + (1, 0, 0): 1, + (1, 1, 0): 4, + (2, 0, 0): 1, + (2, 1, 0): 4, + (3, 0, 0): 2, + (3, 1, 0): 4, + (4, 0, 0): 3, + (4, 1, 0): 4, + (5, 0, 0): 4, + (5, 1, 0): 4, + (6, 0, 0): 4, + (6, 1, 0): 4, + (7, 0, 0): 4, + (7, 1, 0): 4, + (8, 0, 0): 4, + (8, 1, 0): 4, + (9, 0, 0): 4, + (9, 1, 0): 4, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Op.POP( diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto_yto0.py b/tests/ported_static/stSStoreTest/test_sstore_xto_yto0.py index f4e5ace93de..74441b84a63 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto_yto0.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto_yto0.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -243,57 +240,55 @@ def test_sstore_xto_yto0( address=Address(0xDEA0000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, - { - "indexes": {"data": [1, 2], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 1}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 3, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 1})}, + contract_0: Account(storage={}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={}, nonce=1 + ), }, { - "indexes": {"data": 4, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0x96606E69EE07F3BA565D1F25EDEA6C691A780E71): Account( - storage={1: 1} - ), - contract_2: Account(storage={1: 1}), - }, + contract_0: Account(storage={1: 1}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={}, nonce=1 + ), }, + {contract_2: Account(storage={1: 1})}, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, + Address(0x96606E69EE07F3BA565D1F25EDEA6C691A780E71): Account( + storage={1: 1} + ), + contract_2: Account(storage={1: 1}), }, + {contract_2: Account(storage={1: 0})}, + ] + post = expect_posts[ { - "indexes": {"data": [5, 6, 7, 8, 9], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, - }, + (0, 0, 0): 0, + (0, 1, 0): 4, + (1, 0, 0): 1, + (1, 1, 0): 4, + (2, 0, 0): 1, + (2, 1, 0): 4, + (3, 0, 0): 2, + (3, 1, 0): 4, + (4, 0, 0): 3, + (4, 1, 0): 4, + (5, 0, 0): 4, + (5, 1, 0): 4, + (6, 0, 0): 4, + (6, 1, 0): 4, + (7, 0, 0): 4, + (7, 1, 0): 4, + (8, 0, 0): 4, + (8, 1, 0): 4, + (9, 0, 0): 4, + (9, 1, 0): 4, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Op.POP( diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto_yto_x.py b/tests/ported_static/stSStoreTest/test_sstore_xto_yto_x.py index 9b2c31951ed..4c64af91034 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto_yto_x.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto_yto_x.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -243,57 +240,55 @@ def test_sstore_xto_yto_x( address=Address(0xDEA0000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 1}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, - { - "indexes": {"data": [1, 2], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 1}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={1: 1}, nonce=1 - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 3, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 1})}, + contract_0: Account(storage={1: 1}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={}, nonce=1 + ), }, { - "indexes": {"data": 4, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0x90B7D8D4BC39664E30BE0C2380E2B04AA15C6518): Account( - storage={0: 1, 1: 1} - ), - contract_2: Account(storage={1: 1}), - }, + contract_0: Account(storage={1: 1}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={1: 1}, nonce=1 + ), }, + {contract_2: Account(storage={1: 1})}, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, + Address(0x90B7D8D4BC39664E30BE0C2380E2B04AA15C6518): Account( + storage={0: 1, 1: 1} + ), + contract_2: Account(storage={1: 1}), }, + {contract_2: Account(storage={1: 0})}, + ] + post = expect_posts[ { - "indexes": {"data": [5, 6, 7, 8, 9], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, - }, + (0, 0, 0): 0, + (0, 1, 0): 4, + (1, 0, 0): 1, + (1, 1, 0): 4, + (2, 0, 0): 1, + (2, 1, 0): 4, + (3, 0, 0): 2, + (3, 1, 0): 4, + (4, 0, 0): 3, + (4, 1, 0): 4, + (5, 0, 0): 4, + (5, 1, 0): 4, + (6, 0, 0): 4, + (6, 1, 0): 4, + (7, 0, 0): 4, + (7, 1, 0): 4, + (8, 0, 0): 4, + (8, 1, 0): 4, + (9, 0, 0): 4, + (9, 1, 0): 4, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Op.POP( diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto_yto_y.py b/tests/ported_static/stSStoreTest/test_sstore_xto_yto_y.py index b5254ed8235..a496fec3b28 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto_yto_y.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto_yto_y.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -239,57 +236,55 @@ def test_sstore_xto_yto_y( address=Address(0xDEA0000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 1}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, - { - "indexes": {"data": [1, 2], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 2}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={1: 1}, nonce=1 - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 3, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 1})}, + contract_0: Account(storage={1: 1}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={}, nonce=1 + ), }, { - "indexes": {"data": 4, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0xA84440891DDEC0F3A6FA2423D55E437383AD272B): Account( - storage={0: 1, 1: 1} - ), - contract_2: Account(storage={1: 1}), - }, + contract_0: Account(storage={1: 2}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={1: 1}, nonce=1 + ), }, + {contract_2: Account(storage={1: 1})}, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, + Address(0xA84440891DDEC0F3A6FA2423D55E437383AD272B): Account( + storage={0: 1, 1: 1} + ), + contract_2: Account(storage={1: 1}), }, + {contract_2: Account(storage={1: 0})}, + ] + post = expect_posts[ { - "indexes": {"data": [5, 6, 7, 8, 9], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, - }, + (0, 0, 0): 0, + (0, 1, 0): 4, + (1, 0, 0): 1, + (1, 1, 0): 4, + (2, 0, 0): 1, + (2, 1, 0): 4, + (3, 0, 0): 2, + (3, 1, 0): 4, + (4, 0, 0): 3, + (4, 1, 0): 4, + (5, 0, 0): 4, + (5, 1, 0): 4, + (6, 0, 0): 4, + (6, 1, 0): 4, + (7, 0, 0): 4, + (7, 1, 0): 4, + (8, 0, 0): 4, + (8, 1, 0): 4, + (9, 0, 0): 4, + (9, 1, 0): 4, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Op.POP( diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto_yto_z.py b/tests/ported_static/stSStoreTest/test_sstore_xto_yto_z.py index b6b7811d822..64d7ff6e7a7 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto_yto_z.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto_yto_z.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -243,57 +240,55 @@ def test_sstore_xto_yto_z( address=Address(0xDEA0000000000000000000000000000000000000), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 3}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={}, nonce=1 - ), - }, - }, - { - "indexes": {"data": [1, 2], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={1: 1}), - contract_2: Account(storage={1: 1}), - compute_create_address(address=sender, nonce=0): Account( - storage={1: 3}, nonce=1 - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 3, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 1})}, + contract_0: Account(storage={1: 3}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={}, nonce=1 + ), }, { - "indexes": {"data": 4, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0xDE59CA290FA8B9E3DB697325D153C540AC08321D): Account( - storage={0: 3, 1: 1} - ), - contract_2: Account(storage={1: 1}), - }, + contract_0: Account(storage={1: 1}), + contract_2: Account(storage={1: 1}), + compute_create_address(address=sender, nonce=0): Account( + storage={1: 3}, nonce=1 + ), }, + {contract_2: Account(storage={1: 1})}, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, + Address(0xDE59CA290FA8B9E3DB697325D153C540AC08321D): Account( + storage={0: 3, 1: 1} + ), + contract_2: Account(storage={1: 1}), }, + {contract_2: Account(storage={1: 0})}, + ] + post = expect_posts[ { - "indexes": {"data": [5, 6, 7, 8, 9], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={1: 0})}, - }, + (0, 0, 0): 0, + (0, 1, 0): 4, + (1, 0, 0): 1, + (1, 1, 0): 4, + (2, 0, 0): 1, + (2, 1, 0): 4, + (3, 0, 0): 2, + (3, 1, 0): 4, + (4, 0, 0): 3, + (4, 1, 0): 4, + (5, 0, 0): 4, + (5, 1, 0): 4, + (6, 0, 0): 4, + (6, 1, 0): 4, + (7, 0, 0): 4, + (7, 1, 0): 4, + (8, 0, 0): 4, + (8, 1, 0): 4, + (9, 0, 0): 4, + (9, 1, 0): 4, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Op.POP( diff --git a/tests/ported_static/stSelfBalance/test_self_balance_call_types.py b/tests/ported_static/stSelfBalance/test_self_balance_call_types.py index 2d12d4e5179..57fdf1583f0 100644 --- a/tests/ported_static/stSelfBalance/test_self_balance_call_types.py +++ b/tests/ported_static/stSelfBalance/test_self_balance_call_types.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -201,40 +198,32 @@ def test_self_balance_call_types( address=Address(0x84BF87FBEF135AFEA15330FDF5847EB504CFF901), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr: Account(storage={17: 1}), - addr_2: Account(storage={33: 4352}), - addr_3: Account(storage={49: 5}), - addr_4: Account(storage={65: 4864, 66: 4863, 67: 1}), - }, + addr: Account(storage={17: 1}), + addr_2: Account(storage={33: 4352}), + addr_3: Account(storage={49: 5}), + addr_4: Account(storage={65: 4864, 66: 4863, 67: 1}), }, { - "indexes": {"data": [1, 2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: addr, - 1: addr_2, - 2: addr_3, - 3: addr_4, - 17: 1, - 33: 8192, - 49: 5, - 65: 8192, - 66: 8191, - 67: 1, - }, - ), - }, + target: Account( + storage={ + 0: addr, + 1: addr_2, + 2: addr_3, + 3: addr_4, + 17: 1, + 33: 8192, + 49: 5, + 65: 8192, + 66: 8191, + 67: 1, + }, + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1, (2, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(0x1), diff --git a/tests/ported_static/stSpecialTest/test_eoa_empty_paris.py b/tests/ported_static/stSpecialTest/test_eoa_empty_paris.py index b6e28c96397..c5d18df010b 100644 --- a/tests/ported_static/stSpecialTest/test_eoa_empty_paris.py +++ b/tests/ported_static/stSpecialTest/test_eoa_empty_paris.py @@ -27,9 +27,6 @@ TransactionException, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -246,150 +243,97 @@ def test_eoa_empty_paris( address=Address(0x000000000000000000000000000000000000C0DE), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": 0, "gas": 0, "value": 0}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_5: Account( - storage={ - 0: sender, - 49: 0, - 59: 0, - 63: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - 241: 118, - 255: 7626 + cold_account_delta, - 319: 0, - 47825: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - 47826: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - 47827: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - 47828: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - }, - ), - }, - }, - { - "indexes": {"data": 1, "gas": 0, "value": 0}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_5: Account( - storage={ - 0: sender, - 49: 0, - 59: 0, - 63: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - 241: 6818 + call_value_delta, - 255: 7626 + cold_account_delta, - 319: 0, - 47825: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - 47826: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - 47827: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - 47828: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - }, - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": 0, "value": 1}, - "network": [">=Cancun"], - "result": {}, - "expect_exception": { - ">=Cancun": TransactionException.INSUFFICIENT_ACCOUNT_FUNDS - }, + sender: Account(nonce=1), + contract_5: Account( + storage={ + 0: sender, + 49: 0, + 59: 0, + 63: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 + 241: 118, + 255: 7626 + cold_account_delta, + 319: 0, + 47825: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 + 47826: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 + 47827: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 + 47828: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 + }, + ), }, { - "indexes": {"data": 0, "gas": 1, "value": 0}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_5: Account( - storage={ - 0: sender, - 49: 100, - 59: 0, - 63: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - 241: 118, - 255: 7626 + cold_account_delta, - 319: 0, - 47825: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - 47826: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - 47827: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - 47828: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - }, - ), - }, + sender: Account(nonce=1), + contract_5: Account( + storage={ + 0: sender, + 49: 0, + 59: 0, + 63: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 + 241: 6818 + call_value_delta, + 255: 7626 + cold_account_delta, + 319: 0, + 47825: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 + 47826: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 + 47827: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 + 47828: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 + }, + ), }, + {}, { - "indexes": {"data": 1, "gas": 1, "value": 0}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_5: Account( - storage={ - 0: sender, - 49: 100, - 59: 0, - 63: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - 241: 6818 + call_value_delta, - 255: 7626 + cold_account_delta, - 319: 0, - 47825: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - 47826: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - 47827: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - 47828: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - }, - ), - }, + sender: Account(nonce=1), + contract_5: Account( + storage={ + 0: sender, + 49: 100, + 59: 0, + 63: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 + 241: 118, + 255: 7626 + cold_account_delta, + 319: 0, + 47825: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 + 47826: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 + 47827: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 + 47828: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 + }, + ), }, { - "indexes": {"data": 0, "gas": 1, "value": 1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_5: Account( - storage={ - 0: sender, - 49: 0, - 59: 0, - 63: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - 241: 118, - 255: 7626 + cold_account_delta, - 319: 0, - 47825: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - 47826: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - 47827: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - 47828: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - }, - ), - }, + sender: Account(nonce=1), + contract_5: Account( + storage={ + 0: sender, + 49: 100, + 59: 0, + 63: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 + 241: 6818 + call_value_delta, + 255: 7626 + cold_account_delta, + 319: 0, + 47825: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 + 47826: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 + 47827: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 + 47828: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 + }, + ), }, + ] + post = expect_posts[ { - "indexes": {"data": 1, "gas": 1, "value": 1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_5: Account( - storage={ - 0: sender, - 49: 0, - 59: 0, - 63: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - 241: 6818 + call_value_delta, - 255: 7626 + cold_account_delta, - 319: 0, - 47825: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - 47826: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - 47827: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - 47828: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - }, - ), - }, - }, + (0, 0, 0): 0, + (0, 0, 1): 2, + (0, 1, 0): 3, + (0, 1, 1): 0, + (1, 0, 0): 1, + (1, 0, 1): 2, + (1, 1, 0): 4, + (1, 1, 1): 1, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = { + (0, 0, 1): TransactionException.INSUFFICIENT_ACCOUNT_FUNDS, + (1, 0, 1): TransactionException.INSUFFICIENT_ACCOUNT_FUNDS, + }.get((d, g, v)) tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/stStackTests/test_underflow_test.py b/tests/ported_static/stStackTests/test_underflow_test.py index 92b79de5edb..fd39da76ee5 100644 --- a/tests/ported_static/stStackTests/test_underflow_test.py +++ b/tests/ported_static/stStackTests/test_underflow_test.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -2764,1338 +2761,843 @@ def test_underflow_test( address=Address(0x4C5F839D523E76FC3837E085A3E1538CD36E288A), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr: Account(storage={1: 24743}), }, { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_2: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_2: Account(storage={1: 1}), }, { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_3: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_3: Account(storage={1: 24743}), }, { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_4: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_4: Account(storage={1: 1}), }, { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_5: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_5: Account(storage={1: 24743}), }, { - "indexes": {"data": [5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_6: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_6: Account(storage={1: 1}), }, { - "indexes": {"data": [6], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_7: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_7: Account(storage={1: 24743}), }, { - "indexes": {"data": [7], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_8: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_8: Account(storage={1: 1}), }, { - "indexes": {"data": [8], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_9: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_9: Account(storage={1: 24743}), }, { - "indexes": {"data": [9], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_10: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_10: Account(storage={1: 1}), }, { - "indexes": {"data": [10], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_11: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_11: Account(storage={1: 24743}), }, { - "indexes": {"data": [11], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_12: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_12: Account(storage={1: 1}), }, { - "indexes": {"data": [12], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_13: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_13: Account(storage={1: 24743}), }, { - "indexes": {"data": [13], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_14: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_14: Account(storage={1: 1}), }, { - "indexes": {"data": [14], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_15: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_15: Account(storage={1: 24743}), }, { - "indexes": {"data": [15], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_16: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_16: Account(storage={1: 1}), }, { - "indexes": {"data": [16], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_17: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_17: Account(storage={1: 24743}), }, { - "indexes": {"data": [17], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_18: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_18: Account(storage={1: 1}), }, { - "indexes": {"data": [18], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_19: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_19: Account(storage={1: 24743}), }, { - "indexes": {"data": [19], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_20: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_20: Account(storage={1: 1}), }, { - "indexes": {"data": [20], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_21: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_21: Account(storage={1: 24743}), }, { - "indexes": {"data": [21], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_22: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_22: Account(storage={1: 1}), }, { - "indexes": {"data": [22], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_23: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_23: Account(storage={1: 24743}), }, { - "indexes": {"data": [23], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_24: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_24: Account(storage={1: 1}), }, { - "indexes": {"data": [24], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_25: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_25: Account(storage={1: 24743}), }, { - "indexes": {"data": [25], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_26: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_26: Account(storage={1: 1}), }, { - "indexes": {"data": [26], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_27: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_27: Account(storage={1: 24743}), }, { - "indexes": {"data": [27], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_28: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_28: Account(storage={1: 1}), }, { - "indexes": {"data": [28], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_29: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_29: Account(storage={1: 24743}), }, { - "indexes": {"data": [29], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_30: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_30: Account(storage={1: 1}), }, { - "indexes": {"data": [30], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_31: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_31: Account(storage={1: 24743}), }, { - "indexes": {"data": [31], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_32: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_32: Account(storage={1: 1}), }, { - "indexes": {"data": [32], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_33: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_33: Account(storage={1: 24743}), }, { - "indexes": {"data": [33], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_34: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_34: Account(storage={1: 1}), }, { - "indexes": {"data": [34], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_35: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_35: Account(storage={1: 24743}), }, { - "indexes": {"data": [35], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_36: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_36: Account(storage={1: 1}), }, { - "indexes": {"data": [36], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_37: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_37: Account(storage={1: 24743}), }, { - "indexes": {"data": [37], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_38: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_38: Account(storage={1: 1}), }, { - "indexes": {"data": [38], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_39: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_39: Account(storage={1: 24743}), }, { - "indexes": {"data": [39], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_40: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_40: Account(storage={1: 1}), }, { - "indexes": {"data": [40], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_41: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_41: Account(storage={1: 24743}), }, { - "indexes": {"data": [41], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_42: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_42: Account(storage={1: 1}), }, { - "indexes": {"data": [42], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_43: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_43: Account(storage={1: 24743}), }, { - "indexes": {"data": [43], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_44: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_44: Account(storage={1: 1}), }, { - "indexes": {"data": [44], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_45: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_45: Account(storage={1: 24743}), }, { - "indexes": {"data": [45], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_46: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_46: Account(storage={1: 1}), }, { - "indexes": {"data": [46], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_47: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_47: Account(storage={1: 24743}), }, { - "indexes": {"data": [47], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_48: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_48: Account(storage={1: 1}), }, { - "indexes": {"data": [48], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_49: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_49: Account(storage={1: 24743}), }, { - "indexes": {"data": [49], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_50: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_50: Account(storage={1: 1}), }, { - "indexes": {"data": [50], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_51: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_51: Account(storage={1: 24743}), }, { - "indexes": {"data": [51], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_52: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_52: Account(storage={1: 1}), }, { - "indexes": {"data": [52], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_53: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_53: Account(storage={1: 24743}), }, { - "indexes": {"data": [53], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_54: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_54: Account(storage={1: 1}), }, { - "indexes": {"data": [54], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_55: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_55: Account(storage={1: 24743}), }, { - "indexes": {"data": [55], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_56: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_56: Account(storage={1: 1}), }, { - "indexes": {"data": [56], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_57: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_57: Account(storage={1: 24743}), }, { - "indexes": {"data": [57], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_58: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_58: Account(storage={1: 1}), }, { - "indexes": {"data": [58], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_59: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_59: Account(storage={1: 24743}), }, { - "indexes": {"data": [59], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_60: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_60: Account(storage={1: 1}), }, { - "indexes": {"data": [60], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_61: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_61: Account(storage={1: 24743}), }, { - "indexes": {"data": [61], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_62: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_62: Account(storage={1: 1}), }, { - "indexes": {"data": [62], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_63: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_63: Account(storage={1: 24743}), }, { - "indexes": {"data": [63], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_64: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_64: Account(storage={1: 1}), }, { - "indexes": {"data": [64], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_65: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_65: Account(storage={1: 24743}), }, { - "indexes": {"data": [65], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_66: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_66: Account(storage={1: 1}), }, { - "indexes": {"data": [66], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_67: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_67: Account(storage={1: 24743}), }, { - "indexes": {"data": [67], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_68: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_68: Account(storage={1: 1}), }, { - "indexes": {"data": [68], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_69: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_69: Account(storage={1: 24743}), }, { - "indexes": {"data": [69], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_70: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_70: Account(storage={1: 1}), }, { - "indexes": {"data": [70], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_71: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_71: Account(storage={1: 24743}), }, { - "indexes": {"data": [71], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_72: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_72: Account(storage={1: 1}), }, { - "indexes": {"data": [72], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_73: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_73: Account(storage={1: 24743}), }, { - "indexes": {"data": [73], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_74: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_74: Account(storage={1: 1}), }, { - "indexes": {"data": [74], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_75: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_75: Account(storage={1: 24743}), }, { - "indexes": {"data": [75], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_76: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_76: Account(storage={1: 1}), }, { - "indexes": {"data": [76], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_77: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_77: Account(storage={1: 24743}), }, { - "indexes": {"data": [77], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_78: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_78: Account(storage={1: 1}), }, { - "indexes": {"data": [78], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_79: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_79: Account(storage={1: 24743}), }, { - "indexes": {"data": [79], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_80: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_80: Account(storage={1: 1}), }, { - "indexes": {"data": [80], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_81: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_81: Account(storage={1: 24743}), }, { - "indexes": {"data": [81], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_82: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_82: Account(storage={1: 1}), }, { - "indexes": {"data": [82], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_83: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_83: Account(storage={1: 24743}), }, { - "indexes": {"data": [83], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_84: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_84: Account(storage={1: 1}), }, { - "indexes": {"data": [84], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_85: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_85: Account(storage={1: 24743}), }, { - "indexes": {"data": [85], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_86: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_86: Account(storage={1: 1}), }, { - "indexes": {"data": [86], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_87: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_87: Account(storage={1: 24743}), }, { - "indexes": {"data": [87], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_88: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_88: Account(storage={1: 1}), }, { - "indexes": {"data": [88], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_89: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_89: Account(storage={1: 24743}), }, { - "indexes": {"data": [89], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_90: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_90: Account(storage={1: 1}), }, { - "indexes": {"data": [90], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_91: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_91: Account(storage={1: 24743}), }, { - "indexes": {"data": [91], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_92: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_92: Account(storage={1: 1}), }, { - "indexes": {"data": [92], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_93: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_93: Account(storage={1: 24743}), }, { - "indexes": {"data": [93], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_94: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_94: Account(storage={1: 1}), }, { - "indexes": {"data": [94], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_95: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_95: Account(storage={1: 24743}), }, { - "indexes": {"data": [95], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_96: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_96: Account(storage={1: 1}), }, { - "indexes": {"data": [96], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_97: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_97: Account(storage={1: 24743}), }, { - "indexes": {"data": [97], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_98: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_98: Account(storage={1: 1}), }, { - "indexes": {"data": [98], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_99: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_99: Account(storage={1: 24743}), }, { - "indexes": {"data": [99], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_100: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_100: Account(storage={1: 1}), }, { - "indexes": {"data": [100], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_101: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_101: Account(storage={1: 24743}), }, { - "indexes": {"data": [101], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_102: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_102: Account(storage={1: 1}), }, { - "indexes": {"data": [102], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_103: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_103: Account(storage={1: 24743}), }, { - "indexes": {"data": [103], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_104: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_104: Account(storage={1: 1}), }, { - "indexes": {"data": [104], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_105: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_105: Account(storage={1: 24743}), }, { - "indexes": {"data": [105], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_106: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_106: Account(storage={1: 1}), }, { - "indexes": {"data": [106], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_107: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_107: Account(storage={1: 24743}), }, { - "indexes": {"data": [107], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_108: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_108: Account(storage={1: 1}), }, { - "indexes": {"data": [108], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_109: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_109: Account(storage={1: 24743}), }, { - "indexes": {"data": [109], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_110: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_110: Account(storage={1: 1}), }, { - "indexes": {"data": [110], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_111: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_111: Account(storage={1: 24743}), }, { - "indexes": {"data": [111], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_112: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_112: Account(storage={1: 1}), }, { - "indexes": {"data": [112], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_113: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_113: Account(storage={1: 24743}), }, { - "indexes": {"data": [113], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_114: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_114: Account(storage={1: 1}), }, { - "indexes": {"data": [114], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_115: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_115: Account(storage={1: 24743}), }, { - "indexes": {"data": [115], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_116: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_116: Account(storage={1: 1}), }, { - "indexes": {"data": [116], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_117: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_117: Account(storage={1: 24743}), }, { - "indexes": {"data": [117], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_118: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_118: Account(storage={1: 1}), }, { - "indexes": {"data": [118], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_119: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_119: Account(storage={1: 24743}), }, { - "indexes": {"data": [119], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_120: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_120: Account(storage={1: 1}), }, { - "indexes": {"data": [120], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_121: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_121: Account(storage={1: 24743}), }, { - "indexes": {"data": [121], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_122: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_122: Account(storage={1: 1}), }, { - "indexes": {"data": [122], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_123: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_123: Account(storage={1: 24743}), }, { - "indexes": {"data": [123], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_124: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_124: Account(storage={1: 1}), }, { - "indexes": {"data": [124], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_125: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_125: Account(storage={1: 24743}), }, { - "indexes": {"data": [125], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_126: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_126: Account(storage={1: 1}), }, { - "indexes": {"data": [126], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_127: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_127: Account(storage={1: 24743}), }, { - "indexes": {"data": [127], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_128: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_128: Account(storage={1: 1}), }, { - "indexes": {"data": [128], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_129: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_129: Account(storage={1: 24743}), }, { - "indexes": {"data": [129], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_130: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_130: Account(storage={1: 1}), }, { - "indexes": {"data": [130], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_131: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_131: Account(storage={1: 24743}), }, { - "indexes": {"data": [131], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_132: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_132: Account(storage={1: 1}), }, { - "indexes": {"data": [132], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_133: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_133: Account(storage={1: 24743}), }, { - "indexes": {"data": [133], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_134: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_134: Account(storage={1: 1}), }, { - "indexes": {"data": [134], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_135: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_135: Account(storage={1: 24743}), }, { - "indexes": {"data": [135], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_136: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_136: Account(storage={1: 1}), }, { - "indexes": {"data": [136], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_137: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_137: Account(storage={1: 24743}), }, { - "indexes": {"data": [137], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_138: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_138: Account(storage={1: 1}), }, { - "indexes": {"data": [138], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_139: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_139: Account(storage={1: 24743}), }, { - "indexes": {"data": [139], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_140: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_140: Account(storage={1: 1}), }, { - "indexes": {"data": [140], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_141: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_141: Account(storage={1: 24743}), }, { - "indexes": {"data": [141], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_142: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_142: Account(storage={1: 1}), }, { - "indexes": {"data": [142], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_143: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_143: Account(storage={1: 24743}), }, { - "indexes": {"data": [143], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_144: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_144: Account(storage={1: 1}), }, { - "indexes": {"data": [144], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_145: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_145: Account(storage={1: 24743}), }, { - "indexes": {"data": [145], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_146: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_146: Account(storage={1: 1}), }, { - "indexes": {"data": [146], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_147: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_147: Account(storage={1: 24743}), }, { - "indexes": {"data": [147], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_148: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_148: Account(storage={1: 1}), }, { - "indexes": {"data": [148], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_149: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_149: Account(storage={1: 24743}), }, { - "indexes": {"data": [149], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_150: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_150: Account(storage={1: 1}), }, { - "indexes": {"data": [150], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_151: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_151: Account(storage={1: 24743}), }, { - "indexes": {"data": [151], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_152: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_152: Account(storage={1: 1}), }, { - "indexes": {"data": [152], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_153: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_153: Account(storage={1: 24743}), }, { - "indexes": {"data": [153], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_154: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_154: Account(storage={1: 1}), }, { - "indexes": {"data": [154], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_155: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_155: Account(storage={1: 24743}), }, { - "indexes": {"data": [155], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_156: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_156: Account(storage={1: 1}), }, { - "indexes": {"data": [156], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_157: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_157: Account(storage={1: 24743}), }, { - "indexes": {"data": [157], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_158: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_158: Account(storage={1: 1}), }, { - "indexes": {"data": [158], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_159: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_159: Account(storage={1: 24743}), }, { - "indexes": {"data": [159], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_160: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_160: Account(storage={1: 1}), }, { - "indexes": {"data": [160], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_161: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_161: Account(storage={1: 24743}), }, { - "indexes": {"data": [161], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_162: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_162: Account(storage={1: 1}), }, { - "indexes": {"data": [162], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_163: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_163: Account(storage={1: 24743}), }, { - "indexes": {"data": [163], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_164: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_164: Account(storage={1: 1}), }, { - "indexes": {"data": [164], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_165: Account(storage={1: 24743}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_165: Account(storage={1: 24743}), }, { - "indexes": {"data": [165], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 24743, 1: 24743}), - addr_166: Account(storage={1: 1}), - }, + target: Account(storage={0: 24743, 1: 24743}), + addr_166: Account(storage={1: 1}), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + { + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 2, + (3, 0, 0): 3, + (4, 0, 0): 4, + (5, 0, 0): 5, + (6, 0, 0): 6, + (7, 0, 0): 7, + (8, 0, 0): 8, + (9, 0, 0): 9, + (10, 0, 0): 10, + (11, 0, 0): 11, + (12, 0, 0): 12, + (13, 0, 0): 13, + (14, 0, 0): 14, + (15, 0, 0): 15, + (16, 0, 0): 16, + (17, 0, 0): 17, + (18, 0, 0): 18, + (19, 0, 0): 19, + (20, 0, 0): 20, + (21, 0, 0): 21, + (22, 0, 0): 22, + (23, 0, 0): 23, + (24, 0, 0): 24, + (25, 0, 0): 25, + (26, 0, 0): 26, + (27, 0, 0): 27, + (28, 0, 0): 28, + (29, 0, 0): 29, + (30, 0, 0): 30, + (31, 0, 0): 31, + (32, 0, 0): 32, + (33, 0, 0): 33, + (34, 0, 0): 34, + (35, 0, 0): 35, + (36, 0, 0): 36, + (37, 0, 0): 37, + (38, 0, 0): 38, + (39, 0, 0): 39, + (40, 0, 0): 40, + (41, 0, 0): 41, + (42, 0, 0): 42, + (43, 0, 0): 43, + (44, 0, 0): 44, + (45, 0, 0): 45, + (46, 0, 0): 46, + (47, 0, 0): 47, + (48, 0, 0): 48, + (49, 0, 0): 49, + (50, 0, 0): 50, + (51, 0, 0): 51, + (52, 0, 0): 52, + (53, 0, 0): 53, + (54, 0, 0): 54, + (55, 0, 0): 55, + (56, 0, 0): 56, + (57, 0, 0): 57, + (58, 0, 0): 58, + (59, 0, 0): 59, + (60, 0, 0): 60, + (61, 0, 0): 61, + (62, 0, 0): 62, + (63, 0, 0): 63, + (64, 0, 0): 64, + (65, 0, 0): 65, + (66, 0, 0): 66, + (67, 0, 0): 67, + (68, 0, 0): 68, + (69, 0, 0): 69, + (70, 0, 0): 70, + (71, 0, 0): 71, + (72, 0, 0): 72, + (73, 0, 0): 73, + (74, 0, 0): 74, + (75, 0, 0): 75, + (76, 0, 0): 76, + (77, 0, 0): 77, + (78, 0, 0): 78, + (79, 0, 0): 79, + (80, 0, 0): 80, + (81, 0, 0): 81, + (82, 0, 0): 82, + (83, 0, 0): 83, + (84, 0, 0): 84, + (85, 0, 0): 85, + (86, 0, 0): 86, + (87, 0, 0): 87, + (88, 0, 0): 88, + (89, 0, 0): 89, + (90, 0, 0): 90, + (91, 0, 0): 91, + (92, 0, 0): 92, + (93, 0, 0): 93, + (94, 0, 0): 94, + (95, 0, 0): 95, + (96, 0, 0): 96, + (97, 0, 0): 97, + (98, 0, 0): 98, + (99, 0, 0): 99, + (100, 0, 0): 100, + (101, 0, 0): 101, + (102, 0, 0): 102, + (103, 0, 0): 103, + (104, 0, 0): 104, + (105, 0, 0): 105, + (106, 0, 0): 106, + (107, 0, 0): 107, + (108, 0, 0): 108, + (109, 0, 0): 109, + (110, 0, 0): 110, + (111, 0, 0): 111, + (112, 0, 0): 112, + (113, 0, 0): 113, + (114, 0, 0): 114, + (115, 0, 0): 115, + (116, 0, 0): 116, + (117, 0, 0): 117, + (118, 0, 0): 118, + (119, 0, 0): 119, + (120, 0, 0): 120, + (121, 0, 0): 121, + (122, 0, 0): 122, + (123, 0, 0): 123, + (124, 0, 0): 124, + (125, 0, 0): 125, + (126, 0, 0): 126, + (127, 0, 0): 127, + (128, 0, 0): 128, + (129, 0, 0): 129, + (130, 0, 0): 130, + (131, 0, 0): 131, + (132, 0, 0): 132, + (133, 0, 0): 133, + (134, 0, 0): 134, + (135, 0, 0): 135, + (136, 0, 0): 136, + (137, 0, 0): 137, + (138, 0, 0): 138, + (139, 0, 0): 139, + (140, 0, 0): 140, + (141, 0, 0): 141, + (142, 0, 0): 142, + (143, 0, 0): 143, + (144, 0, 0): 144, + (145, 0, 0): 145, + (146, 0, 0): 146, + (147, 0, 0): 147, + (148, 0, 0): 148, + (149, 0, 0): 149, + (150, 0, 0): 150, + (151, 0, 0): 151, + (152, 0, 0): 152, + (153, 0, 0): 153, + (154, 0, 0): 154, + (155, 0, 0): 155, + (156, 0, 0): 156, + (157, 0, 0): 157, + (158, 0, 0): 158, + (159, 0, 0): 159, + (160, 0, 0): 160, + (161, 0, 0): 161, + (162, 0, 0): 162, + (163, 0, 0): 163, + (164, 0, 0): 164, + (165, 0, 0): 165, + }[d, g, v] + ] + _exc = None tx_data = [ Bytes("693c6139") + Hash(addr, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_ab_acalls0.py b/tests/ported_static/stStaticCall/test_static_ab_acalls0.py index ca1b6965436..dd90d2d6585 100644 --- a/tests/ported_static/stStaticCall/test_static_ab_acalls0.py +++ b/tests/ported_static/stStaticCall/test_static_ab_acalls0.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -166,28 +163,20 @@ def test_static_ab_acalls0( address=Address(0x718A83E869D6F4DEA50A650B9825CBFE683BDF16), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr: Account(storage={36: 0}, balance=0xDE0B6B3A76586A0), - addr_2: Account(storage={38: 0}), - target: Account(storage={0: 1, 1: 1}), - }, + addr: Account(storage={36: 0}, balance=0xDE0B6B3A76586A0), + addr_2: Account(storage={38: 0}), + target: Account(storage={0: 1, 1: 1}), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_3: Account(storage={36: 0}, balance=0xDE0B6B3A76586A0), - addr_4: Account(storage={38: 0}), - target: Account(storage={0: 1, 1: 1}), - }, + addr_3: Account(storage={36: 0}, balance=0xDE0B6B3A76586A0), + addr_4: Account(storage={38: 0}), + target: Account(storage={0: 1, 1: 1}), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_ab_acalls1.py b/tests/ported_static/stStaticCall/test_static_ab_acalls1.py index 7f4ceb8d318..e628c5f6020 100644 --- a/tests/ported_static/stStaticCall/test_static_ab_acalls1.py +++ b/tests/ported_static/stStaticCall/test_static_ab_acalls1.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -172,28 +169,12 @@ def test_static_ab_acalls1( address=Address(0x5E75046384134A4554C3C7061D4637CB978D5699), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun=Cancun=Cancun=Cancun=Cancun"], - "result": { - target: Account(storage={0: 1, 1: 1}), - addr: Account(storage={0: 1}), - addr_2: Account(storage={0: 0}), - }, + target: Account(storage={0: 1, 1: 1}), + addr: Account(storage={0: 1}), + addr_2: Account(storage={0: 0}), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 1, 1: 1}), - addr_3: Account(storage={0: 0}), - addr_4: Account(storage={0: 0}), - }, + target: Account(storage={0: 1, 1: 1}), + addr_3: Account(storage={0: 0}), + addr_4: Account(storage={0: 0}), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_ab_acalls_suicide0.py b/tests/ported_static/stStaticCall/test_static_ab_acalls_suicide0.py index 94fcf44f866..f9aabdccc5b 100644 --- a/tests/ported_static/stStaticCall/test_static_ab_acalls_suicide0.py +++ b/tests/ported_static/stStaticCall/test_static_ab_acalls_suicide0.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -174,26 +171,18 @@ def test_static_ab_acalls_suicide0( address=Address(0x644AC2B24A9316ED4C55001E5EDA02D77F729C7B), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_2: Account(storage={38: 0}), - target: Account(storage={0: 1, 1: 1}), - }, + addr_2: Account(storage={38: 0}), + target: Account(storage={0: 1, 1: 1}), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 1, 1: 1}), - addr_2: Account(storage={38: 0}), - }, + target: Account(storage={0: 1, 1: 1}), + addr_2: Account(storage={38: 0}), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_call10.py b/tests/ported_static/stStaticCall/test_static_call10.py index 6329bb04db1..fe374af8a2f 100644 --- a/tests/ported_static/stStaticCall/test_static_call10.py +++ b/tests/ported_static/stStaticCall/test_static_call10.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -144,26 +141,18 @@ def test_static_call10( address=Address(0x689EF931C00F3B00DE5DD2CF0E06F5409B0F26A4), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_2: Account(storage={0: 1, 1: 10}), - target: Account(storage={0: 1, 1: 1}), - }, + addr_2: Account(storage={0: 1, 1: 10}), + target: Account(storage={0: 1, 1: 1}), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_2: Account(storage={0: 0, 1: 0}), - target: Account(storage={0: 1, 1: 1}), - }, + addr_2: Account(storage={0: 0, 1: 0}), + target: Account(storage={0: 1, 1: 1}), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(addr_2, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_call1024_balance_too_low.py b/tests/ported_static/stStaticCall/test_static_call1024_balance_too_low.py index c35d515be61..7dbb076eb4c 100644 --- a/tests/ported_static/stStaticCall/test_static_call1024_balance_too_low.py +++ b/tests/ported_static/stStaticCall/test_static_call1024_balance_too_low.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -132,26 +129,18 @@ def test_static_call1024_balance_too_low( address=Address(0xE8F28EE50521B0388CF0A623B1A89E43D022C039), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun=Cancun=Cancun=Cancun=Cancun"], - "result": { - addr_2: Account(storage={0: 1, 1: 0, 2: 1001}), - target: Account(storage={0: 1, 1: 1}), - }, + addr_2: Account(storage={0: 1, 1: 0, 2: 1001}), + target: Account(storage={0: 1, 1: 1}), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_2: Account(storage={0: 0, 1: 0, 2: 0}), - target: Account(storage={0: 1, 1: 1}), - }, + addr_2: Account(storage={0: 0, 1: 0, 2: 0}), + target: Account(storage={0: 1, 1: 1}), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(addr_2, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_call1024_pre_calls.py b/tests/ported_static/stStaticCall/test_static_call1024_pre_calls.py index e0d260f263f..a8d29faadcb 100644 --- a/tests/ported_static/stStaticCall/test_static_call1024_pre_calls.py +++ b/tests/ported_static/stStaticCall/test_static_call1024_pre_calls.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -162,26 +159,18 @@ def test_static_call1024_pre_calls( address=Address(0x7C546B69D5BDA111C03C8D7B51B41A8D55B843CA), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun"], - "result": { - addr: Account(storage={0: 0, 8: 0, 9: 0, 10: 0}), - addr_2: Account( - storage={}, - code=bytes.fromhex("601260005500"), - nonce=0, - ), - }, + addr: Account(storage={0: 0, 8: 0, 9: 0, 10: 0}), + addr_2: Account( + storage={}, + code=bytes.fromhex("601260005500"), + nonce=0, + ), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_3: Account(storage={0: 18, 9: 1, 10: 1}), - addr_4: Account( - storage={}, - code=bytes.fromhex("601260005200"), - nonce=0, - ), - }, + addr_3: Account(storage={0: 18, 9: 1, 10: 1}), + addr_4: Account( + storage={}, + code=bytes.fromhex("601260005200"), + nonce=0, + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_call_ask_more_gas_on_depth2_then_transaction_has.py b/tests/ported_static/stStaticCall/test_static_call_ask_more_gas_on_depth2_then_transaction_has.py index d47a87e4f8f..dd0ecce5693 100644 --- a/tests/ported_static/stStaticCall/test_static_call_ask_more_gas_on_depth2_then_transaction_has.py +++ b/tests/ported_static/stStaticCall/test_static_call_ask_more_gas_on_depth2_then_transaction_has.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -182,30 +179,22 @@ def test_static_call_ask_more_gas_on_depth2_then_transaction_has( address=Address(0x8169DC735802BB5C18A777052CF4CE326B5FD725), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr: Account(storage={8: 1, 9: 1}), - addr_2: Account(storage={8: 0, 9: 0}), - addr_3: Account(storage={8: 0}), - target: Account(storage={0: 1, 1: 1}), - }, + addr: Account(storage={8: 1, 9: 1}), + addr_2: Account(storage={8: 0, 9: 0}), + addr_3: Account(storage={8: 0}), + target: Account(storage={0: 1, 1: 1}), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_4: Account(storage={8: 1, 9: 1}), - addr_5: Account(storage={8: 0, 9: 0}), - addr_6: Account(storage={8: 0}), - target: Account(storage={0: 1, 1: 1}), - }, + addr_4: Account(storage={8: 1, 9: 1}), + addr_5: Account(storage={8: 0, 9: 0}), + addr_6: Account(storage={8: 0}), + target: Account(storage={0: 1, 1: 1}), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_call_basic.py b/tests/ported_static/stStaticCall/test_static_call_basic.py index a3cf98b6409..7873580575e 100644 --- a/tests/ported_static/stStaticCall/test_static_call_basic.py +++ b/tests/ported_static/stStaticCall/test_static_call_basic.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -178,28 +175,18 @@ def test_static_call_basic( address=Address(0xD5B64FA2CA1E471B45B639A5E9C259CA24C28ACE), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0, 1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0, 1: 1})}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={0: 0, 1: 1})}, + {target: Account(storage={0: 1, 1: 1})}, { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1, 1: 1})}, - }, - { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 1, 1: 1}), - addr_6: Account(balance=23), - }, + target: Account(storage={0: 1, 1: 1}), + addr_6: Account(balance=23), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 0, (1, 0, 0): 0, (2, 0, 0): 1, (3, 0, 0): 2}[d, g, v] + ] + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_call_contract_to_create_contract_and_call_it_oog.py b/tests/ported_static/stStaticCall/test_static_call_contract_to_create_contract_and_call_it_oog.py index e6b7b771be7..76cdc2d782a 100644 --- a/tests/ported_static/stStaticCall/test_static_call_contract_to_create_contract_and_call_it_oog.py +++ b/tests/ported_static/stStaticCall/test_static_call_contract_to_create_contract_and_call_it_oog.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -102,37 +99,29 @@ def test_static_call_contract_to_create_contract_and_call_it_oog( address=Address(0x095E7BAEA6A6C7C4C2DFEB977EFAC326AF552D87), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={ - 0: compute_create_address(address=contract_0, nonce=0), - }, - nonce=1, - ), - sender: Account(nonce=1), - compute_create_address(address=contract_0, nonce=0): Account( - storage={0: 12}, balance=1, nonce=1 - ), - }, + contract_0: Account( + storage={ + 0: compute_create_address(address=contract_0, nonce=0), + }, + nonce=1, + ), + sender: Account(nonce=1), + compute_create_address(address=contract_0, nonce=0): Account( + storage={0: 12}, balance=1, nonce=1 + ), }, { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={0: 0, 2: 0}, nonce=0), - sender: Account(nonce=1), - compute_create_address( - address=contract_0, nonce=0 - ): Account.NONEXISTENT, - }, + contract_0: Account(storage={0: 0, 2: 0}, nonce=0), + sender: Account(nonce=1), + compute_create_address( + address=contract_0, nonce=0 + ): Account.NONEXISTENT, }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 1, (1, 0, 0): 0}[d, g, v]] + _exc = None tx_data = [ Bytes("00"), diff --git a/tests/ported_static/stStaticCall/test_static_call_contract_to_create_contract_oog.py b/tests/ported_static/stStaticCall/test_static_call_contract_to_create_contract_oog.py index a331700c24f..898f8d780e4 100644 --- a/tests/ported_static/stStaticCall/test_static_call_contract_to_create_contract_oog.py +++ b/tests/ported_static/stStaticCall/test_static_call_contract_to_create_contract_oog.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -93,31 +90,23 @@ def test_static_call_contract_to_create_contract_oog( address=Address(0x095E7BAEA6A6C7C4C2DFEB977EFAC326AF552D87), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={0: 0}, nonce=0), - sender: Account(nonce=1), - }, + contract_0: Account(storage={0: 0}, nonce=0), + sender: Account(nonce=1), }, { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={ - 0: compute_create_address(address=contract_0, nonce=0), - }, - nonce=1, - ), - sender: Account(nonce=1), - }, + contract_0: Account( + storage={ + 0: compute_create_address(address=contract_0, nonce=0), + }, + nonce=1, + ), + sender: Account(nonce=1), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 0, 1): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stStaticCall/test_static_call_contract_to_create_contract_oog_bonus_gas.py b/tests/ported_static/stStaticCall/test_static_call_contract_to_create_contract_oog_bonus_gas.py index 33baff843c7..716a3fdaebf 100644 --- a/tests/ported_static/stStaticCall/test_static_call_contract_to_create_contract_oog_bonus_gas.py +++ b/tests/ported_static/stStaticCall/test_static_call_contract_to_create_contract_oog_bonus_gas.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -98,37 +95,29 @@ def test_static_call_contract_to_create_contract_oog_bonus_gas( address=Address(0x095E7BAEA6A6C7C4C2DFEB977EFAC326AF552D87), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun=Cancun=Cancun"], - "result": {target: Account(storage={0: 1})}, - }, - { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0})}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={0: 1})}, + {target: Account(storage={0: 0})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 0, (1, 0, 0): 1, (2, 0, 0): 0, (3, 0, 0): 0}[d, g, v] + ] + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_call_create2.py b/tests/ported_static/stStaticCall/test_static_call_create2.py index 98394b0847c..0e019e4ede6 100644 --- a/tests/ported_static/stStaticCall/test_static_call_create2.py +++ b/tests/ported_static/stStaticCall/test_static_call_create2.py @@ -17,9 +17,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -170,42 +167,30 @@ def test_static_call_create2( address=Address(0x1000000000000000000000000000000000000002), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_1: Account( - storage={ - 0: compute_create_address(address=contract_1, nonce=0), - 1: 1, - }, - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_2: Account( - storage={ - 0: compute_create_address(address=contract_2, nonce=0), - 1: 0, - }, - ), - compute_create_address(address=contract_2, nonce=0): Account( - storage={}, code=bytes.fromhex("6001600155") - ), - }, + contract_1: Account( + storage={ + 0: compute_create_address(address=contract_1, nonce=0), + 1: 1, + }, + ), }, { - "indexes": {"data": 2, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={0: 0, 1: 0})}, + contract_2: Account( + storage={ + 0: compute_create_address(address=contract_2, nonce=0), + 1: 0, + }, + ), + compute_create_address(address=contract_2, nonce=0): Account( + storage={}, code=bytes.fromhex("6001600155") + ), }, + {contract_2: Account(storage={0: 0, 1: 0})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1, (2, 0, 0): 2}[d, g, v]] + _exc = None tx_data = [ Hash(contract_1, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_call_ecrecover0_0input.py b/tests/ported_static/stStaticCall/test_static_call_ecrecover0_0input.py index 3e8f4614d9f..0bd51c5d863 100644 --- a/tests/ported_static/stStaticCall/test_static_call_ecrecover0_0input.py +++ b/tests/ported_static/stStaticCall/test_static_call_ecrecover0_0input.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -138,44 +135,40 @@ def test_static_call_ecrecover0_0input( address=Address(0x1FD04A51AC69C94C58521D30E2DEFC4856A581B0), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": 8, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={2: 0})}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={2: 0})}, + {target: Account(storage={2: 1})}, { - "indexes": {"data": [0, 1, 4, 5, 6, 7], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={2: 1})}, + target: Account( + storage={ + 0: 0x8209944E898F69A7BD10A23C839D341E935FD5CA, + 2: 1, + }, + ), }, { - "indexes": {"data": 2, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 0x8209944E898F69A7BD10A23C839D341E935FD5CA, - 2: 1, - }, - ), - }, + target: Account( + storage={ + 0: 0x4300A157335CB7C9FC9423E011D7DD51090D093F, + 2: 1, + }, + ), }, + ] + post = expect_posts[ { - "indexes": {"data": 3, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 0: 0x4300A157335CB7C9FC9423E011D7DD51090D093F, - 2: 1, - }, - ), - }, - }, + (0, 0, 0): 1, + (1, 0, 0): 1, + (2, 0, 0): 2, + (3, 0, 0): 3, + (4, 0, 0): 1, + (5, 0, 0): 1, + (6, 0, 0): 1, + (7, 0, 0): 1, + (8, 0, 0): 0, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Hash(0x0), diff --git a/tests/ported_static/stStaticCall/test_static_call_with_high_value_and_gas_oog.py b/tests/ported_static/stStaticCall/test_static_call_with_high_value_and_gas_oog.py index ddf1233324b..d28b1a29970 100644 --- a/tests/ported_static/stStaticCall/test_static_call_with_high_value_and_gas_oog.py +++ b/tests/ported_static/stStaticCall/test_static_call_with_high_value_and_gas_oog.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -165,27 +162,19 @@ def test_static_call_with_high_value_and_gas_oog( address=Address(0xBE9C847927D7E832FF5655392C160933D99CB4E8), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr: Account( - storage={ - 0: 1, - 1: 0x3700FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 - }, - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {addr_2: Account(storage={0: 1, 1: 1})}, + addr: Account( + storage={ + 0: 1, + 1: 0x3700FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 + }, + ), }, + {addr_2: Account(storage={0: 1, 1: 1})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_callcall_00.py b/tests/ported_static/stStaticCall/test_static_callcall_00.py index 1dc2606afd2..f16d3c3dbd7 100644 --- a/tests/ported_static/stStaticCall/test_static_callcall_00.py +++ b/tests/ported_static/stStaticCall/test_static_callcall_00.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -190,50 +187,42 @@ def test_static_callcall_00( address=Address(0xBF23F3306533431B2EE5E4CA95E0A0834C090105), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 1, 1: 1}), - addr: Account(storage={0: 1}), - addr_3: Account( - storage={ - 2: 0, - 4: 0, - 7: 0, - 230: 0, - 232: 0, - 236: 0, - 238: 0, - 240: 0, - }, - ), - }, + target: Account(storage={0: 1, 1: 1}), + addr: Account(storage={0: 1}), + addr_3: Account( + storage={ + 2: 0, + 4: 0, + 7: 0, + 230: 0, + 232: 0, + 236: 0, + 238: 0, + 240: 0, + }, + ), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 1, 1: 1}), - addr_4: Account(storage={0: 1}), - addr_6: Account( - storage={ - 2: 0, - 4: 0, - 7: 0, - 230: 0, - 232: 0, - 236: 0, - 238: 0, - 240: 0, - }, - ), - }, + target: Account(storage={0: 1, 1: 1}), + addr_4: Account(storage={0: 1}), + addr_6: Account( + storage={ + 2: 0, + 4: 0, + 7: 0, + 230: 0, + 232: 0, + 236: 0, + 238: 0, + 240: 0, + }, + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_callcall_00_ooge.py b/tests/ported_static/stStaticCall/test_static_callcall_00_ooge.py index 8ba69156208..02e33b26f5b 100644 --- a/tests/ported_static/stStaticCall/test_static_callcall_00_ooge.py +++ b/tests/ported_static/stStaticCall/test_static_callcall_00_ooge.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -190,30 +187,22 @@ def test_static_callcall_00_ooge( address=Address(0x998A75F1A4457FB7B5872C51F34AA7256F732B1E), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr: Account(storage={0: 1, 1: 0, 2: 0}), - addr_2: Account(storage={1: 0, 2: 0}), - addr_3: Account(storage={2: 0}), - target: Account(storage={0: 1, 1: 1}), - }, + addr: Account(storage={0: 1, 1: 0, 2: 0}), + addr_2: Account(storage={1: 0, 2: 0}), + addr_3: Account(storage={2: 0}), + target: Account(storage={0: 1, 1: 1}), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_4: Account(storage={0: 1, 1: 0, 2: 0}), - addr_5: Account(storage={1: 0, 2: 0}), - addr_6: Account(storage={2: 0}), - target: Account(storage={0: 1, 1: 1}), - }, + addr_4: Account(storage={0: 1, 1: 0, 2: 0}), + addr_5: Account(storage={1: 0, 2: 0}), + addr_6: Account(storage={2: 0}), + target: Account(storage={0: 1, 1: 1}), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_callcall_00_ooge_1.py b/tests/ported_static/stStaticCall/test_static_callcall_00_ooge_1.py index 6a9d35e6368..75e1308a75a 100644 --- a/tests/ported_static/stStaticCall/test_static_callcall_00_ooge_1.py +++ b/tests/ported_static/stStaticCall/test_static_callcall_00_ooge_1.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -192,28 +189,20 @@ def test_static_callcall_00_ooge_1( address=Address(0x998A75F1A4457FB7B5872C51F34AA7256F732B1E), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 1, 1: 1}), - addr: Account(storage={0: 1}), - addr_3: Account(storage={2: 0, 5: 0}), - }, + target: Account(storage={0: 1, 1: 1}), + addr: Account(storage={0: 1}), + addr_3: Account(storage={2: 0, 5: 0}), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 1, 1: 1}), - addr_4: Account(storage={0: 1}), - addr_6: Account(storage={2: 0, 5: 0}), - }, + target: Account(storage={0: 1, 1: 1}), + addr_4: Account(storage={0: 1}), + addr_6: Account(storage={2: 0, 5: 0}), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_callcallcall_000.py b/tests/ported_static/stStaticCall/test_static_callcallcall_000.py index 2388568f0db..d58753bb50c 100644 --- a/tests/ported_static/stStaticCall/test_static_callcallcall_000.py +++ b/tests/ported_static/stStaticCall/test_static_callcallcall_000.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -230,54 +227,46 @@ def test_static_callcallcall_000( address=Address(0xBF23F3306533431B2EE5E4CA95E0A0834C090105), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr: Account(storage={0: 1}), - addr_2: Account(storage={}), - addr_3: Account(storage={}), - addr_4: Account( - storage={ - 3: 0, - 4: 0, - 7: 0, - 330: 0, - 332: 0, - 336: 0, - 338: 0, - 340: 0, - }, - ), - target: Account(storage={0: 1, 1: 1}), - }, + addr: Account(storage={0: 1}), + addr_2: Account(storage={}), + addr_3: Account(storage={}), + addr_4: Account( + storage={ + 3: 0, + 4: 0, + 7: 0, + 330: 0, + 332: 0, + 336: 0, + 338: 0, + 340: 0, + }, + ), + target: Account(storage={0: 1, 1: 1}), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr_5: Account(storage={0: 1}), - addr_6: Account(storage={}), - addr_7: Account(storage={}), - addr_8: Account( - storage={ - 3: 0, - 4: 0, - 7: 0, - 330: 0, - 332: 0, - 336: 0, - 338: 0, - 340: 0, - }, - ), - target: Account(storage={0: 1, 1: 1}), - }, + addr_5: Account(storage={0: 1}), + addr_6: Account(storage={}), + addr_7: Account(storage={}), + addr_8: Account( + storage={ + 3: 0, + 4: 0, + 7: 0, + 330: 0, + 332: 0, + 336: 0, + 338: 0, + 340: 0, + }, + ), + target: Account(storage={0: 1, 1: 1}), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_callcallcall_000_ooge.py b/tests/ported_static/stStaticCall/test_static_callcallcall_000_ooge.py index 83d2fc21188..494b0b33b24 100644 --- a/tests/ported_static/stStaticCall/test_static_callcallcall_000_ooge.py +++ b/tests/ported_static/stStaticCall/test_static_callcallcall_000_ooge.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -228,26 +225,18 @@ def test_static_callcallcall_000_ooge( address=Address(0x9B0CB3CB3655D3173FF7C2CD51319AAF2CCA3CAD), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr: Account(storage={0: 1, 1: 0, 2: 0, 3: 0}), - addr_2: Account(storage={1: 0, 2: 0, 3: 0}), - addr_3: Account(storage={2: 0, 3: 0}), - addr_4: Account(storage={3: 0}), - target: Account(storage={0: 1, 1: 1}), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1, 1: 1})}, + addr: Account(storage={0: 1, 1: 0, 2: 0, 3: 0}), + addr_2: Account(storage={1: 0, 2: 0, 3: 0}), + addr_3: Account(storage={2: 0, 3: 0}), + addr_4: Account(storage={3: 0}), + target: Account(storage={0: 1, 1: 1}), }, + {target: Account(storage={0: 1, 1: 1})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_callcallcallcode_001.py b/tests/ported_static/stStaticCall/test_static_callcallcallcode_001.py index 10695d92061..d41322c7c50 100644 --- a/tests/ported_static/stStaticCall/test_static_callcallcallcode_001.py +++ b/tests/ported_static/stStaticCall/test_static_callcallcallcode_001.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -231,37 +228,29 @@ def test_static_callcallcallcode_001( address=Address(0xBF23F3306533431B2EE5E4CA95E0A0834C090105), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - addr: Account(storage={0: 1, 1: 0, 3: 0, 4: 0}), - addr_2: Account(storage={1: 0, 3: 0, 4: 0}), - addr_3: Account( - storage={ - 2: 0, - 3: 0, - 4: 0, - 7: 0, - 330: 0, - 332: 0, - 336: 0, - 338: 0, - 340: 0, - }, - ), - target: Account(storage={0: 1, 1: 1}), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1, 1: 1})}, + addr: Account(storage={0: 1, 1: 0, 3: 0, 4: 0}), + addr_2: Account(storage={1: 0, 3: 0, 4: 0}), + addr_3: Account( + storage={ + 2: 0, + 3: 0, + 4: 0, + 7: 0, + 330: 0, + 332: 0, + 336: 0, + 338: 0, + 340: 0, + }, + ), + target: Account(storage={0: 1, 1: 1}), }, + {target: Account(storage={0: 1, 1: 1})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_callcallcallcode_001_2.py b/tests/ported_static/stStaticCall/test_static_callcallcallcode_001_2.py index f76a30dbfa5..9196b5459d9 100644 --- a/tests/ported_static/stStaticCall/test_static_callcallcallcode_001_2.py +++ b/tests/ported_static/stStaticCall/test_static_callcallcallcode_001_2.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -221,50 +218,23 @@ def test_static_callcallcallcode_001_2( address=Address(0xBF23F3306533431B2EE5E4CA95E0A0834C090105), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 1, 1: 1}), - addr_3: Account( - storage={ - 2: 0, - 3: 0, - 4: 0, - 7: 0, - 330: 0, - 332: 0, - 336: 0, - 338: 0, - 340: 0, - }, - ), - }, - }, - { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account(storage={0: 1, 1: 1}), - addr_3: Account( - storage={ - 2: 0, - 3: 0, - 4: 0, - 7: 0, - 330: 0, - 332: 0, - 336: 0, - 338: 0, - 340: 0, - }, - ), + post = { + target: Account(storage={0: 1, 1: 1}), + addr_3: Account( + storage={ + 2: 0, + 3: 0, + 4: 0, + 7: 0, + 330: 0, + 332: 0, + 336: 0, + 338: 0, + 340: 0, }, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + ), + } + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_callcallcode_01_2.py b/tests/ported_static/stStaticCall/test_static_callcallcode_01_2.py index 66ab50c76f3..17a70430011 100644 --- a/tests/ported_static/stStaticCall/test_static_callcallcode_01_2.py +++ b/tests/ported_static/stStaticCall/test_static_callcallcode_01_2.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -172,20 +169,8 @@ def test_static_callcallcode_01_2( address=Address(0xC766DCC7257DD2AF2B6A354FC922D43D3AD9A390), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1, 1: 1})}, - }, - { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1, 1: 1})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 1, 1: 1})} + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_callcallcodecall_010_2.py b/tests/ported_static/stStaticCall/test_static_callcallcodecall_010_2.py index fbd6b903580..919f9b144d3 100644 --- a/tests/ported_static/stStaticCall/test_static_callcallcodecall_010_2.py +++ b/tests/ported_static/stStaticCall/test_static_callcallcodecall_010_2.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -147,20 +144,8 @@ def test_static_callcallcodecall_010_2( address=Address(0x6B21D14FFAE42852FC3A6F98DA6275E551C07008), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1, 1: 1})}, - }, - { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1, 1: 1})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 1, 1: 1})} + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_callcallcodecallcode_011_2.py b/tests/ported_static/stStaticCall/test_static_callcallcodecallcode_011_2.py index a9751f80768..1231a3a62d2 100644 --- a/tests/ported_static/stStaticCall/test_static_callcallcodecallcode_011_2.py +++ b/tests/ported_static/stStaticCall/test_static_callcallcodecallcode_011_2.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -149,20 +146,8 @@ def test_static_callcallcodecallcode_011_2( address=Address(0x3CEA889FD03A922CC673D25E5DB4E72743AA4878), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1, 1: 1})}, - }, - { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1, 1: 1})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 1, 1: 1})} + _exc = None tx_data = [ Hash(addr_2, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_callcallcodecallcode_011_ooge_2.py b/tests/ported_static/stStaticCall/test_static_callcallcodecallcode_011_ooge_2.py index 26f1bd02f04..169d43461b4 100644 --- a/tests/ported_static/stStaticCall/test_static_callcallcodecallcode_011_ooge_2.py +++ b/tests/ported_static/stStaticCall/test_static_callcallcodecallcode_011_ooge_2.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -160,20 +157,8 @@ def test_static_callcallcodecallcode_011_ooge_2( address=Address(0xF43B4E8B779078758104039080947F8F74E663D3), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1, 1: 1})}, - }, - { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1, 1: 1})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 1, 1: 1})} + _exc = None tx_data = [ Hash(addr_2, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_callcallcodecallcode_011_oogm_before2.py b/tests/ported_static/stStaticCall/test_static_callcallcodecallcode_011_oogm_before2.py index 8d3516646cf..9fb8cc1009b 100644 --- a/tests/ported_static/stStaticCall/test_static_callcallcodecallcode_011_oogm_before2.py +++ b/tests/ported_static/stStaticCall/test_static_callcallcodecallcode_011_oogm_before2.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -193,20 +190,8 @@ def test_static_callcallcodecallcode_011_oogm_before2( address=Address(0x1DFFDBFBE33709F17B6E90137242C109917A994B), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0, 1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1, 1: 1})}, - }, - { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1, 1: 1})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 1, 1: 1})} + _exc = None tx_data = [ Hash(addr_2, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_callcodecall_10_suicide_end2.py b/tests/ported_static/stStaticCall/test_static_callcodecall_10_suicide_end2.py index 92fe9bf3b88..620d1dfd21a 100644 --- a/tests/ported_static/stStaticCall/test_static_callcodecall_10_suicide_end2.py +++ b/tests/ported_static/stStaticCall/test_static_callcodecall_10_suicide_end2.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -118,20 +115,12 @@ def test_static_callcodecall_10_suicide_end2( address=Address(0xB60789F240AC9F12FCDE1E4BBD5042A7F30932D4), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": {target: Account(balance=0xDE0B6B3A7640000)}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": {target: Account(balance=0xDE0B6B3A7640001)}, - }, + expect_posts: list[dict] = [ + {target: Account(balance=0xDE0B6B3A7640000)}, + {target: Account(balance=0xDE0B6B3A7640001)}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 0, 1): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stStaticCall/test_static_callcodecallcall_100_oogm_after_3.py b/tests/ported_static/stStaticCall/test_static_callcodecallcall_100_oogm_after_3.py index 23f939bb74d..4aeeadd6d1d 100644 --- a/tests/ported_static/stStaticCall/test_static_callcodecallcall_100_oogm_after_3.py +++ b/tests/ported_static/stStaticCall/test_static_callcodecallcall_100_oogm_after_3.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -141,20 +138,8 @@ def test_static_callcodecallcall_100_oogm_after_3( nonce=0, ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": -1, "value": [0]}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0, 1: 1})}, - }, - { - "indexes": {"data": -1, "gas": -1, "value": [1]}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 0, 1: 1})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 0, 1: 1})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stStaticCall/test_static_callcodecallcallcode_101_oogm_after_3.py b/tests/ported_static/stStaticCall/test_static_callcodecallcallcode_101_oogm_after_3.py index d1005686e33..138afd2d062 100644 --- a/tests/ported_static/stStaticCall/test_static_callcodecallcallcode_101_oogm_after_3.py +++ b/tests/ported_static/stStaticCall/test_static_callcodecallcallcode_101_oogm_after_3.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -223,20 +220,8 @@ def test_static_callcodecallcallcode_101_oogm_after_3( address=Address(0xE2FA228586F5C62A6728D17728F4622D05D84E45), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1, 1: 1})}, - }, - { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1, 1: 1})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={0: 1, 1: 1})} + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_check_opcodes.py b/tests/ported_static/stStaticCall/test_static_check_opcodes.py index 58ef0d469dc..89aa2a18a95 100644 --- a/tests/ported_static/stStaticCall/test_static_check_opcodes.py +++ b/tests/ported_static/stStaticCall/test_static_check_opcodes.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -235,34 +232,29 @@ def test_static_check_opcodes( address=Address(0x2B8B4845ACB3EF63F61F109B960754CF76DFBDFD), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - target: Account(storage={1: 1}), - }, + sender: Account(nonce=1), + target: Account(storage={1: 1}), }, { - "indexes": {"data": 1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - target: Account(storage={1: 0}), - }, + sender: Account(nonce=1), + target: Account(storage={1: 0}), }, + ] + post = expect_posts[ { - "indexes": {"data": 0, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - target: Account(storage={1: 1}), - }, - }, + (0, 0, 0): 0, + (0, 0, 1): 0, + (0, 1, 0): 0, + (0, 1, 1): 0, + (1, 0, 0): 1, + (1, 0, 1): 1, + (1, 1, 0): 0, + (1, 1, 1): 0, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_check_opcodes2.py b/tests/ported_static/stStaticCall/test_static_check_opcodes2.py index 39abab90f7d..e9844e74b81 100644 --- a/tests/ported_static/stStaticCall/test_static_check_opcodes2.py +++ b/tests/ported_static/stStaticCall/test_static_check_opcodes2.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -496,26 +493,31 @@ def test_static_check_opcodes2( address=Address(0x58D6159788915466CC2BF8A6BC7284928707959B), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": [0, 2, 3, 4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - target: Account(storage={1: 1}), - }, + sender: Account(nonce=1), + target: Account(storage={1: 1}), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - target: Account(storage={1: 0}), - }, + sender: Account(nonce=1), + target: Account(storage={1: 0}), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + { + (0, 0, 0): 0, + (0, 0, 1): 0, + (1, 0, 0): 1, + (1, 0, 1): 1, + (2, 0, 0): 0, + (2, 0, 1): 0, + (3, 0, 0): 0, + (3, 0, 1): 0, + (4, 0, 0): 0, + (4, 0, 1): 0, + }[d, g, v] + ] + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_check_opcodes3.py b/tests/ported_static/stStaticCall/test_static_check_opcodes3.py index 67c36145697..be9e9b65451 100644 --- a/tests/ported_static/stStaticCall/test_static_check_opcodes3.py +++ b/tests/ported_static/stStaticCall/test_static_check_opcodes3.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -534,26 +531,31 @@ def test_static_check_opcodes3( address=Address(0x4AF0C90F8F7B7834E7E7BD57DDA960412F9650F9), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": [0, 2, 3, 4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - target: Account(storage={1: 1}), - }, + sender: Account(nonce=1), + target: Account(storage={1: 1}), }, { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - target: Account(storage={1: 0}), - }, + sender: Account(nonce=1), + target: Account(storage={1: 0}), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + { + (0, 0, 0): 0, + (0, 0, 1): 0, + (1, 0, 0): 1, + (1, 0, 1): 1, + (2, 0, 0): 0, + (2, 0, 1): 0, + (3, 0, 0): 0, + (3, 0, 1): 0, + (4, 0, 0): 0, + (4, 0, 1): 0, + }[d, g, v] + ] + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_check_opcodes4.py b/tests/ported_static/stStaticCall/test_static_check_opcodes4.py index 8c4a09aef3a..e2537a1a925 100644 --- a/tests/ported_static/stStaticCall/test_static_check_opcodes4.py +++ b/tests/ported_static/stStaticCall/test_static_check_opcodes4.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -211,45 +208,35 @@ def test_static_check_opcodes4( address=Address(0x8FD6268252F0D331531601B40524719C7F681FE9), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": 1, "value": 0}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - target: Account( - storage={1: 1, 2: 1, 3: sender, 5: sender, 6: target}, - ), - }, + sender: Account(nonce=1), + target: Account( + storage={1: 1, 2: 1, 3: sender, 5: sender, 6: target}, + ), }, { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - target: Account(storage={}), - }, + sender: Account(nonce=1), + target: Account(storage={}), }, { - "indexes": {"data": -1, "gas": 1, "value": 1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - target: Account( - storage={ - 1: 1, - 2: 1, - 3: sender, - 4: 100, - 5: sender, - 6: target, - }, - ), - }, + sender: Account(nonce=1), + target: Account( + storage={ + 1: 1, + 2: 1, + 3: sender, + 4: 100, + 5: sender, + 6: target, + }, + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 1, (0, 0, 1): 1, (0, 1, 0): 0, (0, 1, 1): 2}[d, g, v] + ] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stStaticCall/test_static_check_opcodes5.py b/tests/ported_static/stStaticCall/test_static_check_opcodes5.py index ff557a77c24..b58a11aa559 100644 --- a/tests/ported_static/stStaticCall/test_static_check_opcodes5.py +++ b/tests/ported_static/stStaticCall/test_static_check_opcodes5.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -500,50 +497,53 @@ def test_static_check_opcodes5( address=Address(0x972F33115B9E8BE9C87412A04CE61E6C3A84D15D), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - addr_6: Account(storage={0: 0}), - }, + sender: Account(nonce=1), + addr_6: Account(storage={0: 0}), }, { - "indexes": {"data": [0, 1], "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - addr_6: Account(storage={0: 1}), - }, + sender: Account(nonce=1), + addr_6: Account(storage={0: 1}), }, { - "indexes": {"data": [2], "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - addr_3: Account(storage={0: 1}), - }, + sender: Account(nonce=1), + addr_3: Account(storage={0: 1}), }, { - "indexes": {"data": [3], "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - addr_4: Account(storage={0: 1}), - }, + sender: Account(nonce=1), + addr_4: Account(storage={0: 1}), }, { - "indexes": {"data": [4], "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - addr_5: Account(storage={0: 1}), - }, + sender: Account(nonce=1), + addr_5: Account(storage={0: 1}), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + { + (0, 0, 0): 0, + (0, 0, 1): 0, + (0, 1, 0): 1, + (0, 1, 1): 1, + (1, 0, 0): 0, + (1, 0, 1): 0, + (1, 1, 0): 1, + (1, 1, 1): 1, + (2, 0, 0): 0, + (2, 0, 1): 0, + (2, 1, 0): 2, + (2, 1, 1): 2, + (3, 0, 0): 0, + (3, 0, 1): 0, + (3, 1, 0): 3, + (3, 1, 1): 3, + (4, 0, 0): 0, + (4, 0, 1): 0, + (4, 1, 0): 4, + (4, 1, 1): 4, + }[d, g, v] + ] + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_contract_creation_make_call_that_ask_more_gas_then_transaction_provided.py b/tests/ported_static/stStaticCall/test_static_contract_creation_make_call_that_ask_more_gas_then_transaction_provided.py index 2ba50e12f09..2e415a6a5ab 100644 --- a/tests/ported_static/stStaticCall/test_static_contract_creation_make_call_that_ask_more_gas_then_transaction_provided.py +++ b/tests/ported_static/stStaticCall/test_static_contract_creation_make_call_that_ask_more_gas_then_transaction_provided.py @@ -16,9 +16,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -180,46 +177,8 @@ def test_static_contract_creation_make_call_that_ask_more_gas_then_transaction_p nonce=0, ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address(address=sender, nonce=0): Account( - nonce=1 - ) - }, - }, - { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address(address=sender, nonce=0): Account( - nonce=1 - ) - }, - }, - { - "indexes": {"data": 2, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address(address=sender, nonce=0): Account( - nonce=1 - ) - }, - }, - { - "indexes": {"data": 3, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address(address=sender, nonce=0): Account( - nonce=1 - ) - }, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {compute_create_address(address=sender, nonce=0): Account(nonce=1)} + _exc = None tx_data = [ Op.STATICCALL( diff --git a/tests/ported_static/stStaticCall/test_static_execute_call_that_ask_fore_gas_then_trabsaction_has.py b/tests/ported_static/stStaticCall/test_static_execute_call_that_ask_fore_gas_then_trabsaction_has.py index c48d9cfe3d4..a1833d40964 100644 --- a/tests/ported_static/stStaticCall/test_static_execute_call_that_ask_fore_gas_then_trabsaction_has.py +++ b/tests/ported_static/stStaticCall/test_static_execute_call_that_ask_fore_gas_then_trabsaction_has.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -128,20 +125,12 @@ def test_static_execute_call_that_ask_fore_gas_then_trabsaction_has( address=Address(0xCE4CCBFFAF450AE2126EB96DCD7C891F37764F20), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [1, 2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={1: 0})}, - }, - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={1: 1})}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={1: 0})}, + {target: Account(storage={1: 1})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 1, (1, 0, 0): 0, (2, 0, 0): 0}[d, g, v]] + _exc = None tx_data = [ Hash(addr, left_padding=True), diff --git a/tests/ported_static/stStaticCall/test_static_loop_calls_then_revert.py b/tests/ported_static/stStaticCall/test_static_loop_calls_then_revert.py index 32fdd9495db..33f1226e270 100644 --- a/tests/ported_static/stStaticCall/test_static_loop_calls_then_revert.py +++ b/tests/ported_static/stStaticCall/test_static_loop_calls_then_revert.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -116,20 +113,8 @@ def test_static_loop_calls_then_revert( nonce=0, ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={1: 1})}, - }, - { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={1: 1})}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {target: Account(storage={1: 1})} + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stStaticCall/test_static_refund_call_to_suicide_twice.py b/tests/ported_static/stStaticCall/test_static_refund_call_to_suicide_twice.py index 6860878412f..117c2cc7d25 100644 --- a/tests/ported_static/stStaticCall/test_static_refund_call_to_suicide_twice.py +++ b/tests/ported_static/stStaticCall/test_static_refund_call_to_suicide_twice.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -111,37 +108,25 @@ def test_static_refund_call_to_suicide_twice( address=Address(0x9DEA1AD5123F3D8B91CFC830B1C602597883E97C), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={0: 0, 1: 1}, balance=0x1BC16D674EC8000A - ), - addr: Account( - storage={1: 1}, - code=bytes.fromhex( - "7375db2708826b7d5e8cd45002f9ae23c830c31efdff00" - ), - balance=0, - nonce=0, + target: Account(storage={0: 0, 1: 1}, balance=0x1BC16D674EC8000A), + addr: Account( + storage={1: 1}, + code=bytes.fromhex( + "7375db2708826b7d5e8cd45002f9ae23c830c31efdff00" ), - }, + balance=0, + nonce=0, + ), }, { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={0: 0, 1: 1}, balance=0xDE0B6B3A764000A - ), - addr: Account(nonce=0), - }, + target: Account(storage={0: 0, 1: 1}, balance=0xDE0B6B3A764000A), + addr: Account(nonce=0), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 1, (1, 0, 0): 0}[d, g, v]] + _exc = None tx_data = [ Hash(0x1F4), diff --git a/tests/ported_static/stStaticCall/test_static_return_bounds_oog.py b/tests/ported_static/stStaticCall/test_static_return_bounds_oog.py index d3be7f1321f..a171fc34615 100644 --- a/tests/ported_static/stStaticCall/test_static_return_bounds_oog.py +++ b/tests/ported_static/stStaticCall/test_static_return_bounds_oog.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -374,42 +371,34 @@ def test_static_return_bounds_oog( nonce=0, ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - target: Account( - storage={ - 1: 1, - 2: 1, - 3: 1, - 4: 1, - 5: 1, - 6: 1, - 7: 1, - 8: 1, - 9: 1, - 10: 1, - 11: 1, - 12: 1, - 13: 1, - 14: 1, - 15: 1, - 16: 1, - }, - balance=1, - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={}, balance=0)}, + target: Account( + storage={ + 1: 1, + 2: 1, + 3: 1, + 4: 1, + 5: 1, + 6: 1, + 7: 1, + 8: 1, + 9: 1, + 10: 1, + 11: 1, + 12: 1, + 13: 1, + 14: 1, + 15: 1, + 16: 1, + }, + balance=1, + ), }, + {target: Account(storage={}, balance=0)}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 1, (1, 0, 0): 0}[d, g, v]] + _exc = None tx_data = [ Bytes("00"), diff --git a/tests/ported_static/stSystemOperationsTest/test_call_to_name_registrator_zeor_size_mem_expansion.py b/tests/ported_static/stSystemOperationsTest/test_call_to_name_registrator_zeor_size_mem_expansion.py index 885556214a2..97ec7f2bfed 100644 --- a/tests/ported_static/stSystemOperationsTest/test_call_to_name_registrator_zeor_size_mem_expansion.py +++ b/tests/ported_static/stSystemOperationsTest/test_call_to_name_registrator_zeor_size_mem_expansion.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -112,20 +109,12 @@ def test_call_to_name_registrator_zeor_size_mem_expansion( nonce=0, ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1}, nonce=0)}, - }, - { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={}, nonce=0)}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={0: 1}, nonce=0)}, + {target: Account(storage={}, nonce=0)}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 1, 0): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stSystemOperationsTest/test_callcode_to_name_registrator_zero_mem_expanion.py b/tests/ported_static/stSystemOperationsTest/test_callcode_to_name_registrator_zero_mem_expanion.py index 27617fd5e2e..a0df1957831 100644 --- a/tests/ported_static/stSystemOperationsTest/test_callcode_to_name_registrator_zero_mem_expanion.py +++ b/tests/ported_static/stSystemOperationsTest/test_callcode_to_name_registrator_zero_mem_expanion.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -112,20 +109,12 @@ def test_callcode_to_name_registrator_zero_mem_expanion( nonce=0, ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={})}, - }, - { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": {target: Account(storage={0: 1})}, - }, + expect_posts: list[dict] = [ + {target: Account(storage={})}, + {target: Account(storage={0: 1})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 1, 0): 1}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stSystemOperationsTest/test_double_selfdestruct_test.py b/tests/ported_static/stSystemOperationsTest/test_double_selfdestruct_test.py index 39db66c2be4..e92c3cb1f8a 100644 --- a/tests/ported_static/stSystemOperationsTest/test_double_selfdestruct_test.py +++ b/tests/ported_static/stSystemOperationsTest/test_double_selfdestruct_test.py @@ -22,9 +22,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -227,45 +224,44 @@ def test_double_selfdestruct_test( address=Address(0x000000000000000000000000000000000000C0DE), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": [0, 1, 2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address( - 0x0000000000000000000000000000000000001001 - ): Account.NONEXISTENT, - Address(0x0000000000000000000000000000000000001002): Account( - balance=0xF4241 - ), - }, + Address( + 0x0000000000000000000000000000000000001001 + ): Account.NONEXISTENT, + Address(0x0000000000000000000000000000000000001002): Account( + balance=0xF4241 + ), }, { - "indexes": {"data": [3, 7], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0x0000000000000000000000000000000000001001): Account( - balance=0xF4241, nonce=0 - ), - Address( - 0x0000000000000000000000000000000000001002 - ): Account.NONEXISTENT, - contract_0: Account(nonce=1), - }, + Address(0x0000000000000000000000000000000000001001): Account( + balance=0xF4241, nonce=0 + ), + Address( + 0x0000000000000000000000000000000000001002 + ): Account.NONEXISTENT, + contract_0: Account(nonce=1), }, { - "indexes": {"data": [4, 5, 6], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0x0000000000000000000000000000000000001001): Account( - balance=0xF4241, nonce=0 - ), - contract_0: Account(nonce=1), - }, + Address(0x0000000000000000000000000000000000001001): Account( + balance=0xF4241, nonce=0 + ), + contract_0: Account(nonce=1), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + { + (0, 0, 0): 0, + (1, 0, 0): 0, + (2, 0, 0): 0, + (3, 0, 0): 1, + (4, 0, 0): 2, + (5, 0, 0): 2, + (6, 0, 0): 2, + (7, 0, 0): 1, + }[d, g, v] + ] + _exc = None tx_data = [ Bytes("f110011002"), diff --git a/tests/ported_static/stSystemOperationsTest/test_double_selfdestruct_touch_paris.py b/tests/ported_static/stSystemOperationsTest/test_double_selfdestruct_touch_paris.py index 26364936fba..1eecdb494f4 100644 --- a/tests/ported_static/stSystemOperationsTest/test_double_selfdestruct_touch_paris.py +++ b/tests/ported_static/stSystemOperationsTest/test_double_selfdestruct_touch_paris.py @@ -20,9 +20,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -137,40 +134,28 @@ def test_double_selfdestruct_touch_paris( address=Address(0x8EC7465877D3957084DC907C0F6D8F2911A17A52), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": -1, "value": 0}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - target: Account(storage={}, balance=0, nonce=0), - empty_account_1: Account(balance=10), - empty_account_2: Account(balance=10), - }, + sender: Account(nonce=1), + target: Account(storage={}, balance=0, nonce=0), + empty_account_1: Account(balance=10), + empty_account_2: Account(balance=10), }, { - "indexes": {"data": -1, "gas": -1, "value": 1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - target: Account(storage={}, balance=0, nonce=0), - empty_account_1: Account(balance=10), - empty_account_2: Account(balance=11, nonce=0), - }, + sender: Account(nonce=1), + target: Account(storage={}, balance=0, nonce=0), + empty_account_1: Account(balance=10), + empty_account_2: Account(balance=11, nonce=0), }, { - "indexes": {"data": -1, "gas": -1, "value": 2}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - target: Account(storage={}, balance=0, nonce=0), - empty_account_1: Account(balance=11, nonce=0), - empty_account_2: Account(balance=11, nonce=0), - }, + sender: Account(nonce=1), + target: Account(storage={}, balance=0, nonce=0), + empty_account_1: Account(balance=11, nonce=0), + empty_account_2: Account(balance=11, nonce=0), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 0, 1): 1, (0, 0, 2): 2}[d, g, v]] + _exc = None tx_data = [ Bytes(""), diff --git a/tests/ported_static/stSystemOperationsTest/test_multi_selfdestruct.py b/tests/ported_static/stSystemOperationsTest/test_multi_selfdestruct.py index 004c4a8b668..59b8b9cf42d 100644 --- a/tests/ported_static/stSystemOperationsTest/test_multi_selfdestruct.py +++ b/tests/ported_static/stSystemOperationsTest/test_multi_selfdestruct.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -275,60 +272,44 @@ def test_multi_selfdestruct( nonce=1, ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_1: Account( - storage={0: 1, 1: 3, 2: 0, 16: 1, 17: 3, 18: 2} - ), - contract_0: Account(balance=2, nonce=1), - }, + contract_1: Account( + storage={0: 1, 1: 3, 2: 0, 16: 1, 17: 3, 18: 2} + ), + contract_0: Account(balance=2, nonce=1), }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_1: Account( - storage={0: 1, 1: 3, 2: 0, 16: 1, 17: 5, 18: 0} - ), - contract_0: Account(balance=0, nonce=1), - }, + contract_1: Account( + storage={0: 1, 1: 3, 2: 0, 16: 1, 17: 5, 18: 0} + ), + contract_0: Account(balance=0, nonce=1), }, { - "indexes": {"data": 2, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_1: Account( - storage={0: 1, 1: 3, 2: 0, 16: 1, 17: 3, 18: 0, 19: 2}, - ), - contract_0: Account(balance=0, nonce=1), - }, + contract_1: Account( + storage={0: 1, 1: 3, 2: 0, 16: 1, 17: 3, 18: 0, 19: 2}, + ), + contract_0: Account(balance=0, nonce=1), }, { - "indexes": {"data": 3, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_1: Account( - storage={0: 1, 1: 3, 2: 0, 16: 0, 17: 3, 18: 0, 19: 0}, - ), - contract_0: Account(balance=0, nonce=1), - }, + contract_1: Account( + storage={0: 1, 1: 3, 2: 0, 16: 0, 17: 3, 18: 0, 19: 0}, + ), + contract_0: Account(balance=0, nonce=1), }, { - "indexes": {"data": 4, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_1: Account( - storage={0: 1, 1: 3, 2: 0, 16: 1, 17: 3, 18: 1, 19: 1}, - ), - contract_0: Account(balance=1, nonce=1), - }, + contract_1: Account( + storage={0: 1, 1: 3, 2: 0, 16: 1, 17: 3, 18: 1, 19: 1}, + ), + contract_0: Account(balance=1, nonce=1), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 0, (1, 0, 0): 1, (2, 0, 0): 2, (3, 0, 0): 3, (4, 0, 0): 4}[ + d, g, v + ] + ] + _exc = None tx_data = [ Bytes("01"), diff --git a/tests/ported_static/stTransactionTest/test_opcodes_transaction_init.py b/tests/ported_static/stTransactionTest/test_opcodes_transaction_init.py index f93284cfd53..a589e301865 100644 --- a/tests/ported_static/stTransactionTest/test_opcodes_transaction_init.py +++ b/tests/ported_static/stTransactionTest/test_opcodes_transaction_init.py @@ -18,9 +18,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -871,271 +868,180 @@ def test_opcodes_transaction_init( address=Address(0x0F572E5295C57F15886F9B263E2F6D2D6C7B5EC6), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": 33, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - compute_create_address(address=sender, nonce=0): Account( - storage={ - 0: 0x38600060013960015160005560006000F3000000000000000000000000000000, # noqa: E501 - }, - nonce=1, - ), - }, - }, - { - "indexes": {"data": 37, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - compute_create_address(address=sender, nonce=0): Account( - nonce=1 - ), - }, - }, - { - "indexes": {"data": 38, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - compute_create_address(address=sender, nonce=0): Account( - nonce=1 - ), - }, - }, - { - "indexes": {"data": 120, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - compute_create_address(address=sender, nonce=0): Account( - nonce=2 - ), - }, - }, - { - "indexes": {"data": 124, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - compute_create_address(address=sender, nonce=0): Account( - nonce=1 - ), - }, - }, - { - "indexes": {"data": 125, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - compute_create_address(address=sender, nonce=0): Account( - nonce=1 - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": 126, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - compute_create_address( - address=sender, nonce=0 - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + compute_create_address(address=sender, nonce=0): Account( + storage={ + 0: 0x38600060013960015160005560006000F3000000000000000000000000000000, # noqa: E501 + }, + nonce=1, + ), }, { - "indexes": {"data": 127, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - compute_create_address( - address=sender, nonce=0 - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + compute_create_address(address=sender, nonce=0): Account(nonce=1), }, { - "indexes": { - "data": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 34, - 35, - 36, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97, - 98, - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 121, - 122, - 123, - ], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - compute_create_address(address=sender, nonce=0): Account( - nonce=1 - ), - }, + sender: Account(nonce=1), + compute_create_address(address=sender, nonce=0): Account(nonce=2), }, { - "indexes": {"data": [128], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - compute_create_address( - address=sender, nonce=0 - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + compute_create_address( + address=sender, nonce=0 + ): Account.NONEXISTENT, }, { - "indexes": {"data": [129], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account(storage={0: 1, 1: 0}), - compute_create_address(address=sender, nonce=0): Account( - nonce=1 - ), - }, + sender: Account(nonce=1), + contract_0: Account(storage={0: 1, 1: 0}), + compute_create_address(address=sender, nonce=0): Account(nonce=1), }, { - "indexes": {"data": [130], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account(storage={}), - compute_create_address( - address=sender, nonce=0 - ): Account.NONEXISTENT, - }, + sender: Account(nonce=1), + contract_0: Account(storage={}), + compute_create_address( + address=sender, nonce=0 + ): Account.NONEXISTENT, }, + ] + post = expect_posts[ { - "indexes": {"data": [131], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(nonce=1), - contract_0: Account(storage={}), - compute_create_address( - address=sender, nonce=0 - ): Account.NONEXISTENT, - }, - }, + (0, 0, 0): 1, + (1, 0, 0): 1, + (2, 0, 0): 1, + (3, 0, 0): 1, + (4, 0, 0): 1, + (5, 0, 0): 1, + (6, 0, 0): 1, + (7, 0, 0): 1, + (8, 0, 0): 1, + (9, 0, 0): 1, + (10, 0, 0): 1, + (11, 0, 0): 1, + (12, 0, 0): 1, + (13, 0, 0): 1, + (14, 0, 0): 1, + (15, 0, 0): 1, + (16, 0, 0): 1, + (17, 0, 0): 1, + (18, 0, 0): 1, + (19, 0, 0): 1, + (20, 0, 0): 1, + (21, 0, 0): 1, + (22, 0, 0): 1, + (23, 0, 0): 1, + (24, 0, 0): 1, + (25, 0, 0): 1, + (26, 0, 0): 1, + (27, 0, 0): 1, + (28, 0, 0): 1, + (29, 0, 0): 1, + (30, 0, 0): 1, + (31, 0, 0): 1, + (32, 0, 0): 1, + (33, 0, 0): 0, + (34, 0, 0): 1, + (35, 0, 0): 1, + (36, 0, 0): 1, + (37, 0, 0): 1, + (38, 0, 0): 1, + (39, 0, 0): 1, + (40, 0, 0): 1, + (41, 0, 0): 1, + (42, 0, 0): 1, + (43, 0, 0): 1, + (44, 0, 0): 1, + (45, 0, 0): 1, + (46, 0, 0): 1, + (47, 0, 0): 1, + (48, 0, 0): 1, + (49, 0, 0): 1, + (50, 0, 0): 1, + (51, 0, 0): 1, + (52, 0, 0): 1, + (53, 0, 0): 1, + (54, 0, 0): 1, + (55, 0, 0): 1, + (56, 0, 0): 1, + (57, 0, 0): 1, + (58, 0, 0): 1, + (59, 0, 0): 1, + (60, 0, 0): 1, + (61, 0, 0): 1, + (62, 0, 0): 1, + (63, 0, 0): 1, + (64, 0, 0): 1, + (65, 0, 0): 1, + (66, 0, 0): 1, + (67, 0, 0): 1, + (68, 0, 0): 1, + (69, 0, 0): 1, + (70, 0, 0): 1, + (71, 0, 0): 1, + (72, 0, 0): 1, + (73, 0, 0): 1, + (74, 0, 0): 1, + (75, 0, 0): 1, + (76, 0, 0): 1, + (77, 0, 0): 1, + (78, 0, 0): 1, + (79, 0, 0): 1, + (80, 0, 0): 1, + (81, 0, 0): 1, + (82, 0, 0): 1, + (83, 0, 0): 1, + (84, 0, 0): 1, + (85, 0, 0): 1, + (86, 0, 0): 1, + (87, 0, 0): 1, + (88, 0, 0): 1, + (89, 0, 0): 1, + (90, 0, 0): 1, + (91, 0, 0): 1, + (92, 0, 0): 1, + (93, 0, 0): 1, + (94, 0, 0): 1, + (95, 0, 0): 1, + (96, 0, 0): 1, + (97, 0, 0): 1, + (98, 0, 0): 1, + (99, 0, 0): 1, + (100, 0, 0): 1, + (101, 0, 0): 1, + (102, 0, 0): 1, + (103, 0, 0): 1, + (104, 0, 0): 1, + (105, 0, 0): 1, + (106, 0, 0): 1, + (107, 0, 0): 1, + (108, 0, 0): 1, + (109, 0, 0): 1, + (110, 0, 0): 1, + (111, 0, 0): 1, + (112, 0, 0): 1, + (113, 0, 0): 1, + (114, 0, 0): 1, + (115, 0, 0): 1, + (116, 0, 0): 1, + (117, 0, 0): 1, + (118, 0, 0): 1, + (119, 0, 0): 1, + (120, 0, 0): 2, + (121, 0, 0): 1, + (122, 0, 0): 1, + (123, 0, 0): 1, + (124, 0, 0): 1, + (125, 0, 0): 1, + (126, 0, 0): 3, + (127, 0, 0): 3, + (128, 0, 0): 3, + (129, 0, 0): 4, + (130, 0, 0): 5, + (131, 0, 0): 5, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Op.STOP + Op.RETURN(offset=0x0, size=0x1), diff --git a/tests/ported_static/stTransactionTest/test_suicides_and_internal_call_suicides_success.py b/tests/ported_static/stTransactionTest/test_suicides_and_internal_call_suicides_success.py index 661b972ec23..8ba68c186c8 100644 --- a/tests/ported_static/stTransactionTest/test_suicides_and_internal_call_suicides_success.py +++ b/tests/ported_static/stTransactionTest/test_suicides_and_internal_call_suicides_success.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -103,28 +100,20 @@ def test_suicides_and_internal_call_suicides_success( address=Address(0xC94F5374FCE5EDBC8E2A8697C15331677E6EBF0B), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": 0, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address( - 0x0000000000000000000000000000000000000001 - ): Account.NONEXISTENT, - }, + Address( + 0x0000000000000000000000000000000000000001 + ): Account.NONEXISTENT, }, { - "indexes": {"data": 1, "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0x0000000000000000000000000000000000000001): Account( - storage={}, balance=1 - ), - }, + Address(0x0000000000000000000000000000000000000001): Account( + storage={}, balance=1 + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Hash(0x55F0), diff --git a/tests/ported_static/stWalletTest/test_multi_owned_construction_not_enough_gas_partial.py b/tests/ported_static/stWalletTest/test_multi_owned_construction_not_enough_gas_partial.py index 52ccc3ac3f3..f88e737edc3 100644 --- a/tests/ported_static/stWalletTest/test_multi_owned_construction_not_enough_gas_partial.py +++ b/tests/ported_static/stWalletTest/test_multi_owned_construction_not_enough_gas_partial.py @@ -21,9 +21,6 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) REFERENCE_SPEC_GIT_PATH = "N/A" REFERENCE_SPEC_VERSION = "N/A" @@ -72,30 +69,20 @@ def test_multi_owned_construction_not_enough_gas_partial( base_fee_per_gas=10, ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": -1, "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address( - address=sender, nonce=0 - ): Account.NONEXISTENT, - sender: Account(storage={}, code=b"", nonce=1), - }, + compute_create_address( + address=sender, nonce=0 + ): Account.NONEXISTENT, + sender: Account(storage={}, code=b"", nonce=1), }, { - "indexes": {"data": -1, "gas": 1, "value": -1}, - "network": [">=Cancun"], - "result": { - compute_create_address(address=sender, nonce=0): Account( - nonce=1 - ), - sender: Account(storage={}, code=b"", nonce=1), - }, + compute_create_address(address=sender, nonce=0): Account(nonce=1), + sender: Account(storage={}, code=b"", nonce=1), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (0, 1, 0): 1}[d, g, v]] + _exc = None tx_data = [ Bytes( diff --git a/tests/ported_static/stZeroKnowledge/test_pairing_test.py b/tests/ported_static/stZeroKnowledge/test_pairing_test.py index bf844166115..2ba135a84e0 100644 --- a/tests/ported_static/stZeroKnowledge/test_pairing_test.py +++ b/tests/ported_static/stZeroKnowledge/test_pairing_test.py @@ -16,9 +16,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -296,25 +293,40 @@ def test_pairing_test( nonce=0, ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0, 1, 2, 3, 4], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_0: Account(storage={0: 1, 1: 1})}, - }, - { - "indexes": {"data": -1, "gas": [1, 2, 3], "value": -1}, - "network": [">=Cancun"], - "result": {contract_0: Account(storage={})}, - }, + expect_posts: list[dict] = [ + {contract_0: Account(storage={0: 1, 1: 1})}, + {contract_0: Account(storage={})}, + {contract_0: Account(storage={0: 1, 1: 0})}, + ] + post = expect_posts[ { - "indexes": {"data": [5], "gas": 0, "value": -1}, - "network": [">=Cancun"], - "result": {contract_0: Account(storage={0: 1, 1: 0})}, - }, + (0, 0, 0): 0, + (0, 1, 0): 1, + (0, 2, 0): 1, + (0, 3, 0): 1, + (1, 0, 0): 0, + (1, 1, 0): 1, + (1, 2, 0): 1, + (1, 3, 0): 1, + (2, 0, 0): 0, + (2, 1, 0): 1, + (2, 2, 0): 1, + (2, 3, 0): 1, + (3, 0, 0): 0, + (3, 1, 0): 1, + (3, 2, 0): 1, + (3, 3, 0): 1, + (4, 0, 0): 0, + (4, 1, 0): 1, + (4, 2, 0): 1, + (4, 3, 0): 1, + (5, 0, 0): 2, + (5, 1, 0): 1, + (5, 2, 0): 1, + (5, 3, 0): 1, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Hash(0x180) diff --git a/tests/ported_static/vmArithmeticTest/test_add.py b/tests/ported_static/vmArithmeticTest/test_add.py index 38a910bcf77..fd9d51aeb7a 100644 --- a/tests/ported_static/vmArithmeticTest/test_add.py +++ b/tests/ported_static/vmArithmeticTest/test_add.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -203,35 +200,27 @@ def test_add( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE, # noqa: E501 - }, - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_1: Account(storage={0: 3})}, + contract_0: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE, # noqa: E501 + }, + ), }, + {contract_1: Account(storage={0: 3})}, { - "indexes": {"data": [2, 3, 4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_2: Account(storage={0: 0}), - contract_3: Account(storage={0: 0}), - contract_4: Account(storage={0: 0}), - }, + contract_2: Account(storage={0: 0}), + contract_3: Account(storage={0: 0}), + contract_4: Account(storage={0: 0}), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 0, (1, 0, 0): 1, (2, 0, 0): 2, (3, 0, 0): 2, (4, 0, 0): 2}[ + d, g, v + ] + ] + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmArithmeticTest/test_addmod.py b/tests/ported_static/vmArithmeticTest/test_addmod.py index 122864ca167..c9dda67f03e 100644 --- a/tests/ported_static/vmArithmeticTest/test_addmod.py +++ b/tests/ported_static/vmArithmeticTest/test_addmod.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -392,96 +389,51 @@ def test_addmod( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_0: Account(storage={0: 1})}, - }, - { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_1: Account(storage={0: 1})}, - }, - { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={0: 2})}, - }, - { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_3: Account(storage={0: 0})}, - }, - { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_4: Account(storage={0: 1})}, - }, - { - "indexes": {"data": [5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_5: Account(storage={0: 5})}, - }, - { - "indexes": {"data": [6], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_6: Account(storage={0: 0})}, - }, - { - "indexes": {"data": [7], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_7: Account(storage={0: 0})}, - }, + expect_posts: list[dict] = [ + {contract_0: Account(storage={0: 1})}, + {contract_1: Account(storage={0: 1})}, + {contract_2: Account(storage={0: 2})}, + {contract_3: Account(storage={0: 0})}, + {contract_4: Account(storage={0: 1})}, + {contract_5: Account(storage={0: 5})}, + {contract_6: Account(storage={0: 0})}, + {contract_7: Account(storage={0: 0})}, + {contract_8: Account(storage={0: 1})}, + {contract_9: Account(storage={0: 2})}, + {contract_10: Account(storage={0: 4})}, + {contract_11: Account(storage={0: 1})}, + {contract_12: Account(storage={0: 0})}, + {contract_13: Account(storage={0: 0})}, + {contract_14: Account(storage={0: 0})}, { - "indexes": {"data": [8], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_8: Account(storage={0: 1})}, - }, - { - "indexes": {"data": [9], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_9: Account(storage={0: 2})}, - }, - { - "indexes": {"data": [10], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_10: Account(storage={0: 4})}, - }, - { - "indexes": {"data": [11], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_11: Account(storage={0: 1})}, - }, - { - "indexes": {"data": [12], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_12: Account(storage={0: 0})}, - }, - { - "indexes": {"data": [13], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_13: Account(storage={0: 0})}, - }, - { - "indexes": {"data": [14], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_14: Account(storage={0: 0})}, + contract_15: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 + }, + ), }, + ] + post = expect_posts[ { - "indexes": {"data": [15], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_15: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 - }, - ), - }, - }, + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 2, + (3, 0, 0): 3, + (4, 0, 0): 4, + (5, 0, 0): 5, + (6, 0, 0): 6, + (7, 0, 0): 7, + (8, 0, 0): 8, + (9, 0, 0): 9, + (10, 0, 0): 10, + (11, 0, 0): 11, + (12, 0, 0): 12, + (13, 0, 0): 13, + (14, 0, 0): 14, + (15, 0, 0): 15, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmArithmeticTest/test_div.py b/tests/ported_static/vmArithmeticTest/test_div.py index 5a13e87254f..7a0c75529e3 100644 --- a/tests/ported_static/vmArithmeticTest/test_div.py +++ b/tests/ported_static/vmArithmeticTest/test_div.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -234,40 +231,31 @@ def test_div( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0, 3, 4, 6], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={0: 0}), - contract_3: Account(storage={0: 0}), - contract_4: Account(storage={0: 0}), - contract_6: Account(storage={0: 0}), - }, - }, - { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_1: Account(storage={0: 137})}, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={0: 2})}, - }, - { - "indexes": {"data": [5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_5: Account(storage={0: 1})}, + contract_0: Account(storage={0: 0}), + contract_3: Account(storage={0: 0}), + contract_4: Account(storage={0: 0}), + contract_6: Account(storage={0: 0}), }, + {contract_1: Account(storage={0: 137})}, + {contract_2: Account(storage={0: 2})}, + {contract_5: Account(storage={0: 1})}, + {contract_7: Account(storage={0: 7})}, + ] + post = expect_posts[ { - "indexes": {"data": [7], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_7: Account(storage={0: 7})}, - }, + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 2, + (3, 0, 0): 0, + (4, 0, 0): 0, + (5, 0, 0): 3, + (6, 0, 0): 0, + (7, 0, 0): 4, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmArithmeticTest/test_exp.py b/tests/ported_static/vmArithmeticTest/test_exp.py index 5514c6d2f91..66d3736d968 100644 --- a/tests/ported_static/vmArithmeticTest/test_exp.py +++ b/tests/ported_static/vmArithmeticTest/test_exp.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -282,65 +279,43 @@ def test_exp( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [9, 3, 7], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_3: Account(storage={0: 0}), - contract_7: Account(storage={0: 0}), - contract_9: Account(storage={0: 0}), - }, - }, - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_0: Account(storage={0: 4})}, - }, - { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_1: Account(storage={0: 1})}, - }, - { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_2: Account( - storage={ - 0: 0xBC8CCCCCCCC888888880000000AAAAAAB00000000FFFFFFFFFFFFFFF7FFFFFFF, # noqa: E501 - }, - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_4: Account(storage={0: 1})}, + contract_3: Account(storage={0: 0}), + contract_7: Account(storage={0: 0}), + contract_9: Account(storage={0: 0}), }, + {contract_0: Account(storage={0: 4})}, + {contract_1: Account(storage={0: 1})}, { - "indexes": {"data": [5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_5: Account(storage={0: 257})}, - }, - { - "indexes": {"data": [6], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_6: Account(storage={0: 1})}, - }, - { - "indexes": {"data": [8], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_8: Account(storage={0: 1})}, + contract_2: Account( + storage={ + 0: 0xBC8CCCCCCCC888888880000000AAAAAAB00000000FFFFFFFFFFFFFFF7FFFFFFF, # noqa: E501 + }, + ), }, + {contract_4: Account(storage={0: 1})}, + {contract_5: Account(storage={0: 257})}, + {contract_6: Account(storage={0: 1})}, + {contract_8: Account(storage={0: 1})}, + {contract_10: Account(storage={0: 32768})}, + ] + post = expect_posts[ { - "indexes": {"data": [10], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_10: Account(storage={0: 32768})}, - }, + (0, 0, 0): 1, + (1, 0, 0): 2, + (2, 0, 0): 3, + (3, 0, 0): 0, + (4, 0, 0): 4, + (5, 0, 0): 5, + (6, 0, 0): 6, + (7, 0, 0): 0, + (8, 0, 0): 7, + (9, 0, 0): 0, + (10, 0, 0): 8, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmArithmeticTest/test_mod.py b/tests/ported_static/vmArithmeticTest/test_mod.py index 44970acfe0f..e0765c9a3e9 100644 --- a/tests/ported_static/vmArithmeticTest/test_mod.py +++ b/tests/ported_static/vmArithmeticTest/test_mod.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -209,44 +206,33 @@ def test_mod( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_0: Account(storage={0: 2})}, - }, - { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_1: Account(storage={0: 1})}, - }, + expect_posts: list[dict] = [ + {contract_0: Account(storage={0: 2})}, + {contract_1: Account(storage={0: 1})}, { - "indexes": {"data": [2, 3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_2: Account(storage={0: 0}), - contract_3: Account(storage={0: 0}), - }, + contract_2: Account(storage={0: 0}), + contract_3: Account(storage={0: 0}), }, + {contract_4: Account(storage={0: 2})}, { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_4: Account(storage={0: 2})}, + contract_5: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 + }, + ), }, + ] + post = expect_posts[ { - "indexes": {"data": [5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_5: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 - }, - ), - }, - }, + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 2, + (3, 0, 0): 2, + (4, 0, 0): 3, + (5, 0, 0): 4, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmArithmeticTest/test_mul.py b/tests/ported_static/vmArithmeticTest/test_mul.py index dd176fbf7cd..835f03f651f 100644 --- a/tests/ported_static/vmArithmeticTest/test_mul.py +++ b/tests/ported_static/vmArithmeticTest/test_mul.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -298,61 +295,45 @@ def test_mul( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [8, 2, 5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_2: Account(storage={0: 0}), - contract_5: Account(storage={0: 0}), - contract_8: Account(storage={0: 0}), - }, - }, - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_0: Account(storage={0: 6})}, - }, - { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_1: Account(storage={0: 1})}, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_3: Account(storage={0: 23})}, + contract_2: Account(storage={0: 0}), + contract_5: Account(storage={0: 0}), + contract_8: Account(storage={0: 0}), }, + {contract_0: Account(storage={0: 6})}, + {contract_1: Account(storage={0: 1})}, + {contract_3: Account(storage={0: 23})}, { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_4: Account( - storage={ - 0: 0x8000000000000000000000000000000000000000000000000000000000000000, # noqa: E501 - }, - ), - }, + contract_4: Account( + storage={ + 0: 0x8000000000000000000000000000000000000000000000000000000000000000, # noqa: E501 + }, + ), }, + {contract_6: Account(storage={0: 1})}, { - "indexes": {"data": [6], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_6: Account(storage={0: 1})}, + contract_7: Account( + storage={ + 0: 0x47D0817E4167B1EB4F9FC722B133EF9D7D9A6FB4C2C1C442D000107A5E419561, # noqa: E501 + }, + ), }, + ] + post = expect_posts[ { - "indexes": {"data": [7], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_7: Account( - storage={ - 0: 0x47D0817E4167B1EB4F9FC722B133EF9D7D9A6FB4C2C1C442D000107A5E419561, # noqa: E501 - }, - ), - }, - }, + (0, 0, 0): 1, + (1, 0, 0): 2, + (2, 0, 0): 0, + (3, 0, 0): 3, + (4, 0, 0): 4, + (5, 0, 0): 0, + (6, 0, 0): 5, + (7, 0, 0): 6, + (8, 0, 0): 0, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmArithmeticTest/test_mulmod.py b/tests/ported_static/vmArithmeticTest/test_mulmod.py index 173ad89d1cc..48935d67e0b 100644 --- a/tests/ported_static/vmArithmeticTest/test_mulmod.py +++ b/tests/ported_static/vmArithmeticTest/test_mulmod.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -439,68 +436,47 @@ def test_mulmod( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": { - "data": [0, 1, 6, 9, 11, 12, 13, 15], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": { - contract_0: Account(storage={0: 0}), - contract_1: Account(storage={0: 0}), - contract_6: Account(storage={0: 0}), - contract_9: Account(storage={0: 0}), - contract_11: Account(storage={0: 0}), - contract_12: Account(storage={0: 0}), - contract_13: Account(storage={0: 0}), - contract_15: Account(storage={0: 0}), - }, - }, - { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={0: 2})}, - }, - { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_3: Account(storage={0: 5})}, - }, - { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_4: Account(storage={0: 99})}, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": [5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_5: Account(storage={0: 1})}, - }, - { - "indexes": {"data": [7], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_7: Account(storage={0: 4})}, - }, - { - "indexes": {"data": [8], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_8: Account(storage={0: 3})}, - }, - { - "indexes": {"data": [10], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_10: Account(storage={0: 1})}, + contract_0: Account(storage={0: 0}), + contract_1: Account(storage={0: 0}), + contract_6: Account(storage={0: 0}), + contract_9: Account(storage={0: 0}), + contract_11: Account(storage={0: 0}), + contract_12: Account(storage={0: 0}), + contract_13: Account(storage={0: 0}), + contract_15: Account(storage={0: 0}), }, + {contract_2: Account(storage={0: 2})}, + {contract_3: Account(storage={0: 5})}, + {contract_4: Account(storage={0: 99})}, + {contract_5: Account(storage={0: 1})}, + {contract_7: Account(storage={0: 4})}, + {contract_8: Account(storage={0: 3})}, + {contract_10: Account(storage={0: 1})}, + {contract_14: Account(storage={0: 1})}, + ] + post = expect_posts[ { - "indexes": {"data": [14], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_14: Account(storage={0: 1})}, - }, + (0, 0, 0): 0, + (1, 0, 0): 0, + (2, 0, 0): 1, + (3, 0, 0): 2, + (4, 0, 0): 3, + (5, 0, 0): 4, + (6, 0, 0): 0, + (7, 0, 0): 5, + (8, 0, 0): 6, + (9, 0, 0): 0, + (10, 0, 0): 7, + (11, 0, 0): 0, + (12, 0, 0): 0, + (13, 0, 0): 0, + (14, 0, 0): 8, + (15, 0, 0): 0, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmArithmeticTest/test_sdiv.py b/tests/ported_static/vmArithmeticTest/test_sdiv.py index 7c360e52047..e3ab04ea2af 100644 --- a/tests/ported_static/vmArithmeticTest/test_sdiv.py +++ b/tests/ported_static/vmArithmeticTest/test_sdiv.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -522,131 +519,103 @@ def test_sdiv( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [2, 6, 7, 10, 11, 16], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_2: Account(storage={0: 0}), - contract_6: Account(storage={0: 0}), - contract_7: Account(storage={0: 0}), - contract_10: Account(storage={0: 0}), - contract_11: Account(storage={0: 0}), - contract_16: Account(storage={0: 0}), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 - }, - ), - }, + contract_2: Account(storage={0: 0}), + contract_6: Account(storage={0: 0}), + contract_7: Account(storage={0: 0}), + contract_10: Account(storage={0: 0}), + contract_11: Account(storage={0: 0}), + contract_16: Account(storage={0: 0}), }, { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_1: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 - }, - ), - }, + contract_0: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 + }, + ), }, { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_3: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE, # noqa: E501 - }, - ), - }, + contract_1: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 + }, + ), }, { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_4: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 - }, - ), - }, + contract_3: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE, # noqa: E501 + }, + ), }, { - "indexes": {"data": [5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_5: Account( - storage={ - 0: 0x8000000000000000000000000000000000000000000000000000000000000000, # noqa: E501 - }, - ), - }, + contract_4: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 + }, + ), }, { - "indexes": {"data": [8], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_8: Account(storage={0: 1})}, + contract_5: Account( + storage={ + 0: 0x8000000000000000000000000000000000000000000000000000000000000000, # noqa: E501 + }, + ), }, + {contract_8: Account(storage={0: 1})}, { - "indexes": {"data": [9], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_9: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 - }, - ), - }, + contract_9: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 + }, + ), }, + {contract_12: Account(storage={0: 1})}, { - "indexes": {"data": [12], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_12: Account(storage={0: 1})}, + contract_13: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 + }, + ), }, { - "indexes": {"data": [13], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_13: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 - }, - ), - }, + contract_14: Account( + storage={ + 0: 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 + }, + ), }, { - "indexes": {"data": [15], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_14: Account( - storage={ - 0: 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 - }, - ), - }, + contract_15: Account( + storage={ + 0: 0x8000000000000000000000000000000000000000000000000000000000000000, # noqa: E501 + }, + ), }, + ] + post = expect_posts[ { - "indexes": {"data": [14], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_15: Account( - storage={ - 0: 0x8000000000000000000000000000000000000000000000000000000000000000, # noqa: E501 - }, - ), - }, - }, + (0, 0, 0): 1, + (1, 0, 0): 2, + (2, 0, 0): 0, + (3, 0, 0): 3, + (4, 0, 0): 4, + (5, 0, 0): 5, + (6, 0, 0): 0, + (7, 0, 0): 0, + (8, 0, 0): 6, + (9, 0, 0): 7, + (10, 0, 0): 0, + (11, 0, 0): 0, + (12, 0, 0): 8, + (13, 0, 0): 9, + (14, 0, 0): 11, + (15, 0, 0): 10, + (16, 0, 0): 0, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmArithmeticTest/test_signextend.py b/tests/ported_static/vmArithmeticTest/test_signextend.py index d05e6c2c264..5ae5fb787b9 100644 --- a/tests/ported_static/vmArithmeticTest/test_signextend.py +++ b/tests/ported_static/vmArithmeticTest/test_signextend.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -388,119 +385,81 @@ def test_signextend( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [1, 6], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_1: Account(storage={0: 0}), - contract_6: Account(storage={0: 0}), - }, - }, - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_0: Account(storage={0: 0x126AF4})}, - }, - { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_2: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 - }, - ), - }, - }, - { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_3: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE, # noqa: E501 - }, - ), - }, - }, - { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_4: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 - }, - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": [5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_5: Account(storage={0: 255})}, + contract_1: Account(storage={0: 0}), + contract_6: Account(storage={0: 0}), }, + {contract_0: Account(storage={0: 0x126AF4})}, { - "indexes": {"data": [7], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_7: Account(storage={0: 106})}, - }, - { - "indexes": {"data": [8], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_8: Account(storage={0: 27380})}, + contract_2: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 + }, + ), }, { - "indexes": {"data": [9], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_9: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAF4, # noqa: E501 - }, - ), - }, + contract_3: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE, # noqa: E501 + }, + ), }, { - "indexes": {"data": [10], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_10: Account(storage={0: 32768})}, + contract_4: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 + }, + ), }, + {contract_5: Account(storage={0: 255})}, + {contract_7: Account(storage={0: 106})}, + {contract_8: Account(storage={0: 27380})}, { - "indexes": {"data": [11], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_11: Account(storage={0: 65535})}, + contract_9: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAF4, # noqa: E501 + }, + ), }, + {contract_10: Account(storage={0: 32768})}, + {contract_11: Account(storage={0: 65535})}, { - "indexes": {"data": [12], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_12: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4, # noqa: E501 - }, - ), - }, + contract_12: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4, # noqa: E501 + }, + ), }, + {contract_13: Account(storage={0: 1})}, { - "indexes": {"data": [13], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_13: Account(storage={0: 1})}, + contract_14: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 + }, + ), }, + ] + post = expect_posts[ { - "indexes": {"data": [14], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_14: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 - }, - ), - }, - }, + (0, 0, 0): 1, + (1, 0, 0): 0, + (2, 0, 0): 2, + (3, 0, 0): 3, + (4, 0, 0): 4, + (5, 0, 0): 5, + (6, 0, 0): 0, + (7, 0, 0): 6, + (8, 0, 0): 7, + (9, 0, 0): 8, + (10, 0, 0): 9, + (11, 0, 0): 10, + (12, 0, 0): 11, + (13, 0, 0): 12, + (14, 0, 0): 13, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmArithmeticTest/test_smod.py b/tests/ported_static/vmArithmeticTest/test_smod.py index 728f89a210b..e9bd1b4d7b7 100644 --- a/tests/ported_static/vmArithmeticTest/test_smod.py +++ b/tests/ported_static/vmArithmeticTest/test_smod.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -205,56 +202,45 @@ def test_smod( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ + {contract_0: Account(storage={0: 2})}, { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_0: Account(storage={0: 2})}, + contract_1: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 + }, + ), }, { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_1: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 - }, - ), - }, + contract_2: Account(storage={0: 0}), + contract_3: Account(storage={0: 0}), }, { - "indexes": {"data": [2, 3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_2: Account(storage={0: 0}), - contract_3: Account(storage={0: 0}), - }, + contract_4: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE, # noqa: E501 + }, + ), }, { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_4: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE, # noqa: E501 - }, - ), - }, + contract_5: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 + }, + ), }, + ] + post = expect_posts[ { - "indexes": {"data": [5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_5: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 - }, - ), - }, - }, + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 2, + (3, 0, 0): 2, + (4, 0, 0): 3, + (5, 0, 0): 4, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmArithmeticTest/test_sub.py b/tests/ported_static/vmArithmeticTest/test_sub.py index 2d8d2654766..3a165d3c9af 100644 --- a/tests/ported_static/vmArithmeticTest/test_sub.py +++ b/tests/ported_static/vmArithmeticTest/test_sub.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -187,53 +184,37 @@ def test_sub( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_0: Account(storage={0: 22})}, - }, - { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_1: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 - }, - ), - }, - }, + expect_posts: list[dict] = [ + {contract_0: Account(storage={0: 22})}, { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_2: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE9, # noqa: E501 - }, - ), - }, + contract_1: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 + }, + ), }, { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_3: Account(storage={0: 1})}, + contract_2: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE9, # noqa: E501 + }, + ), }, + {contract_3: Account(storage={0: 1})}, { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_4: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 - }, - ), - }, + contract_4: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 + }, + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 0, (1, 0, 0): 1, (2, 0, 0): 2, (3, 0, 0): 3, (4, 0, 0): 4}[ + d, g, v + ] + ] + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmBitwiseLogicOperation/test_and.py b/tests/ported_static/vmBitwiseLogicOperation/test_and.py index 919c2763837..f0b37afd805 100644 --- a/tests/ported_static/vmBitwiseLogicOperation/test_and.py +++ b/tests/ported_static/vmBitwiseLogicOperation/test_and.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -189,47 +186,31 @@ def test_and( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_0: Account(storage={0: 2})}, - }, + expect_posts: list[dict] = [ + {contract_0: Account(storage={0: 2})}, + {contract_2: Account(storage={0: 1})}, { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={0: 1})}, - }, - { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_3: Account( - storage={ - 0: 0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF, # noqa: E501 - }, - ), - }, - }, - { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_4: Account( - storage={ - 0: 0xEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE, # noqa: E501 - }, - ), - }, + contract_3: Account( + storage={ + 0: 0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF, # noqa: E501 + }, + ), }, { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_1: Account(storage={0: 0})}, + contract_4: Account( + storage={ + 0: 0xEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE, # noqa: E501 + }, + ), }, + {contract_1: Account(storage={0: 0})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 0, (1, 0, 0): 4, (2, 0, 0): 1, (3, 0, 0): 2, (4, 0, 0): 3}[ + d, g, v + ] + ] + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmBitwiseLogicOperation/test_byte.py b/tests/ported_static/vmBitwiseLogicOperation/test_byte.py index 56887a82b99..ed079cbde28 100644 --- a/tests/ported_static/vmBitwiseLogicOperation/test_byte.py +++ b/tests/ported_static/vmBitwiseLogicOperation/test_byte.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -341,107 +338,74 @@ def test_byte( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_0: Account(storage={0: 1})}, - }, - { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_1: Account(storage={0: 2})}, - }, - { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={0: 4})}, - }, - { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_3: Account(storage={0: 8})}, - }, - { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_4: Account(storage={0: 16})}, - }, - { - "indexes": {"data": [5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_5: Account(storage={0: 32})}, - }, + expect_posts: list[dict] = [ + {contract_0: Account(storage={0: 1})}, + {contract_1: Account(storage={0: 2})}, + {contract_2: Account(storage={0: 4})}, + {contract_3: Account(storage={0: 8})}, + {contract_4: Account(storage={0: 16})}, + {contract_5: Account(storage={0: 32})}, + {contract_6: Account(storage={0: 64})}, + {contract_7: Account(storage={0: 128})}, + {contract_8: Account(storage={0: 0})}, + {contract_9: Account(storage={0: 0})}, + {contract_10: Account(storage={1: 172})}, { - "indexes": {"data": [6], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_6: Account(storage={0: 64})}, - }, - { - "indexes": {"data": [7], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_7: Account(storage={0: 128})}, - }, - { - "indexes": {"data": [8], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_8: Account(storage={0: 0})}, - }, - { - "indexes": {"data": [9], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_9: Account(storage={0: 0})}, - }, - { - "indexes": {"data": [10], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_10: Account(storage={1: 172})}, + contract_11: Account( + storage={ + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9, + 10: 10, + 11: 11, + 12: 12, + 13: 13, + 14: 14, + 15: 15, + 16: 16, + 17: 17, + 18: 18, + 19: 19, + 20: 20, + 21: 21, + 22: 22, + 23: 23, + 24: 24, + 25: 25, + 26: 26, + 27: 27, + 28: 28, + 29: 29, + 30: 30, + 31: 31, + }, + ), }, + ] + post = expect_posts[ { - "indexes": {"data": [11], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_11: Account( - storage={ - 0: 0, - 1: 1, - 2: 2, - 3: 3, - 4: 4, - 5: 5, - 6: 6, - 7: 7, - 8: 8, - 9: 9, - 10: 10, - 11: 11, - 12: 12, - 13: 13, - 14: 14, - 15: 15, - 16: 16, - 17: 17, - 18: 18, - 19: 19, - 20: 20, - 21: 21, - 22: 22, - 23: 23, - 24: 24, - 25: 25, - 26: 26, - 27: 27, - 28: 28, - 29: 29, - 30: 30, - 31: 31, - }, - ), - }, - }, + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 2, + (3, 0, 0): 3, + (4, 0, 0): 4, + (5, 0, 0): 5, + (6, 0, 0): 6, + (7, 0, 0): 7, + (8, 0, 0): 8, + (9, 0, 0): 9, + (10, 0, 0): 10, + (11, 0, 0): 11, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(contract_0, left_padding=True), diff --git a/tests/ported_static/vmBitwiseLogicOperation/test_eq.py b/tests/ported_static/vmBitwiseLogicOperation/test_eq.py index 3c20ccd8773..b779f5af2cf 100644 --- a/tests/ported_static/vmBitwiseLogicOperation/test_eq.py +++ b/tests/ported_static/vmBitwiseLogicOperation/test_eq.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -141,25 +138,13 @@ def test_eq( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_0: Account(storage={0: 0})}, - }, - { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_1: Account(storage={0: 1})}, - }, - { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={0: 1})}, - }, + expect_posts: list[dict] = [ + {contract_0: Account(storage={0: 0})}, + {contract_1: Account(storage={0: 1})}, + {contract_2: Account(storage={0: 1})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1, (2, 0, 0): 2}[d, g, v]] + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmBitwiseLogicOperation/test_gt.py b/tests/ported_static/vmBitwiseLogicOperation/test_gt.py index 06e1b39c681..3c8a371fc6e 100644 --- a/tests/ported_static/vmBitwiseLogicOperation/test_gt.py +++ b/tests/ported_static/vmBitwiseLogicOperation/test_gt.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -166,30 +163,16 @@ def test_gt( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_0: Account(storage={0: 1})}, - }, - { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_1: Account(storage={0: 0})}, - }, - { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={0: 1})}, - }, - { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_3: Account(storage={0: 0})}, - }, + expect_posts: list[dict] = [ + {contract_0: Account(storage={0: 1})}, + {contract_1: Account(storage={0: 0})}, + {contract_2: Account(storage={0: 1})}, + {contract_3: Account(storage={0: 0})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 0, (1, 0, 0): 1, (2, 0, 0): 2, (3, 0, 0): 3}[d, g, v] + ] + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmBitwiseLogicOperation/test_iszero.py b/tests/ported_static/vmBitwiseLogicOperation/test_iszero.py index e83fe80b0d8..7e6df4ef4f0 100644 --- a/tests/ported_static/vmBitwiseLogicOperation/test_iszero.py +++ b/tests/ported_static/vmBitwiseLogicOperation/test_iszero.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -137,25 +134,13 @@ def test_iszero( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_0: Account(storage={0: 0})}, - }, - { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_1: Account(storage={0: 1})}, - }, - { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={0: 0})}, - }, + expect_posts: list[dict] = [ + {contract_0: Account(storage={0: 0})}, + {contract_1: Account(storage={0: 1})}, + {contract_2: Account(storage={0: 0})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1, (2, 0, 0): 2}[d, g, v]] + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmBitwiseLogicOperation/test_lt.py b/tests/ported_static/vmBitwiseLogicOperation/test_lt.py index d2be95c3d03..0e4e48cbe45 100644 --- a/tests/ported_static/vmBitwiseLogicOperation/test_lt.py +++ b/tests/ported_static/vmBitwiseLogicOperation/test_lt.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -166,30 +163,16 @@ def test_lt( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_0: Account(storage={0: 0})}, - }, - { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_1: Account(storage={0: 1})}, - }, - { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={0: 0})}, - }, - { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_3: Account(storage={0: 1})}, - }, + expect_posts: list[dict] = [ + {contract_0: Account(storage={0: 0})}, + {contract_1: Account(storage={0: 1})}, + {contract_2: Account(storage={0: 0})}, + {contract_3: Account(storage={0: 1})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 0, (1, 0, 0): 1, (2, 0, 0): 2, (3, 0, 0): 3}[d, g, v] + ] + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmBitwiseLogicOperation/test_not.py b/tests/ported_static/vmBitwiseLogicOperation/test_not.py index 4b4e07d8dd0..4c7121133a6 100644 --- a/tests/ported_static/vmBitwiseLogicOperation/test_not.py +++ b/tests/ported_static/vmBitwiseLogicOperation/test_not.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -210,64 +207,49 @@ def test_not( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 - }, - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_1: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD, # noqa: E501 - }, - ), - }, + contract_0: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 + }, + ), }, { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={0: 0})}, + contract_1: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD, # noqa: E501 + }, + ), }, + {contract_2: Account(storage={0: 0})}, + {contract_3: Account(storage={0: 1})}, { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_3: Account(storage={0: 1})}, + contract_4: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE, # noqa: E501 + }, + ), }, { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_4: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE, # noqa: E501 - }, - ), - }, + contract_5: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 + }, + ), }, + ] + post = expect_posts[ { - "indexes": {"data": [5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_5: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 - }, - ), - }, - }, + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 2, + (3, 0, 0): 3, + (4, 0, 0): 4, + (5, 0, 0): 5, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmBitwiseLogicOperation/test_or.py b/tests/ported_static/vmBitwiseLogicOperation/test_or.py index 7fc19e60d81..ea721476a84 100644 --- a/tests/ported_static/vmBitwiseLogicOperation/test_or.py +++ b/tests/ported_static/vmBitwiseLogicOperation/test_or.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -217,58 +214,43 @@ def test_or( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_0: Account(storage={0: 2})}, - }, + expect_posts: list[dict] = [ + {contract_0: Account(storage={0: 2})}, + {contract_1: Account(storage={0: 3})}, + {contract_2: Account(storage={0: 3})}, { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_1: Account(storage={0: 3})}, - }, - { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={0: 3})}, + contract_3: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 + }, + ), }, { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_3: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 - }, - ), - }, + contract_4: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 + }, + ), }, { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_4: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 - }, - ), - }, + contract_5: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 + }, + ), }, + ] + post = expect_posts[ { - "indexes": {"data": [5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_5: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 - }, - ), - }, - }, + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 2, + (3, 0, 0): 3, + (4, 0, 0): 4, + (5, 0, 0): 5, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmBitwiseLogicOperation/test_sgt.py b/tests/ported_static/vmBitwiseLogicOperation/test_sgt.py index 5164480e359..812973afb18 100644 --- a/tests/ported_static/vmBitwiseLogicOperation/test_sgt.py +++ b/tests/ported_static/vmBitwiseLogicOperation/test_sgt.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -166,30 +163,16 @@ def test_sgt( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_0: Account(storage={0: 0})}, - }, - { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_1: Account(storage={0: 1})}, - }, - { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={0: 0})}, - }, - { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_3: Account(storage={0: 1})}, - }, + expect_posts: list[dict] = [ + {contract_0: Account(storage={0: 0})}, + {contract_1: Account(storage={0: 1})}, + {contract_2: Account(storage={0: 0})}, + {contract_3: Account(storage={0: 1})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 0, (1, 0, 0): 1, (2, 0, 0): 2, (3, 0, 0): 3}[d, g, v] + ] + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmBitwiseLogicOperation/test_slt.py b/tests/ported_static/vmBitwiseLogicOperation/test_slt.py index fc950a2787d..7aab6c68401 100644 --- a/tests/ported_static/vmBitwiseLogicOperation/test_slt.py +++ b/tests/ported_static/vmBitwiseLogicOperation/test_slt.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -166,30 +163,16 @@ def test_slt( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_0: Account(storage={0: 1})}, - }, - { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_1: Account(storage={0: 0})}, - }, - { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={0: 1})}, - }, - { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_3: Account(storage={0: 0})}, - }, + expect_posts: list[dict] = [ + {contract_0: Account(storage={0: 1})}, + {contract_1: Account(storage={0: 0})}, + {contract_2: Account(storage={0: 1})}, + {contract_3: Account(storage={0: 0})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 0, (1, 0, 0): 1, (2, 0, 0): 2, (3, 0, 0): 3}[d, g, v] + ] + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmBitwiseLogicOperation/test_xor.py b/tests/ported_static/vmBitwiseLogicOperation/test_xor.py index b5bdb7b26bf..3d63e87dad4 100644 --- a/tests/ported_static/vmBitwiseLogicOperation/test_xor.py +++ b/tests/ported_static/vmBitwiseLogicOperation/test_xor.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -217,58 +214,43 @@ def test_xor( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_0: Account(storage={0: 0})}, - }, + expect_posts: list[dict] = [ + {contract_0: Account(storage={0: 0})}, + {contract_1: Account(storage={0: 3})}, + {contract_2: Account(storage={0: 2})}, { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_1: Account(storage={0: 3})}, - }, - { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={0: 2})}, + contract_3: Account( + storage={ + 0: 0xFEDCBA9876543210FEDCBA9876543210FEDCBA9876543210FEDCBA9876543210, # noqa: E501 + }, + ), }, { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_3: Account( - storage={ - 0: 0xFEDCBA9876543210FEDCBA9876543210FEDCBA9876543210FEDCBA9876543210, # noqa: E501 - }, - ), - }, + contract_4: Account( + storage={ + 0: 0x1111111111111111111111111111111111111111111111111111111111111111, # noqa: E501 + }, + ), }, { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_4: Account( - storage={ - 0: 0x1111111111111111111111111111111111111111111111111111111111111111, # noqa: E501 - }, - ), - }, + contract_5: Account( + storage={ + 0: 0x1111111111111111111111111111101111111111111111111111111111111111, # noqa: E501 + }, + ), }, + ] + post = expect_posts[ { - "indexes": {"data": [5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_5: Account( - storage={ - 0: 0x1111111111111111111111111111101111111111111111111111111111111111, # noqa: E501 - }, - ), - }, - }, + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 2, + (3, 0, 0): 3, + (4, 0, 0): 4, + (5, 0, 0): 5, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmIOandFlowOperations/test_codecopy.py b/tests/ported_static/vmIOandFlowOperations/test_codecopy.py index bfc509a4799..906f7987e28 100644 --- a/tests/ported_static/vmIOandFlowOperations/test_codecopy.py +++ b/tests/ported_static/vmIOandFlowOperations/test_codecopy.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -291,66 +288,50 @@ def test_codecopy( address=Address(0x0000000000000000000000000000000000001002), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_5: Account( - storage={ - 0: 0x6040600060003960005160005560205160015500000000000000000000000000, # noqa: E501 - 1: 0, - }, - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_5: Account( - storage={ - 0: 0x6110006000600039600051600055602051600155000000000000000000000000, # noqa: E501 - 1: 0, - }, - ), - }, + contract_5: Account( + storage={ + 0: 0x6040600060003960005160005560205160015500000000000000000000000000, # noqa: E501 + 1: 0, + }, + ), }, { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_5: Account(storage={0: 0, 1: 0})}, + contract_5: Account( + storage={ + 0: 0x6110006000600039600051600055602051600155000000000000000000000000, # noqa: E501 + 1: 0, + }, + ), }, + {contract_5: Account(storage={0: 0, 1: 0})}, { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_5: Account( - storage={ - 0: 0x6010600F600E600D600C600B600A600960086007600660056004600360026001, # noqa: E501 - 1: 0x101010101010101010101010101016101005260206000600039604060206020, # noqa: E501 - 2: 0x3960005160005560205160015560405160025500000000000000000000000000, # noqa: E501 - }, - ), - }, + contract_5: Account( + storage={ + 0: 0x6010600F600E600D600C600B600A600960086007600660056004600360026001, # noqa: E501 + 1: 0x101010101010101010101010101016101005260206000600039604060206020, # noqa: E501 + 2: 0x3960005160005560205160015560405160025500000000000000000000000000, # noqa: E501 + }, + ), }, { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_5: Account( - storage={ - 0: 0x3860FF5560FF5460006000396160A76000556160A76001556160A76002556000, # noqa: E501 - 1: 0x5160005560205160015560405160025560605160035560805160045560A05160, # noqa: E501 - 2: 0x5550061DEADFF60FF546000F360AA60BB60CC60DD60EE60FFF4000000000000, # noqa: E501 - 255: 91, - }, - ), - }, + contract_5: Account( + storage={ + 0: 0x3860FF5560FF5460006000396160A76000556160A76001556160A76002556000, # noqa: E501 + 1: 0x5160005560205160015560405160025560605160035560805160045560A05160, # noqa: E501 + 2: 0x5550061DEADFF60FF546000F360AA60BB60CC60DD60EE60FFF4000000000000, # noqa: E501 + 255: 91, + }, + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 0, (1, 0, 0): 2, (2, 0, 0): 1, (3, 0, 0): 3, (4, 0, 0): 4}[ + d, g, v + ] + ] + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmIOandFlowOperations/test_gas.py b/tests/ported_static/vmIOandFlowOperations/test_gas.py index fdfe01710a7..5871bc51bcb 100644 --- a/tests/ported_static/vmIOandFlowOperations/test_gas.py +++ b/tests/ported_static/vmIOandFlowOperations/test_gas.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -118,20 +115,12 @@ def test_gas( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun=Cancun=Cancun"], - "result": {contract_17: Account(storage={0: 2989})}, - }, + expect_posts: list[dict] = [ + {contract_17: Account(storage={0: 2989})}, + {contract_17: Account(storage={0: 24589})}, + ] + post = expect_posts[ { - "indexes": {"data": [2, 6, 7, 8, 16], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_17: Account(storage={0: 24589})}, - }, + (0, 0, 0): 0, + (1, 0, 0): 0, + (2, 0, 0): 1, + (3, 0, 0): 0, + (4, 0, 0): 0, + (5, 0, 0): 0, + (6, 0, 0): 1, + (7, 0, 0): 1, + (8, 0, 0): 1, + (9, 0, 0): 0, + (10, 0, 0): 0, + (11, 0, 0): 0, + (12, 0, 0): 0, + (13, 0, 0): 0, + (14, 0, 0): 0, + (15, 0, 0): 0, + (16, 0, 0): 1, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmIOandFlowOperations/test_jump_to_push.py b/tests/ported_static/vmIOandFlowOperations/test_jump_to_push.py index f3168e3b044..f5de609cd65 100644 --- a/tests/ported_static/vmIOandFlowOperations/test_jump_to_push.py +++ b/tests/ported_static/vmIOandFlowOperations/test_jump_to_push.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -1619,108 +1616,93 @@ def test_jump_to_push( address=Address(0x000000000000000000000000000000000000012C), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": { - "data": [ - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - ], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": {contract_95: Account(storage={0: 0})}, - }, + expect_posts: list[dict] = [ + {contract_95: Account(storage={0: 0})}, + {contract_95: Account(storage={0: 1})}, + ] + post = expect_posts[ { - "indexes": { - "data": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - ], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": {contract_95: Account(storage={0: 1})}, - }, + (0, 0, 0): 1, + (1, 0, 0): 1, + (2, 0, 0): 1, + (3, 0, 0): 1, + (4, 0, 0): 1, + (5, 0, 0): 1, + (6, 0, 0): 1, + (7, 0, 0): 1, + (8, 0, 0): 1, + (9, 0, 0): 1, + (10, 0, 0): 1, + (11, 0, 0): 1, + (12, 0, 0): 1, + (13, 0, 0): 1, + (14, 0, 0): 1, + (15, 0, 0): 1, + (16, 0, 0): 1, + (17, 0, 0): 1, + (18, 0, 0): 1, + (19, 0, 0): 1, + (20, 0, 0): 1, + (21, 0, 0): 1, + (22, 0, 0): 1, + (23, 0, 0): 1, + (24, 0, 0): 1, + (25, 0, 0): 1, + (26, 0, 0): 0, + (27, 0, 0): 0, + (28, 0, 0): 0, + (29, 0, 0): 0, + (30, 0, 0): 0, + (31, 0, 0): 0, + (32, 0, 0): 0, + (33, 0, 0): 0, + (34, 0, 0): 0, + (35, 0, 0): 0, + (36, 0, 0): 0, + (37, 0, 0): 0, + (38, 0, 0): 0, + (39, 0, 0): 0, + (40, 0, 0): 0, + (41, 0, 0): 0, + (42, 0, 0): 0, + (43, 0, 0): 0, + (44, 0, 0): 0, + (45, 0, 0): 0, + (46, 0, 0): 0, + (47, 0, 0): 0, + (48, 0, 0): 0, + (49, 0, 0): 0, + (50, 0, 0): 0, + (51, 0, 0): 0, + (52, 0, 0): 0, + (53, 0, 0): 0, + (54, 0, 0): 0, + (55, 0, 0): 0, + (56, 0, 0): 0, + (57, 0, 0): 0, + (58, 0, 0): 0, + (59, 0, 0): 0, + (60, 0, 0): 0, + (61, 0, 0): 0, + (62, 0, 0): 0, + (63, 0, 0): 0, + (64, 0, 0): 0, + (65, 0, 0): 0, + (66, 0, 0): 0, + (67, 0, 0): 0, + (68, 0, 0): 0, + (69, 0, 0): 0, + (70, 0, 0): 0, + (71, 0, 0): 0, + (72, 0, 0): 0, + (73, 0, 0): 0, + (74, 0, 0): 0, + (75, 0, 0): 0, + (76, 0, 0): 0, + (77, 0, 0): 0, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(contract_0, left_padding=True), diff --git a/tests/ported_static/vmIOandFlowOperations/test_jumpi.py b/tests/ported_static/vmIOandFlowOperations/test_jumpi.py index c2da7dde412..61d2fbc57e3 100644 --- a/tests/ported_static/vmIOandFlowOperations/test_jumpi.py +++ b/tests/ported_static/vmIOandFlowOperations/test_jumpi.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -582,28 +579,41 @@ def test_jumpi( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": { - "data": [0, 1, 5, 6, 8, 9, 13, 14, 15, 16, 17, 18, 20, 22], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": {contract_26: Account(storage={0: 2989})}, - }, + expect_posts: list[dict] = [ + {contract_26: Account(storage={0: 2989})}, + {contract_26: Account(storage={0: 24589})}, + ] + post = expect_posts[ { - "indexes": { - "data": [2, 3, 4, 7, 10, 11, 12, 19, 21, 23, 24, 25], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": {contract_26: Account(storage={0: 24589})}, - }, + (0, 0, 0): 0, + (1, 0, 0): 0, + (2, 0, 0): 1, + (3, 0, 0): 1, + (4, 0, 0): 1, + (5, 0, 0): 0, + (6, 0, 0): 0, + (7, 0, 0): 1, + (8, 0, 0): 0, + (9, 0, 0): 0, + (10, 0, 0): 1, + (11, 0, 0): 1, + (12, 0, 0): 1, + (13, 0, 0): 0, + (14, 0, 0): 0, + (15, 0, 0): 0, + (16, 0, 0): 0, + (17, 0, 0): 0, + (18, 0, 0): 0, + (19, 0, 0): 1, + (20, 0, 0): 0, + (21, 0, 0): 1, + (22, 0, 0): 0, + (23, 0, 0): 1, + (24, 0, 0): 1, + (25, 0, 0): 1, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(contract_0, left_padding=True), diff --git a/tests/ported_static/vmIOandFlowOperations/test_loops_conditionals.py b/tests/ported_static/vmIOandFlowOperations/test_loops_conditionals.py index ec091a54e3d..6854f3d7b8d 100644 --- a/tests/ported_static/vmIOandFlowOperations/test_loops_conditionals.py +++ b/tests/ported_static/vmIOandFlowOperations/test_loops_conditionals.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -379,35 +376,29 @@ def test_loops_conditionals( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0, 2, 4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_11: Account(storage={0: 24589})}, - }, - { - "indexes": {"data": [1, 3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_11: Account(storage={0: 2989})}, - }, - { - "indexes": {"data": [5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_11: Account(storage={0: 24743})}, - }, - { - "indexes": {"data": [8, 6, 7], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_11: Account(storage={0: 0, 1: 0x10000})}, - }, + expect_posts: list[dict] = [ + {contract_11: Account(storage={0: 24589})}, + {contract_11: Account(storage={0: 2989})}, + {contract_11: Account(storage={0: 24743})}, + {contract_11: Account(storage={0: 0, 1: 0x10000})}, + {contract_11: Account(storage={0: 55})}, + ] + post = expect_posts[ { - "indexes": {"data": [9, 10], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_11: Account(storage={0: 55})}, - }, + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 0, + (3, 0, 0): 1, + (4, 0, 0): 0, + (5, 0, 0): 2, + (6, 0, 0): 3, + (7, 0, 0): 3, + (8, 0, 0): 3, + (9, 0, 0): 4, + (10, 0, 0): 4, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmIOandFlowOperations/test_mload.py b/tests/ported_static/vmIOandFlowOperations/test_mload.py index cf11bf25816..1b0b4478007 100644 --- a/tests/ported_static/vmIOandFlowOperations/test_mload.py +++ b/tests/ported_static/vmIOandFlowOperations/test_mload.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -142,26 +139,18 @@ def test_mload( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_3: Account( - storage={ - 0: 0x111122223333444455556666777788889999AAAABBBBCCCCDDDDEEEEFFFF, # noqa: E501 - }, - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": [1, 2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_3: Account(storage={0: 2989})}, + contract_3: Account( + storage={ + 0: 0x111122223333444455556666777788889999AAAABBBBCCCCDDDDEEEEFFFF, # noqa: E501 + }, + ), }, + {contract_3: Account(storage={0: 2989})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1, (2, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmIOandFlowOperations/test_msize.py b/tests/ported_static/vmIOandFlowOperations/test_msize.py index 5cc3faad9f2..2079d91cf08 100644 --- a/tests/ported_static/vmIOandFlowOperations/test_msize.py +++ b/tests/ported_static/vmIOandFlowOperations/test_msize.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -227,35 +224,24 @@ def test_msize( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0, 1], "gas": -1, "value": -1}, - "network": [">=Cancun=Cancun=Cancun=Cancun=Cancun=Cancun"], - "result": { - contract_5: Account( - storage={ - 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 - }, - ), - }, - }, - { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_5: Account(storage={0: 1})}, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_5: Account(storage={0: 0})}, - }, - { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_5: Account(storage={0: 255})}, + contract_5: Account( + storage={ + 0: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, # noqa: E501 + }, + ), }, + {contract_5: Account(storage={0: 1})}, + {contract_5: Account(storage={0: 0})}, + {contract_5: Account(storage={0: 255})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 0, (1, 0, 0): 1, (2, 0, 0): 0, (3, 0, 0): 2, (4, 0, 0): 3}[ + d, g, v + ] + ] + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmIOandFlowOperations/test_mstore8.py b/tests/ported_static/vmIOandFlowOperations/test_mstore8.py index 23cc67ce2c1..f2fe8f14909 100644 --- a/tests/ported_static/vmIOandFlowOperations/test_mstore8.py +++ b/tests/ported_static/vmIOandFlowOperations/test_mstore8.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -146,32 +143,24 @@ def test_mstore8( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ + expect_posts: list[dict] = [ { - "indexes": {"data": [0, 2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_3: Account( - storage={ - 0: 0xFF00000000000000000000000000000000000000000000000000000000000000, # noqa: E501 - }, - ), - }, + contract_3: Account( + storage={ + 0: 0xFF00000000000000000000000000000000000000000000000000000000000000, # noqa: E501 + }, + ), }, { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_3: Account( - storage={ - 0: 0xFFEE0000000000000000000000000000000000000000000000000000000000, # noqa: E501 - }, - ), - }, + contract_3: Account( + storage={ + 0: 0xFFEE0000000000000000000000000000000000000000000000000000000000, # noqa: E501 + }, + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1, (2, 0, 0): 0}[d, g, v]] + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmIOandFlowOperations/test_pc.py b/tests/ported_static/vmIOandFlowOperations/test_pc.py index fc3df94d285..092fdbdacc8 100644 --- a/tests/ported_static/vmIOandFlowOperations/test_pc.py +++ b/tests/ported_static/vmIOandFlowOperations/test_pc.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -115,20 +112,12 @@ def test_pc( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={0: 0})}, - }, - { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={0: 255, 1: 5})}, - }, + expect_posts: list[dict] = [ + {contract_2: Account(storage={0: 0})}, + {contract_2: Account(storage={0: 255, 1: 5})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmIOandFlowOperations/test_pop.py b/tests/ported_static/vmIOandFlowOperations/test_pop.py index 9e49f6e31bc..c1f9a871406 100644 --- a/tests/ported_static/vmIOandFlowOperations/test_pop.py +++ b/tests/ported_static/vmIOandFlowOperations/test_pop.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -107,20 +104,12 @@ def test_pop( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={3: 2})}, - }, - { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={4: 0})}, - }, + expect_posts: list[dict] = [ + {contract_2: Account(storage={3: 2})}, + {contract_2: Account(storage={4: 0})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1}[d, g, v]] + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmIOandFlowOperations/test_return.py b/tests/ported_static/vmIOandFlowOperations/test_return.py index 17e39f195f8..ceecc47ceee 100644 --- a/tests/ported_static/vmIOandFlowOperations/test_return.py +++ b/tests/ported_static/vmIOandFlowOperations/test_return.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -215,46 +212,34 @@ def test_return( address=Address(0x0000000000000000000000000000000000001002), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0, 2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_5: Account( - storage={ - 0: 0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF, # noqa: E501 - 1: 0, - 255: 24589, - }, - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_5: Account(storage={255: 2989})}, + contract_5: Account( + storage={ + 0: 0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF, # noqa: E501 + 1: 0, + 255: 24589, + }, + ), }, + {contract_5: Account(storage={255: 2989})}, { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_5: Account( - storage={ - 0: 0xABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0000000000, # noqa: E501 - 1: 0, - 255: 24589, - }, - ), - }, - }, - { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_5: Account(storage={0: 39, 255: 2989})}, + contract_5: Account( + storage={ + 0: 0xABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0000000000, # noqa: E501 + 1: 0, + 255: 24589, + }, + ), }, + {contract_5: Account(storage={0: 39, 255: 2989})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 0, (1, 0, 0): 1, (2, 0, 0): 0, (3, 0, 0): 2, (4, 0, 0): 3}[ + d, g, v + ] + ] + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmIOandFlowOperations/test_sstore_sload.py b/tests/ported_static/vmIOandFlowOperations/test_sstore_sload.py index 21b82a91fe5..ca95439e824 100644 --- a/tests/ported_static/vmIOandFlowOperations/test_sstore_sload.py +++ b/tests/ported_static/vmIOandFlowOperations/test_sstore_sload.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -148,31 +145,17 @@ def test_sstore_sload( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_3: Account(storage={0: 255, 10: 238, 20: 255}) - }, - }, + expect_posts: list[dict] = [ + {contract_3: Account(storage={0: 255, 10: 238, 20: 255})}, + {contract_3: Account(storage={0: 255, 10: 238})}, { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_3: Account(storage={0: 255, 10: 238})}, - }, - { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_3: Account( - storage={0: 255, 1: 238, 2: 221, 10: 238, 20: 221} - ), - }, + contract_3: Account( + storage={0: 255, 1: 238, 2: 221, 10: 238, 20: 221} + ), }, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1, (2, 0, 0): 2}[d, g, v]] + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmLogTest/test_log0.py b/tests/ported_static/vmLogTest/test_log0.py index d743762ab28..524e79f2d89 100644 --- a/tests/ported_static/vmLogTest/test_log0.py +++ b/tests/ported_static/vmLogTest/test_log0.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -282,20 +279,23 @@ def test_log0( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0, 3, 4, 5, 6, 7], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_8: Account(storage={0: 24589})}, - }, + expect_posts: list[dict] = [ + {contract_8: Account(storage={0: 24589})}, + {contract_8: Account(storage={0: 2989})}, + ] + post = expect_posts[ { - "indexes": {"data": [1, 2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_8: Account(storage={0: 2989})}, - }, + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 1, + (3, 0, 0): 0, + (4, 0, 0): 0, + (5, 0, 0): 0, + (6, 0, 0): 0, + (7, 0, 0): 0, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmLogTest/test_log1.py b/tests/ported_static/vmLogTest/test_log1.py index b4309d454e6..12199ebd588 100644 --- a/tests/ported_static/vmLogTest/test_log1.py +++ b/tests/ported_static/vmLogTest/test_log1.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -306,20 +303,24 @@ def test_log1( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0, 3, 4, 5, 6, 7, 8], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_9: Account(storage={0: 24589})}, - }, + expect_posts: list[dict] = [ + {contract_9: Account(storage={0: 24589})}, + {contract_9: Account(storage={0: 2989})}, + ] + post = expect_posts[ { - "indexes": {"data": [1, 2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_9: Account(storage={0: 2989})}, - }, + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 1, + (3, 0, 0): 0, + (4, 0, 0): 0, + (5, 0, 0): 0, + (6, 0, 0): 0, + (7, 0, 0): 0, + (8, 0, 0): 0, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmLogTest/test_log2.py b/tests/ported_static/vmLogTest/test_log2.py index 95fa656fe44..002cc093dd0 100644 --- a/tests/ported_static/vmLogTest/test_log2.py +++ b/tests/ported_static/vmLogTest/test_log2.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -307,20 +304,24 @@ def test_log2( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0, 3, 4, 5, 6, 7, 8], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_9: Account(storage={0: 24589})}, - }, + expect_posts: list[dict] = [ + {contract_9: Account(storage={0: 24589})}, + {contract_9: Account(storage={0: 2989})}, + ] + post = expect_posts[ { - "indexes": {"data": [1, 2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_9: Account(storage={0: 2989})}, - }, + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 1, + (3, 0, 0): 0, + (4, 0, 0): 0, + (5, 0, 0): 0, + (6, 0, 0): 0, + (7, 0, 0): 0, + (8, 0, 0): 0, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmLogTest/test_log3.py b/tests/ported_static/vmLogTest/test_log3.py index a763ee5fd27..6452825388e 100644 --- a/tests/ported_static/vmLogTest/test_log3.py +++ b/tests/ported_static/vmLogTest/test_log3.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -351,24 +348,25 @@ def test_log3( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": { - "data": [0, 3, 4, 5, 6, 7, 8, 9], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": {contract_10: Account(storage={0: 24589})}, - }, + expect_posts: list[dict] = [ + {contract_10: Account(storage={0: 24589})}, + {contract_10: Account(storage={0: 2989})}, + ] + post = expect_posts[ { - "indexes": {"data": [1, 2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_10: Account(storage={0: 2989})}, - }, + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 1, + (3, 0, 0): 0, + (4, 0, 0): 0, + (5, 0, 0): 0, + (6, 0, 0): 0, + (7, 0, 0): 0, + (8, 0, 0): 0, + (9, 0, 0): 0, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmLogTest/test_log4.py b/tests/ported_static/vmLogTest/test_log4.py index 3266265017a..1809451f863 100644 --- a/tests/ported_static/vmLogTest/test_log4.py +++ b/tests/ported_static/vmLogTest/test_log4.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -397,24 +394,25 @@ def test_log4( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": { - "data": [0, 3, 4, 5, 6, 7, 8, 9], - "gas": -1, - "value": -1, - }, - "network": [">=Cancun"], - "result": {contract_10: Account(storage={0: 24589})}, - }, + expect_posts: list[dict] = [ + {contract_10: Account(storage={0: 24589})}, + {contract_10: Account(storage={0: 2989})}, + ] + post = expect_posts[ { - "indexes": {"data": [1, 2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_10: Account(storage={0: 2989})}, - }, + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 1, + (3, 0, 0): 0, + (4, 0, 0): 0, + (5, 0, 0): 0, + (6, 0, 0): 0, + (7, 0, 0): 0, + (8, 0, 0): 0, + (9, 0, 0): 0, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmTests/test_block_info.py b/tests/ported_static/vmTests/test_block_info.py index 57fc33cc47d..7752d0eb3b4 100644 --- a/tests/ported_static/vmTests/test_block_info.py +++ b/tests/ported_static/vmTests/test_block_info.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -163,35 +160,19 @@ def test_block_info( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_0: Account(storage={0: coinbase})}, - }, - { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_1: Account(storage={0: 0x20000})}, - }, - { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={0: 0x5F5E100})}, - }, - { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_3: Account(storage={0: 1})}, - }, - { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_4: Account(storage={0: 1000})}, - }, + expect_posts: list[dict] = [ + {contract_0: Account(storage={0: coinbase})}, + {contract_1: Account(storage={0: 0x20000})}, + {contract_2: Account(storage={0: 0x5F5E100})}, + {contract_3: Account(storage={0: 1})}, + {contract_4: Account(storage={0: 1000})}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[ + {(0, 0, 0): 0, (1, 0, 0): 1, (2, 0, 0): 2, (3, 0, 0): 3, (4, 0, 0): 4}[ + d, g, v + ] + ] + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmTests/test_env_info.py b/tests/ported_static/vmTests/test_env_info.py index 67c2e62f6d6..3e49352e2ab 100644 --- a/tests/ported_static/vmTests/test_env_info.py +++ b/tests/ported_static/vmTests/test_env_info.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -271,66 +268,39 @@ def test_env_info( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_0: Account(storage={0: contract_0})}, - }, - { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_1: Account( - storage={ - 0: 0x6007600060003900000000000000000000000000000000000000000000000000, # noqa: E501 - }, - ), - }, - }, - { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_2: Account(storage={0: 0})}, - }, - { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_3: Account(storage={0: 0})}, - }, - { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_4: Account(storage={0: contract_10})}, - }, - { - "indexes": {"data": [5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_5: Account(storage={0: 16})}, - }, - { - "indexes": {"data": [6], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_6: Account(storage={0: 5})}, - }, + expect_posts: list[dict] = [ + {contract_0: Account(storage={0: contract_0})}, { - "indexes": {"data": [7], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_7: Account(storage={0: 4660})}, - }, - { - "indexes": {"data": [8], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_8: Account(storage={0: sender})}, + contract_1: Account( + storage={ + 0: 0x6007600060003900000000000000000000000000000000000000000000000000, # noqa: E501 + }, + ), }, + {contract_2: Account(storage={0: 0})}, + {contract_3: Account(storage={0: 0})}, + {contract_4: Account(storage={0: contract_10})}, + {contract_5: Account(storage={0: 16})}, + {contract_6: Account(storage={0: 5})}, + {contract_7: Account(storage={0: 4660})}, + {contract_8: Account(storage={0: sender})}, + {contract_9: Account(storage={0: 0})}, + ] + post = expect_posts[ { - "indexes": {"data": [9], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_9: Account(storage={0: 0})}, - }, + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 2, + (3, 0, 0): 3, + (4, 0, 0): 4, + (5, 0, 0): 5, + (6, 0, 0): 6, + (7, 0, 0): 7, + (8, 0, 0): 8, + (9, 0, 0): 9, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmTests/test_random.py b/tests/ported_static/vmTests/test_random.py index 5a64236ce99..3e36bce4300 100644 --- a/tests/ported_static/vmTests/test_random.py +++ b/tests/ported_static/vmTests/test_random.py @@ -17,9 +17,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -177,40 +174,8 @@ def test_random( address=Address(0xA83DB56C7CE68C06129B80C7BE0D0F5E0869D536), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {sender: Account(nonce=1)}, - }, - { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {sender: Account(nonce=1)}, - }, - { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {sender: Account(nonce=1)}, - }, - { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {sender: Account(nonce=1)}, - }, - { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {sender: Account(nonce=1)}, - }, - { - "indexes": {"data": [5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {sender: Account(nonce=1)}, - }, - ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = {sender: Account(nonce=1)} + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmTests/test_sha3.py b/tests/ported_static/vmTests/test_sha3.py index a3805b31105..3c3c1362c61 100644 --- a/tests/ported_static/vmTests/test_sha3.py +++ b/tests/ported_static/vmTests/test_sha3.py @@ -18,9 +18,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -403,167 +400,119 @@ def test_sha3( address=Address(0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC), # noqa: E501 ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_0: Account( - storage={ - 0: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - }, - ), - }, - }, - { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_1: Account( - storage={ - 0: 0xC41589E7559804EA4A2080DAD19D876A024CCB05117835447D72CE08C1D020EC, # noqa: E501 - }, - ), - }, - }, - { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_2: Account( - storage={ - 0: 0x6BD2DD6BD408CBEE33429358BF24FDC64612FBF8B1B4DB604518F40FFD34B607, # noqa: E501 - }, - ), - }, - }, - { - "indexes": {"data": [3], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_3: Account( - storage={ - 0: 0xBE6F1B42B34644F918560A07F959D23E532DEA5338E4B9F63DB0CAEB608018FA, # noqa: E501 - }, - ), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": [4], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_4: Account(storage={0: 0})}, + contract_0: Account( + storage={ + 0: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 + }, + ), }, { - "indexes": {"data": [5], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_5: Account(storage={0: 0})}, + contract_1: Account( + storage={ + 0: 0xC41589E7559804EA4A2080DAD19D876A024CCB05117835447D72CE08C1D020EC, # noqa: E501 + }, + ), }, { - "indexes": {"data": [6], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_6: Account(storage={0: 0})}, + contract_2: Account( + storage={ + 0: 0x6BD2DD6BD408CBEE33429358BF24FDC64612FBF8B1B4DB604518F40FFD34B607, # noqa: E501 + }, + ), }, { - "indexes": {"data": [7], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_7: Account(storage={0: 0})}, + contract_3: Account( + storage={ + 0: 0xBE6F1B42B34644F918560A07F959D23E532DEA5338E4B9F63DB0CAEB608018FA, # noqa: E501 + }, + ), }, + {contract_4: Account(storage={0: 0})}, + {contract_5: Account(storage={0: 0})}, + {contract_6: Account(storage={0: 0})}, + {contract_7: Account(storage={0: 0})}, + {contract_8: Account(storage={0: 0})}, { - "indexes": {"data": [8], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_8: Account(storage={0: 0})}, + contract_9: Account( + storage={ + 0: 0xBC36789E7A1E281436464229828F817D6612F7B477D66591FF96A9E064BCC98A, # noqa: E501 + }, + ), }, { - "indexes": {"data": [9], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_9: Account( - storage={ - 0: 0xBC36789E7A1E281436464229828F817D6612F7B477D66591FF96A9E064BCC98A, # noqa: E501 - }, - ), - }, + contract_10: Account( + storage={ + 0: 0xBC36789E7A1E281436464229828F817D6612F7B477D66591FF96A9E064BCC98A, # noqa: E501 + }, + ), }, { - "indexes": {"data": [10], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_10: Account( - storage={ - 0: 0xBC36789E7A1E281436464229828F817D6612F7B477D66591FF96A9E064BCC98A, # noqa: E501 - }, - ), - }, + contract_11: Account( + storage={ + 0: 0xBC36789E7A1E281436464229828F817D6612F7B477D66591FF96A9E064BCC98A, # noqa: E501 + }, + ), }, { - "indexes": {"data": [11], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_11: Account( - storage={ - 0: 0xBC36789E7A1E281436464229828F817D6612F7B477D66591FF96A9E064BCC98A, # noqa: E501 - }, - ), - }, + contract_12: Account( + storage={ + 0: 0xBC36789E7A1E281436464229828F817D6612F7B477D66591FF96A9E064BCC98A, # noqa: E501 + }, + ), }, { - "indexes": {"data": [12], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_12: Account( - storage={ - 0: 0xBC36789E7A1E281436464229828F817D6612F7B477D66591FF96A9E064BCC98A, # noqa: E501 - }, - ), - }, + contract_13: Account( + storage={ + 0: 0xBC36789E7A1E281436464229828F817D6612F7B477D66591FF96A9E064BCC98A, # noqa: E501 + }, + ), }, { - "indexes": {"data": [13], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_13: Account( - storage={ - 0: 0xBC36789E7A1E281436464229828F817D6612F7B477D66591FF96A9E064BCC98A, # noqa: E501 - }, - ), - }, + contract_14: Account( + storage={ + 0: 0xBC36789E7A1E281436464229828F817D6612F7B477D66591FF96A9E064BCC98A, # noqa: E501 + }, + ), }, { - "indexes": {"data": [15], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_14: Account( - storage={ - 0: 0xBC36789E7A1E281436464229828F817D6612F7B477D66591FF96A9E064BCC98A, # noqa: E501 - }, - ), - }, + contract_15: Account( + storage={ + 0: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 + }, + ), }, { - "indexes": {"data": [16], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_15: Account( - storage={ - 0: 0xC5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470, # noqa: E501 - }, - ), - }, + contract_16: Account( + storage={ + 0: 0x290DECD9548B62A8D60345A988386FC84BA6BC95484008F6362F93160EF3E563, # noqa: E501 + }, + ), }, + ] + post = expect_posts[ { - "indexes": {"data": [14], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - contract_16: Account( - storage={ - 0: 0x290DECD9548B62A8D60345A988386FC84BA6BC95484008F6362F93160EF3E563, # noqa: E501 - }, - ), - }, - }, + (0, 0, 0): 0, + (1, 0, 0): 1, + (2, 0, 0): 2, + (3, 0, 0): 3, + (4, 0, 0): 4, + (5, 0, 0): 5, + (6, 0, 0): 6, + (7, 0, 0): 7, + (8, 0, 0): 8, + (9, 0, 0): 9, + (10, 0, 0): 10, + (11, 0, 0): 11, + (12, 0, 0): 12, + (13, 0, 0): 13, + (14, 0, 0): 16, + (15, 0, 0): 14, + (16, 0, 0): 15, + }[d, g, v] ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + _exc = None tx_data = [ Bytes("693c6139") + Hash(0x0), diff --git a/tests/ported_static/vmTests/test_suicide.py b/tests/ported_static/vmTests/test_suicide.py index c562b182d0d..26b868c1a78 100644 --- a/tests/ported_static/vmTests/test_suicide.py +++ b/tests/ported_static/vmTests/test_suicide.py @@ -30,9 +30,6 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -157,32 +154,20 @@ def test_suicide( 0x5AF31075D9DE - 10 * cold_account_access_delta - 10 * intrinsic_delta ) - expect_entries_: list[dict] = [ - { - "indexes": {"data": [0], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - sender: Account(balance=caller_balance), - contract_3: Account(balance=0xFF100000000000), - }, - }, + expect_posts: list[dict] = [ { - "indexes": {"data": [1], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": { - Address(0x000000000000000000000000000000000000DEAD): Account( - balance=0x100000000000 - ), - }, + sender: Account(balance=caller_balance), + contract_3: Account(balance=0xFF100000000000), }, { - "indexes": {"data": [2], "gas": -1, "value": -1}, - "network": [">=Cancun"], - "result": {contract_3: Account(balance=0x100000000000)}, + Address(0x000000000000000000000000000000000000DEAD): Account( + balance=0x100000000000 + ), }, + {contract_3: Account(balance=0x100000000000)}, ] - - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) + post = expect_posts[{(0, 0, 0): 0, (1, 0, 0): 1, (2, 0, 0): 2}[d, g, v]] + _exc = None tx_data = [ Bytes("693c6139") + Hash(contract_0, left_padding=True),