From b68a53250a3c4c0b816fec12f38bb4f0c38b7518 Mon Sep 17 00:00:00 2001 From: felipe Date: Thu, 29 Jan 2026 08:56:10 -0700 Subject: [PATCH 1/3] feat(test-fill): speed up filling (#2079) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(test-fill): Build index incrementally, not at the end of fill * perf(test): defer index model validation * perf(tests): O(n²) to O(n) trie-building approach for perf * perf(test-fill): Use --no-html; releases don't publish these (needless overhead) * refactor: cleanup; add more hasher compat tests * refactor(perf): validate at IndexFile once, not at every single file * feat(perf): distribute slow-marked tests early to runners; avoid long tail - mark more slow tests * refactor: changes from comments on PR #2079 * chore(ci): show the slowest 50 tests on every py3 run * refactor(perf): pre-serialize fixture JSON while workers parallelize * refactor(perf): write partial JSON fixture files + merge at end - xdist workers were writing to the same fixture JSON file causing O(n²) work... each worker had to read, parse, and rewrite all previous entries. - now workers write to their own partial JSONL file (append-only, O(1)) - test_blob_txs.partial.gw0.jsonl - test_blob_txs.partial.gw1.jsonl - etc. .. and at session end, ``merge_partial_fixture_files()`` combines all partials into the final JSON file Test teardown on some tests dropped from ~80s to ~1s * fix: remove pre-serialization small win to help pypy runs --- .github/configs/feature.yaml | 14 +- .../src/execution_testing/cli/gen_index.py | 74 +++ .../src/execution_testing/cli/hasher.py | 105 ++++- .../pytest_commands/plugins/filler/filler.py | 37 +- .../cli/tests/test_hasher.py | 431 ++++++++++++++++- .../execution_testing/fixtures/__init__.py | 7 +- .../execution_testing/fixtures/collector.py | 159 ++++++- .../src/execution_testing/fixtures/consume.py | 4 +- .../src/execution_testing/fixtures/file.py | 8 +- .../fixtures/tests/test_collector.py | 435 ++++++++++++++++++ .../test_excess_blob_gas_fork_transition.py | 1 + tests/frontier/opcodes/test_blockhash.py | 1 + .../test_blob_reserve_price_with_bpo.py | 1 + ...blob_reserve_price_with_bpo_transitions.py | 1 + .../prague/eip6110_deposits/test_deposits.py | 1 + .../ContractCreationSpamFiller.json | 3 + .../Return50000_2Filler.json | 3 + .../static_Return50000_2Filler.json | 3 + tox.ini | 2 + 19 files changed, 1264 insertions(+), 26 deletions(-) create mode 100644 packages/testing/src/execution_testing/fixtures/tests/test_collector.py diff --git a/.github/configs/feature.yaml b/.github/configs/feature.yaml index b9404e5d59..17ac97dce5 100644 --- a/.github/configs/feature.yaml +++ b/.github/configs/feature.yaml @@ -1,27 +1,27 @@ # Unless filling for special features, all features should fill for previous forks (starting from Frontier) too stable: evm-type: stable - fill-params: --until=Prague --fill-static-tests --ignore=tests/static/state_tests/stQuadraticComplexityTest + fill-params: --no-html --until=Prague --fill-static-tests --ignore=tests/static/state_tests/stQuadraticComplexityTest develop: - evm-type: develop - fill-params: --until=BPO4 --fill-static-tests --ignore=tests/static/state_tests/stQuadraticComplexityTest + evm-type: develop + fill-params: --no-html --until=BPO4 --fill-static-tests --ignore=tests/static/state_tests/stQuadraticComplexityTest benchmark: evm-type: benchmark - fill-params: --fork=Prague --gas-benchmark-values 1,5,10,30,60,100,150 -m benchmark ./tests/benchmark + fill-params: --no-html --fork=Prague --gas-benchmark-values 1,5,10,30,60,100,150 -m benchmark ./tests/benchmark benchmark_develop: evm-type: benchmark - fill-params: --fork=Osaka --gas-benchmark-values 1,5,10,30,60,100,150 -m "benchmark" ./tests/benchmark + fill-params: --no-html --fork=Osaka --gas-benchmark-values 1,5,10,30,60,100,150 -m "benchmark" ./tests/benchmark feature_only: true benchmark_fast: evm-type: benchmark - fill-params: --fork=Prague --gas-benchmark-values 100 -m "benchmark" ./tests/benchmark + fill-params: --no-html --fork=Prague --gas-benchmark-values 100 -m "benchmark" ./tests/benchmark feature_only: true bal: evm-type: develop - fill-params: --fork=Amsterdam --fill-static-tests + fill-params: --no-html --fork=Amsterdam --fill-static-tests feature_only: true diff --git a/packages/testing/src/execution_testing/cli/gen_index.py b/packages/testing/src/execution_testing/cli/gen_index.py index 1e4af37cf1..3a95688d5e 100644 --- a/packages/testing/src/execution_testing/cli/gen_index.py +++ b/packages/testing/src/execution_testing/cli/gen_index.py @@ -226,5 +226,79 @@ def generate_fixtures_index( f.write(index.model_dump_json(exclude_none=False, indent=2)) +def merge_partial_indexes(output_dir: Path, quiet_mode: bool = False) -> None: + """ + Merge partial index files from all workers into final index.json. + + This is called by pytest_sessionfinish on the master process after all + workers have finished and written their partial indexes. + + Partial indexes use JSONL format (one JSON object per line) for efficient + append-only writes during fill. Entries are validated with Pydantic here. + + Args: + output_dir: The fixture output directory. + quiet_mode: If True, don't print status messages. + + """ + meta_dir = output_dir / ".meta" + partial_files = list(meta_dir.glob("partial_index*.jsonl")) + + if not partial_files: + raise Exception("No partial indexes found.") + + # Merge all partial indexes (JSONL format: one entry per line) + # Read as raw dicts — the data was already validated when collected + # from live Pydantic fixture objects in add_fixture(). + all_raw_entries: list[dict] = [] + all_forks: set = set() + all_formats: set = set() + + for partial_file in partial_files: + with open(partial_file) as f: + for line in f: + line = line.strip() + if not line: + continue + entry_data = json.loads(line) + all_raw_entries.append(entry_data) + # Collect forks and formats from raw strings + if entry_data.get("fork"): + all_forks.add(entry_data["fork"]) + if entry_data.get("format"): + all_formats.add(entry_data["format"]) + + # Compute root hash from raw dicts (no Pydantic needed) + root_hash = HashableItem.from_raw_entries(all_raw_entries).hash() + + # Build final index — Pydantic validates the entire structure once + # via model_validate(), not 96k individual model_validate() calls. + index = IndexFile.model_validate( + { + "test_cases": all_raw_entries, + "root_hash": HexNumber(root_hash), + "created_at": datetime.datetime.now(), + "test_count": len(all_raw_entries), + "forks": list(all_forks), + "fixture_formats": list(all_formats), + } + ) + + # Write final index + index_path = meta_dir / "index.json" + index_path.parent.mkdir(parents=True, exist_ok=True) + index_path.write_text(index.model_dump_json(exclude_none=True, indent=2)) + + if not quiet_mode: + rich.print( + f"[green]Merged {len(partial_files)} partial indexes " + f"({len(all_raw_entries)} test cases) into {index_path}[/]" + ) + + # Cleanup partial files + for partial_file in partial_files: + partial_file.unlink() + + if __name__ == "__main__": generate_fixtures_index_cli() diff --git a/packages/testing/src/execution_testing/cli/hasher.py b/packages/testing/src/execution_testing/cli/hasher.py index 5b13e229b1..5bd6a9b8e9 100644 --- a/packages/testing/src/execution_testing/cli/hasher.py +++ b/packages/testing/src/execution_testing/cli/hasher.py @@ -1,17 +1,22 @@ """Simple CLI tool to hash a directory of JSON fixtures.""" +from __future__ import annotations + import hashlib import json import sys from dataclasses import dataclass, field from enum import IntEnum, auto from pathlib import Path -from typing import Any, Callable, Dict, List, Optional, TypeVar +from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, TypeVar import click from rich.console import Console from rich.markup import escape as rich_escape +if TYPE_CHECKING: + from execution_testing.fixtures.consume import TestCaseIndexFile + class HashableItemType(IntEnum): """Represents the type of a hashable item.""" @@ -145,6 +150,104 @@ def from_folder( items[file_path.name] = item return cls(type=HashableItemType.FOLDER, items=items, parents=parents) + @classmethod + def from_index_entries( + cls, entries: List["TestCaseIndexFile"] + ) -> "HashableItem": + """ + Create a hashable item tree from index entries (no file I/O). + + This produces the same hash as from_folder() but uses pre-collected + fixture hashes instead of reading files from disk. + + Optimized to O(n) using a trie-like structure built in a single pass, + avoiding repeated path operations and iterations. + """ + raw = [ + { + "id": e.id, + "json_path": str(e.json_path), + "fixture_hash": str(e.fixture_hash) + if e.fixture_hash + else None, + } + for e in entries + ] + return cls.from_raw_entries(raw) + + @classmethod + def from_raw_entries(cls, entries: List[Dict]) -> "HashableItem": + """ + Create a hashable item tree from raw entry dicts (no file I/O). + + Accepts dicts with "id", "json_path", and "fixture_hash" keys. + This avoids Pydantic overhead entirely — only plain string/int + operations are used to build the hash tree. + + Produces the same hash as from_folder() and from_index_entries(). + """ + # Build a trie where each node is either: + # - A dict (folder node) containing child nodes + # - A list of (test_id, hash_bytes) tuples (file node marker) + # + # Structure: {folder: {folder: {file.json: [(id, hash), ...]}}} + root_trie: dict = {} + + # Single pass: insert all entries into trie + for entry in entries: + fixture_hash = entry.get("fixture_hash") + if not fixture_hash: + continue + + # Navigate/create path to file node + path_parts = Path(entry["json_path"]).parts + current = root_trie + + # Navigate to parent folder, creating nodes as needed + for part in path_parts[:-1]: + if part not in current: + current[part] = {} + current = current[part] + + # Add test entry to file node + file_name = path_parts[-1] + if file_name not in current: + current[file_name] = [] + + # Convert hex string to 32-byte hash + hash_bytes = int(fixture_hash, 16).to_bytes(32, "big") + current[file_name].append((entry["id"], hash_bytes)) + + # Convert trie to HashableItem tree (single recursive pass) + def trie_to_hashable(node: dict) -> Dict[str, "HashableItem"]: + """Convert a trie node to HashableItem dict.""" + items: Dict[str, HashableItem] = {} + + for name, child in node.items(): + if isinstance(child, list): + # File node: child is list of (test_id, hash_bytes) + test_items = { + test_id: cls( + type=HashableItemType.TEST, root=hash_bytes + ) + for test_id, hash_bytes in child + } + items[name] = cls( + type=HashableItemType.FILE, items=test_items + ) + else: + # Folder node: recurse + items[name] = cls( + type=HashableItemType.FOLDER, + items=trie_to_hashable(child), + ) + + return items + + return cls( + type=HashableItemType.FOLDER, items=trie_to_hashable(root_trie) + ) + def render_hash_report( folder: Path, diff --git a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/filler/filler.py b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/filler/filler.py index 55a8f37c1e..bd2490f820 100644 --- a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/filler/filler.py +++ b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/filler/filler.py @@ -29,7 +29,7 @@ ReferenceSpec, ) from execution_testing.cli.gen_index import ( - generate_fixtures_index, + merge_partial_indexes, ) from execution_testing.client_clis import TransitionTool from execution_testing.client_clis.clis.geth import FixtureConsumerTool @@ -44,6 +44,7 @@ PreAllocGroupBuilders, PreAllocGroups, TestInfo, + merge_partial_fixture_files, ) from execution_testing.forks import ( Fork, @@ -1237,11 +1238,16 @@ def fixture_collector( single_fixture_per_file=fixture_output.single_fixture_per_file, filler_path=filler_path, base_dump_dir=base_dump_dir, + generate_index=request.config.getoption("generate_index"), ) yield fixture_collector - fixture_collector.dump_fixtures() + worker_id = os.environ.get("PYTEST_XDIST_WORKER", None) + fixture_collector.dump_fixtures(worker_id) if do_fixture_verification: fixture_collector.verify_fixture_files(evm_fixture_verification) + # Write partial index for this worker/scope + if fixture_collector.generate_index: + fixture_collector.write_partial_index(worker_id) @pytest.fixture(autouse=True, scope="session") @@ -1589,6 +1595,19 @@ def pytest_collection_modifyitems( for i in reversed(items_for_removal): items.pop(i) + # Schedule slow-marked tests first (Longest Processing Time First). + # Workers each grab the next test from the queue, so slow tests get + # distributed across workers and finish before the fast-test tail. + slow_items = [] + normal_items = [] + for item in items: + if item.get_closest_marker("slow") is not None: + slow_items.append(item) + else: + normal_items.append(item) + if slow_items: + items[:] = slow_items + normal_items + def pytest_sessionfinish(session: pytest.Session, exitstatus: int) -> None: """ @@ -1630,18 +1649,24 @@ def pytest_sessionfinish(session: pytest.Session, exitstatus: int) -> None: if fixture_output.is_stdout or is_help_or_collectonly_mode(session.config): return + # Merge partial fixture files from all workers into final JSON files + merge_partial_fixture_files(fixture_output.directory) + # Remove any lock files that may have been created. for file in fixture_output.directory.rglob("*.lock"): file.unlink() - # Generate index file for all produced fixtures. + # Generate index file for all produced fixtures by merging partial indexes. + # Only merge if partial indexes were actually written (i.e., tests produced + # fixtures). When no tests are filled (e.g., all skipped), no partial + # indexes exist and merge_partial_indexes should not be called. if ( session.config.getoption("generate_index") and not session_instance.phase_manager.is_pre_alloc_generation ): - generate_fixtures_index( - fixture_output.directory, quiet_mode=True, force_flag=False - ) + meta_dir = fixture_output.directory / ".meta" + if meta_dir.exists() and any(meta_dir.glob("partial_index*.jsonl")): + merge_partial_indexes(fixture_output.directory, quiet_mode=True) # Create tarball of the output directory if the output is a tarball. fixture_output.create_tarball() diff --git a/packages/testing/src/execution_testing/cli/tests/test_hasher.py b/packages/testing/src/execution_testing/cli/tests/test_hasher.py index b80bdc1e30..bd5c935780 100644 --- a/packages/testing/src/execution_testing/cli/tests/test_hasher.py +++ b/packages/testing/src/execution_testing/cli/tests/test_hasher.py @@ -1,11 +1,57 @@ -"""Tests for the hasher CLI tool.""" +"""Tests for the hasher CLI tool, module, and merge_partial_indexes.""" import json +import tempfile from pathlib import Path +from typing import Generator, List +import pytest from click.testing import CliRunner -from execution_testing.cli.hasher import hasher +from execution_testing.base_types import HexNumber +from execution_testing.cli.gen_index import merge_partial_indexes +from execution_testing.cli.hasher import HashableItem, hasher +from execution_testing.fixtures.consume import IndexFile, TestCaseIndexFile + +HASH_1 = 0x1111111111111111111111111111111111111111111111111111111111111111 +HASH_2 = 0x2222222222222222222222222222222222222222222222222222222222222222 +HASH_3 = 0x3333333333333333333333333333333333333333333333333333333333333333 +HASH_4 = 0x4444444444444444444444444444444444444444444444444444444444444444 +HASH_9 = 0x9999999999999999999999999999999999999999999999999999999999999999 + + +def _hex_str(h: int) -> str: + """Convert an integer hash to its 0x-prefixed hex string.""" + return f"0x{h:064x}" + + +def _make_entry( + test_id: str, + json_path: str, + fixture_hash: int, + fork: str | None = None, + fmt: str | None = None, +) -> TestCaseIndexFile: + """Create a TestCaseIndexFile for testing.""" + return TestCaseIndexFile( + id=test_id, + json_path=Path(json_path), + fixture_hash=HexNumber(fixture_hash), + fork=fork, + format=fmt, + ) + + +def _make_json_fixture(test_names_and_hashes: dict[str, int]) -> str: + """Create a JSON fixture file matching from_folder expectations.""" + data = {} + for name, h in test_names_and_hashes.items(): + data[name] = { + "_info": {"hash": _hex_str(h)}, + "pre": {}, + "post": {}, + } + return json.dumps(data) def create_fixture(path: Path, test_name: str, hash_value: str) -> None: @@ -340,3 +386,384 @@ def test_hash_help(self) -> None: result = runner.invoke(hasher, ["hash", "--help"]) assert result.exit_code == 0 assert "Hash folders of JSON fixtures" in result.output + + +class TestHashableItemFromIndexEntries: + """Test that from_index_entries produces same hash as from_folder.""" + + @pytest.fixture + def fixture_dir(self) -> Generator[Path, None, None]: + """Create a temporary directory with test fixtures.""" + with tempfile.TemporaryDirectory() as tmpdir: + base = Path(tmpdir) + + # state_tests/cancun/test.json (two tests) + state_tests = base / "state_tests" / "cancun" + state_tests.mkdir(parents=True) + (state_tests / "test.json").write_text( + _make_json_fixture({"test_one": HASH_1, "test_two": HASH_2}) + ) + + # blockchain_tests/cancun/test.json (one test) + blockchain_tests = base / "blockchain_tests" / "cancun" + blockchain_tests.mkdir(parents=True) + (blockchain_tests / "test.json").write_text( + _make_json_fixture({"test_three": HASH_3}) + ) + + yield base + + @pytest.fixture + def index_entries(self) -> List[TestCaseIndexFile]: + """Create index entries matching the fixture_dir structure.""" + return [ + _make_entry("test_one", "state_tests/cancun/test.json", HASH_1), + _make_entry("test_two", "state_tests/cancun/test.json", HASH_2), + _make_entry( + "test_three", "blockchain_tests/cancun/test.json", HASH_3 + ), + ] + + def test_hash_matches_from_folder( + self, + fixture_dir: Path, + index_entries: List[TestCaseIndexFile], + ) -> None: + """Verify from_index_entries produces same hash as from_folder.""" + hash_from_folder = HashableItem.from_folder( + folder_path=fixture_dir + ).hash() + hash_from_entries = HashableItem.from_index_entries( + index_entries + ).hash() + assert hash_from_folder == hash_from_entries + + def test_hash_changes_with_different_entries( + self, index_entries: List[TestCaseIndexFile] + ) -> None: + """Verify hash changes when entries change.""" + hash1 = HashableItem.from_index_entries(index_entries).hash() + + modified = index_entries.copy() + modified[0] = _make_entry( + "test_one", "state_tests/cancun/test.json", HASH_9 + ) + hash2 = HashableItem.from_index_entries(modified).hash() + + assert hash1 != hash2 + + def test_empty_entries(self) -> None: + """Verify empty entries produces a valid hash.""" + result = HashableItem.from_index_entries([]).hash() + assert result is not None + assert len(result) == 32 + + def test_multiple_files_in_same_folder(self) -> None: + """Verify hash with multiple JSON files in the same folder.""" + with tempfile.TemporaryDirectory() as tmpdir: + base = Path(tmpdir) + folder = base / "tests" / "cancun" + folder.mkdir(parents=True) + + (folder / "test_a.json").write_text( + _make_json_fixture({"a1": HASH_1}) + ) + (folder / "test_b.json").write_text( + _make_json_fixture({"b1": HASH_2}) + ) + + entries = [ + _make_entry("a1", "tests/cancun/test_a.json", HASH_1), + _make_entry("b1", "tests/cancun/test_b.json", HASH_2), + ] + + hash_from_folder = HashableItem.from_folder( + folder_path=base + ).hash() + hash_from_entries = HashableItem.from_index_entries(entries).hash() + assert hash_from_folder == hash_from_entries + + def test_deeply_nested_paths(self) -> None: + """Verify hash with deeply nested folder structures (3+ levels).""" + with tempfile.TemporaryDirectory() as tmpdir: + base = Path(tmpdir) + deep = base / "a" / "b" / "c" / "d" + deep.mkdir(parents=True) + + (deep / "test.json").write_text( + _make_json_fixture({"t1": HASH_1, "t2": HASH_2}) + ) + + entries = [ + _make_entry("t1", "a/b/c/d/test.json", HASH_1), + _make_entry("t2", "a/b/c/d/test.json", HASH_2), + ] + + hash_from_folder = HashableItem.from_folder( + folder_path=base + ).hash() + hash_from_entries = HashableItem.from_index_entries(entries).hash() + assert hash_from_folder == hash_from_entries + + def test_single_file_single_test(self) -> None: + """Verify degenerate case: one folder, one file, one test.""" + with tempfile.TemporaryDirectory() as tmpdir: + base = Path(tmpdir) + folder = base / "tests" + folder.mkdir() + + (folder / "only.json").write_text( + _make_json_fixture({"solo": HASH_4}) + ) + + entries = [_make_entry("solo", "tests/only.json", HASH_4)] + + hash_from_folder = HashableItem.from_folder( + folder_path=base + ).hash() + hash_from_entries = HashableItem.from_index_entries(entries).hash() + assert hash_from_folder == hash_from_entries + + def test_entries_with_none_fixture_hash_skipped(self) -> None: + """Verify entries with fixture_hash=None are skipped.""" + entries_with_none = [ + _make_entry("t1", "tests/a.json", HASH_1), + TestCaseIndexFile( + id="t_null", + json_path=Path("tests/a.json"), + fixture_hash=None, + fork=None, + format=None, + ), + ] + entries_without_none = [ + _make_entry("t1", "tests/a.json", HASH_1), + ] + + hash_with = HashableItem.from_index_entries(entries_with_none).hash() + hash_without = HashableItem.from_index_entries( + entries_without_none + ).hash() + assert hash_with == hash_without + + +class TestMergePartialIndexes: + """Test the JSONL partial index merge pipeline end-to-end.""" + + def _write_jsonl(self, path: Path, entries: list[dict]) -> None: + """Write a list of dicts as JSONL lines.""" + path.parent.mkdir(parents=True, exist_ok=True) + with open(path, "w") as f: + for entry in entries: + f.write(json.dumps(entry) + "\n") + + def _make_entry_dict( + self, + test_id: str, + json_path: str, + fixture_hash: int, + fork: str | None = None, + fmt: str | None = None, + ) -> dict: + """Create a dict matching what collector.py writes to JSONL.""" + return { + "id": test_id, + "json_path": json_path, + "fixture_hash": _hex_str(fixture_hash), + "fork": fork, + "format": fmt, + "pre_hash": None, + } + + def test_merge_produces_valid_index(self) -> None: + """Verify merging JSONL partials produces a valid index.json.""" + with tempfile.TemporaryDirectory() as tmpdir: + output_dir = Path(tmpdir) + meta_dir = output_dir / ".meta" + meta_dir.mkdir(parents=True) + + entries = [ + self._make_entry_dict( + "test_a", + "state_tests/cancun/test.json", + HASH_1, + fork="Cancun", + fmt="state_test", + ), + self._make_entry_dict( + "test_b", + "blockchain_tests/cancun/test.json", + HASH_2, + fork="Cancun", + fmt="blockchain_test", + ), + ] + + self._write_jsonl( + meta_dir / "partial_index.gw0.jsonl", entries[:1] + ) + self._write_jsonl( + meta_dir / "partial_index.gw1.jsonl", entries[1:] + ) + + merge_partial_indexes(output_dir, quiet_mode=True) + + index_path = meta_dir / "index.json" + assert index_path.exists() + + index = IndexFile.model_validate_json(index_path.read_text()) + assert index.test_count == 2 + assert index.root_hash is not None + assert index.root_hash != 0 + + def test_merge_fixture_formats_uses_format_name(self) -> None: + """ + Verify fixture_formats contains format_name values (e.g. + 'state_test') not class names (e.g. 'StateFixture'). + + This is the exact bug that format.__name__ would have caused. + """ + with tempfile.TemporaryDirectory() as tmpdir: + output_dir = Path(tmpdir) + meta_dir = output_dir / ".meta" + + entries = [ + self._make_entry_dict( + "t1", + "state_tests/test.json", + HASH_1, + fork="Cancun", + fmt="state_test", + ), + self._make_entry_dict( + "t2", + "blockchain_tests/test.json", + HASH_2, + fork="Cancun", + fmt="blockchain_test", + ), + ] + self._write_jsonl(meta_dir / "partial_index.gw0.jsonl", entries) + + merge_partial_indexes(output_dir, quiet_mode=True) + + index = IndexFile.model_validate_json( + (meta_dir / "index.json").read_text() + ) + assert index.fixture_formats is not None + assert sorted(index.fixture_formats) == [ + "blockchain_test", + "state_test", + ] + + def test_merge_forks_collected_correctly(self) -> None: + """Verify forks are collected from validated entries.""" + with tempfile.TemporaryDirectory() as tmpdir: + output_dir = Path(tmpdir) + meta_dir = output_dir / ".meta" + + entries = [ + self._make_entry_dict( + "t1", + "state_tests/test.json", + HASH_1, + fork="Cancun", + fmt="state_test", + ), + self._make_entry_dict( + "t2", + "state_tests/test2.json", + HASH_2, + fork="Shanghai", + fmt="state_test", + ), + ] + self._write_jsonl(meta_dir / "partial_index.gw0.jsonl", entries) + + merge_partial_indexes(output_dir, quiet_mode=True) + + index = IndexFile.model_validate_json( + (meta_dir / "index.json").read_text() + ) + assert index.forks is not None + assert sorted(str(f) for f in index.forks) == [ + "Cancun", + "Shanghai", + ] + + def test_merge_cleans_up_partial_files(self) -> None: + """Verify partial JSONL files are deleted after merge.""" + with tempfile.TemporaryDirectory() as tmpdir: + output_dir = Path(tmpdir) + meta_dir = output_dir / ".meta" + + entries = [ + self._make_entry_dict( + "t1", + "state_tests/test.json", + HASH_1, + fmt="state_test", + ), + ] + self._write_jsonl(meta_dir / "partial_index.gw0.jsonl", entries) + self._write_jsonl(meta_dir / "partial_index.gw1.jsonl", entries) + + merge_partial_indexes(output_dir, quiet_mode=True) + + remaining = list(meta_dir.glob("partial_index*.jsonl")) + assert remaining == [] + + def test_merge_multiple_workers_same_hash_as_single(self) -> None: + """Verify hash is the same regardless of how entries are split.""" + entry_dicts = [ + self._make_entry_dict( + "t1", "state_tests/a.json", HASH_1, fmt="state_test" + ), + self._make_entry_dict( + "t2", "state_tests/a.json", HASH_2, fmt="state_test" + ), + self._make_entry_dict( + "t3", "blockchain_tests/b.json", HASH_3, fmt="blockchain_test" + ), + ] + + # Single worker: all entries in one file + with tempfile.TemporaryDirectory() as tmpdir1: + output1 = Path(tmpdir1) + meta1 = output1 / ".meta" + self._write_jsonl(meta1 / "partial_index.gw0.jsonl", entry_dicts) + merge_partial_indexes(output1, quiet_mode=True) + index1 = IndexFile.model_validate_json( + (meta1 / "index.json").read_text() + ) + + # Multiple workers: entries split across files + with tempfile.TemporaryDirectory() as tmpdir2: + output2 = Path(tmpdir2) + meta2 = output2 / ".meta" + self._write_jsonl( + meta2 / "partial_index.gw0.jsonl", entry_dicts[:1] + ) + self._write_jsonl( + meta2 / "partial_index.gw1.jsonl", entry_dicts[1:2] + ) + self._write_jsonl( + meta2 / "partial_index.gw2.jsonl", entry_dicts[2:] + ) + merge_partial_indexes(output2, quiet_mode=True) + index2 = IndexFile.model_validate_json( + (meta2 / "index.json").read_text() + ) + + assert index1.root_hash == index2.root_hash + assert index1.test_count == index2.test_count + + def test_merge_raises_when_no_partial_files(self) -> None: + """Verify merge_partial_indexes raises when no partials exist.""" + with tempfile.TemporaryDirectory() as tmpdir: + output_dir = Path(tmpdir) + meta_dir = output_dir / ".meta" + meta_dir.mkdir(parents=True) + + with pytest.raises(Exception, match="No partial indexes found"): + merge_partial_indexes(output_dir, quiet_mode=True) diff --git a/packages/testing/src/execution_testing/fixtures/__init__.py b/packages/testing/src/execution_testing/fixtures/__init__.py index 9d882707e7..18d4b3a118 100644 --- a/packages/testing/src/execution_testing/fixtures/__init__.py +++ b/packages/testing/src/execution_testing/fixtures/__init__.py @@ -14,7 +14,11 @@ BlockchainFixture, BlockchainFixtureCommon, ) -from .collector import FixtureCollector, TestInfo +from .collector import ( + FixtureCollector, + TestInfo, + merge_partial_fixture_files, +) from .consume import FixtureConsumer from .pre_alloc_groups import ( PreAllocGroup, @@ -45,4 +49,5 @@ "StateFixture", "TestInfo", "TransactionFixture", + "merge_partial_fixture_files", ] diff --git a/packages/testing/src/execution_testing/fixtures/collector.py b/packages/testing/src/execution_testing/fixtures/collector.py index b389609d5d..74bdb6b471 100644 --- a/packages/testing/src/execution_testing/fixtures/collector.py +++ b/packages/testing/src/execution_testing/fixtures/collector.py @@ -9,7 +9,16 @@ import sys from dataclasses import dataclass, field from pathlib import Path -from typing import ClassVar, Dict, Literal, Optional, Tuple +from typing import ( + ClassVar, + Dict, + List, + Literal, + Optional, + Tuple, +) + +from filelock import FileLock from execution_testing.base_types import to_json @@ -18,6 +27,70 @@ from .file import Fixtures +def merge_partial_fixture_files(output_dir: Path) -> None: + """ + Merge all partial fixture JSONL files into final JSON fixture files. + + Called at session end after all workers have written their partials. + Each partial file contains JSONL lines: {"k": fixture_id, "v": json_str} + """ + # Find all partial files + partial_files = list(output_dir.rglob("*.partial.*.jsonl")) + if not partial_files: + return + + # Group partial files by their target fixture file + # e.g., "test.partial.gw0.jsonl" -> "test.json" + partials_by_target: Dict[Path, List[Path]] = {} + for partial in partial_files: + # Remove .partial.{worker_id}.jsonl suffix to get target + name = partial.name + # Find ".partial." and remove everything after + idx = name.find(".partial.") + if idx == -1: + continue + target_name = name[:idx] + ".json" + target_path = partial.parent / target_name + if target_path not in partials_by_target: + partials_by_target[target_path] = [] + partials_by_target[target_path].append(partial) + + # Merge each group into its target file + for target_path, partials in partials_by_target.items(): + entries: Dict[str, str] = {} + + # Read all partial files + for partial in partials: + with open(partial) as f: + for line in f: + line = line.strip() + if not line: + continue + entry = json.loads(line) + entries[entry["k"]] = entry["v"] + + # Write final JSON file + sorted_keys = sorted(entries.keys()) + parts = ["{\n"] + last_idx = len(sorted_keys) - 1 + for i, key in enumerate(sorted_keys): + key_json = json.dumps(key) + # Add indentation for nesting inside outer JSON object + value_indented = entries[key].replace("\n", "\n ") + parts.append(f" {key_json}: {value_indented}") + parts.append(",\n" if i < last_idx else "\n") + parts.append("}") + target_path.write_text("".join(parts)) + + # Clean up partial files + for partial in partials: + partial.unlink() + # Also remove lock files + lock_file = partial.with_suffix(".lock") + if lock_file.exists(): + lock_file.unlink() + + @dataclass(kw_only=True, slots=True) class TestInfo: """Contains test information from the current node.""" @@ -125,10 +198,14 @@ class FixtureCollector: filler_path: Path base_dump_dir: Optional[Path] = None flush_interval: int = 1000 + generate_index: bool = True # Internal state all_fixtures: Dict[Path, Fixtures] = field(default_factory=dict) json_path_to_test_item: Dict[Path, TestInfo] = field(default_factory=dict) + # Store index entries as simple dicts + # (avoid Pydantic overhead during collection) + index_entries: List[Dict] = field(default_factory=list) def get_fixture_basename(self, info: TestInfo) -> Path: """Return basename of the fixture file for a given test case.""" @@ -166,6 +243,22 @@ def add_fixture(self, info: TestInfo, fixture: BaseFixture) -> Path: self.all_fixtures[fixture_path][info.get_id()] = fixture + # Collect index entry while data is in memory (if indexing enabled) + # Store as simple dict to avoid Pydantic overhead during collection + if self.generate_index: + relative_path = fixture_path.relative_to(self.output_dir) + fixture_fork = fixture.get_fork() + index_entry = { + "id": info.get_id(), + "json_path": str(relative_path), + "fixture_hash": str(fixture.hash) if fixture.hash else None, + "fork": fixture_fork.name() if fixture_fork else None, + "format": fixture.format_name, + } + if (pre_hash := getattr(fixture, "pre_hash", None)) is not None: + index_entry["pre_hash"] = pre_hash + self.index_entries.append(index_entry) + if ( self.flush_interval > 0 and len(self.all_fixtures) >= self.flush_interval @@ -174,7 +267,7 @@ def add_fixture(self, info: TestInfo, fixture: BaseFixture) -> Path: return fixture_path - def dump_fixtures(self) -> None: + def dump_fixtures(self, worker_id: str | None = None) -> None: """Dump all collected fixtures to their respective files.""" if self.output_dir.name == "stdout": combined_fixtures = { @@ -191,10 +284,35 @@ def dump_fixtures(self) -> None: raise TypeError( "All fixtures in a single file must have the same format." ) - fixtures.collect_into_file(fixture_path) + self._write_partial_fixtures(fixture_path, fixtures, worker_id) self.all_fixtures.clear() + def _write_partial_fixtures( + self, file_path: Path, fixtures: Fixtures, worker_id: str | None + ) -> None: + """ + Write fixtures to a partial JSONL file (append-only). + + Each line is a JSON object: {"key": "fixture_id", "value": "json_str"} + This avoids O(n) merge work per worker - just O(1) append. + Final merge to JSON happens at session end. + """ + suffix = f".{worker_id}" if worker_id else ".main" + partial_path = file_path.with_suffix(f".partial{suffix}.jsonl") + partial_path.parent.mkdir(parents=True, exist_ok=True) + lock_file_path = partial_path.with_suffix(".lock") + + lines = [] + for name in fixtures: + value = json.dumps(fixtures[name].json_dict_with_info(), indent=4) + # Store as JSONL: {"k": key, "v": serialized value string} + lines.append(json.dumps({"k": name, "v": value}) + "\n") + + with FileLock(lock_file_path): + with open(partial_path, "a") as f: + f.writelines(lines) + def verify_fixture_files( self, evm_fixture_verification: FixtureConsumer ) -> None: @@ -231,3 +349,38 @@ def _get_consume_direct_dump_dir( return info.get_dump_dir_path( self.base_dump_dir, self.filler_path, level="test_function" ) + + def write_partial_index(self, worker_id: str | None = None) -> Path | None: + """ + Append collected index entries to a partial index file using JSONL + format. + + Uses append-only JSONL (JSON Lines) format for efficient writes without + read-modify-write cycles. Each line is a complete JSON object + representing one index entry. + + Args: + worker_id: The xdist worker ID (e.g., "gw0"), or None for master. + + Returns: + Path to the partial index file, or None if indexing is disabled. + + """ + if not self.generate_index or not self.index_entries: + return None + + suffix = f".{worker_id}" if worker_id else ".master" + partial_index_path = ( + self.output_dir / ".meta" / f"partial_index{suffix}.jsonl" + ) + partial_index_path.parent.mkdir(parents=True, exist_ok=True) + lock_file_path = partial_index_path.with_suffix(".lock") + + # Append entries as JSONL (one JSON object per line) + # This avoids read-modify-write cycles + with FileLock(lock_file_path): + with open(partial_index_path, "a") as f: + for entry in self.index_entries: + f.write(json.dumps(entry) + "\n") + + return partial_index_path diff --git a/packages/testing/src/execution_testing/fixtures/consume.py b/packages/testing/src/execution_testing/fixtures/consume.py index d43ad6deac..3c03a85cd5 100644 --- a/packages/testing/src/execution_testing/fixtures/consume.py +++ b/packages/testing/src/execution_testing/fixtures/consume.py @@ -47,8 +47,8 @@ class TestCaseBase(BaseModel): """Base model for a test case used in EEST consume commands.""" id: str - fixture_hash: HexNumber | None - fork: Fork | None + fixture_hash: HexNumber | None = None + fork: Fork | None = None format: FixtureFormat pre_hash: str | None = None __test__ = False # stop pytest from collecting this class as a test diff --git a/packages/testing/src/execution_testing/fixtures/file.py b/packages/testing/src/execution_testing/fixtures/file.py index 4cf09cb1b1..5656359136 100644 --- a/packages/testing/src/execution_testing/fixtures/file.py +++ b/packages/testing/src/execution_testing/fixtures/file.py @@ -62,10 +62,10 @@ def collect_into_file(self, file_path: Path) -> None: lock_file_path = file_path.with_suffix(".lock") with FileLock(lock_file_path): if file_path.exists(): - with open(file_path, "r") as f: - json_fixtures = json.load(f) + json_fixtures = json.loads(file_path.read_bytes()) for name, fixture in self.items(): json_fixtures[name] = fixture.json_dict_with_info() - with open(file_path, "w") as f: - json.dump(dict(sorted(json_fixtures.items())), f, indent=4) + file_path.write_text( + json.dumps(dict(sorted(json_fixtures.items())), indent=4) + ) diff --git a/packages/testing/src/execution_testing/fixtures/tests/test_collector.py b/packages/testing/src/execution_testing/fixtures/tests/test_collector.py new file mode 100644 index 0000000000..87e55e6f89 --- /dev/null +++ b/packages/testing/src/execution_testing/fixtures/tests/test_collector.py @@ -0,0 +1,435 @@ +"""Test cases for the execution_testing.fixtures.collector module.""" + +import json +from pathlib import Path + +import pytest + +from ..base import BaseFixture +from ..collector import FixtureCollector, TestInfo, merge_partial_fixture_files +from ..file import Fixtures +from ..transaction import FixtureResult, TransactionFixture + + +def _make_fixture(nonce: int = 0) -> TransactionFixture: + """Create a minimal TransactionFixture for testing.""" + fixture = TransactionFixture( + transaction=f"0x{nonce:04x}", + result={"Paris": FixtureResult(intrinsic_gas=nonce)}, + ) + fixture.fill_info( + "t8n-test", + f"test description {nonce}", + fixture_source_url="http://example.com", + ref_spec=None, + _info_metadata={}, + ) + return fixture + + +def _make_info(test_id: str, module_path: Path) -> TestInfo: + """Create a TestInfo for testing.""" + return TestInfo( + name=f"test_func[fork_Paris-{test_id}]", + id=f"{module_path}::test_func[fork_Paris-{test_id}]", + original_name="test_func", + module_path=module_path, + ) + + +@pytest.fixture +def output_dir(tmp_path: Path) -> Path: + """Create output directory for test fixtures.""" + out = tmp_path / "output" + out.mkdir() + return out + + +@pytest.fixture +def filler_path(tmp_path: Path) -> Path: + """Create a filler path (tests directory root).""" + p = tmp_path / "tests" + p.mkdir() + return p + + +@pytest.fixture +def module_path(filler_path: Path) -> Path: + """Create a dummy test module path.""" + mod = filler_path / "cancun" / "test_example.py" + mod.parent.mkdir(parents=True, exist_ok=True) + mod.touch() + return mod + + +class TestPartialFixtureFiles: + """Tests for partial fixture file writing and merging.""" + + def test_single_fixture_matches_json_dumps( + self, output_dir: Path, filler_path: Path, module_path: Path + ) -> None: + """Output for a single fixture must match json.dumps(..., indent=4).""" + collector = FixtureCollector( + output_dir=output_dir, + fill_static_tests=False, + single_fixture_per_file=False, + filler_path=filler_path, + generate_index=False, + ) + fixture = _make_fixture(1) + info = _make_info("tx_test", module_path) + collector.add_fixture(info, fixture) + collector.dump_fixtures(worker_id="gw0") + merge_partial_fixture_files(output_dir) + + # Find the written file + json_files = list(output_dir.rglob("*.json")) + assert len(json_files) == 1 + written = json_files[0].read_text() + + # Build expected output using the original json.dumps approach + fixture_id = info.get_id() + expected_dict = {fixture_id: fixture.json_dict_with_info()} + expected = json.dumps(dict(sorted(expected_dict.items())), indent=4) + assert written == expected + + def test_multiple_fixtures_match_json_dumps( + self, output_dir: Path, filler_path: Path, module_path: Path + ) -> None: + """ + Output for multiple fixtures must match json.dumps(..., indent=4). + """ + collector = FixtureCollector( + output_dir=output_dir, + fill_static_tests=False, + single_fixture_per_file=False, + filler_path=filler_path, + generate_index=False, + ) + fixtures_and_infos = [] + for i in range(5): + fixture = _make_fixture(i) + info = _make_info(f"tx_test_{i}", module_path) + collector.add_fixture(info, fixture) + fixtures_and_infos.append((info, fixture)) + + collector.dump_fixtures(worker_id="gw0") + merge_partial_fixture_files(output_dir) + + json_files = list(output_dir.rglob("*.json")) + assert len(json_files) == 1 + written = json_files[0].read_text() + + expected_dict = { + info.get_id(): fixture.json_dict_with_info() + for info, fixture in fixtures_and_infos + } + expected = json.dumps(dict(sorted(expected_dict.items())), indent=4) + assert written == expected + + def test_multiple_workers_merge_correctly( + self, output_dir: Path, filler_path: Path, module_path: Path + ) -> None: + """ + Simulates xdist: worker A and B write partial files, merge at end. + Final output should match json.dumps of all fixtures. + """ + collector1 = FixtureCollector( + output_dir=output_dir, + fill_static_tests=False, + single_fixture_per_file=False, + filler_path=filler_path, + generate_index=False, + ) + # Worker A writes fixtures 0-2 + pairs_a = [] + for i in range(3): + fixture = _make_fixture(i) + info = _make_info(f"tx_test_{i}", module_path) + collector1.add_fixture(info, fixture) + pairs_a.append((info, fixture)) + collector1.dump_fixtures(worker_id="gw0") + + # Worker B writes fixtures 3-5 (separate partial file) + collector2 = FixtureCollector( + output_dir=output_dir, + fill_static_tests=False, + single_fixture_per_file=False, + filler_path=filler_path, + generate_index=False, + ) + pairs_b = [] + for i in range(3, 6): + fixture = _make_fixture(i) + info = _make_info(f"tx_test_{i}", module_path) + collector2.add_fixture(info, fixture) + pairs_b.append((info, fixture)) + collector2.dump_fixtures(worker_id="gw1") + + # Merge at session end + merge_partial_fixture_files(output_dir) + + # Verify final output matches json.dumps of all 6 fixtures + json_files = list(output_dir.rglob("*.json")) + assert len(json_files) == 1 + written = json_files[0].read_text() + + expected_dict = { + info.get_id(): fixture.json_dict_with_info() + for info, fixture in pairs_a + pairs_b + } + expected = json.dumps(dict(sorted(expected_dict.items())), indent=4) + assert written == expected + + def test_output_is_valid_json( + self, output_dir: Path, filler_path: Path, module_path: Path + ) -> None: + """The written file must be parseable as valid JSON.""" + collector = FixtureCollector( + output_dir=output_dir, + fill_static_tests=False, + single_fixture_per_file=False, + filler_path=filler_path, + generate_index=False, + ) + for i in range(3): + fixture = _make_fixture(i) + info = _make_info(f"tx_test_{i}", module_path) + collector.add_fixture(info, fixture) + + collector.dump_fixtures(worker_id="gw0") + merge_partial_fixture_files(output_dir) + + json_files = list(output_dir.rglob("*.json")) + assert len(json_files) == 1 + parsed = json.loads(json_files[0].read_text()) + assert isinstance(parsed, dict) + assert len(parsed) == 3 + + def test_fixtures_sorted_by_key( + self, output_dir: Path, filler_path: Path, module_path: Path + ) -> None: + """Fixture entries in the output file must be sorted by key.""" + collector = FixtureCollector( + output_dir=output_dir, + fill_static_tests=False, + single_fixture_per_file=False, + filler_path=filler_path, + generate_index=False, + ) + # Add in reverse order + for i in reversed(range(3)): + fixture = _make_fixture(i) + info = _make_info(f"tx_test_{i}", module_path) + collector.add_fixture(info, fixture) + + collector.dump_fixtures(worker_id="gw0") + merge_partial_fixture_files(output_dir) + + json_files = list(output_dir.rglob("*.json")) + assert len(json_files) == 1 + content = json_files[0].read_text() + parsed = json.loads(content) + keys = list(parsed.keys()) + assert keys == sorted(keys) + + def test_partial_files_cleaned_up_after_merge( + self, output_dir: Path, filler_path: Path, module_path: Path + ) -> None: + """Partial JSONL files are deleted after merging.""" + collector = FixtureCollector( + output_dir=output_dir, + fill_static_tests=False, + single_fixture_per_file=False, + filler_path=filler_path, + generate_index=False, + ) + fixture = _make_fixture(1) + info = _make_info("tx_test", module_path) + collector.add_fixture(info, fixture) + collector.dump_fixtures(worker_id="gw0") + + # Verify partial file exists before merge + partial_files = list(output_dir.rglob("*.partial.*.jsonl")) + assert len(partial_files) == 1 + + merge_partial_fixture_files(output_dir) + + # Verify partial file is deleted after merge + partial_files = list(output_dir.rglob("*.partial.*.jsonl")) + assert len(partial_files) == 0 + + +class TestLegacyCompatibility: + """ + Tests verifying the new partial file approach produces byte-identical + output to the legacy Fixtures.collect_into_file() method. + """ + + def test_single_fixture_matches_legacy( + self, output_dir: Path, filler_path: Path, module_path: Path + ) -> None: + """Single fixture output matches legacy collect_into_file().""" + fixture: BaseFixture = _make_fixture(1) + info = _make_info("tx_test", module_path) + fixture_id = info.get_id() + + # Legacy approach: use Fixtures.collect_into_file() + legacy_dir = output_dir / "legacy" + legacy_dir.mkdir() + legacy_file = legacy_dir / "test.json" + legacy_fixtures = Fixtures(root={fixture_id: fixture}) + legacy_fixtures.collect_into_file(legacy_file) + legacy_output = legacy_file.read_text() + + # New approach: use partial files + merge + new_dir = output_dir / "new" + new_dir.mkdir() + collector = FixtureCollector( + output_dir=new_dir, + fill_static_tests=False, + single_fixture_per_file=False, + filler_path=filler_path, + generate_index=False, + ) + collector.add_fixture(info, fixture) + collector.dump_fixtures(worker_id="gw0") + merge_partial_fixture_files(new_dir) + new_files = list(new_dir.rglob("*.json")) + assert len(new_files) == 1 + new_output = new_files[0].read_text() + + assert new_output == legacy_output + + def test_multiple_fixtures_match_legacy( + self, output_dir: Path, filler_path: Path, module_path: Path + ) -> None: + """Multiple fixtures output matches legacy collect_into_file().""" + fixtures_dict: dict[str, BaseFixture] = {} + infos = [] + for i in range(5): + fixture = _make_fixture(i) + info = _make_info(f"tx_test_{i}", module_path) + fixtures_dict[info.get_id()] = fixture + infos.append(info) + + # Legacy approach + legacy_dir = output_dir / "legacy" + legacy_dir.mkdir() + legacy_file = legacy_dir / "test.json" + legacy_fixtures = Fixtures(root=fixtures_dict) + legacy_fixtures.collect_into_file(legacy_file) + legacy_output = legacy_file.read_text() + + # New approach + new_dir = output_dir / "new" + new_dir.mkdir() + collector = FixtureCollector( + output_dir=new_dir, + fill_static_tests=False, + single_fixture_per_file=False, + filler_path=filler_path, + generate_index=False, + ) + for i, info in enumerate(infos): + collector.add_fixture(info, list(fixtures_dict.values())[i]) + collector.dump_fixtures(worker_id="gw0") + merge_partial_fixture_files(new_dir) + new_files = list(new_dir.rglob("*.json")) + assert len(new_files) == 1 + new_output = new_files[0].read_text() + + assert new_output == legacy_output + + def test_multiple_workers_match_legacy( + self, output_dir: Path, filler_path: Path, module_path: Path + ) -> None: + """ + Multiple workers writing to same logical file matches legacy output. + """ + fixtures_dict: dict[str, BaseFixture] = {} + infos = [] + for i in range(6): + fixture = _make_fixture(i) + info = _make_info(f"tx_test_{i}", module_path) + fixtures_dict[info.get_id()] = fixture + infos.append(info) + + # Legacy approach: all fixtures in one call + legacy_dir = output_dir / "legacy" + legacy_dir.mkdir() + legacy_file = legacy_dir / "test.json" + legacy_fixtures = Fixtures(root=fixtures_dict) + legacy_fixtures.collect_into_file(legacy_file) + legacy_output = legacy_file.read_text() + + # New approach: simulate 3 workers, each with 2 fixtures + new_dir = output_dir / "new" + new_dir.mkdir() + fixture_values = list(fixtures_dict.values()) + for worker_idx in range(3): + collector = FixtureCollector( + output_dir=new_dir, + fill_static_tests=False, + single_fixture_per_file=False, + filler_path=filler_path, + generate_index=False, + ) + start = worker_idx * 2 + for i in range(start, start + 2): + collector.add_fixture(infos[i], fixture_values[i]) + collector.dump_fixtures(worker_id=f"gw{worker_idx}") + + merge_partial_fixture_files(new_dir) + new_files = list(new_dir.rglob("*.json")) + assert len(new_files) == 1 + new_output = new_files[0].read_text() + + assert new_output == legacy_output + + def test_special_characters_in_keys_match_legacy( + self, output_dir: Path, filler_path: Path, module_path: Path + ) -> None: + """Fixture IDs with special characters produce identical output.""" + # Create fixtures with complex IDs (typical pytest node IDs) + fixtures_dict: dict[str, BaseFixture] = {} + infos = [] + complex_ids = [ + "param[fork_Paris-state_test]", + "param[fork_Shanghai-blockchain_test]", + 'param[value="quoted"]', + "param[path/with/slashes]", + ] + for i, test_id in enumerate(complex_ids): + fixture = _make_fixture(i) + info = _make_info(test_id, module_path) + fixtures_dict[info.get_id()] = fixture + infos.append(info) + + # Legacy approach + legacy_dir = output_dir / "legacy" + legacy_dir.mkdir() + legacy_file = legacy_dir / "test.json" + legacy_fixtures = Fixtures(root=fixtures_dict) + legacy_fixtures.collect_into_file(legacy_file) + legacy_output = legacy_file.read_text() + + # New approach + new_dir = output_dir / "new" + new_dir.mkdir() + collector = FixtureCollector( + output_dir=new_dir, + fill_static_tests=False, + single_fixture_per_file=False, + filler_path=filler_path, + generate_index=False, + ) + for i, info in enumerate(infos): + collector.add_fixture(info, list(fixtures_dict.values())[i]) + collector.dump_fixtures(worker_id="gw0") + merge_partial_fixture_files(new_dir) + new_files = list(new_dir.rglob("*.json")) + assert len(new_files) == 1 + new_output = new_files[0].read_text() + + assert new_output == legacy_output diff --git a/tests/cancun/eip4844_blobs/test_excess_blob_gas_fork_transition.py b/tests/cancun/eip4844_blobs/test_excess_blob_gas_fork_transition.py index 1866a4e210..d5f6dbff75 100644 --- a/tests/cancun/eip4844_blobs/test_excess_blob_gas_fork_transition.py +++ b/tests/cancun/eip4844_blobs/test_excess_blob_gas_fork_transition.py @@ -526,6 +526,7 @@ def test_fork_transition_excess_blob_gas_at_blob_genesis( ], ) @pytest.mark.parametrize("block_base_fee_per_gas", [7, 16, 23]) +@pytest.mark.slow def test_fork_transition_excess_blob_gas_post_blob_genesis( blockchain_test: BlockchainTestFiller, genesis_environment: Environment, diff --git a/tests/frontier/opcodes/test_blockhash.py b/tests/frontier/opcodes/test_blockhash.py index de0b7a3034..ca7c07459f 100644 --- a/tests/frontier/opcodes/test_blockhash.py +++ b/tests/frontier/opcodes/test_blockhash.py @@ -22,6 +22,7 @@ pytest.param(256, True, id="256_empty_blocks"), ], ) +@pytest.mark.slow() def test_genesis_hash_available( blockchain_test: BlockchainTestFiller, pre: Alloc, diff --git a/tests/osaka/eip7918_blob_reserve_price/test_blob_reserve_price_with_bpo.py b/tests/osaka/eip7918_blob_reserve_price/test_blob_reserve_price_with_bpo.py index 79c4bd14d8..c0eb3af65c 100644 --- a/tests/osaka/eip7918_blob_reserve_price/test_blob_reserve_price_with_bpo.py +++ b/tests/osaka/eip7918_blob_reserve_price/test_blob_reserve_price_with_bpo.py @@ -21,6 +21,7 @@ @pytest.mark.valid_for_bpo_forks() @pytest.mark.parametrize("parent_excess_blobs", [27]) @pytest.mark.parametrize("block_base_fee_per_gas", [17]) +@pytest.mark.slow def test_blob_base_fee_with_bpo_transition( blockchain_test: BlockchainTestFiller, pre: Alloc, diff --git a/tests/osaka/eip7918_blob_reserve_price/test_blob_reserve_price_with_bpo_transitions.py b/tests/osaka/eip7918_blob_reserve_price/test_blob_reserve_price_with_bpo_transitions.py index 08f98b96df..f4e3af6282 100644 --- a/tests/osaka/eip7918_blob_reserve_price/test_blob_reserve_price_with_bpo_transitions.py +++ b/tests/osaka/eip7918_blob_reserve_price/test_blob_reserve_price_with_bpo_transitions.py @@ -560,6 +560,7 @@ def get_fork_scenarios(fork: Fork) -> Iterator[ParameterSet]: ) @pytest.mark.valid_at_transition_to("Osaka", subsequent_forks=True) @pytest.mark.valid_for_bpo_forks() +@pytest.mark.slow() def test_reserve_price_at_transition( blockchain_test: BlockchainTestFiller, pre: Alloc, diff --git a/tests/prague/eip6110_deposits/test_deposits.py b/tests/prague/eip6110_deposits/test_deposits.py index be345f02a1..7f69c23ee9 100644 --- a/tests/prague/eip6110_deposits/test_deposits.py +++ b/tests/prague/eip6110_deposits/test_deposits.py @@ -914,6 +914,7 @@ ), ], ) +@pytest.mark.slow() @pytest.mark.pre_alloc_group( "deposit_requests", reason="Tests standard deposit request functionality with system contract", diff --git a/tests/static/state_tests/stAttackTest/ContractCreationSpamFiller.json b/tests/static/state_tests/stAttackTest/ContractCreationSpamFiller.json index 543bb0e046..07acf98ea3 100644 --- a/tests/static/state_tests/stAttackTest/ContractCreationSpamFiller.json +++ b/tests/static/state_tests/stAttackTest/ContractCreationSpamFiller.json @@ -1,5 +1,8 @@ { "ContractCreationSpam" : { + "_info" : { + "pytest_marks": ["slow"] + }, "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "currentDifficulty" : "0x20000", diff --git a/tests/static/state_tests/stQuadraticComplexityTest/Return50000_2Filler.json b/tests/static/state_tests/stQuadraticComplexityTest/Return50000_2Filler.json index 486b49cbe7..c5646174aa 100644 --- a/tests/static/state_tests/stQuadraticComplexityTest/Return50000_2Filler.json +++ b/tests/static/state_tests/stQuadraticComplexityTest/Return50000_2Filler.json @@ -1,5 +1,8 @@ { "Return50000_2" : { + "_info" : { + "pytest_marks": ["slow"] + }, "env" : { "currentCoinbase" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", "currentDifficulty" : "0x020000", diff --git a/tests/static/state_tests/stStaticCall/static_Return50000_2Filler.json b/tests/static/state_tests/stStaticCall/static_Return50000_2Filler.json index f2c178c800..7b7ce761bf 100644 --- a/tests/static/state_tests/stStaticCall/static_Return50000_2Filler.json +++ b/tests/static/state_tests/stStaticCall/static_Return50000_2Filler.json @@ -1,5 +1,8 @@ { "static_Return50000_2" : { + "_info" : { + "pytest_marks": ["slow"] + }, "env" : { "currentCoinbase" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", "currentDifficulty" : "0x020000", diff --git a/tox.ini b/tox.ini index 22b12f6121..36f8fc652d 100644 --- a/tox.ini +++ b/tox.ini @@ -93,6 +93,7 @@ commands = fill \ -m "not slow and not zkevm and not benchmark" \ -n auto --maxprocesses 10 --dist=loadgroup \ + --skip-index \ --cov-config=pyproject.toml \ --cov=ethereum \ --cov-report=term \ @@ -103,6 +104,7 @@ commands = --log-to "{toxworkdir}/logs" \ --clean \ --until Amsterdam \ + --durations=50 \ {posargs} \ tests From 1b266ab5cfc4147a0e5a3a866b42805b2ae14ac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=94=A1=E4=BD=B3=E8=AA=A0=20Louis=20Tsai?= <72684086+LouisTsai-Csie@users.noreply.github.com> Date: Fri, 30 Jan 2026 00:52:59 +0800 Subject: [PATCH 2/3] fix(test-benchmark): support `blobhash` benchmark (#2067) * fix: failing blobhash test * refactor: update blobhash benchmark --- .../compute/instruction/test_tx_context.py | 47 ++++++++++++------- 1 file changed, 29 insertions(+), 18 deletions(-) diff --git a/tests/benchmark/compute/instruction/test_tx_context.py b/tests/benchmark/compute/instruction/test_tx_context.py index cded6cab60..3c4975fc93 100644 --- a/tests/benchmark/compute/instruction/test_tx_context.py +++ b/tests/benchmark/compute/instruction/test_tx_context.py @@ -7,7 +7,7 @@ - BLOBHASH """ -from typing import Any, Dict +import math import pytest from execution_testing import ( @@ -41,36 +41,47 @@ def test_call_frame_context_ops( ) -@pytest.mark.repricing(blob_index=0, blobs_present=1) +@pytest.mark.repricing @pytest.mark.parametrize( - "blob_index, blobs_present", + "blob_present", [ - pytest.param(0, 0, id="no blobs"), - pytest.param(0, 1, id="one blob and accessed"), - pytest.param(1, 1, id="one blob but access non-existent index"), - pytest.param(5, 6, id="six blobs, access latest"), + pytest.param(0, id="no_blobs"), + pytest.param(1, id="one_blob"), ], ) def test_blobhash( fork: Fork, benchmark_test: BenchmarkTestFiller, - blob_index: int, - blobs_present: bool, + blob_present: int, + fixed_opcode_count: int | None, + gas_benchmark_value: int, ) -> None: """Benchmark BLOBHASH instruction.""" - tx_kwargs: Dict[str, Any] = {} - if blobs_present > 0: - tx_kwargs["ty"] = TransactionType.BLOB_TRANSACTION - tx_kwargs["max_fee_per_blob_gas"] = fork.min_base_fee_per_blob_gas() - tx_kwargs["blob_versioned_hashes"] = add_kzg_version( - [i.to_bytes() * 32 for i in range(blobs_present)], - BlobsSpec.BLOB_COMMITMENT_VERSION_KZG, - ) + tx_kwargs: dict = {} + if blob_present: + cap = fork.transaction_gas_limit_cap() + if fixed_opcode_count is None and cap is not None: + # Check if blob tx splits would exceed block blob limit + required_splits = math.ceil(gas_benchmark_value / cap) + max_blobs = fork.max_blobs_per_block() + if required_splits > max_blobs: + pytest.skip( + f"Blob tx needs {required_splits} splits but fork allows " + f"{max_blobs} blobs/block" + ) + tx_kwargs = { + "ty": TransactionType.BLOB_TRANSACTION, + "max_fee_per_blob_gas": fork.min_base_fee_per_blob_gas(), + "blob_versioned_hashes": add_kzg_version( + [i.to_bytes(32, "big") for i in range(blob_present)], + BlobsSpec.BLOB_COMMITMENT_VERSION_KZG, + ), + } benchmark_test( target_opcode=Op.BLOBHASH, code_generator=ExtCallGenerator( - attack_block=Op.BLOBHASH(blob_index), + attack_block=Op.BLOBHASH(Op.PUSH0), tx_kwargs=tx_kwargs, ), ) From 2c549ce0b655dab328e917ed251acbae5a655cbb Mon Sep 17 00:00:00 2001 From: Mario Vega Date: Thu, 29 Jan 2026 20:01:38 +0100 Subject: [PATCH 3/3] feat(testing/fixtures): Add logs to state fixtures (#2091) * feat(testing/specs): Add receipt, including log list, to state fixture * fix * feat(test-specs): add transaction log verification support * fix(testing): unit test expectations * fix: tox -e static * feat(testing/tests): Add log unit test * feat(test): Add receipts to blockchain_tests to help debug root mismatches (#5) * refactor(specs/testing): gasUsed -> cumulativeGasUsed * refactor: Add RLP to tx receipts and use proper fields --------- Co-authored-by: spencer-tb Co-authored-by: felipe --- packages/testing/src/conftest.py | 16 +- .../testing/src/execution_testing/__init__.py | 2 + .../base_types/serialization.py | 22 +- .../client_clis/clis/execution_specs.py | 1 + .../client_clis/tests/fixtures/1/exp.json | 4 +- .../client_clis/tests/fixtures/3/exp.json | 4 +- .../client_clis/tests/test_execution_specs.py | 2 - .../exceptions/exceptions/transaction.py | 2 + .../execution_testing/fixtures/blockchain.py | 7 +- .../src/execution_testing/fixtures/common.py | 90 +++- .../src/execution_testing/fixtures/state.py | 7 +- .../src/execution_testing/specs/blockchain.py | 15 +- .../src/execution_testing/specs/helpers.py | 86 +++- .../src/execution_testing/specs/state.py | 17 + .../blockchain_london_invalid_filled.json | 422 +++++++++++------- .../blockchain_london_valid_filled.json | 392 ++++++++++------ ...ncun_blockchain_test_engine_tx_type_0.json | 30 +- ...inid_cancun_blockchain_test_tx_type_0.json | 155 ++++--- .../chainid_cancun_state_test_tx_type_0.json | 33 +- .../chainid_cancun_state_test_tx_type_1.json | 39 +- ...id_istanbul_blockchain_test_tx_type_0.json | 133 +++--- ...inid_london_blockchain_test_tx_type_0.json | 133 +++--- ...aris_blockchain_test_engine_tx_type_0.json | 30 +- .../chainid_paris_state_test_tx_type_0.json | 33 +- ...ghai_blockchain_test_engine_tx_type_0.json | 30 +- ...chainid_shanghai_state_test_tx_type_0.json | 33 +- .../specs/tests/test_expect.py | 170 ++++++- .../specs/tests/test_fixtures.py | 23 +- .../execution_testing/test_types/__init__.py | 3 +- .../test_types/receipt_types.py | 34 +- .../test_types/transaction_types.py | 10 - .../evm_tools/t8n/t8n_types.py | 15 +- .../test_point_evaluation_precompile.py | 2 +- .../test_mcopy_memory_expansion.py | 2 +- .../test_execution_gas.py | 8 +- .../test_refunds.py | 2 +- tests/prague/eip7702_set_code_tx/test_gas.py | 2 +- .../eip7702_set_code_tx/test_set_code_txs.py | 4 +- .../eip3860_initcode/test_initcode.py | 2 +- 39 files changed, 1384 insertions(+), 631 deletions(-) diff --git a/packages/testing/src/conftest.py b/packages/testing/src/conftest.py index 835ef90170..9f7efe2dd8 100644 --- a/packages/testing/src/conftest.py +++ b/packages/testing/src/conftest.py @@ -8,6 +8,7 @@ from execution_testing.client_clis import ( BesuTransitionTool, ExecutionSpecsTransitionTool, + GethTransitionTool, TransitionTool, ) @@ -49,11 +50,16 @@ def installed_transition_tool_instances() -> Generator[ @pytest.fixture( - params=INSTALLED_TRANSITION_TOOLS, - ids=[ - transition_tool_class.__name__ - for transition_tool_class in INSTALLED_TRANSITION_TOOLS - ], + params=[ + pytest.param( + transition_tool, + marks=[pytest.mark.xfail(reason="Geth t8n needs update")] + if transition_tool == GethTransitionTool + else [], + id=transition_tool.__name__, + ) + for transition_tool in INSTALLED_TRANSITION_TOOLS + ] ) def installed_t8n( request: pytest.FixtureRequest, diff --git a/packages/testing/src/execution_testing/__init__.py b/packages/testing/src/execution_testing/__init__.py index 05f4914c83..fbc3d6c5eb 100644 --- a/packages/testing/src/execution_testing/__init__.py +++ b/packages/testing/src/execution_testing/__init__.py @@ -71,6 +71,7 @@ TestParameterGroup, TestPhaseManager, Transaction, + TransactionLog, TransactionReceipt, TransactionType, Withdrawal, @@ -186,6 +187,7 @@ "TestPrivateKey2", "Transaction", "TransactionException", + "TransactionLog", "TransactionReceipt", "TransactionTest", "TransactionTestFiller", diff --git a/packages/testing/src/execution_testing/base_types/serialization.py b/packages/testing/src/execution_testing/base_types/serialization.py index 251fd4de26..5d5f75e7af 100644 --- a/packages/testing/src/execution_testing/base_types/serialization.py +++ b/packages/testing/src/execution_testing/base_types/serialization.py @@ -1,9 +1,10 @@ """Ethereum test types for serialization and encoding.""" -from typing import Any, ClassVar, List +from typing import Any, ClassVar, List, Self, Sequence import ethereum_rlp as eth_rlp from ethereum_types.numeric import Uint +from trie import HexaryTrie from execution_testing.base_types import Bytes @@ -33,6 +34,7 @@ class RLPSerializable: signable: ClassVar[bool] = False rlp_fields: ClassVar[List[str]] rlp_signing_fields: ClassVar[List[str]] + rlp_exclude_none: ClassVar[bool] = False def get_rlp_fields(self) -> List[str]: """ @@ -102,9 +104,10 @@ def to_list_from_fields(self, fields: List[str]) -> List[Any]: f'in object type "{self.__class__.__name__}"' ) try: - values_list.append( - to_serializable_element(getattr(self, field)) - ) + value = getattr(self, field) + if self.rlp_exclude_none and value is None: + continue + values_list.append(to_serializable_element(value)) except Exception as e: raise Exception( f'Unable to rlp serialize field "{field}" ' @@ -151,6 +154,17 @@ def rlp(self) -> Bytes: self.get_rlp_prefix() + eth_rlp.encode(self.to_list(signing=False)) ) + @classmethod + def list_root(cls, element_list: Sequence[Self]) -> bytes: + """Return the root of a list of the given type.""" + t = HexaryTrie(db={}) + for i, e in enumerate(element_list): + t.set( + eth_rlp.encode(Uint(i)), + e.rlp(), + ) + return t.root_hash + class SignableRLPSerializable(RLPSerializable): """ diff --git a/packages/testing/src/execution_testing/client_clis/clis/execution_specs.py b/packages/testing/src/execution_testing/client_clis/clis/execution_specs.py index 7f181df9cc..4066124e4e 100644 --- a/packages/testing/src/execution_testing/client_clis/clis/execution_specs.py +++ b/packages/testing/src/execution_testing/client_clis/clis/execution_specs.py @@ -227,6 +227,7 @@ class ExecutionSpecsExceptionMapper(ExceptionMapper): BlockException.SYSTEM_CONTRACT_EMPTY: "System contract address", BlockException.SYSTEM_CONTRACT_CALL_FAILED: "call failed:", BlockException.INVALID_DEPOSIT_EVENT_LAYOUT: "deposit", + TransactionException.LOG_MISMATCH: "LogMismatchError", } mapping_regex: ClassVar[Dict[ExceptionBase, str]] = { # Temporary solution for issue #1981. diff --git a/packages/testing/src/execution_testing/client_clis/tests/fixtures/1/exp.json b/packages/testing/src/execution_testing/client_clis/tests/fixtures/1/exp.json index 03da7dcdb2..92f768586d 100644 --- a/packages/testing/src/execution_testing/client_clis/tests/fixtures/1/exp.json +++ b/packages/testing/src/execution_testing/client_clis/tests/fixtures/1/exp.json @@ -30,10 +30,10 @@ "root": "0x", "status": "0x1", "cumulativeGasUsed": "0x5208", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logs": [], + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "transactionHash": "0x0557bacce3375c98d806609b8d5043072f0b6a8bae45ae5a67a00d3a1a18d673", "contractAddress": "0x0000000000000000000000000000000000000000", - "gasUsed": "0x5208", "blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "transactionIndex": "0x0" } diff --git a/packages/testing/src/execution_testing/client_clis/tests/fixtures/3/exp.json b/packages/testing/src/execution_testing/client_clis/tests/fixtures/3/exp.json index 6238b76ecb..753bd8b44c 100644 --- a/packages/testing/src/execution_testing/client_clis/tests/fixtures/3/exp.json +++ b/packages/testing/src/execution_testing/client_clis/tests/fixtures/3/exp.json @@ -31,10 +31,10 @@ "root": "0x", "status": "0x1", "cumulativeGasUsed": "0x521f", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logs": [], + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "transactionHash": "0x72fadbef39cd251a437eea619cfeda752271a5faaaa2147df012e112159ffb81", "contractAddress": "0x0000000000000000000000000000000000000000", - "gasUsed": "0x521f", "blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "transactionIndex": "0x0" } diff --git a/packages/testing/src/execution_testing/client_clis/tests/test_execution_specs.py b/packages/testing/src/execution_testing/client_clis/tests/test_execution_specs.py index 498e08deb0..4f8964a67f 100644 --- a/packages/testing/src/execution_testing/client_clis/tests/test_execution_specs.py +++ b/packages/testing/src/execution_testing/client_clis/tests/test_execution_specs.py @@ -190,8 +190,6 @@ def test_evm_t8n( # eels are handled here. missing_receipt_fields = [ "root", - "status", - "cumulativeGasUsed", "contractAddress", "blockHash", "transactionIndex", diff --git a/packages/testing/src/execution_testing/exceptions/exceptions/transaction.py b/packages/testing/src/execution_testing/exceptions/exceptions/transaction.py index 64d79e0478..a2b90227fd 100644 --- a/packages/testing/src/execution_testing/exceptions/exceptions/transaction.py +++ b/packages/testing/src/execution_testing/exceptions/exceptions/transaction.py @@ -194,3 +194,5 @@ class TransactionException(ExceptionBase): """ TYPE_4_TX_PRE_FORK = auto() """Transaction type 4 included before activation fork.""" + LOG_MISMATCH = auto() + """Transaction receipt logs do not match expected logs.""" diff --git a/packages/testing/src/execution_testing/fixtures/blockchain.py b/packages/testing/src/execution_testing/fixtures/blockchain.py index fa85d4b60b..6b15039515 100644 --- a/packages/testing/src/execution_testing/fixtures/blockchain.py +++ b/packages/testing/src/execution_testing/fixtures/blockchain.py @@ -64,7 +64,11 @@ ) from .base import BaseFixture, FixtureFillingPhase -from .common import FixtureAuthorizationTuple, FixtureBlobSchedule +from .common import ( + FixtureAuthorizationTuple, + FixtureBlobSchedule, + FixtureTransactionReceipt, +) def post_state_validator( @@ -638,6 +642,7 @@ def strip_block_number_computed_field(cls, data: Any) -> Any: default_factory=list, alias="uncleHeaders" ) withdrawals: List[FixtureWithdrawal] | None = None + receipts: List[FixtureTransactionReceipt] | None = None execution_witness: WitnessChunk | None = None block_access_list: BlockAccessList | None = Field( None, description="EIP-7928 Block Access List" diff --git a/packages/testing/src/execution_testing/fixtures/common.py b/packages/testing/src/execution_testing/fixtures/common.py index eb381019f9..2dadf0127b 100644 --- a/packages/testing/src/execution_testing/fixtures/common.py +++ b/packages/testing/src/execution_testing/fixtures/common.py @@ -1,19 +1,28 @@ """Common types used to define multiple fixture types.""" -from typing import Any, Dict +from typing import Any, ClassVar, Dict, List -from pydantic import AliasChoices, Field, model_validator +from pydantic import AliasChoices, Field, computed_field, model_validator from execution_testing.base_types import ( BlobSchedule, + Bloom, + Bytes, CamelModel, EthereumTestRootModel, + Hash, + RLPSerializable, SignableRLPSerializable, ZeroPaddedHexNumber, ) from execution_testing.test_types.account_types import Address +from execution_testing.test_types.receipt_types import ( + ReceiptDelegation, + TransactionReceipt, +) from execution_testing.test_types.transaction_types import ( AuthorizationTupleGeneric, + Transaction, ) @@ -88,3 +97,80 @@ def sign(self) -> None: """Sign the current object for further serialization.""" # No-op, as the object is always already signed return + + +class FixtureTransactionLog(CamelModel, RLPSerializable): + """Fixture variant of the TransactionLog type.""" + + address: Address | None = None + topics: List[Hash] | None = None + data: Bytes | None = None + + rlp_fields: ClassVar[List[str]] = [ + "address", + "topics", + "data", + ] + + +class FixtureReceiptDelegation(ReceiptDelegation): + """Fixture variant of the ReceiptDelegation type.""" + + nonce: ZeroPaddedHexNumber + + +class FixtureTransactionReceipt(CamelModel, RLPSerializable): + """Fixture variant of the TransactionReceipt type.""" + + transaction_hash: Hash + ty: ZeroPaddedHexNumber = Field(..., alias="type") + cumulative_gas_used: ZeroPaddedHexNumber + bloom: Bloom + logs: List[FixtureTransactionLog] + post_state: Hash | None = None + status: bool | None = None + + rlp_fields: ClassVar[List[str]] = [ + "post_state", + "status", + "cumulative_gas_used", + "bloom", + "logs", + ] + rlp_exclude_none: ClassVar[bool] = True + + @model_validator(mode="before") + @classmethod + def _drop_computed_fields(cls, data: Any) -> Any: + if isinstance(data, dict): + data = dict(data) + data.pop("rlp", None) + data.pop("rlp_field", None) + return data + + @computed_field(alias="rlp") + def rlp_field(self) -> Bytes: + """Return the RLP.""" + return self.rlp() + + def get_rlp_prefix(self) -> bytes: + """ + Return a prefix that has to be appended to the serialized object. + + By default, an empty string is returned. + """ + if self.ty > 0: + return bytes([self.ty]) + return b"" + + @classmethod + def from_transaction_receipt( + cls, + receipt: TransactionReceipt, + tx: Transaction, + ) -> "FixtureTransactionReceipt": + """Return FixtureTransactionReceipt from a TransactionReceipt.""" + model_as_dict = receipt.model_dump( + exclude_none=True, include=set(cls.model_fields.keys()) + ) | {"ty": tx.ty, "transaction_hash": tx.hash} + return cls(**model_as_dict) diff --git a/packages/testing/src/execution_testing/fixtures/state.py b/packages/testing/src/execution_testing/fixtures/state.py index a69eb35899..32891b5dc0 100644 --- a/packages/testing/src/execution_testing/fixtures/state.py +++ b/packages/testing/src/execution_testing/fixtures/state.py @@ -22,7 +22,11 @@ ) from .base import BaseFixture -from .common import FixtureAuthorizationTuple, FixtureBlobSchedule +from .common import ( + FixtureAuthorizationTuple, + FixtureBlobSchedule, + FixtureTransactionReceipt, +) class FixtureEnvironment(EnvironmentGeneric[ZeroPaddedHexNumber]): @@ -89,6 +93,7 @@ class FixtureForkPost(CamelModel): state_root: Hash = Field(..., alias="hash") logs_hash: Hash = Field(..., alias="logs") + receipt: FixtureTransactionReceipt | None = None tx_bytes: Bytes = Field(..., alias="txbytes") indexes: FixtureForkPostIndexes = Field( default_factory=FixtureForkPostIndexes diff --git a/packages/testing/src/execution_testing/specs/blockchain.py b/packages/testing/src/execution_testing/specs/blockchain.py index 3acd66a03f..41f42f597d 100644 --- a/packages/testing/src/execution_testing/specs/blockchain.py +++ b/packages/testing/src/execution_testing/specs/blockchain.py @@ -64,7 +64,10 @@ FixtureWithdrawal, InvalidFixtureBlock, ) -from execution_testing.fixtures.common import FixtureBlobSchedule +from execution_testing.fixtures.common import ( + FixtureBlobSchedule, + FixtureTransactionReceipt, +) from execution_testing.forks import Fork from execution_testing.test_types import ( Alloc, @@ -381,6 +384,16 @@ def get_fixture_block(self) -> FixtureBlock | InvalidFixtureBlock: if self.withdrawals is not None else None ), + receipts=( + [ + FixtureTransactionReceipt.from_transaction_receipt( + r, self.txs[i] + ) + for i, r in enumerate(self.result.receipts) + ] + if self.result.receipts + else None + ), block_access_list=self.block_access_list if self.block_access_list else None, diff --git a/packages/testing/src/execution_testing/specs/helpers.py b/packages/testing/src/execution_testing/specs/helpers.py index 42f1a911a5..a176cd1c59 100644 --- a/packages/testing/src/execution_testing/specs/helpers.py +++ b/packages/testing/src/execution_testing/specs/helpers.py @@ -12,7 +12,11 @@ TransactionException, UndefinedException, ) -from execution_testing.test_types import Transaction, TransactionReceipt +from execution_testing.test_types import ( + Transaction, + TransactionLog, + TransactionReceipt, +) class ExecutionContext(StrEnum): @@ -131,6 +135,29 @@ def __init__( super().__init__(message) +class LogMismatchError(Exception): + """ + Exception used when an actual log field differs from the expected one. + """ + + def __init__( + self, + index: int, + log_index: int, + field_name: str, + expected_value: Any, + actual_value: Any, + ): + """Initialize the exception.""" + message = ( + f"\nLogMismatch (pos={index}, log={log_index}):" + f"\n What: {field_name} mismatch!" + f"\n Want: {expected_value}" + f"\n Got: {actual_value}" + ) + super().__init__(message) + + @dataclass class ExceptionInfo: """Info to print transaction exception error messages.""" @@ -236,6 +263,39 @@ def __init__( ) +def verify_log( + tx_index: int, + log_index: int, + expected: TransactionLog, + actual: TransactionLog, +) -> None: + """Verify a single log matches expected values (only specified fields).""" + if expected.address is not None and expected.address != actual.address: + raise LogMismatchError( + index=tx_index, + log_index=log_index, + field_name="address", + expected_value=expected.address, + actual_value=actual.address, + ) + if expected.topics is not None and expected.topics != actual.topics: + raise LogMismatchError( + index=tx_index, + log_index=log_index, + field_name="topics", + expected_value=expected.topics, + actual_value=actual.topics, + ) + if expected.data is not None and expected.data != actual.data: + raise LogMismatchError( + index=tx_index, + log_index=log_index, + field_name="data", + expected_value=expected.data, + actual_value=actual.data, + ) + + def verify_transaction_receipt( transaction_index: int, expected_receipt: TransactionReceipt | None, @@ -252,15 +312,31 @@ def verify_transaction_receipt( return assert actual_receipt is not None if ( - expected_receipt.gas_used is not None - and actual_receipt.gas_used != expected_receipt.gas_used + expected_receipt.cumulative_gas_used is not None + and actual_receipt.cumulative_gas_used + != expected_receipt.cumulative_gas_used ): raise TransactionReceiptMismatchError( index=transaction_index, field_name="gas_used", - expected_value=expected_receipt.gas_used, - actual_value=actual_receipt.gas_used, + expected_value=expected_receipt.cumulative_gas_used, + actual_value=actual_receipt.cumulative_gas_used, ) + if expected_receipt.logs is not None and actual_receipt.logs is not None: + actual_logs = actual_receipt.logs + expected_logs = expected_receipt.logs + if len(expected_logs) != len(actual_logs): + raise LogMismatchError( + index=transaction_index, + log_index=0, + field_name="log_count", + expected_value=len(expected_logs), + actual_value=len(actual_logs), + ) + for log_idx, (expected, actual) in enumerate( + zip(expected_logs, actual_logs, strict=True) + ): + verify_log(transaction_index, log_idx, expected, actual) # TODO: Add more fields as needed diff --git a/packages/testing/src/execution_testing/specs/state.py b/packages/testing/src/execution_testing/specs/state.py index e4d5f9c61c..16af5fe4e1 100644 --- a/packages/testing/src/execution_testing/specs/state.py +++ b/packages/testing/src/execution_testing/specs/state.py @@ -44,6 +44,7 @@ FixtureEnvironment, FixtureForkPost, FixtureTransaction, + FixtureTransactionReceipt, ) from execution_testing.forks import Fork from execution_testing.logging import ( @@ -472,6 +473,21 @@ def make_state_test_fixture( f"expected_benchmark_gas_used " f"({expected_benchmark_gas_used}), difference: {diff}" ) + if len(transition_tool_output.result.receipts) == 1: + receipt = FixtureTransactionReceipt.from_transaction_receipt( + transition_tool_output.result.receipts[0], tx + ) + receipt_root = FixtureTransactionReceipt.list_root([receipt]) + assert ( + transition_tool_output.result.receipts_root == receipt_root + ), ( + f"Receipts root mismatch: " + f"{transition_tool_output.result.receipts_root} != " + f"{receipt_root.hex()}" + f"Receipt: {receipt.rlp()}" + ) + else: + receipt = None return StateFixture( env=FixtureEnvironment(**env.model_dump(exclude_none=True)), @@ -481,6 +497,7 @@ def make_state_test_fixture( FixtureForkPost( state_root=transition_tool_output.result.state_root, logs_hash=transition_tool_output.result.logs_hash, + receipt=receipt, tx_bytes=tx.rlp(), expect_exception=tx.error, state=output_alloc, diff --git a/packages/testing/src/execution_testing/specs/tests/fixtures/blockchain_london_invalid_filled.json b/packages/testing/src/execution_testing/specs/tests/fixtures/blockchain_london_invalid_filled.json index b70a5b4027..9f3aa32522 100644 --- a/packages/testing/src/execution_testing/specs/tests/fixtures/blockchain_london_invalid_filled.json +++ b/packages/testing/src/execution_testing/specs/tests/fixtures/blockchain_london_invalid_filled.json @@ -1,11 +1,6 @@ { "000/my_blockchain_test/London": { - "_info": { - "hash": "0x94854ed3844fcf06f8b74349e63aa0e6dcf43a307f5888b93be310ff39de55ff", - "fixture_format": "blockchain_test" - }, "network": "London", - "genesisRLP": "0xf90200f901fba00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a089a5be1d3306f6f05b42678ef13ac3dbc37bef9a2a80862c21eb22eee29194c2a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200008088016345785d8a0000808000a000000000000000000000000000000000000000000000000000000000000000008800000000000000008203e8c0c0", "genesisBlockHeader": { "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", @@ -25,9 +20,139 @@ "baseFeePerGas": "0x03e8", "hash": "0x6241b4534da26b654ec5bb30d29b1d5202454af544b05828433354da7471957c" }, + "pre": { + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { + "nonce": "0x00", + "balance": "0x01000000000000000000", + "code": "0x", + "storage": {} + }, + "0xd02d72e067e77158444ef2020ff2d325f929b363": { + "nonce": "0x01", + "balance": "0x01000000000000000000", + "code": "0x", + "storage": {} + }, + "0xcccccccccccccccccccccccccccccccccccccccc": { + "nonce": "0x01", + "balance": "0x010000000000", + "code": "0x484355483a036110004301554761200043015500", + "storage": {} + }, + "0xcccccccccccccccccccccccccccccccccccccccd": { + "nonce": "0x01", + "balance": "0x020000000000", + "code": "0x60008060008073cccccccccccccccccccccccccccccccccccccccc5af450", + "storage": {} + }, + "0x000000000000000000000000000000000000c0de": { + "nonce": "0x01", + "balance": "0x00", + "code": "0x60008060008073cccccccccccccccccccccccccccccccccccccccc5af450", + "storage": {} + }, + "0xccccccccccccccccccccccccccccccccccccccce": { + "nonce": "0x01", + "balance": "0x020000000000", + "code": "0x60008060008061100061c0de5af160008060008073cccccccccccccccccccccccccccccccccccccccc5af4905050", + "storage": {} + } + }, + "postState": { + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { + "nonce": "0x0a", + "balance": "0xfffffffffba0afe5e7", + "code": "0x", + "storage": {} + }, + "0xd02d72e067e77158444ef2020ff2d325f929b363": { + "nonce": "0x01", + "balance": "0x01000000000000000000", + "code": "0x", + "storage": {} + }, + "0xcccccccccccccccccccccccccccccccccccccccc": { + "nonce": "0x01", + "balance": "0x010000000000", + "code": "0x484355483a036110004301554761200043015500", + "storage": { + "0x01": "0x036b", + "0x1001": "0x01", + "0x2001": "0x010000000000", + "0x02": "0x02fe", + "0x1002": "0x0a", + "0x2002": "0x010000000000", + "0x03": "0x029f", + "0x1003": "0x0149", + "0x2003": "0x010000000000", + "0x04": "0x024c", + "0x1004": "0x019c", + "0x2004": "0x010000000000" + } + }, + "0xcccccccccccccccccccccccccccccccccccccccd": { + "nonce": "0x01", + "balance": "0x020000000000", + "code": "0x60008060008073cccccccccccccccccccccccccccccccccccccccc5af450", + "storage": { + "0x02": "0x02fe", + "0x1002": "0x64", + "0x2002": "0x020000000000", + "0x03": "0x029f", + "0x1003": "0x018401", + "0x2003": "0x020000000000", + "0x04": "0x024c", + "0x1004": "0x018454", + "0x2004": "0x020000000000" + } + }, + "0x000000000000000000000000000000000000c0de": { + "nonce": "0x01", + "balance": "0x3000", + "code": "0x60008060008073cccccccccccccccccccccccccccccccccccccccc5af450", + "storage": { + "0x02": "0x02fe", + "0x1002": "0x64", + "0x2002": "0x1000", + "0x03": "0x029f", + "0x1003": "0x64", + "0x2003": "0x2000", + "0x04": "0x024c", + "0x1004": "0x64", + "0x2004": "0x3000" + } + }, + "0xccccccccccccccccccccccccccccccccccccccce": { + "nonce": "0x01", + "balance": "0x01ffffffd000", + "code": "0x60008060008061100061c0de5af160008060008073cccccccccccccccccccccccccccccccccccccccc5af4905050", + "storage": { + "0x02": "0x02fe", + "0x1002": "0x64", + "0x2002": "0x01fffffff000", + "0x03": "0x029f", + "0x1003": "0x64", + "0x2003": "0x01ffffffe000", + "0x04": "0x024c", + "0x1004": "0x64", + "0x2004": "0x01ffffffd000" + } + }, + "0xba5e000000000000000000000000000000000000": { + "nonce": "0x00", + "balance": "0x6f05b5a16c783b4b", + "code": "0x", + "storage": {} + } + }, + "lastblockhash": "0xf5e2f23d9a212edbb35a07bc9f582f4a632b694bd4ef8742de8ad6c6acacf72c", + "config": { + "network": "London", + "chainid": "0x01" + }, + "genesisRLP": "0xf90200f901fba00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a089a5be1d3306f6f05b42678ef13ac3dbc37bef9a2a80862c21eb22eee29194c2a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200008088016345785d8a0000808000a000000000000000000000000000000000000000000000000000000000000000008800000000000000008203e8c0c0", "blocks": [ { - "rlp": "0xf9026ef901fea06241b4534da26b654ec5bb30d29b1d5202454af544b05828433354da7471957ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a03eb2e72e8ed9a59768bb9ac05915b781a764f2582edcf111053fe6531e466613a0586f963eea0fb4726f0f91f895f2aa5d67bffb5207a529b40d781244a0c7017ba029b0562f7140574dd0d50dee8a271b22e1a0a7b78fca58f7c60370d8317ba2a9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000188016345785d8a0000830155340c80a0000000000000000000000000000000000000000000000000000000000000000088000000000000000082036bf86ab86802f8650180018203e8830f424094cccccccccccccccccccccccccccccccccccccccc8001c080a03351b6993208fc7b03fd770c8c06440cfb0d75b29aafee0a4c64c8ba20a80e58a067817fdb3058e75c5d26e51a33d1e338346bc7d406e115447a4bb5f7ab01625bc0", "blockHeader": { "parentHash": "0x6241b4534da26b654ec5bb30d29b1d5202454af544b05828433354da7471957c", "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", @@ -47,7 +172,6 @@ "baseFeePerGas": "0x036b", "hash": "0x12bba91a7e1f277f1549e832e06820f8849308f70f8659acf846bdc15f5d586e" }, - "blocknumber": "1", "transactions": [ { "type": "0x02", @@ -66,10 +190,22 @@ "sender": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" } ], - "uncleHeaders": [] + "uncleHeaders": [], + "receipts": [ + { + "transactionHash": "0xbca913628955677525aef79728df903b090ce75a14d47dfaf9200753ee28f8a9", + "type": "0x02", + "cumulativeGasUsed": "0x015534", + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logs": [], + "status": true, + "rlp": "0x02f901090183015534b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0" + } + ], + "rlp": "0xf9026ef901fea06241b4534da26b654ec5bb30d29b1d5202454af544b05828433354da7471957ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a03eb2e72e8ed9a59768bb9ac05915b781a764f2582edcf111053fe6531e466613a0586f963eea0fb4726f0f91f895f2aa5d67bffb5207a529b40d781244a0c7017ba029b0562f7140574dd0d50dee8a271b22e1a0a7b78fca58f7c60370d8317ba2a9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000188016345785d8a0000830155340c80a0000000000000000000000000000000000000000000000000000000000000000088000000000000000082036bf86ab86802f8650180018203e8830f424094cccccccccccccccccccccccccccccccccccccccc8001c080a03351b6993208fc7b03fd770c8c06440cfb0d75b29aafee0a4c64c8ba20a80e58a067817fdb3058e75c5d26e51a33d1e338346bc7d406e115447a4bb5f7ab01625bc0", + "blocknumber": "1" }, { - "rlp": "0xf90349f901fea012bba91a7e1f277f1549e832e06820f8849308f70f8659acf846bdc15f5d586ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a0d9d9cc8ae73834ba9dc75fe8c68d36e980c82fcaf887dc220a05f152a327ae55a05521d9ad5adef72f021e4270a1f6851ca772dd56acaf4ff03362151bfb715298a0e225d44649351c3dccc61c1d904451d6f0f5a407c072099fe1085cfad88447d6b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000288016345785d8a000083053c421880a000000000000000000000000000000000000000000000000000000000000000008800000000000000008202fef90144b86a02f86701010a8203e8830f424094cccccccccccccccccccccccccccccccccccccccc80820201c080a06ea285a870a051df2b8c80c462b7d3517f984815e09c4748efc8548a40434050a052f635268c1b9e1538ac76b37cb69c7b897595744d6de2dda9507b6624d352d0b86a02f8670102648203e8830f424094cccccccccccccccccccccccccccccccccccccccd80820202c080a0218549e818b36b3823c3f11a65ab5c1e16f6886469c385503cc2f1af1f53825da058b082850f55fd61290a99add11b7af6356ac8d55fbe4d513f06bf648824a64db86a02f8670103648203e8830f424094ccccccccccccccccccccccccccccccccccccccce80820203c001a0339e9ed3f6342f2644e4cd33a775b7e62a8208a137dcf2e354c7473caa77782aa074004c85b651c8ca9828aac28414997f3eff46edbba2bb606a545d95fd4c9b3ac0", "blockHeader": { "parentHash": "0x12bba91a7e1f277f1549e832e06820f8849308f70f8659acf846bdc15f5d586e", "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", @@ -89,7 +225,6 @@ "baseFeePerGas": "0x02fe", "hash": "0x0e043cb2eb0339900f6199c0ab517e5be3a81d898fa58078ed8b866ddc60b010" }, - "blocknumber": "2", "transactions": [ { "type": "0x02", @@ -140,7 +275,38 @@ "sender": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" } ], - "uncleHeaders": [] + "uncleHeaders": [], + "receipts": [ + { + "transactionHash": "0x58c03df6d8bcf23e82becf748be6804b152fe2b00c569b33c6d3d85b58aafc17", + "type": "0x02", + "cumulativeGasUsed": "0x015544", + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logs": [], + "status": true, + "rlp": "0x02f901090183015544b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0" + }, + { + "transactionHash": "0x2a74b75600019e641a3106069cd02330ff969cd0538d087b6a81c46e01d8d3fd", + "type": "0x02", + "cumulativeGasUsed": "0x02b4c3", + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logs": [], + "status": true, + "rlp": "0x02f90109018302b4c3b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0" + }, + { + "transactionHash": "0x7809ac11ae8a0b4c05b635dd3e3dbca1c99757bd790157d4a8d15f1d2a765768", + "type": "0x02", + "cumulativeGasUsed": "0x053c42", + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logs": [], + "status": true, + "rlp": "0x02f901090183053c42b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0" + } + ], + "rlp": "0xf90349f901fea012bba91a7e1f277f1549e832e06820f8849308f70f8659acf846bdc15f5d586ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a0d9d9cc8ae73834ba9dc75fe8c68d36e980c82fcaf887dc220a05f152a327ae55a05521d9ad5adef72f021e4270a1f6851ca772dd56acaf4ff03362151bfb715298a0e225d44649351c3dccc61c1d904451d6f0f5a407c072099fe1085cfad88447d6b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000288016345785d8a000083053c421880a000000000000000000000000000000000000000000000000000000000000000008800000000000000008202fef90144b86a02f86701010a8203e8830f424094cccccccccccccccccccccccccccccccccccccccc80820201c080a06ea285a870a051df2b8c80c462b7d3517f984815e09c4748efc8548a40434050a052f635268c1b9e1538ac76b37cb69c7b897595744d6de2dda9507b6624d352d0b86a02f8670102648203e8830f424094cccccccccccccccccccccccccccccccccccccccd80820202c080a0218549e818b36b3823c3f11a65ab5c1e16f6886469c385503cc2f1af1f53825da058b082850f55fd61290a99add11b7af6356ac8d55fbe4d513f06bf648824a64db86a02f8670103648203e8830f424094ccccccccccccccccccccccccccccccccccccccce80820203c001a0339e9ed3f6342f2644e4cd33a775b7e62a8208a137dcf2e354c7473caa77782aa074004c85b651c8ca9828aac28414997f3eff46edbba2bb606a545d95fd4c9b3ac0", + "blocknumber": "2" }, { "rlp": "0xf902e1f901fea00e043cb2eb0339900f6199c0ab517e5be3a81d898fa58078ed8b866ddc60b010a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a069f3a735c7a7e1ea24a03a7107eba6a880d2d0251aaf24eaa7f109ece7969bf9a07c6d7fe1d1734fca072880e563f763405dc362222d37487cb098a006f7db3b2ca0976beb67b634171d419ef326220dfdda98074e3495940240a105e17643f0a4efb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000388016345785d8a0000830155442480a0000000000000000000000000000000000000000000000000000000000000000088000000000000000082029ff8ddb86c02f86901048203e88203e8830f424094cccccccccccccccccccccccccccccccccccccccc80820301c001a0720e2870881f8b0e285b7ec02c169f1165847bcb5f36ea5f33f3db6079854f63a04448266b715d7d99acd1e31dcab50d7119faa620d44c69b3f64f97d636634169b86d02f86a0105830186a08203e8830f424094cccccccccccccccccccccccccccccccccccccccd80820302c080a06c7fb2be7e001a210d72480522b9ebecade52d721360ce5242e34a6c05a02715a01220e3cb7418cd6294443b38d05f5ed9f2967b182d25c784e11e7863454b8f9bc0", @@ -165,7 +331,6 @@ "baseFeePerGas": "0x029f", "hash": "0x0cb9b60de1bb3893d7b7b806562a78aca5e9fbff47bf62893a5f6c0afcc73b48" }, - "blocknumber": "3", "transactions": [ { "type": "0x02", @@ -200,11 +365,22 @@ "sender": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" } ], - "uncleHeaders": [] + "uncleHeaders": [], + "receipts": [ + { + "transactionHash": "0x968ad99d155b27adf6347a19648ee67c40f091a1bae1f373ff3de625fcc3e2ed", + "type": "0x02", + "cumulativeGasUsed": "0x015544", + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logs": [], + "status": true, + "rlp": "0x02f901090183015544b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0" + } + ], + "blocknumber": "3" } }, { - "rlp": "0xf9034ff901fea00e043cb2eb0339900f6199c0ab517e5be3a81d898fa58078ed8b866ddc60b010a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a0bb08d7ca9c904f3d01b78041a9d70f69e83b0a6ec7af471cbd00933a47fdacaea027f7b224df1d270bfa03ba564cd4962071b89f91c965dbbfacff55e7ec66c652a0f42d43454db7c51eadf004bd9e43522c4894f02c602b709cd45e67597c622f2eb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000388016345785d8a000083053c422480a0000000000000000000000000000000000000000000000000000000000000000088000000000000000082029ff9014ab86c02f86901048203e88203e8830f424094cccccccccccccccccccccccccccccccccccccccc80820301c001a0720e2870881f8b0e285b7ec02c169f1165847bcb5f36ea5f33f3db6079854f63a04448266b715d7d99acd1e31dcab50d7119faa620d44c69b3f64f97d636634169b86a02f8670105648203e8830f424094ccccccccccccccccccccccccccccccccccccccce80820303c080a09c8531a41f9281633470c5e12b6c72c8930409a6433f26bf7b394a703d18512ea07a0c6151fde75f10a7e4efdd17a21f1f25206559bd4b8cf7880e5bc30e1cfe33b86e02f86b0106830186a0830186a0830f424094cccccccccccccccccccccccccccccccccccccccd80820304c001a0c8b85e158b532a0e3b3b5848fad0f4d5c6807805a4ce65e8591de13a62f3ac6aa03e923eb1be030c3ca69623f31ad3a357368b1ccb7ee48ac8deec5cb5dc49cb0cc0", "blockHeader": { "parentHash": "0x0e043cb2eb0339900f6199c0ab517e5be3a81d898fa58078ed8b866ddc60b010", "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", @@ -224,7 +400,6 @@ "baseFeePerGas": "0x029f", "hash": "0x5c66e5b6d6513ec98e9d8ee88137f1a2418542550977ea02015439acd2bf8f8e" }, - "blocknumber": "3", "transactions": [ { "type": "0x02", @@ -275,7 +450,38 @@ "sender": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" } ], - "uncleHeaders": [] + "uncleHeaders": [], + "receipts": [ + { + "transactionHash": "0x968ad99d155b27adf6347a19648ee67c40f091a1bae1f373ff3de625fcc3e2ed", + "type": "0x02", + "cumulativeGasUsed": "0x015544", + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logs": [], + "status": true, + "rlp": "0x02f901090183015544b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0" + }, + { + "transactionHash": "0x371a182905cef209b524b49169cf7706803c08f78cd5a3511a040dc33f964b9d", + "type": "0x02", + "cumulativeGasUsed": "0x03dcc3", + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logs": [], + "status": true, + "rlp": "0x02f90109018303dcc3b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0" + }, + { + "transactionHash": "0x9ef9c65647e57c7a93d6e88e47e03ae4e4c28625d301bd74d633d95291ce5ec1", + "type": "0x02", + "cumulativeGasUsed": "0x053c42", + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logs": [], + "status": true, + "rlp": "0x02f901090183053c42b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0" + } + ], + "rlp": "0xf9034ff901fea00e043cb2eb0339900f6199c0ab517e5be3a81d898fa58078ed8b866ddc60b010a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a0bb08d7ca9c904f3d01b78041a9d70f69e83b0a6ec7af471cbd00933a47fdacaea027f7b224df1d270bfa03ba564cd4962071b89f91c965dbbfacff55e7ec66c652a0f42d43454db7c51eadf004bd9e43522c4894f02c602b709cd45e67597c622f2eb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000388016345785d8a000083053c422480a0000000000000000000000000000000000000000000000000000000000000000088000000000000000082029ff9014ab86c02f86901048203e88203e8830f424094cccccccccccccccccccccccccccccccccccccccc80820301c001a0720e2870881f8b0e285b7ec02c169f1165847bcb5f36ea5f33f3db6079854f63a04448266b715d7d99acd1e31dcab50d7119faa620d44c69b3f64f97d636634169b86a02f8670105648203e8830f424094ccccccccccccccccccccccccccccccccccccccce80820303c080a09c8531a41f9281633470c5e12b6c72c8930409a6433f26bf7b394a703d18512ea07a0c6151fde75f10a7e4efdd17a21f1f25206559bd4b8cf7880e5bc30e1cfe33b86e02f86b0106830186a0830186a0830f424094cccccccccccccccccccccccccccccccccccccccd80820304c001a0c8b85e158b532a0e3b3b5848fad0f4d5c6807805a4ce65e8591de13a62f3ac6aa03e923eb1be030c3ca69623f31ad3a357368b1ccb7ee48ac8deec5cb5dc49cb0cc0", + "blocknumber": "3" }, { "rlp": "0xf902e1f901fea05c66e5b6d6513ec98e9d8ee88137f1a2418542550977ea02015439acd2bf8f8ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a0e834ba6cd27f2702b0adf2ef6a85e2fbc340fb948c96e75b674e9a73a5dbc3d1a04722f7b17f27aee5dfa0d92ba40e16de960374a98ec63e728acaa1564d8a54f3a0976beb67b634171d419ef326220dfdda98074e3495940240a105e17643f0a4efb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000488016345785d8a0000830155443080a0000000000000000000000000000000000000000000000000000000000000000088000000000000000082024cf8ddb86c02f86901078203e88203e8830f424094cccccccccccccccccccccccccccccccccccccccc80820401c001a0113c54f83e1b1e5c689ba86d288ec0ce2877f350b71821c4c7a3f7073b46602ca0548848e711b86ceeb657fd0a0bf44b792f6665ed18ec8a04f498471e811f8f97b86d02f86a0108830186a08203e8830f424094cccccccccccccccccccccccccccccccccccccccd80820402c001a0ebc8ad530ec3d510998aa2485763fcd1c6958c900c8d8ae6eaf86e1eddde8b23a0341e4a021f7b77da28d853c07d11253b92331ab640ad3f28f5d7b2cdbc7ceca7c0", @@ -300,7 +506,6 @@ "baseFeePerGas": "0x024c", "hash": "0x1f01f6d8ff3a461486c4c4334c94a05f114d161b1ac082c7374ad7ac51eea7f2" }, - "blocknumber": "4", "transactions": [ { "type": "0x02", @@ -335,11 +540,22 @@ "sender": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" } ], - "uncleHeaders": [] + "uncleHeaders": [], + "receipts": [ + { + "transactionHash": "0x2e93d5b1a0c54422cc7603f0d3f18e14283f9a0e45a6dbd97e5dc9380a32777e", + "type": "0x02", + "cumulativeGasUsed": "0x015544", + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logs": [], + "status": true, + "rlp": "0x02f901090183015544b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0" + } + ], + "blocknumber": "4" } }, { - "rlp": "0xf9034ff901fea05c66e5b6d6513ec98e9d8ee88137f1a2418542550977ea02015439acd2bf8f8ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a0e2b2b992b108bcd0e036067ef693f2d1b94c2f48d074a4f6b9d98537bbf15e9aa07617400c1efcb3e64b8cf55ccaaae8e335621bd6897b5e439d93b8dc011a4331a0f42d43454db7c51eadf004bd9e43522c4894f02c602b709cd45e67597c622f2eb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000488016345785d8a000083053c423080a0000000000000000000000000000000000000000000000000000000000000000088000000000000000082024cf9014ab86c02f86901078203e88203e8830f424094cccccccccccccccccccccccccccccccccccccccc80820401c001a0113c54f83e1b1e5c689ba86d288ec0ce2877f350b71821c4c7a3f7073b46602ca0548848e711b86ceeb657fd0a0bf44b792f6665ed18ec8a04f498471e811f8f97b86a02f8670108648203e8830f424094ccccccccccccccccccccccccccccccccccccccce80820403c080a08d7ec1116399aab6e1297b09302b291d73c5898a0338fb62a46c74b037d15a15a03cacc1a12eb47c261394443d490b8436f53a99d2109dac9ca5018cf531e6b29db86e02f86b0109830186a0830186a0830f424094cccccccccccccccccccccccccccccccccccccccd80820404c001a054bd3a30ee3c2182d92f30223adb53feb0f51d76970a2628d9479536ff3edfe9a06f681aa0ad9362eeeafb981394526ca6425f3a24e1c7f44c413b68dd2e56e5d0c0", "blockHeader": { "parentHash": "0x5c66e5b6d6513ec98e9d8ee88137f1a2418542550977ea02015439acd2bf8f8e", "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", @@ -359,7 +575,6 @@ "baseFeePerGas": "0x024c", "hash": "0xf5e2f23d9a212edbb35a07bc9f582f4a632b694bd4ef8742de8ad6c6acacf72c" }, - "blocknumber": "4", "transactions": [ { "type": "0x02", @@ -410,139 +625,44 @@ "sender": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" } ], - "uncleHeaders": [] + "uncleHeaders": [], + "receipts": [ + { + "transactionHash": "0x2e93d5b1a0c54422cc7603f0d3f18e14283f9a0e45a6dbd97e5dc9380a32777e", + "type": "0x02", + "cumulativeGasUsed": "0x015544", + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logs": [], + "status": true, + "rlp": "0x02f901090183015544b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0" + }, + { + "transactionHash": "0x00f633ca59767a100b4b0cf66e92b60eccb1c806a84facd4b4c838d52d877302", + "type": "0x02", + "cumulativeGasUsed": "0x03dcc3", + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logs": [], + "status": true, + "rlp": "0x02f90109018303dcc3b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0" + }, + { + "transactionHash": "0x26f6a986bb0f85d8f7abbce82c0b77ba59a8ea57486775076e37590a9c30e47d", + "type": "0x02", + "cumulativeGasUsed": "0x053c42", + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logs": [], + "status": true, + "rlp": "0x02f901090183053c42b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0" + } + ], + "rlp": "0xf9034ff901fea05c66e5b6d6513ec98e9d8ee88137f1a2418542550977ea02015439acd2bf8f8ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a0e2b2b992b108bcd0e036067ef693f2d1b94c2f48d074a4f6b9d98537bbf15e9aa07617400c1efcb3e64b8cf55ccaaae8e335621bd6897b5e439d93b8dc011a4331a0f42d43454db7c51eadf004bd9e43522c4894f02c602b709cd45e67597c622f2eb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000488016345785d8a000083053c423080a0000000000000000000000000000000000000000000000000000000000000000088000000000000000082024cf9014ab86c02f86901078203e88203e8830f424094cccccccccccccccccccccccccccccccccccccccc80820401c001a0113c54f83e1b1e5c689ba86d288ec0ce2877f350b71821c4c7a3f7073b46602ca0548848e711b86ceeb657fd0a0bf44b792f6665ed18ec8a04f498471e811f8f97b86a02f8670108648203e8830f424094ccccccccccccccccccccccccccccccccccccccce80820403c080a08d7ec1116399aab6e1297b09302b291d73c5898a0338fb62a46c74b037d15a15a03cacc1a12eb47c261394443d490b8436f53a99d2109dac9ca5018cf531e6b29db86e02f86b0109830186a0830186a0830f424094cccccccccccccccccccccccccccccccccccccccd80820404c001a054bd3a30ee3c2182d92f30223adb53feb0f51d76970a2628d9479536ff3edfe9a06f681aa0ad9362eeeafb981394526ca6425f3a24e1c7f44c413b68dd2e56e5d0c0", + "blocknumber": "4" } ], - "lastblockhash": "0xf5e2f23d9a212edbb35a07bc9f582f4a632b694bd4ef8742de8ad6c6acacf72c", - "pre": { - "0x000000000000000000000000000000000000c0de": { - "nonce": "0x01", - "balance": "0x00", - "code": "0x60008060008073cccccccccccccccccccccccccccccccccccccccc5af450", - "storage": {} - }, - "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { - "nonce": "0x00", - "balance": "0x01000000000000000000", - "code": "0x", - "storage": {} - }, - "0xcccccccccccccccccccccccccccccccccccccccc": { - "nonce": "0x01", - "balance": "0x010000000000", - "code": "0x484355483a036110004301554761200043015500", - "storage": {} - }, - "0xcccccccccccccccccccccccccccccccccccccccd": { - "nonce": "0x01", - "balance": "0x020000000000", - "code": "0x60008060008073cccccccccccccccccccccccccccccccccccccccc5af450", - "storage": {} - }, - "0xccccccccccccccccccccccccccccccccccccccce": { - "nonce": "0x01", - "balance": "0x020000000000", - "code": "0x60008060008061100061c0de5af160008060008073cccccccccccccccccccccccccccccccccccccccc5af4905050", - "storage": {} - }, - "0xd02d72e067e77158444ef2020ff2d325f929b363": { - "nonce": "0x01", - "balance": "0x01000000000000000000", - "code": "0x", - "storage": {} - } - }, - "postState": { - "0x000000000000000000000000000000000000c0de": { - "nonce": "0x01", - "balance": "0x3000", - "code": "0x60008060008073cccccccccccccccccccccccccccccccccccccccc5af450", - "storage": { - "0x02": "0x02fe", - "0x03": "0x029f", - "0x04": "0x024c", - "0x1002": "0x64", - "0x1003": "0x64", - "0x1004": "0x64", - "0x2002": "0x1000", - "0x2003": "0x2000", - "0x2004": "0x3000" - } - }, - "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { - "nonce": "0x0a", - "balance": "0xfffffffffba0afe5e7", - "code": "0x", - "storage": {} - }, - "0xba5e000000000000000000000000000000000000": { - "nonce": "0x00", - "balance": "0x6f05b5a16c783b4b", - "code": "0x", - "storage": {} - }, - "0xcccccccccccccccccccccccccccccccccccccccc": { - "nonce": "0x01", - "balance": "0x010000000000", - "code": "0x484355483a036110004301554761200043015500", - "storage": { - "0x01": "0x036b", - "0x02": "0x02fe", - "0x03": "0x029f", - "0x04": "0x024c", - "0x1001": "0x01", - "0x1002": "0x0a", - "0x1003": "0x0149", - "0x1004": "0x019c", - "0x2001": "0x010000000000", - "0x2002": "0x010000000000", - "0x2003": "0x010000000000", - "0x2004": "0x010000000000" - } - }, - "0xcccccccccccccccccccccccccccccccccccccccd": { - "nonce": "0x01", - "balance": "0x020000000000", - "code": "0x60008060008073cccccccccccccccccccccccccccccccccccccccc5af450", - "storage": { - "0x02": "0x02fe", - "0x03": "0x029f", - "0x04": "0x024c", - "0x1002": "0x64", - "0x1003": "0x018401", - "0x1004": "0x018454", - "0x2002": "0x020000000000", - "0x2003": "0x020000000000", - "0x2004": "0x020000000000" - } - }, - "0xccccccccccccccccccccccccccccccccccccccce": { - "nonce": "0x01", - "balance": "0x01ffffffd000", - "code": "0x60008060008061100061c0de5af160008060008073cccccccccccccccccccccccccccccccccccccccc5af4905050", - "storage": { - "0x02": "0x02fe", - "0x03": "0x029f", - "0x04": "0x024c", - "0x1002": "0x64", - "0x1003": "0x64", - "0x1004": "0x64", - "0x2002": "0x01fffffff000", - "0x2003": "0x01ffffffe000", - "0x2004": "0x01ffffffd000" - } - }, - "0xd02d72e067e77158444ef2020ff2d325f929b363": { - "nonce": "0x01", - "balance": "0x01000000000000000000", - "code": "0x", - "storage": {} - } - }, "sealEngine": "NoProof", - "config": { - "network": "London", - "chainid": "0x01" + "_info": { + "hash": "0x6e42f77408e60c3e36fa2e84a95fe0d885b013138c10dd90ca340e49343bafdd", + "fixture_format": "blockchain_test" } } -} +} \ No newline at end of file diff --git a/packages/testing/src/execution_testing/specs/tests/fixtures/blockchain_london_valid_filled.json b/packages/testing/src/execution_testing/specs/tests/fixtures/blockchain_london_valid_filled.json index 0968fb5608..3dd67a53a2 100644 --- a/packages/testing/src/execution_testing/specs/tests/fixtures/blockchain_london_valid_filled.json +++ b/packages/testing/src/execution_testing/specs/tests/fixtures/blockchain_london_valid_filled.json @@ -1,11 +1,6 @@ { "000/my_blockchain_test/London": { - "_info": { - "hash": "0x4ba67dfce5957e3339bf3e6e7ad78f4345b34a087c4656c92fddbef3726b1ec2", - "fixture_format": "blockchain_test" - }, "network": "London", - "genesisRLP": "0xf90200f901fba00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a089a5be1d3306f6f05b42678ef13ac3dbc37bef9a2a80862c21eb22eee29194c2a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200008088016345785d8a0000808000a000000000000000000000000000000000000000000000000000000000000000008800000000000000008203e8c0c0", "genesisBlockHeader": { "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", @@ -25,9 +20,139 @@ "baseFeePerGas": "0x03e8", "hash": "0x6241b4534da26b654ec5bb30d29b1d5202454af544b05828433354da7471957c" }, + "pre": { + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { + "nonce": "0x00", + "balance": "0x01000000000000000000", + "code": "0x", + "storage": {} + }, + "0xd02d72e067e77158444ef2020ff2d325f929b363": { + "nonce": "0x01", + "balance": "0x01000000000000000000", + "code": "0x", + "storage": {} + }, + "0xcccccccccccccccccccccccccccccccccccccccc": { + "nonce": "0x01", + "balance": "0x010000000000", + "code": "0x484355483a036110004301554761200043015500", + "storage": {} + }, + "0xcccccccccccccccccccccccccccccccccccccccd": { + "nonce": "0x01", + "balance": "0x020000000000", + "code": "0x60008060008073cccccccccccccccccccccccccccccccccccccccc5af450", + "storage": {} + }, + "0x000000000000000000000000000000000000c0de": { + "nonce": "0x01", + "balance": "0x00", + "code": "0x60008060008073cccccccccccccccccccccccccccccccccccccccc5af450", + "storage": {} + }, + "0xccccccccccccccccccccccccccccccccccccccce": { + "nonce": "0x01", + "balance": "0x020000000000", + "code": "0x60008060008061100061c0de5af160008060008073cccccccccccccccccccccccccccccccccccccccc5af4905050", + "storage": {} + } + }, + "postState": { + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { + "nonce": "0x0a", + "balance": "0xfffffffffba0afe5e7", + "code": "0x", + "storage": {} + }, + "0xd02d72e067e77158444ef2020ff2d325f929b363": { + "nonce": "0x01", + "balance": "0x01000000000000000000", + "code": "0x", + "storage": {} + }, + "0xcccccccccccccccccccccccccccccccccccccccc": { + "nonce": "0x01", + "balance": "0x010000000000", + "code": "0x484355483a036110004301554761200043015500", + "storage": { + "0x01": "0x036b", + "0x1001": "0x01", + "0x2001": "0x010000000000", + "0x02": "0x02fe", + "0x1002": "0x0a", + "0x2002": "0x010000000000", + "0x03": "0x029f", + "0x1003": "0x0149", + "0x2003": "0x010000000000", + "0x04": "0x024c", + "0x1004": "0x019c", + "0x2004": "0x010000000000" + } + }, + "0xcccccccccccccccccccccccccccccccccccccccd": { + "nonce": "0x01", + "balance": "0x020000000000", + "code": "0x60008060008073cccccccccccccccccccccccccccccccccccccccc5af450", + "storage": { + "0x02": "0x02fe", + "0x1002": "0x64", + "0x2002": "0x020000000000", + "0x03": "0x029f", + "0x1003": "0x018401", + "0x2003": "0x020000000000", + "0x04": "0x024c", + "0x1004": "0x018454", + "0x2004": "0x020000000000" + } + }, + "0x000000000000000000000000000000000000c0de": { + "nonce": "0x01", + "balance": "0x3000", + "code": "0x60008060008073cccccccccccccccccccccccccccccccccccccccc5af450", + "storage": { + "0x02": "0x02fe", + "0x1002": "0x64", + "0x2002": "0x1000", + "0x03": "0x029f", + "0x1003": "0x64", + "0x2003": "0x2000", + "0x04": "0x024c", + "0x1004": "0x64", + "0x2004": "0x3000" + } + }, + "0xccccccccccccccccccccccccccccccccccccccce": { + "nonce": "0x01", + "balance": "0x01ffffffd000", + "code": "0x60008060008061100061c0de5af160008060008073cccccccccccccccccccccccccccccccccccccccc5af4905050", + "storage": { + "0x02": "0x02fe", + "0x1002": "0x64", + "0x2002": "0x01fffffff000", + "0x03": "0x029f", + "0x1003": "0x64", + "0x2003": "0x01ffffffe000", + "0x04": "0x024c", + "0x1004": "0x64", + "0x2004": "0x01ffffffd000" + } + }, + "0xba5e000000000000000000000000000000000000": { + "nonce": "0x00", + "balance": "0x6f05b5a16c783b4b", + "code": "0x", + "storage": {} + } + }, + "lastblockhash": "0xf5e2f23d9a212edbb35a07bc9f582f4a632b694bd4ef8742de8ad6c6acacf72c", + "config": { + "network": "London", + "chainid": "0x01" + }, + "genesisRLP": "0xf90200f901fba00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a089a5be1d3306f6f05b42678ef13ac3dbc37bef9a2a80862c21eb22eee29194c2a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200008088016345785d8a0000808000a000000000000000000000000000000000000000000000000000000000000000008800000000000000008203e8c0c0", "blocks": [ { - "rlp": "0xf9026ef901fea06241b4534da26b654ec5bb30d29b1d5202454af544b05828433354da7471957ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a03eb2e72e8ed9a59768bb9ac05915b781a764f2582edcf111053fe6531e466613a0586f963eea0fb4726f0f91f895f2aa5d67bffb5207a529b40d781244a0c7017ba029b0562f7140574dd0d50dee8a271b22e1a0a7b78fca58f7c60370d8317ba2a9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000188016345785d8a0000830155340c80a0000000000000000000000000000000000000000000000000000000000000000088000000000000000082036bf86ab86802f8650180018203e8830f424094cccccccccccccccccccccccccccccccccccccccc8001c080a03351b6993208fc7b03fd770c8c06440cfb0d75b29aafee0a4c64c8ba20a80e58a067817fdb3058e75c5d26e51a33d1e338346bc7d406e115447a4bb5f7ab01625bc0", "blockHeader": { "parentHash": "0x6241b4534da26b654ec5bb30d29b1d5202454af544b05828433354da7471957c", "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", @@ -47,7 +172,6 @@ "baseFeePerGas": "0x036b", "hash": "0x12bba91a7e1f277f1549e832e06820f8849308f70f8659acf846bdc15f5d586e" }, - "blocknumber": "1", "transactions": [ { "type": "0x02", @@ -66,10 +190,22 @@ "sender": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" } ], - "uncleHeaders": [] + "uncleHeaders": [], + "receipts": [ + { + "transactionHash": "0xbca913628955677525aef79728df903b090ce75a14d47dfaf9200753ee28f8a9", + "type": "0x02", + "cumulativeGasUsed": "0x015534", + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logs": [], + "status": true, + "rlp": "0x02f901090183015534b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0" + } + ], + "rlp": "0xf9026ef901fea06241b4534da26b654ec5bb30d29b1d5202454af544b05828433354da7471957ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a03eb2e72e8ed9a59768bb9ac05915b781a764f2582edcf111053fe6531e466613a0586f963eea0fb4726f0f91f895f2aa5d67bffb5207a529b40d781244a0c7017ba029b0562f7140574dd0d50dee8a271b22e1a0a7b78fca58f7c60370d8317ba2a9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000188016345785d8a0000830155340c80a0000000000000000000000000000000000000000000000000000000000000000088000000000000000082036bf86ab86802f8650180018203e8830f424094cccccccccccccccccccccccccccccccccccccccc8001c080a03351b6993208fc7b03fd770c8c06440cfb0d75b29aafee0a4c64c8ba20a80e58a067817fdb3058e75c5d26e51a33d1e338346bc7d406e115447a4bb5f7ab01625bc0", + "blocknumber": "1" }, { - "rlp": "0xf90349f901fea012bba91a7e1f277f1549e832e06820f8849308f70f8659acf846bdc15f5d586ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a0d9d9cc8ae73834ba9dc75fe8c68d36e980c82fcaf887dc220a05f152a327ae55a05521d9ad5adef72f021e4270a1f6851ca772dd56acaf4ff03362151bfb715298a0e225d44649351c3dccc61c1d904451d6f0f5a407c072099fe1085cfad88447d6b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000288016345785d8a000083053c421880a000000000000000000000000000000000000000000000000000000000000000008800000000000000008202fef90144b86a02f86701010a8203e8830f424094cccccccccccccccccccccccccccccccccccccccc80820201c080a06ea285a870a051df2b8c80c462b7d3517f984815e09c4748efc8548a40434050a052f635268c1b9e1538ac76b37cb69c7b897595744d6de2dda9507b6624d352d0b86a02f8670102648203e8830f424094cccccccccccccccccccccccccccccccccccccccd80820202c080a0218549e818b36b3823c3f11a65ab5c1e16f6886469c385503cc2f1af1f53825da058b082850f55fd61290a99add11b7af6356ac8d55fbe4d513f06bf648824a64db86a02f8670103648203e8830f424094ccccccccccccccccccccccccccccccccccccccce80820203c001a0339e9ed3f6342f2644e4cd33a775b7e62a8208a137dcf2e354c7473caa77782aa074004c85b651c8ca9828aac28414997f3eff46edbba2bb606a545d95fd4c9b3ac0", "blockHeader": { "parentHash": "0x12bba91a7e1f277f1549e832e06820f8849308f70f8659acf846bdc15f5d586e", "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", @@ -89,7 +225,6 @@ "baseFeePerGas": "0x02fe", "hash": "0x0e043cb2eb0339900f6199c0ab517e5be3a81d898fa58078ed8b866ddc60b010" }, - "blocknumber": "2", "transactions": [ { "type": "0x02", @@ -140,10 +275,40 @@ "sender": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" } ], - "uncleHeaders": [] + "uncleHeaders": [], + "receipts": [ + { + "transactionHash": "0x58c03df6d8bcf23e82becf748be6804b152fe2b00c569b33c6d3d85b58aafc17", + "type": "0x02", + "cumulativeGasUsed": "0x015544", + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logs": [], + "status": true, + "rlp": "0x02f901090183015544b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0" + }, + { + "transactionHash": "0x2a74b75600019e641a3106069cd02330ff969cd0538d087b6a81c46e01d8d3fd", + "type": "0x02", + "cumulativeGasUsed": "0x02b4c3", + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logs": [], + "status": true, + "rlp": "0x02f90109018302b4c3b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0" + }, + { + "transactionHash": "0x7809ac11ae8a0b4c05b635dd3e3dbca1c99757bd790157d4a8d15f1d2a765768", + "type": "0x02", + "cumulativeGasUsed": "0x053c42", + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logs": [], + "status": true, + "rlp": "0x02f901090183053c42b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0" + } + ], + "rlp": "0xf90349f901fea012bba91a7e1f277f1549e832e06820f8849308f70f8659acf846bdc15f5d586ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a0d9d9cc8ae73834ba9dc75fe8c68d36e980c82fcaf887dc220a05f152a327ae55a05521d9ad5adef72f021e4270a1f6851ca772dd56acaf4ff03362151bfb715298a0e225d44649351c3dccc61c1d904451d6f0f5a407c072099fe1085cfad88447d6b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000288016345785d8a000083053c421880a000000000000000000000000000000000000000000000000000000000000000008800000000000000008202fef90144b86a02f86701010a8203e8830f424094cccccccccccccccccccccccccccccccccccccccc80820201c080a06ea285a870a051df2b8c80c462b7d3517f984815e09c4748efc8548a40434050a052f635268c1b9e1538ac76b37cb69c7b897595744d6de2dda9507b6624d352d0b86a02f8670102648203e8830f424094cccccccccccccccccccccccccccccccccccccccd80820202c080a0218549e818b36b3823c3f11a65ab5c1e16f6886469c385503cc2f1af1f53825da058b082850f55fd61290a99add11b7af6356ac8d55fbe4d513f06bf648824a64db86a02f8670103648203e8830f424094ccccccccccccccccccccccccccccccccccccccce80820203c001a0339e9ed3f6342f2644e4cd33a775b7e62a8208a137dcf2e354c7473caa77782aa074004c85b651c8ca9828aac28414997f3eff46edbba2bb606a545d95fd4c9b3ac0", + "blocknumber": "2" }, { - "rlp": "0xf9034ff901fea00e043cb2eb0339900f6199c0ab517e5be3a81d898fa58078ed8b866ddc60b010a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a0bb08d7ca9c904f3d01b78041a9d70f69e83b0a6ec7af471cbd00933a47fdacaea027f7b224df1d270bfa03ba564cd4962071b89f91c965dbbfacff55e7ec66c652a0f42d43454db7c51eadf004bd9e43522c4894f02c602b709cd45e67597c622f2eb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000388016345785d8a000083053c422480a0000000000000000000000000000000000000000000000000000000000000000088000000000000000082029ff9014ab86c02f86901048203e88203e8830f424094cccccccccccccccccccccccccccccccccccccccc80820301c001a0720e2870881f8b0e285b7ec02c169f1165847bcb5f36ea5f33f3db6079854f63a04448266b715d7d99acd1e31dcab50d7119faa620d44c69b3f64f97d636634169b86a02f8670105648203e8830f424094ccccccccccccccccccccccccccccccccccccccce80820303c080a09c8531a41f9281633470c5e12b6c72c8930409a6433f26bf7b394a703d18512ea07a0c6151fde75f10a7e4efdd17a21f1f25206559bd4b8cf7880e5bc30e1cfe33b86e02f86b0106830186a0830186a0830f424094cccccccccccccccccccccccccccccccccccccccd80820304c001a0c8b85e158b532a0e3b3b5848fad0f4d5c6807805a4ce65e8591de13a62f3ac6aa03e923eb1be030c3ca69623f31ad3a357368b1ccb7ee48ac8deec5cb5dc49cb0cc0", "blockHeader": { "parentHash": "0x0e043cb2eb0339900f6199c0ab517e5be3a81d898fa58078ed8b866ddc60b010", "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", @@ -163,7 +328,6 @@ "baseFeePerGas": "0x029f", "hash": "0x5c66e5b6d6513ec98e9d8ee88137f1a2418542550977ea02015439acd2bf8f8e" }, - "blocknumber": "3", "transactions": [ { "type": "0x02", @@ -214,10 +378,40 @@ "sender": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" } ], - "uncleHeaders": [] + "uncleHeaders": [], + "receipts": [ + { + "transactionHash": "0x968ad99d155b27adf6347a19648ee67c40f091a1bae1f373ff3de625fcc3e2ed", + "type": "0x02", + "cumulativeGasUsed": "0x015544", + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logs": [], + "status": true, + "rlp": "0x02f901090183015544b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0" + }, + { + "transactionHash": "0x371a182905cef209b524b49169cf7706803c08f78cd5a3511a040dc33f964b9d", + "type": "0x02", + "cumulativeGasUsed": "0x03dcc3", + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logs": [], + "status": true, + "rlp": "0x02f90109018303dcc3b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0" + }, + { + "transactionHash": "0x9ef9c65647e57c7a93d6e88e47e03ae4e4c28625d301bd74d633d95291ce5ec1", + "type": "0x02", + "cumulativeGasUsed": "0x053c42", + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logs": [], + "status": true, + "rlp": "0x02f901090183053c42b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0" + } + ], + "rlp": "0xf9034ff901fea00e043cb2eb0339900f6199c0ab517e5be3a81d898fa58078ed8b866ddc60b010a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a0bb08d7ca9c904f3d01b78041a9d70f69e83b0a6ec7af471cbd00933a47fdacaea027f7b224df1d270bfa03ba564cd4962071b89f91c965dbbfacff55e7ec66c652a0f42d43454db7c51eadf004bd9e43522c4894f02c602b709cd45e67597c622f2eb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000388016345785d8a000083053c422480a0000000000000000000000000000000000000000000000000000000000000000088000000000000000082029ff9014ab86c02f86901048203e88203e8830f424094cccccccccccccccccccccccccccccccccccccccc80820301c001a0720e2870881f8b0e285b7ec02c169f1165847bcb5f36ea5f33f3db6079854f63a04448266b715d7d99acd1e31dcab50d7119faa620d44c69b3f64f97d636634169b86a02f8670105648203e8830f424094ccccccccccccccccccccccccccccccccccccccce80820303c080a09c8531a41f9281633470c5e12b6c72c8930409a6433f26bf7b394a703d18512ea07a0c6151fde75f10a7e4efdd17a21f1f25206559bd4b8cf7880e5bc30e1cfe33b86e02f86b0106830186a0830186a0830f424094cccccccccccccccccccccccccccccccccccccccd80820304c001a0c8b85e158b532a0e3b3b5848fad0f4d5c6807805a4ce65e8591de13a62f3ac6aa03e923eb1be030c3ca69623f31ad3a357368b1ccb7ee48ac8deec5cb5dc49cb0cc0", + "blocknumber": "3" }, { - "rlp": "0xf9034ff901fea05c66e5b6d6513ec98e9d8ee88137f1a2418542550977ea02015439acd2bf8f8ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a0e2b2b992b108bcd0e036067ef693f2d1b94c2f48d074a4f6b9d98537bbf15e9aa07617400c1efcb3e64b8cf55ccaaae8e335621bd6897b5e439d93b8dc011a4331a0f42d43454db7c51eadf004bd9e43522c4894f02c602b709cd45e67597c622f2eb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000488016345785d8a000083053c423080a0000000000000000000000000000000000000000000000000000000000000000088000000000000000082024cf9014ab86c02f86901078203e88203e8830f424094cccccccccccccccccccccccccccccccccccccccc80820401c001a0113c54f83e1b1e5c689ba86d288ec0ce2877f350b71821c4c7a3f7073b46602ca0548848e711b86ceeb657fd0a0bf44b792f6665ed18ec8a04f498471e811f8f97b86a02f8670108648203e8830f424094ccccccccccccccccccccccccccccccccccccccce80820403c080a08d7ec1116399aab6e1297b09302b291d73c5898a0338fb62a46c74b037d15a15a03cacc1a12eb47c261394443d490b8436f53a99d2109dac9ca5018cf531e6b29db86e02f86b0109830186a0830186a0830f424094cccccccccccccccccccccccccccccccccccccccd80820404c001a054bd3a30ee3c2182d92f30223adb53feb0f51d76970a2628d9479536ff3edfe9a06f681aa0ad9362eeeafb981394526ca6425f3a24e1c7f44c413b68dd2e56e5d0c0", "blockHeader": { "parentHash": "0x5c66e5b6d6513ec98e9d8ee88137f1a2418542550977ea02015439acd2bf8f8e", "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", @@ -237,7 +431,6 @@ "baseFeePerGas": "0x024c", "hash": "0xf5e2f23d9a212edbb35a07bc9f582f4a632b694bd4ef8742de8ad6c6acacf72c" }, - "blocknumber": "4", "transactions": [ { "type": "0x02", @@ -288,139 +481,44 @@ "sender": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" } ], - "uncleHeaders": [] + "uncleHeaders": [], + "receipts": [ + { + "transactionHash": "0x2e93d5b1a0c54422cc7603f0d3f18e14283f9a0e45a6dbd97e5dc9380a32777e", + "type": "0x02", + "cumulativeGasUsed": "0x015544", + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logs": [], + "status": true, + "rlp": "0x02f901090183015544b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0" + }, + { + "transactionHash": "0x00f633ca59767a100b4b0cf66e92b60eccb1c806a84facd4b4c838d52d877302", + "type": "0x02", + "cumulativeGasUsed": "0x03dcc3", + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logs": [], + "status": true, + "rlp": "0x02f90109018303dcc3b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0" + }, + { + "transactionHash": "0x26f6a986bb0f85d8f7abbce82c0b77ba59a8ea57486775076e37590a9c30e47d", + "type": "0x02", + "cumulativeGasUsed": "0x053c42", + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logs": [], + "status": true, + "rlp": "0x02f901090183053c42b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0" + } + ], + "rlp": "0xf9034ff901fea05c66e5b6d6513ec98e9d8ee88137f1a2418542550977ea02015439acd2bf8f8ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a0e2b2b992b108bcd0e036067ef693f2d1b94c2f48d074a4f6b9d98537bbf15e9aa07617400c1efcb3e64b8cf55ccaaae8e335621bd6897b5e439d93b8dc011a4331a0f42d43454db7c51eadf004bd9e43522c4894f02c602b709cd45e67597c622f2eb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000488016345785d8a000083053c423080a0000000000000000000000000000000000000000000000000000000000000000088000000000000000082024cf9014ab86c02f86901078203e88203e8830f424094cccccccccccccccccccccccccccccccccccccccc80820401c001a0113c54f83e1b1e5c689ba86d288ec0ce2877f350b71821c4c7a3f7073b46602ca0548848e711b86ceeb657fd0a0bf44b792f6665ed18ec8a04f498471e811f8f97b86a02f8670108648203e8830f424094ccccccccccccccccccccccccccccccccccccccce80820403c080a08d7ec1116399aab6e1297b09302b291d73c5898a0338fb62a46c74b037d15a15a03cacc1a12eb47c261394443d490b8436f53a99d2109dac9ca5018cf531e6b29db86e02f86b0109830186a0830186a0830f424094cccccccccccccccccccccccccccccccccccccccd80820404c001a054bd3a30ee3c2182d92f30223adb53feb0f51d76970a2628d9479536ff3edfe9a06f681aa0ad9362eeeafb981394526ca6425f3a24e1c7f44c413b68dd2e56e5d0c0", + "blocknumber": "4" } ], - "lastblockhash": "0xf5e2f23d9a212edbb35a07bc9f582f4a632b694bd4ef8742de8ad6c6acacf72c", - "pre": { - "0x000000000000000000000000000000000000c0de": { - "nonce": "0x01", - "balance": "0x00", - "code": "0x60008060008073cccccccccccccccccccccccccccccccccccccccc5af450", - "storage": {} - }, - "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { - "nonce": "0x00", - "balance": "0x01000000000000000000", - "code": "0x", - "storage": {} - }, - "0xcccccccccccccccccccccccccccccccccccccccc": { - "nonce": "0x01", - "balance": "0x010000000000", - "code": "0x484355483a036110004301554761200043015500", - "storage": {} - }, - "0xcccccccccccccccccccccccccccccccccccccccd": { - "nonce": "0x01", - "balance": "0x020000000000", - "code": "0x60008060008073cccccccccccccccccccccccccccccccccccccccc5af450", - "storage": {} - }, - "0xccccccccccccccccccccccccccccccccccccccce": { - "nonce": "0x01", - "balance": "0x020000000000", - "code": "0x60008060008061100061c0de5af160008060008073cccccccccccccccccccccccccccccccccccccccc5af4905050", - "storage": {} - }, - "0xd02d72e067e77158444ef2020ff2d325f929b363": { - "nonce": "0x01", - "balance": "0x01000000000000000000", - "code": "0x", - "storage": {} - } - }, - "postState": { - "0x000000000000000000000000000000000000c0de": { - "nonce": "0x01", - "balance": "0x3000", - "code": "0x60008060008073cccccccccccccccccccccccccccccccccccccccc5af450", - "storage": { - "0x02": "0x02fe", - "0x03": "0x029f", - "0x04": "0x024c", - "0x1002": "0x64", - "0x1003": "0x64", - "0x1004": "0x64", - "0x2002": "0x1000", - "0x2003": "0x2000", - "0x2004": "0x3000" - } - }, - "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { - "nonce": "0x0a", - "balance": "0xfffffffffba0afe5e7", - "code": "0x", - "storage": {} - }, - "0xba5e000000000000000000000000000000000000": { - "nonce": "0x00", - "balance": "0x6f05b5a16c783b4b", - "code": "0x", - "storage": {} - }, - "0xcccccccccccccccccccccccccccccccccccccccc": { - "nonce": "0x01", - "balance": "0x010000000000", - "code": "0x484355483a036110004301554761200043015500", - "storage": { - "0x01": "0x036b", - "0x02": "0x02fe", - "0x03": "0x029f", - "0x04": "0x024c", - "0x1001": "0x01", - "0x1002": "0x0a", - "0x1003": "0x0149", - "0x1004": "0x019c", - "0x2001": "0x010000000000", - "0x2002": "0x010000000000", - "0x2003": "0x010000000000", - "0x2004": "0x010000000000" - } - }, - "0xcccccccccccccccccccccccccccccccccccccccd": { - "nonce": "0x01", - "balance": "0x020000000000", - "code": "0x60008060008073cccccccccccccccccccccccccccccccccccccccc5af450", - "storage": { - "0x02": "0x02fe", - "0x03": "0x029f", - "0x04": "0x024c", - "0x1002": "0x64", - "0x1003": "0x018401", - "0x1004": "0x018454", - "0x2002": "0x020000000000", - "0x2003": "0x020000000000", - "0x2004": "0x020000000000" - } - }, - "0xccccccccccccccccccccccccccccccccccccccce": { - "nonce": "0x01", - "balance": "0x01ffffffd000", - "code": "0x60008060008061100061c0de5af160008060008073cccccccccccccccccccccccccccccccccccccccc5af4905050", - "storage": { - "0x02": "0x02fe", - "0x03": "0x029f", - "0x04": "0x024c", - "0x1002": "0x64", - "0x1003": "0x64", - "0x1004": "0x64", - "0x2002": "0x01fffffff000", - "0x2003": "0x01ffffffe000", - "0x2004": "0x01ffffffd000" - } - }, - "0xd02d72e067e77158444ef2020ff2d325f929b363": { - "nonce": "0x01", - "balance": "0x01000000000000000000", - "code": "0x", - "storage": {} - } - }, "sealEngine": "NoProof", - "config": { - "network": "London", - "chainid": "0x01" + "_info": { + "hash": "0x620a13e96b3eb731834fad810d11e7c1ce83353cf2fdd5a2548e730d960a3951", + "fixture_format": "blockchain_test" } } -} +} \ No newline at end of file diff --git a/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_cancun_blockchain_test_engine_tx_type_0.json b/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_cancun_blockchain_test_engine_tx_type_0.json index f455f4ed49..759d758cb4 100644 --- a/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_cancun_blockchain_test_engine_tx_type_0.json +++ b/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_cancun_blockchain_test_engine_tx_type_0.json @@ -1,7 +1,7 @@ { "000/my_chain_id_test/Cancun/tx_type_0": { "_info": { - "hash": "0x82d853aef147345cedd8eb383c3ea00c1d1c4b64222911fd2580806de1f51c15", + "hash": "0xceef046d56927cb3ba54a0dddae52780b253edceb40696e62683dff192a68956", "fixture_format": "blockchain_test_engine" }, "network": "Cancun", @@ -9,7 +9,7 @@ "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "coinbase": "0x0000000000000000000000000000000000000000", - "stateRoot": "0x789d559bf5d313e15da4139b57627160d23146cf6cdf9995e0394d165b1527ef", + "stateRoot": "0xd2600b08e8060646941f031c57f82638332bb61fbf50d4dd7ee79e044a10a7be", "transactionsTrie": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "receiptTrie": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", @@ -26,27 +26,27 @@ "blobGasUsed": "0x00", "excessBlobGas": "0x00", "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000", - "hash": "0x28c341ffc393152bd02e8689d8172dd66939ac3be2b91c5841721d1755d13c2b" + "hash": "0x7f67195b5e60c9989632e87927cbbeadeed869fda749e45f9bdc7cf6e2941a1b" }, "engineNewPayloads": [ { "params": [ { - "parentHash": "0x28c341ffc393152bd02e8689d8172dd66939ac3be2b91c5841721d1755d13c2b", + "parentHash": "0x7f67195b5e60c9989632e87927cbbeadeed869fda749e45f9bdc7cf6e2941a1b", "feeRecipient": "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "stateRoot": "0xdb94ed1be4d52fb6360c88b363cb71af08df2493e57a66ec4751f90097f2fcbb", - "receiptsRoot": "0xc598f69a5674cae9337261b669970e24abc0b46e6d284372a239ec8ccbf20b0a", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "stateRoot": "0xdcdfda5b82f001e215063fbe542aa92ef1790e84b0a4d3a65845f4a5c644aa5d", + "receiptsRoot": "0x4b93b3c0006d672c5dfd4094132d3e8acd463e7cb018f86df29136c9a399d0b6", + "logsBloom": "0x04000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000", "blockNumber": "0x1", "gasLimit": "0x2540be400", - "gasUsed": "0xa861", + "gasUsed": "0xab63", "timestamp": "0x3e8", "extraData": "0x00", "prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000", "baseFeePerGas": "0x7", "blobGasUsed": "0x0", "excessBlobGas": "0x0", - "blockHash": "0x3cce15f0f21f4ea23499856be01a090f0ea1be6bea4a11777b4d0cc70d105a4b", + "blockHash": "0x08333a79bf9a2f9c8807c9ea88ade4609d082582e80f84934bd98819002451ba", "transactions": [ "0xf861800a8405f5e10094100000000000000000000000000000000000000080801ba07e09e26678ed4fac08a249ebe8ed680bf9051a5e14ad223e4b2b9d26e0208f37a05f6e3f188e3e6eab7d7d3b6568f5eac7d687b08d307d3154ccd8c87b4630509b" ], @@ -59,7 +59,7 @@ "forkchoiceUpdatedVersion": "3" } ], - "lastblockhash": "0x3cce15f0f21f4ea23499856be01a090f0ea1be6bea4a11777b4d0cc70d105a4b", + "lastblockhash": "0x08333a79bf9a2f9c8807c9ea88ade4609d082582e80f84934bd98819002451ba", "pre": { "0x000f3df6d732807ef1319fb7b8bb8522d0beac02": { "balance": "0x00", @@ -70,7 +70,7 @@ "0x1000000000000000000000000000000000000000": { "nonce": "0x00", "balance": "0x00", - "code": "0x4660015500", + "code": "0x46600155600260016000a100", "storage": {} }, "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { @@ -92,20 +92,20 @@ "0x1000000000000000000000000000000000000000": { "nonce": "0x00", "balance": "0x00", - "code": "0x4660015500", + "code": "0x46600155600260016000a100", "storage": { "0x01": "0x01" } }, "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": { "nonce": "0x00", - "balance": "0x01f923", + "balance": "0x020229", "code": "0x", "storage": {} }, "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { "nonce": "0x01", - "balance": "0x3635c9adc5de996c36", + "balance": "0x3635c9adc5de994e22", "code": "0x", "storage": {} } @@ -122,4 +122,4 @@ } } } -} +} \ No newline at end of file diff --git a/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_cancun_blockchain_test_tx_type_0.json b/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_cancun_blockchain_test_tx_type_0.json index 766dd9d9f5..d7b989563d 100644 --- a/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_cancun_blockchain_test_tx_type_0.json +++ b/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_cancun_blockchain_test_tx_type_0.json @@ -1,16 +1,11 @@ { "000/my_chain_id_test/Cancun/tx_type_0": { - "_info": { - "hash": "0x6e77c3ba39a0874917e9dcd7f911de1e950e82e028603a0fc39630f973579fd9", - "fixture_format": "blockchain_test" - }, "network": "Cancun", - "genesisRLP": "0xf9023df90237a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0789d559bf5d313e15da4139b57627160d23146cf6cdf9995e0394d165b1527efa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080808502540be400808000a0000000000000000000000000000000000000000000000000000000000000000088000000000000000007a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b4218080a00000000000000000000000000000000000000000000000000000000000000000c0c0c0", "genesisBlockHeader": { "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "coinbase": "0x0000000000000000000000000000000000000000", - "stateRoot": "0x789d559bf5d313e15da4139b57627160d23146cf6cdf9995e0394d165b1527ef", + "stateRoot": "0xd2600b08e8060646941f031c57f82638332bb61fbf50d4dd7ee79e044a10a7be", "transactionsTrie": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "receiptTrie": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", @@ -27,67 +22,19 @@ "blobGasUsed": "0x00", "excessBlobGas": "0x00", "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000", - "hash": "0x28c341ffc393152bd02e8689d8172dd66939ac3be2b91c5841721d1755d13c2b" + "hash": "0x7f67195b5e60c9989632e87927cbbeadeed869fda749e45f9bdc7cf6e2941a1b" }, - "blocks": [ - { - "rlp": "0xf902a5f9023ba028c341ffc393152bd02e8689d8172dd66939ac3be2b91c5841721d1755d13c2ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347942adc25665018aa1fe0e6bc666dac8fc2697ff9baa0db94ed1be4d52fb6360c88b363cb71af08df2493e57a66ec4751f90097f2fcbba08151d548273f6683169524b66ca9fe338b9ce42bc3540046c828fd939ae23bcba0c598f69a5674cae9337261b669970e24abc0b46e6d284372a239ec8ccbf20b0ab901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080018502540be40082a8618203e800a0000000000000000000000000000000000000000000000000000000000000000088000000000000000007a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b4218080a00000000000000000000000000000000000000000000000000000000000000000f863f861800a8405f5e10094100000000000000000000000000000000000000080801ba07e09e26678ed4fac08a249ebe8ed680bf9051a5e14ad223e4b2b9d26e0208f37a05f6e3f188e3e6eab7d7d3b6568f5eac7d687b08d307d3154ccd8c87b4630509bc0c0", - "blockHeader": { - "parentHash": "0x28c341ffc393152bd02e8689d8172dd66939ac3be2b91c5841721d1755d13c2b", - "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "stateRoot": "0xdb94ed1be4d52fb6360c88b363cb71af08df2493e57a66ec4751f90097f2fcbb", - "transactionsTrie": "0x8151d548273f6683169524b66ca9fe338b9ce42bc3540046c828fd939ae23bcb", - "receiptTrie": "0xc598f69a5674cae9337261b669970e24abc0b46e6d284372a239ec8ccbf20b0a", - "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0x00", - "number": "0x01", - "gasLimit": "0x02540be400", - "gasUsed": "0xa861", - "timestamp": "0x03e8", - "extraData": "0x00", - "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "nonce": "0x0000000000000000", - "baseFeePerGas": "0x07", - "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "blobGasUsed": "0x00", - "excessBlobGas": "0x00", - "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000", - "hash": "0x3cce15f0f21f4ea23499856be01a090f0ea1be6bea4a11777b4d0cc70d105a4b" - }, - "blocknumber": "1", - "transactions": [ - { - "type": "0x00", - "chainId": "0x00", - "nonce": "0x00", - "gasPrice": "0x0a", - "gasLimit": "0x05f5e100", - "to": "0x1000000000000000000000000000000000000000", - "value": "0x00", - "data": "0x", - "v": "0x1b", - "r": "0x7e09e26678ed4fac08a249ebe8ed680bf9051a5e14ad223e4b2b9d26e0208f37", - "s": "0x5f6e3f188e3e6eab7d7d3b6568f5eac7d687b08d307d3154ccd8c87b4630509b", - "sender": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" - } - ], - "uncleHeaders": [], - "withdrawals": [] - } - ], - "lastblockhash": "0x3cce15f0f21f4ea23499856be01a090f0ea1be6bea4a11777b4d0cc70d105a4b", "pre": { "0x000f3df6d732807ef1319fb7b8bb8522d0beac02": { + "nonce": "0x01", "balance": "0x00", "code": "0x3373fffffffffffffffffffffffffffffffffffffffe14604d57602036146024575f5ffd5b5f35801560495762001fff810690815414603c575f5ffd5b62001fff01545f5260205ff35b5f5ffd5b62001fff42064281555f359062001fff015500", - "nonce": "0x01", "storage": {} }, "0x1000000000000000000000000000000000000000": { "nonce": "0x00", "balance": "0x00", - "code": "0x4660015500", + "code": "0x46600155600260016000a100", "storage": {} }, "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { @@ -99,9 +46,9 @@ }, "postState": { "0x000f3df6d732807ef1319fb7b8bb8522d0beac02": { + "nonce": "0x01", "balance": "0x00", "code": "0x3373fffffffffffffffffffffffffffffffffffffffe14604d57602036146024575f5ffd5b5f35801560495762001fff810690815414603c575f5ffd5b62001fff01545f5260205ff35b5f5ffd5b62001fff42064281555f359062001fff015500", - "nonce": "0x01", "storage": { "0x03e8": "0x03e8" } @@ -109,35 +56,107 @@ "0x1000000000000000000000000000000000000000": { "nonce": "0x00", "balance": "0x00", - "code": "0x4660015500", + "code": "0x46600155600260016000a100", "storage": { "0x01": "0x01" } }, - "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": { - "nonce": "0x00", - "balance": "0x01f923", + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { + "nonce": "0x01", + "balance": "0x3635c9adc5de994e22", "code": "0x", "storage": {} }, - "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { - "nonce": "0x01", - "balance": "0x3635c9adc5de996c36", + "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": { + "nonce": "0x00", + "balance": "0x020229", "code": "0x", "storage": {} } }, - "sealEngine": "NoProof", + "lastblockhash": "0x08333a79bf9a2f9c8807c9ea88ade4609d082582e80f84934bd98819002451ba", "config": { "network": "Cancun", "chainid": "0x01", "blobSchedule": { "Cancun": { - "max": "0x06", "target": "0x03", + "max": "0x06", "baseFeeUpdateFraction": "0x32f0ed" } } + }, + "genesisRLP": "0xf9023df90237a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0d2600b08e8060646941f031c57f82638332bb61fbf50d4dd7ee79e044a10a7bea056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080808502540be400808000a0000000000000000000000000000000000000000000000000000000000000000088000000000000000007a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b4218080a00000000000000000000000000000000000000000000000000000000000000000c0c0c0", + "blocks": [ + { + "blockHeader": { + "parentHash": "0x7f67195b5e60c9989632e87927cbbeadeed869fda749e45f9bdc7cf6e2941a1b", + "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "coinbase": "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "stateRoot": "0xdcdfda5b82f001e215063fbe542aa92ef1790e84b0a4d3a65845f4a5c644aa5d", + "transactionsTrie": "0x8151d548273f6683169524b66ca9fe338b9ce42bc3540046c828fd939ae23bcb", + "receiptTrie": "0x4b93b3c0006d672c5dfd4094132d3e8acd463e7cb018f86df29136c9a399d0b6", + "bloom": "0x04000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000", + "difficulty": "0x00", + "number": "0x01", + "gasLimit": "0x02540be400", + "gasUsed": "0xab63", + "timestamp": "0x03e8", + "extraData": "0x00", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x0000000000000000", + "baseFeePerGas": "0x07", + "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "blobGasUsed": "0x00", + "excessBlobGas": "0x00", + "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000", + "hash": "0x08333a79bf9a2f9c8807c9ea88ade4609d082582e80f84934bd98819002451ba" + }, + "transactions": [ + { + "type": "0x00", + "chainId": "0x00", + "nonce": "0x00", + "gasPrice": "0x0a", + "gasLimit": "0x05f5e100", + "to": "0x1000000000000000000000000000000000000000", + "value": "0x00", + "data": "0x", + "v": "0x1b", + "r": "0x7e09e26678ed4fac08a249ebe8ed680bf9051a5e14ad223e4b2b9d26e0208f37", + "s": "0x5f6e3f188e3e6eab7d7d3b6568f5eac7d687b08d307d3154ccd8c87b4630509b", + "sender": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" + } + ], + "uncleHeaders": [], + "withdrawals": [], + "receipts": [ + { + "transactionHash": "0xdb1e409d11d92e6e8b3825ec82dff14f3661f1247c0d306ed4ff6aa22b0987f4", + "cumulativeGasUsed": "0xab63", + "bloom": "0x04000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000", + "logs": [ + { + "address": "0x1000000000000000000000000000000000000000", + "topics": [ + "0x0000000000000000000000000000000000000000000000000000000000000002" + ], + "data": "0x00" + } + ], + "rlp": "0xf901430182ab63b9010004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000f83af838941000000000000000000000000000000000000000e1a0000000000000000000000000000000000000000000000000000000000000000200", + "status": true, + "type": "0x00" + } + ], + "rlp": "0xf902a5f9023ba07f67195b5e60c9989632e87927cbbeadeed869fda749e45f9bdc7cf6e2941a1ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347942adc25665018aa1fe0e6bc666dac8fc2697ff9baa0dcdfda5b82f001e215063fbe542aa92ef1790e84b0a4d3a65845f4a5c644aa5da08151d548273f6683169524b66ca9fe338b9ce42bc3540046c828fd939ae23bcba04b93b3c0006d672c5dfd4094132d3e8acd463e7cb018f86df29136c9a399d0b6b901000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000080018502540be40082ab638203e800a0000000000000000000000000000000000000000000000000000000000000000088000000000000000007a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b4218080a00000000000000000000000000000000000000000000000000000000000000000f863f861800a8405f5e10094100000000000000000000000000000000000000080801ba07e09e26678ed4fac08a249ebe8ed680bf9051a5e14ad223e4b2b9d26e0208f37a05f6e3f188e3e6eab7d7d3b6568f5eac7d687b08d307d3154ccd8c87b4630509bc0c0", + "blocknumber": "1" + } + ], + "sealEngine": "NoProof", + "_info": { + "hash": "0x5e72c19553fb0f49fe42ab04412d476c3106c4a949a43545451a4bf0688f7a96", + "fixture_format": "blockchain_test" } } -} +} \ No newline at end of file diff --git a/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_cancun_state_test_tx_type_0.json b/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_cancun_state_test_tx_type_0.json index 6cfaf9eff9..0b68cc8628 100644 --- a/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_cancun_state_test_tx_type_0.json +++ b/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_cancun_state_test_tx_type_0.json @@ -1,7 +1,7 @@ { "000/my_chain_id_test/Cancun/tx_type_0": { "_info": { - "hash": "0x9e980ae5cce8c6222831e99c0a33facfd7b8e50be053b84e3ed357c2c1818491", + "hash": "0x68c19b4fa2c34898a20f27615b4f84dc46fc84bf704972212c72602dae27d6eb", "fixture_format": "state_test" }, "env": { @@ -28,7 +28,7 @@ "0x1000000000000000000000000000000000000000": { "nonce": "0x00", "balance": "0x00", - "code": "0x4660015500", + "code": "0x46600155600260016000a100", "storage": {} }, "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { @@ -57,8 +57,25 @@ "post": { "Cancun": [ { - "hash": "0x19919608275963e6e20a1191996f5b19db8208dd8df54097cfd2b9cb14f682b6", - "logs": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "hash": "0xaf03c39e7a64dc7072c098673612e0e0aa75419aec9bf8a454da0332fed3ae09", + "logs": "0x6f322afda7b9376eb43961bc85e0a097c0118bb3545c42c888830702a95b18a5", + "receipt": { + "cumulativeGasUsed": "0xab63", + "logs": [ + { + "address": "0x1000000000000000000000000000000000000000", + "data": "0x00", + "topics": [ + "0x0000000000000000000000000000000000000000000000000000000000000002" + ] + } + ], + "bloom": "0x04000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000", + "transactionHash": "0xdb1e409d11d92e6e8b3825ec82dff14f3661f1247c0d306ed4ff6aa22b0987f4", + "rlp": "0xf901430182ab63b9010004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000f83af838941000000000000000000000000000000000000000e1a0000000000000000000000000000000000000000000000000000000000000000200", + "status": true, + "type": "0x00" + }, "txbytes": "0xf861800a8405f5e10094100000000000000000000000000000000000000080801ba07e09e26678ed4fac08a249ebe8ed680bf9051a5e14ad223e4b2b9d26e0208f37a05f6e3f188e3e6eab7d7d3b6568f5eac7d687b08d307d3154ccd8c87b4630509b", "indexes": { "data": 0, @@ -69,20 +86,20 @@ "0x1000000000000000000000000000000000000000": { "nonce": "0x00", "balance": "0x00", - "code": "0x4660015500", + "code": "0x46600155600260016000a100", "storage": { "0x01": "0x01" } }, "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": { - "balance": "0x01f923", + "balance": "0x020229", "nonce": "0x00", "code": "0x", "storage": {} }, "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { "nonce": "0x01", - "balance": "0x3635c9adc5de996c36", + "balance": "0x3635c9adc5de994e22", "code": "0x", "storage": {} } @@ -91,4 +108,4 @@ ] } } -} +} \ No newline at end of file diff --git a/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_cancun_state_test_tx_type_1.json b/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_cancun_state_test_tx_type_1.json index 6ff672ed22..387201566c 100644 --- a/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_cancun_state_test_tx_type_1.json +++ b/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_cancun_state_test_tx_type_1.json @@ -1,7 +1,7 @@ { "000/my_chain_id_test/Cancun/tx_type_1": { "_info": { - "hash": "0x5ca0b01465e00811b102c33dadc2366055d6c73684bfb67b8414fa6146b38bca", + "hash": "0x49130f37343fa73f364ed83e2a2e7146c4effa64cdb6b371f5f2bf3f2004fade", "fixture_format": "state_test" }, "env": { @@ -28,7 +28,7 @@ "0x1000000000000000000000000000000000000000": { "nonce": "0x00", "balance": "0x00", - "code": "0x4660015500", + "code": "0x46600155600260016000a100", "storage": {} }, "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { @@ -39,11 +39,11 @@ } }, "transaction": { - "accessLists" : [ + "accessLists": [ [ { - "address" : "0x0000000000000000000000000000000000001234", - "storageKeys" : [ + "address": "0x0000000000000000000000000000000000001234", + "storageKeys": [ "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001" ] @@ -68,8 +68,25 @@ "post": { "Cancun": [ { - "hash": "0xac58d5721514e1a25b3d952de498e835c25ad680fc6883c7cccfdb89582734dd", - "logs": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "hash": "0x0ee52e9f67e3c0327408ba3a0b530d6832345fa94420053457e3ae147c4f2363", + "logs": "0x6f322afda7b9376eb43961bc85e0a097c0118bb3545c42c888830702a95b18a5", + "receipt": { + "cumulativeGasUsed": "0xc39b", + "logs": [ + { + "address": "0x1000000000000000000000000000000000000000", + "data": "0x00", + "topics": [ + "0x0000000000000000000000000000000000000000000000000000000000000002" + ] + } + ], + "bloom": "0x04000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000", + "transactionHash": "0x74db1f529be708c28edd23279649482c2174aff44ee7190929673c868d7b6bcf", + "rlp": "0x01f901430182c39bb9010004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000f83af838941000000000000000000000000000000000000000e1a0000000000000000000000000000000000000000000000000000000000000000200", + "status": true, + "type": "0x01" + }, "txbytes": "0x01f8bf01800a8405f5e1009410000000000000000000000000000000000000008080f85bf859940000000000000000000000000000000000001234f842a00000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000180a07d812c52979e6d8616538f2146e9499ca59f01b8c540d7a950ec7e695020a123a02cec47a8982651456ad416578b8792e197e4f1861bcbcfb33e3f2ef75109c322", "indexes": { "data": 0, @@ -80,20 +97,20 @@ "0x1000000000000000000000000000000000000000": { "nonce": "0x00", "balance": "0x00", - "code": "0x4660015500", + "code": "0x46600155600260016000a100", "storage": { "0x01": "0x01" } }, "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": { - "balance": "0x0241cb", + "balance": "0x024ad1", "nonce": "0x00", "code": "0x", "storage": {} }, "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { "nonce": "0x01", - "balance": "0x3635c9adc5de987a06", + "balance": "0x3635c9adc5de985bf2", "code": "0x", "storage": {} } @@ -102,4 +119,4 @@ ] } } -} +} \ No newline at end of file diff --git a/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_istanbul_blockchain_test_tx_type_0.json b/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_istanbul_blockchain_test_tx_type_0.json index 801b5428c4..024b092b1c 100644 --- a/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_istanbul_blockchain_test_tx_type_0.json +++ b/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_istanbul_blockchain_test_tx_type_0.json @@ -1,16 +1,11 @@ { "000/my_chain_id_test/Istanbul/tx_type_0": { - "_info": { - "hash": "0x8b79023dc05fa9a4e374938ea0c6e04248cc6f30a3e2754737885901693e0c6e", - "fixture_format": "blockchain_test" - }, "network": "Istanbul", - "genesisRLP": "0xf901faf901f5a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0aff9f63320a482f8c4e4f15f659e6a7ac382138fbbb6919243b0cba4c5988a5aa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000808502540be400808000a00000000000000000000000000000000000000000000000000000000000000000880000000000000000c0c0", "genesisBlockHeader": { "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "coinbase": "0x0000000000000000000000000000000000000000", - "stateRoot": "0xaff9f63320a482f8c4e4f15f659e6a7ac382138fbbb6919243b0cba4c5988a5a", + "stateRoot": "0x03727f261910c4f666532f9374d9dadaa72a69c2d4171955caa71e7a98adc447", "transactionsTrie": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "receiptTrie": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", @@ -22,30 +17,70 @@ "extraData": "0x00", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", - "hash": "0xfcf37297d9e49a1c75e6d18f0e490d1c0ecb3c49cb464f4fd95bb224a8262bda" + "hash": "0xec3ce185f68c896dd44ffa0411678f59027ea09caf66de21213257b5c1241218" + }, + "pre": { + "0x1000000000000000000000000000000000000000": { + "nonce": "0x00", + "balance": "0x00", + "code": "0x46600155600260016000a100", + "storage": {} + }, + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { + "nonce": "0x00", + "balance": "0x3635c9adc5dea00000", + "code": "0x", + "storage": {} + } + }, + "postState": { + "0x1000000000000000000000000000000000000000": { + "nonce": "0x00", + "balance": "0x00", + "code": "0x46600155600260016000a100", + "storage": { + "0x01": "0x01" + } + }, + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { + "nonce": "0x01", + "balance": "0x3635c9adc5de99a02a", + "code": "0x", + "storage": {} + }, + "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": { + "nonce": "0x00", + "balance": "0x1bc16d674ece5fd6", + "code": "0x", + "storage": {} + } }, + "lastblockhash": "0xe8c05589c5de362c930acbe987e2791fbf96537f7bf6977875cbe6ed1479d3fa", + "config": { + "network": "Istanbul", + "chainid": "0x01" + }, + "genesisRLP": "0xf901faf901f5a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a003727f261910c4f666532f9374d9dadaa72a69c2d4171955caa71e7a98adc447a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000808502540be400808000a00000000000000000000000000000000000000000000000000000000000000000880000000000000000c0c0", "blocks": [ { - "rlp": "0xf90262f901f9a0fcf37297d9e49a1c75e6d18f0e490d1c0ecb3c49cb464f4fd95bb224a8262bdaa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347942adc25665018aa1fe0e6bc666dac8fc2697ff9baa0330a7882a8fadd60d0b6bf3d8ce7a8ae024800ae31ad8fae24d654a6a83fcad6a08151d548273f6683169524b66ca9fe338b9ce42bc3540046c828fd939ae23bcba0fa9e942c7bab1017c29ab8b7f9484e311f3a2ba680c2ec8abbaea2365cecc93eb901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000018502540be40082a02d8203e800a00000000000000000000000000000000000000000000000000000000000000000880000000000000000f863f861800a8405f5e10094100000000000000000000000000000000000000080801ba07e09e26678ed4fac08a249ebe8ed680bf9051a5e14ad223e4b2b9d26e0208f37a05f6e3f188e3e6eab7d7d3b6568f5eac7d687b08d307d3154ccd8c87b4630509bc0", "blockHeader": { - "parentHash": "0xfcf37297d9e49a1c75e6d18f0e490d1c0ecb3c49cb464f4fd95bb224a8262bda", + "parentHash": "0xec3ce185f68c896dd44ffa0411678f59027ea09caf66de21213257b5c1241218", "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "coinbase": "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "stateRoot": "0x330a7882a8fadd60d0b6bf3d8ce7a8ae024800ae31ad8fae24d654a6a83fcad6", + "stateRoot": "0xecfbb77cf4742ee1ea84df09516302b4e59829582d6ad68c48fd605cb3ccdab4", "transactionsTrie": "0x8151d548273f6683169524b66ca9fe338b9ce42bc3540046c828fd939ae23bcb", - "receiptTrie": "0xfa9e942c7bab1017c29ab8b7f9484e311f3a2ba680c2ec8abbaea2365cecc93e", - "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie": "0xea2896eb820f2178aaddde2a641e11a37cf9c7c36e8ef302f0eb924c0318b671", + "bloom": "0x04000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000", "difficulty": "0x020000", "number": "0x01", "gasLimit": "0x02540be400", - "gasUsed": "0xa02d", + "gasUsed": "0xa32f", "timestamp": "0x03e8", "extraData": "0x00", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", - "hash": "0xc413245fffae8b7c6392bcd3dfbbdee24118e94d9a58722a7abd91a4e1d048b7" + "hash": "0xe8c05589c5de362c930acbe987e2791fbf96537f7bf6977875cbe6ed1479d3fa" }, - "blocknumber": "1", "transactions": [ { "type": "0x00", @@ -62,50 +97,34 @@ "sender": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" } ], - "uncleHeaders": [] + "uncleHeaders": [], + "receipts": [ + { + "transactionHash": "0xdb1e409d11d92e6e8b3825ec82dff14f3661f1247c0d306ed4ff6aa22b0987f4", + "cumulativeGasUsed": "0xa32f", + "bloom": "0x04000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000", + "logs": [ + { + "address": "0x1000000000000000000000000000000000000000", + "topics": [ + "0x0000000000000000000000000000000000000000000000000000000000000002" + ], + "data": "0x00" + } + ], + "rlp": "0xf901430182a32fb9010004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000f83af838941000000000000000000000000000000000000000e1a0000000000000000000000000000000000000000000000000000000000000000200", + "status": true, + "type": "0x00" + } + ], + "rlp": "0xf90262f901f9a0ec3ce185f68c896dd44ffa0411678f59027ea09caf66de21213257b5c1241218a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347942adc25665018aa1fe0e6bc666dac8fc2697ff9baa0ecfbb77cf4742ee1ea84df09516302b4e59829582d6ad68c48fd605cb3ccdab4a08151d548273f6683169524b66ca9fe338b9ce42bc3540046c828fd939ae23bcba0ea2896eb820f2178aaddde2a641e11a37cf9c7c36e8ef302f0eb924c0318b671b901000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000083020000018502540be40082a32f8203e800a00000000000000000000000000000000000000000000000000000000000000000880000000000000000f863f861800a8405f5e10094100000000000000000000000000000000000000080801ba07e09e26678ed4fac08a249ebe8ed680bf9051a5e14ad223e4b2b9d26e0208f37a05f6e3f188e3e6eab7d7d3b6568f5eac7d687b08d307d3154ccd8c87b4630509bc0", + "blocknumber": "1" } ], - "lastblockhash": "0xc413245fffae8b7c6392bcd3dfbbdee24118e94d9a58722a7abd91a4e1d048b7", - "pre": { - "0x1000000000000000000000000000000000000000": { - "nonce": "0x00", - "balance": "0x00", - "code": "0x4660015500", - "storage": {} - }, - "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { - "nonce": "0x00", - "balance": "0x3635c9adc5dea00000", - "code": "0x", - "storage": {} - } - }, - "postState": { - "0x1000000000000000000000000000000000000000": { - "nonce": "0x00", - "balance": "0x00", - "code": "0x4660015500", - "storage": { - "0x01": "0x01" - } - }, - "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": { - "nonce": "0x00", - "balance": "0x1bc16d674ece41c2", - "code": "0x", - "storage": {} - }, - "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { - "nonce": "0x01", - "balance": "0x3635c9adc5de99be3e", - "code": "0x", - "storage": {} - } - }, "sealEngine": "NoProof", - "config": { - "network": "Istanbul", - "chainid": "0x01" + "_info": { + "hash": "0x57a6f950bef3a44741ac3617e53f37bb55b124ce2e26d02508b217e6d351eba8", + "fixture_format": "blockchain_test" } } -} +} \ No newline at end of file diff --git a/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_london_blockchain_test_tx_type_0.json b/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_london_blockchain_test_tx_type_0.json index e35630dc8a..6ea499bbc5 100644 --- a/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_london_blockchain_test_tx_type_0.json +++ b/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_london_blockchain_test_tx_type_0.json @@ -1,16 +1,11 @@ { "000/my_chain_id_test/London/tx_type_0": { - "_info": { - "hash": "0x8f3a32616f93086c33339f1d020a97103df4963edcef3a108babcc95d4cd3951", - "fixture_format": "blockchain_test" - }, "network": "London", - "genesisRLP": "0xf901fbf901f6a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0aff9f63320a482f8c4e4f15f659e6a7ac382138fbbb6919243b0cba4c5988a5aa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000808502540be400808000a0000000000000000000000000000000000000000000000000000000000000000088000000000000000007c0c0", "genesisBlockHeader": { "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "coinbase": "0x0000000000000000000000000000000000000000", - "stateRoot": "0xaff9f63320a482f8c4e4f15f659e6a7ac382138fbbb6919243b0cba4c5988a5a", + "stateRoot": "0x03727f261910c4f666532f9374d9dadaa72a69c2d4171955caa71e7a98adc447", "transactionsTrie": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "receiptTrie": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", @@ -23,31 +18,71 @@ "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", "baseFeePerGas": "0x07", - "hash": "0x107e91b6c929ab8d50e2de4f3952d602f5531b3f5348430b4005fbbf9d195375" + "hash": "0xd8357264cc6251a5396f5fbae1e3b41fef2217b931b6da35e07cffc95838bf0b" + }, + "pre": { + "0x1000000000000000000000000000000000000000": { + "nonce": "0x00", + "balance": "0x00", + "code": "0x46600155600260016000a100", + "storage": {} + }, + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { + "nonce": "0x00", + "balance": "0x3635c9adc5dea00000", + "code": "0x", + "storage": {} + } + }, + "postState": { + "0x1000000000000000000000000000000000000000": { + "nonce": "0x00", + "balance": "0x00", + "code": "0x46600155600260016000a100", + "storage": { + "0x01": "0x01" + } + }, + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { + "nonce": "0x01", + "balance": "0x3635c9adc5de994e22", + "code": "0x", + "storage": {} + }, + "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": { + "nonce": "0x00", + "balance": "0x1bc16d674eca0229", + "code": "0x", + "storage": {} + } }, + "lastblockhash": "0x771beea22a98357c1fce6a4955c7023c95d515f5f3f761f8b5abd23d0c1805b5", + "config": { + "network": "London", + "chainid": "0x01" + }, + "genesisRLP": "0xf901fbf901f6a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a003727f261910c4f666532f9374d9dadaa72a69c2d4171955caa71e7a98adc447a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000808502540be400808000a0000000000000000000000000000000000000000000000000000000000000000088000000000000000007c0c0", "blocks": [ { - "rlp": "0xf90263f901faa0107e91b6c929ab8d50e2de4f3952d602f5531b3f5348430b4005fbbf9d195375a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347942adc25665018aa1fe0e6bc666dac8fc2697ff9baa0a48abc194fdd8e58a32a90874e9144e19eb68306ec5e51bca9389d1043eeb20fa08151d548273f6683169524b66ca9fe338b9ce42bc3540046c828fd939ae23bcba0c598f69a5674cae9337261b669970e24abc0b46e6d284372a239ec8ccbf20b0ab901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000018502540be40082a8618203e800a0000000000000000000000000000000000000000000000000000000000000000088000000000000000007f863f861800a8405f5e10094100000000000000000000000000000000000000080801ba07e09e26678ed4fac08a249ebe8ed680bf9051a5e14ad223e4b2b9d26e0208f37a05f6e3f188e3e6eab7d7d3b6568f5eac7d687b08d307d3154ccd8c87b4630509bc0", "blockHeader": { - "parentHash": "0x107e91b6c929ab8d50e2de4f3952d602f5531b3f5348430b4005fbbf9d195375", + "parentHash": "0xd8357264cc6251a5396f5fbae1e3b41fef2217b931b6da35e07cffc95838bf0b", "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "coinbase": "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "stateRoot": "0xa48abc194fdd8e58a32a90874e9144e19eb68306ec5e51bca9389d1043eeb20f", + "stateRoot": "0x802b7a48210549d8f4b5662c44aede70132d55a42f09364a049bf14dd776ab9c", "transactionsTrie": "0x8151d548273f6683169524b66ca9fe338b9ce42bc3540046c828fd939ae23bcb", - "receiptTrie": "0xc598f69a5674cae9337261b669970e24abc0b46e6d284372a239ec8ccbf20b0a", - "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie": "0x4b93b3c0006d672c5dfd4094132d3e8acd463e7cb018f86df29136c9a399d0b6", + "bloom": "0x04000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000", "difficulty": "0x020000", "number": "0x01", "gasLimit": "0x02540be400", - "gasUsed": "0xa861", + "gasUsed": "0xab63", "timestamp": "0x03e8", "extraData": "0x00", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", "baseFeePerGas": "0x07", - "hash": "0xe05293fe6050385e463d93c310bc52f87715f509aeb036455bbe4597cf36706a" + "hash": "0x771beea22a98357c1fce6a4955c7023c95d515f5f3f761f8b5abd23d0c1805b5" }, - "blocknumber": "1", "transactions": [ { "type": "0x00", @@ -64,50 +99,34 @@ "sender": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" } ], - "uncleHeaders": [] + "uncleHeaders": [], + "receipts": [ + { + "transactionHash": "0xdb1e409d11d92e6e8b3825ec82dff14f3661f1247c0d306ed4ff6aa22b0987f4", + "cumulativeGasUsed": "0xab63", + "bloom": "0x04000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000", + "logs": [ + { + "address": "0x1000000000000000000000000000000000000000", + "topics": [ + "0x0000000000000000000000000000000000000000000000000000000000000002" + ], + "data": "0x00" + } + ], + "rlp": "0xf901430182ab63b9010004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000f83af838941000000000000000000000000000000000000000e1a0000000000000000000000000000000000000000000000000000000000000000200", + "status": true, + "type": "0x00" + } + ], + "rlp": "0xf90263f901faa0d8357264cc6251a5396f5fbae1e3b41fef2217b931b6da35e07cffc95838bf0ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347942adc25665018aa1fe0e6bc666dac8fc2697ff9baa0802b7a48210549d8f4b5662c44aede70132d55a42f09364a049bf14dd776ab9ca08151d548273f6683169524b66ca9fe338b9ce42bc3540046c828fd939ae23bcba04b93b3c0006d672c5dfd4094132d3e8acd463e7cb018f86df29136c9a399d0b6b901000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000083020000018502540be40082ab638203e800a0000000000000000000000000000000000000000000000000000000000000000088000000000000000007f863f861800a8405f5e10094100000000000000000000000000000000000000080801ba07e09e26678ed4fac08a249ebe8ed680bf9051a5e14ad223e4b2b9d26e0208f37a05f6e3f188e3e6eab7d7d3b6568f5eac7d687b08d307d3154ccd8c87b4630509bc0", + "blocknumber": "1" } ], - "lastblockhash": "0xe05293fe6050385e463d93c310bc52f87715f509aeb036455bbe4597cf36706a", - "pre": { - "0x1000000000000000000000000000000000000000": { - "nonce": "0x00", - "balance": "0x00", - "code": "0x4660015500", - "storage": {} - }, - "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { - "nonce": "0x00", - "balance": "0x3635c9adc5dea00000", - "code": "0x", - "storage": {} - } - }, - "postState": { - "0x1000000000000000000000000000000000000000": { - "nonce": "0x00", - "balance": "0x00", - "code": "0x4660015500", - "storage": { - "0x01": "0x01" - } - }, - "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": { - "nonce": "0x00", - "balance": "0x1bc16d674ec9f923", - "code": "0x", - "storage": {} - }, - "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { - "nonce": "0x01", - "balance": "0x3635c9adc5de996c36", - "code": "0x", - "storage": {} - } - }, "sealEngine": "NoProof", - "config": { - "network": "London", - "chainid": "0x01" + "_info": { + "hash": "0xc2da7ab682d573a2ff88b987526c1ae2d5abac2c738b575294b7976c5358078b", + "fixture_format": "blockchain_test" } } -} +} \ No newline at end of file diff --git a/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_paris_blockchain_test_engine_tx_type_0.json b/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_paris_blockchain_test_engine_tx_type_0.json index 4d4711e47a..a2f767b425 100644 --- a/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_paris_blockchain_test_engine_tx_type_0.json +++ b/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_paris_blockchain_test_engine_tx_type_0.json @@ -1,16 +1,16 @@ { "000/my_chain_id_test/Paris/tx_type_0": { "_info": { - "hash": "0xf07acbb0efdbea6064fa443f0c8a74de6bb3e9895a7717759deedb99310eec4e", + "hash": "0xfb3bfb73acf7ccc1592d06a570cf2e95eec18c6335bd095e425e814c8bb3433d", "fixture_format": "blockchain_test_engine" }, "network": "Paris", - "lastblockhash": "0xe92eedff2a0489bd861f528e248994b6791b0f5b845d90b34c68bc8cbc51c369", + "lastblockhash": "0xc24d78b58b7ccc57effaee66f54e3c6c2c79de399568432ed1aa34c66475c2ee", "genesisBlockHeader": { "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "coinbase": "0x0000000000000000000000000000000000000000", - "stateRoot": "0xaff9f63320a482f8c4e4f15f659e6a7ac382138fbbb6919243b0cba4c5988a5a", + "stateRoot": "0x03727f261910c4f666532f9374d9dadaa72a69c2d4171955caa71e7a98adc447", "transactionsTrie": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "receiptTrie": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", @@ -23,25 +23,25 @@ "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", "baseFeePerGas": "0x07", - "hash": "0xb2b30c502e6c7cafc6324b17a6aedebf7bd14a0eec632d5a1b50eede93965a86" + "hash": "0xd1a7a221b753e7e951359b0785c57d498709224b299b0a925cefd5b4076c56dd" }, "engineNewPayloads": [ { "params": [ { - "parentHash": "0xb2b30c502e6c7cafc6324b17a6aedebf7bd14a0eec632d5a1b50eede93965a86", + "parentHash": "0xd1a7a221b753e7e951359b0785c57d498709224b299b0a925cefd5b4076c56dd", "feeRecipient": "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "stateRoot": "0x19919608275963e6e20a1191996f5b19db8208dd8df54097cfd2b9cb14f682b6", - "receiptsRoot": "0xc598f69a5674cae9337261b669970e24abc0b46e6d284372a239ec8ccbf20b0a", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "stateRoot": "0xaf03c39e7a64dc7072c098673612e0e0aa75419aec9bf8a454da0332fed3ae09", + "receiptsRoot": "0x4b93b3c0006d672c5dfd4094132d3e8acd463e7cb018f86df29136c9a399d0b6", + "logsBloom": "0x04000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000", "blockNumber": "0x1", "gasLimit": "0x2540be400", - "gasUsed": "0xa861", + "gasUsed": "0xab63", "timestamp": "0x3e8", "extraData": "0x00", "prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000", "baseFeePerGas": "0x7", - "blockHash": "0xe92eedff2a0489bd861f528e248994b6791b0f5b845d90b34c68bc8cbc51c369", + "blockHash": "0xc24d78b58b7ccc57effaee66f54e3c6c2c79de399568432ed1aa34c66475c2ee", "transactions": [ "0xf861800a8405f5e10094100000000000000000000000000000000000000080801ba07e09e26678ed4fac08a249ebe8ed680bf9051a5e14ad223e4b2b9d26e0208f37a05f6e3f188e3e6eab7d7d3b6568f5eac7d687b08d307d3154ccd8c87b4630509b" ] @@ -55,7 +55,7 @@ "0x1000000000000000000000000000000000000000": { "nonce": "0x00", "balance": "0x00", - "code": "0x4660015500", + "code": "0x46600155600260016000a100", "storage": {} }, "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { @@ -69,20 +69,20 @@ "0x1000000000000000000000000000000000000000": { "nonce": "0x00", "balance": "0x00", - "code": "0x4660015500", + "code": "0x46600155600260016000a100", "storage": { "0x01": "0x01" } }, "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": { "nonce": "0x00", - "balance": "0x01f923", + "balance": "0x020229", "code": "0x", "storage": {} }, "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { "nonce": "0x01", - "balance": "0x3635c9adc5de996c36", + "balance": "0x3635c9adc5de994e22", "code": "0x", "storage": {} } @@ -92,4 +92,4 @@ "chainid": "0x01" } } -} +} \ No newline at end of file diff --git a/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_paris_state_test_tx_type_0.json b/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_paris_state_test_tx_type_0.json index 245d253106..c017f1c564 100644 --- a/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_paris_state_test_tx_type_0.json +++ b/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_paris_state_test_tx_type_0.json @@ -1,7 +1,7 @@ { "000/my_chain_id_test/Paris/tx_type_0": { "_info": { - "hash": "0x9de75fac42e382815fa12e0252e64b901ed1b0225446209223c8a3569e1c2857", + "hash": "0xdf866e0391fe827cdcde77f06d63ca9fc3a8692a1048618c2cf12a5e6e6649ae", "fixture_format": "state_test" }, "env": { @@ -17,7 +17,7 @@ "0x1000000000000000000000000000000000000000": { "nonce": "0x00", "balance": "0x00", - "code": "0x4660015500", + "code": "0x46600155600260016000a100", "storage": {} }, "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { @@ -46,8 +46,25 @@ "post": { "Paris": [ { - "hash": "0x19919608275963e6e20a1191996f5b19db8208dd8df54097cfd2b9cb14f682b6", - "logs": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "hash": "0xaf03c39e7a64dc7072c098673612e0e0aa75419aec9bf8a454da0332fed3ae09", + "logs": "0x6f322afda7b9376eb43961bc85e0a097c0118bb3545c42c888830702a95b18a5", + "receipt": { + "transactionHash": "0xdb1e409d11d92e6e8b3825ec82dff14f3661f1247c0d306ed4ff6aa22b0987f4", + "cumulativeGasUsed": "0xab63", + "bloom": "0x04000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000", + "logs": [ + { + "address": "0x1000000000000000000000000000000000000000", + "data": "0x00", + "topics": [ + "0x0000000000000000000000000000000000000000000000000000000000000002" + ] + } + ], + "rlp": "0xf901430182ab63b9010004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000f83af838941000000000000000000000000000000000000000e1a0000000000000000000000000000000000000000000000000000000000000000200", + "status": true, + "type": "0x00" + }, "txbytes": "0xf861800a8405f5e10094100000000000000000000000000000000000000080801ba07e09e26678ed4fac08a249ebe8ed680bf9051a5e14ad223e4b2b9d26e0208f37a05f6e3f188e3e6eab7d7d3b6568f5eac7d687b08d307d3154ccd8c87b4630509b", "indexes": { "data": 0, @@ -58,20 +75,20 @@ "0x1000000000000000000000000000000000000000": { "nonce": "0x00", "balance": "0x00", - "code": "0x4660015500", + "code": "0x46600155600260016000a100", "storage": { "0x01": "0x01" } }, "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": { - "balance": "0x01f923", + "balance": "0x020229", "nonce": "0x00", "code": "0x", "storage": {} }, "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { "nonce": "0x01", - "balance": "0x3635c9adc5de996c36", + "balance": "0x3635c9adc5de994e22", "code": "0x", "storage": {} } @@ -83,4 +100,4 @@ "chainid": "0x01" } } -} +} \ No newline at end of file diff --git a/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_shanghai_blockchain_test_engine_tx_type_0.json b/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_shanghai_blockchain_test_engine_tx_type_0.json index bdf89fb02e..a0f1290ba1 100644 --- a/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_shanghai_blockchain_test_engine_tx_type_0.json +++ b/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_shanghai_blockchain_test_engine_tx_type_0.json @@ -1,16 +1,16 @@ { "000/my_chain_id_test/Shanghai/tx_type_0": { "_info": { - "hash": "0x361818ee5736a45c10c34ec445bf872d280b2f2ad61c297cceb14772b1393006", + "hash": "0x0f064e5636b7eff1f95283ffd0ff3fc866f4e52232b6fb2e9d13959844a32068", "fixture_format": "blockchain_test_engine" }, - "lastblockhash": "0x9c10141361e180632f7973f4f3a0aed2baa5ebb776bae84caafdcc07a24933e8", + "lastblockhash": "0x31657672062664f60cb3b80949cdbb2e8df92337b1d526386c5bccf5ff518709", "network": "Shanghai", "genesisBlockHeader": { "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "coinbase": "0x0000000000000000000000000000000000000000", - "stateRoot": "0xaff9f63320a482f8c4e4f15f659e6a7ac382138fbbb6919243b0cba4c5988a5a", + "stateRoot": "0x03727f261910c4f666532f9374d9dadaa72a69c2d4171955caa71e7a98adc447", "transactionsTrie": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "receiptTrie": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", @@ -24,25 +24,25 @@ "nonce": "0x0000000000000000", "baseFeePerGas": "0x07", "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "hash": "0x62f038416dbe4a03ea264e084edd9024b3589b49e66f7d5528b72a138a34570f" + "hash": "0xbc604017bb703b299b2d56725813fe58bf755640c2e784335ca1c74ace774762" }, "engineNewPayloads": [ { "params": [ { - "parentHash": "0x62f038416dbe4a03ea264e084edd9024b3589b49e66f7d5528b72a138a34570f", + "parentHash": "0xbc604017bb703b299b2d56725813fe58bf755640c2e784335ca1c74ace774762", "feeRecipient": "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "stateRoot": "0x19919608275963e6e20a1191996f5b19db8208dd8df54097cfd2b9cb14f682b6", - "receiptsRoot": "0xc598f69a5674cae9337261b669970e24abc0b46e6d284372a239ec8ccbf20b0a", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "stateRoot": "0xaf03c39e7a64dc7072c098673612e0e0aa75419aec9bf8a454da0332fed3ae09", + "receiptsRoot": "0x4b93b3c0006d672c5dfd4094132d3e8acd463e7cb018f86df29136c9a399d0b6", + "logsBloom": "0x04000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000", "blockNumber": "0x1", "gasLimit": "0x2540be400", - "gasUsed": "0xa861", + "gasUsed": "0xab63", "timestamp": "0x3e8", "extraData": "0x00", "prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000", "baseFeePerGas": "0x7", - "blockHash": "0x9c10141361e180632f7973f4f3a0aed2baa5ebb776bae84caafdcc07a24933e8", + "blockHash": "0x31657672062664f60cb3b80949cdbb2e8df92337b1d526386c5bccf5ff518709", "transactions": [ "0xf861800a8405f5e10094100000000000000000000000000000000000000080801ba07e09e26678ed4fac08a249ebe8ed680bf9051a5e14ad223e4b2b9d26e0208f37a05f6e3f188e3e6eab7d7d3b6568f5eac7d687b08d307d3154ccd8c87b4630509b" ], @@ -57,7 +57,7 @@ "0x1000000000000000000000000000000000000000": { "nonce": "0x00", "balance": "0x00", - "code": "0x4660015500", + "code": "0x46600155600260016000a100", "storage": {} }, "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { @@ -71,20 +71,20 @@ "0x1000000000000000000000000000000000000000": { "nonce": "0x00", "balance": "0x00", - "code": "0x4660015500", + "code": "0x46600155600260016000a100", "storage": { "0x01": "0x01" } }, "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": { "nonce": "0x00", - "balance": "0x01f923", + "balance": "0x020229", "code": "0x", "storage": {} }, "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { "nonce": "0x01", - "balance": "0x3635c9adc5de996c36", + "balance": "0x3635c9adc5de994e22", "code": "0x", "storage": {} } @@ -94,4 +94,4 @@ "chainid": "0x01" } } -} +} \ No newline at end of file diff --git a/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_shanghai_state_test_tx_type_0.json b/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_shanghai_state_test_tx_type_0.json index d26ffeaa8b..c34b7bc8f1 100644 --- a/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_shanghai_state_test_tx_type_0.json +++ b/packages/testing/src/execution_testing/specs/tests/fixtures/chainid_shanghai_state_test_tx_type_0.json @@ -1,7 +1,7 @@ { "000/my_chain_id_test/Shanghai/tx_type_0": { "_info": { - "hash": "0xdd6900920530f2ba834d659b952c023a5962c352512529da8ed9614d99a0c1b8", + "hash": "0x7cddf0155fe83996e0a3b835dffa494c9612e84ea5b5ac018eb8591c67cd5079", "fixture_format": "state_test" }, "env": { @@ -17,7 +17,7 @@ "0x1000000000000000000000000000000000000000": { "nonce": "0x00", "balance": "0x00", - "code": "0x4660015500", + "code": "0x46600155600260016000a100", "storage": {} }, "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { @@ -46,8 +46,25 @@ "post": { "Shanghai": [ { - "hash": "0x19919608275963e6e20a1191996f5b19db8208dd8df54097cfd2b9cb14f682b6", - "logs": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "hash": "0xaf03c39e7a64dc7072c098673612e0e0aa75419aec9bf8a454da0332fed3ae09", + "logs": "0x6f322afda7b9376eb43961bc85e0a097c0118bb3545c42c888830702a95b18a5", + "receipt": { + "cumulativeGasUsed": "0xab63", + "logs": [ + { + "address": "0x1000000000000000000000000000000000000000", + "data": "0x00", + "topics": [ + "0x0000000000000000000000000000000000000000000000000000000000000002" + ] + } + ], + "bloom": "0x04000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000", + "transactionHash": "0xdb1e409d11d92e6e8b3825ec82dff14f3661f1247c0d306ed4ff6aa22b0987f4", + "rlp": "0xf901430182ab63b9010004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000f83af838941000000000000000000000000000000000000000e1a0000000000000000000000000000000000000000000000000000000000000000200", + "status": true, + "type": "0x00" + }, "txbytes": "0xf861800a8405f5e10094100000000000000000000000000000000000000080801ba07e09e26678ed4fac08a249ebe8ed680bf9051a5e14ad223e4b2b9d26e0208f37a05f6e3f188e3e6eab7d7d3b6568f5eac7d687b08d307d3154ccd8c87b4630509b", "indexes": { "data": 0, @@ -58,20 +75,20 @@ "0x1000000000000000000000000000000000000000": { "nonce": "0x00", "balance": "0x00", - "code": "0x4660015500", + "code": "0x46600155600260016000a100", "storage": { "0x01": "0x01" } }, "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": { - "balance": "0x01f923", + "balance": "0x020229", "nonce": "0x00", "code": "0x", "storage": {} }, "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { "nonce": "0x01", - "balance": "0x3635c9adc5de996c36", + "balance": "0x3635c9adc5de994e22", "code": "0x", "storage": {} } @@ -83,4 +100,4 @@ "chainid": "0x01" } } -} +} \ No newline at end of file diff --git a/packages/testing/src/execution_testing/specs/tests/test_expect.py b/packages/testing/src/execution_testing/specs/tests/test_expect.py index 5cb5d0519c..6a5e69a10e 100644 --- a/packages/testing/src/execution_testing/specs/tests/test_expect.py +++ b/packages/testing/src/execution_testing/specs/tests/test_expect.py @@ -7,6 +7,8 @@ from execution_testing.base_types import ( Account, Address, + Bytes, + Hash, Storage, TestAddress, TestPrivateKey, @@ -24,15 +26,18 @@ Alloc, Environment, Transaction, + TransactionLog, TransactionReceipt, ) from ..blockchain import BlockchainEngineFixture, BlockchainTest from ..helpers import ( ExecutionExceptionMismatchError, + LogMismatchError, TransactionReceiptMismatchError, UnexpectedExecutionFailError, UnexpectedExecutionSuccessError, + verify_log, ) from ..state import StateTest @@ -378,7 +383,9 @@ def test_post_account_mismatch( Transaction( secret_key=TestPrivateKey, error=TransactionException.INTRINSIC_GAS_TOO_LOW, - expected_receipt=TransactionReceipt(gas_used=21_000), + expected_receipt=TransactionReceipt( + cumulative_gas_used=21_000 + ), ), UnexpectedExecutionSuccessError, id="TransactionUnexpectedExecutionSuccessError", @@ -387,7 +394,9 @@ def test_post_account_mismatch( Transaction( secret_key=TestPrivateKey, gas_limit=20_999, - expected_receipt=TransactionReceipt(gas_used=21_000), + expected_receipt=TransactionReceipt( + cumulative_gas_used=21_000 + ), ), UnexpectedExecutionFailError, id="TransactionUnexpectedExecutionFailError", @@ -395,7 +404,9 @@ def test_post_account_mismatch( pytest.param( Transaction( secret_key=TestPrivateKey, - expected_receipt=TransactionReceipt(gas_used=21_001), + expected_receipt=TransactionReceipt( + cumulative_gas_used=21_001 + ), ), TransactionReceiptMismatchError, id="TransactionReceiptMismatchError", @@ -404,7 +415,9 @@ def test_post_account_mismatch( Transaction( secret_key=TestPrivateKey, gas_limit=20_999, - expected_receipt=TransactionReceipt(gas_used=21_001), + expected_receipt=TransactionReceipt( + cumulative_gas_used=21_001 + ), ), UnexpectedExecutionFailError, id="TransactionUnexpectedExecutionFailError+TransactionReceiptMismatchError", @@ -413,7 +426,9 @@ def test_post_account_mismatch( Transaction( secret_key=TestPrivateKey, error=TransactionException.INTRINSIC_GAS_TOO_LOW, - expected_receipt=TransactionReceipt(gas_used=21_001), + expected_receipt=TransactionReceipt( + cumulative_gas_used=21_001 + ), ), UnexpectedExecutionSuccessError, id="TransactionUnexpectedExecutionSuccessError+TransactionReceiptMismatchError", @@ -543,3 +558,148 @@ def test_block_intermediate_state( post=block_3.expected_post_state, blocks=[block_1, block_2, block_3], ).generate(t8n=default_t8n, fixture_format=fixture_format) + + +# Log verification tests +@pytest.mark.parametrize( + "expected_log,actual_log,should_raise", + [ + pytest.param( + TransactionLog( + address=Address(0x100), + topics=[Hash(b"\x01" * 32)], + data=Bytes(b"\x02" * 32), + ), + TransactionLog( + address=Address(0x100), + topics=[Hash(b"\x01" * 32)], + data=Bytes(b"\x02" * 32), + ), + False, + id="matching_logs", + ), + pytest.param( + TransactionLog( + address=Address(0x100), + ), + TransactionLog( + address=Address(0x200), + topics=[Hash(b"\x01" * 32)], + data=Bytes(b"\x02" * 32), + ), + True, + id="address_mismatch", + ), + pytest.param( + TransactionLog( + topics=[Hash(b"\x01" * 32)], + ), + TransactionLog( + address=Address(0x100), + topics=[Hash(b"\x02" * 32)], + data=Bytes(b"\x02" * 32), + ), + True, + id="topics_mismatch", + ), + pytest.param( + TransactionLog( + data=Bytes(b"\x01" * 32), + ), + TransactionLog( + address=Address(0x100), + topics=[Hash(b"\x01" * 32)], + data=Bytes(b"\x02" * 32), + ), + True, + id="data_mismatch", + ), + pytest.param( + TransactionLog( + address=None, + topics=None, + data=None, + ), + TransactionLog( + address=Address(0x100), + topics=[Hash(b"\x01" * 32)], + data=Bytes(b"\x02" * 32), + ), + False, + id="no_fields_specified", + ), + ], +) +def test_verify_log( + expected_log: TransactionLog, + actual_log: TransactionLog, + should_raise: bool, +) -> None: + """Test verify_log function for log field mismatches.""" + if should_raise: + with pytest.raises(LogMismatchError): + verify_log(0, 0, expected_log, actual_log) + else: + verify_log(0, 0, expected_log, actual_log) + + +# Log mismatch integration tests using Amsterdam fork (EIP-7708) +@pytest.mark.parametrize( + "mismatch_type", + [ + pytest.param("address", id="log_address_mismatch"), + pytest.param("topics", id="log_topics_mismatch"), + pytest.param("data", id="log_data_mismatch"), + ], +) +def test_log_mismatch_during_generation( + default_t8n: TransitionTool, + mismatch_type: str, +) -> None: + """ + Test that log mismatches raise LogMismatchError during test generation. + """ + from execution_testing.forks import Amsterdam + + # EIP-7708 transfer log constants + system_address = Address(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE) + + # Create a simple transfer transaction + recipient = Address(0x100) + transfer_value = 1000 + + # Create intentionally wrong expected logs based on mismatch type + if mismatch_type == "address": + wrong_log = TransactionLog( + address=Address(0x1234), # Wrong address, should be system_address + ) + elif mismatch_type == "topics": + wrong_log = TransactionLog( + address=system_address, + topics=[Hash(b"\x00" * 32)], # Wrong topic + ) + else: # data + wrong_log = TransactionLog( + address=system_address, + data=Bytes((9999).to_bytes(32, "big")), # Wrong data + ) + + tx = Transaction( + secret_key=TestPrivateKey, + to=recipient, + value=transfer_value, + expected_receipt=TransactionReceipt(logs=[wrong_log]), + ) + + pre = Alloc({TestAddress: Account(balance=10**18)}) + + state_test = StateTest( + env=Environment(), + pre=pre, + post={}, # Empty post to skip post-state verification + tx=tx, + fork=Amsterdam, + ) + + with pytest.raises(LogMismatchError): + state_test.generate(t8n=default_t8n, fixture_format=StateFixture) diff --git a/packages/testing/src/execution_testing/specs/tests/test_fixtures.py b/packages/testing/src/execution_testing/specs/tests/test_fixtures.py index 90680eb05d..21d5267857 100644 --- a/packages/testing/src/execution_testing/specs/tests/test_fixtures.py +++ b/packages/testing/src/execution_testing/specs/tests/test_fixtures.py @@ -152,10 +152,10 @@ def test_fill_state_test( number=1, timestamp=1000, ) - + contract_code = Op.SSTORE(1, Op.CHAINID) + Op.LOG1(0, 1, 2) + Op.STOP pre = { 0x1000000000000000000000000000000000000000: Account( - code="0x4660015500" + code=contract_code ), "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": Account( balance=1000000000000000000000 @@ -189,7 +189,7 @@ def test_fill_state_test( post = { "0x1000000000000000000000000000000000000000": Account( - code="0x4660015500", storage={"0x01": "0x01"} + code=contract_code, storage={"0x01": "0x01"} ), } @@ -545,6 +545,12 @@ def test_fill_blockchain_valid_txs( # noqa: D102 BlockchainEngineFixtureCommon, ) + with open("/tmp/actual.json", "w") as f: + f.write( + json.dumps( + blockchain_test_fixture.json_dict_with_info(), indent=4 + ) + ) assert isinstance( blockchain_test_fixture, (BlockchainFixtureCommon, BlockchainEngineFixtureCommon), @@ -566,6 +572,7 @@ def test_fill_blockchain_valid_txs( # noqa: D102 remove_info_metadata(fixture) assert fixture_name in fixture assert fixture_name in expected + assert fixture[fixture_name] == expected[fixture_name] @pytest.mark.parametrize("fork", [London], indirect=True) @@ -946,4 +953,12 @@ def test_fill_blockchain_invalid_txs( remove_info_metadata(fixture) assert fixture_name in fixture assert fixture_name in expected - assert fixture[fixture_name] == expected[fixture_name] + with open("/tmp/actual.json", "w") as f: + f.write( + json.dumps( + generated_fixture.json_dict_with_info(hash_only=True), indent=4 + ) + ) + assert fixture[fixture_name] == expected[fixture_name], ( + f"EXPECTED: {json.dumps(expected[fixture_name])}" + ) diff --git a/packages/testing/src/execution_testing/test_types/__init__.py b/packages/testing/src/execution_testing/test_types/__init__.py index ef30805950..c87148f92a 100644 --- a/packages/testing/src/execution_testing/test_types/__init__.py +++ b/packages/testing/src/execution_testing/test_types/__init__.py @@ -30,7 +30,7 @@ compute_deterministic_create2_address, ) from .phase_manager import TestPhase, TestPhaseManager -from .receipt_types import TransactionReceipt +from .receipt_types import TransactionLog, TransactionReceipt from .request_types import ( ConsolidationRequest, DepositRequest, @@ -77,6 +77,7 @@ "TestPhaseManager", "Transaction", "TransactionDefaults", + "TransactionLog", "TransactionReceipt", "TransactionTestMetadata", "TransactionType", diff --git a/packages/testing/src/execution_testing/test_types/receipt_types.py b/packages/testing/src/execution_testing/test_types/receipt_types.py index 66b1216daf..b4bbf9b95a 100644 --- a/packages/testing/src/execution_testing/test_types/receipt_types.py +++ b/packages/testing/src/execution_testing/test_types/receipt_types.py @@ -17,15 +17,15 @@ class TransactionLog(CamelModel): """Transaction log.""" - address: Address - topics: List[Hash] - data: Bytes - block_number: HexNumber - transaction_hash: Hash - transaction_index: HexNumber - block_hash: Hash - log_index: HexNumber - removed: bool + address: Address | None = None + topics: List[Hash] | None = None + data: Bytes | None = None + block_number: HexNumber | None = None + transaction_hash: Hash | None = None + transaction_index: HexNumber | None = None + block_hash: Hash | None = None + log_index: HexNumber | None = None + removed: bool | None = None class ReceiptDelegation(CamelModel): @@ -44,25 +44,25 @@ class TransactionReceipt(CamelModel): def strip_extra_fields(cls, data: Any) -> Any: """Strip extra fields from t8n tool output not part of model.""" if isinstance(data, dict): - # t8n tool returns 'succeeded' which is redundant with 'status' - data.pop("succeeded", None) - # t8n tool may return 'post_state' which is not part of this model - data.pop("post_state", None) - data.pop("postState", None) # geth (1.16+) returns extra fields in receipts data.pop("type", None) data.pop("blockNumber", None) return data transaction_hash: Hash | None = None - gas_used: HexNumber | None = None + post_state: Hash | None = Field( + None, validation_alias=AliasChoices("post_state", "postState") + ) root: Bytes | None = None - status: HexNumber | None = None + status: HexNumber | None = Field( + None, validation_alias=AliasChoices("status", "succeeded") + ) cumulative_gas_used: HexNumber | None = None - logs_bloom: Bloom | None = Field( + bloom: Bloom | None = Field( None, validation_alias=AliasChoices("logs_bloom", "logsBloom", "bloom") ) logs: List[TransactionLog] | None = None + gas_used: HexNumber | None = None contract_address: Address | None = None effective_gas_price: HexNumber | None = None block_hash: Hash | None = None diff --git a/packages/testing/src/execution_testing/test_types/transaction_types.py b/packages/testing/src/execution_testing/test_types/transaction_types.py index cb1267b94d..2c26953666 100644 --- a/packages/testing/src/execution_testing/test_types/transaction_types.py +++ b/packages/testing/src/execution_testing/test_types/transaction_types.py @@ -8,7 +8,6 @@ import ethereum_rlp as eth_rlp from coincurve.keys import PrivateKey, PublicKey -from ethereum_types.numeric import Uint from pydantic import ( AliasChoices, BaseModel, @@ -18,7 +17,6 @@ model_serializer, model_validator, ) -from trie import HexaryTrie from execution_testing.base_types import ( AccessList, @@ -759,14 +757,6 @@ def serializable_list(self) -> Any: """ return self.rlp() if self.ty > 0 else self.to_list(signing=False) - @staticmethod - def list_root(input_txs: List["Transaction"]) -> Hash: - """Return transactions root of a list of transactions.""" - t = HexaryTrie(db={}) - for i, tx in enumerate(input_txs): - t.set(eth_rlp.encode(Uint(i)), tx.rlp()) - return Hash(t.root_hash) - @staticmethod def list_blob_versioned_hashes( input_txs: List["Transaction"], diff --git a/src/ethereum_spec_tools/evm_tools/t8n/t8n_types.py b/src/ethereum_spec_tools/evm_tools/t8n/t8n_types.py index 544838a5db..5595c38960 100644 --- a/src/ethereum_spec_tools/evm_tools/t8n/t8n_types.py +++ b/src/ethereum_spec_tools/evm_tools/t8n/t8n_types.py @@ -413,9 +413,22 @@ def json_encode_receipts(self) -> Any: assert hasattr(receipt, "post_state") receipt_dict["post_state"] = "0x" + receipt.post_state.hex() - receipt_dict["gasUsed"] = hex(receipt.cumulative_gas_used) + receipt_dict["cumulativeGasUsed"] = hex( + receipt.cumulative_gas_used + ) receipt_dict["bloom"] = "0x" + receipt.bloom.hex() + # Add logs to receipts + logs_json = [] + for log in receipt.logs: + log_dict = { + "address": "0x" + log.address.hex(), + "topics": ["0x" + topic.hex() for topic in log.topics], + "data": "0x" + log.data.hex(), + } + logs_json.append(log_dict) + receipt_dict["logs"] = logs_json + receipts_json.append(receipt_dict) return receipts_json diff --git a/tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py b/tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py index 8a0e26aebf..a46cc06314 100644 --- a/tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py +++ b/tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py @@ -599,7 +599,7 @@ def test_tx_entry_point( access_list=access_list, to=Address(Spec.POINT_EVALUATION_PRECOMPILE_ADDRESS), gas_limit=call_gas + intrinsic_gas_cost, - expected_receipt=TransactionReceipt(gas_used=consumed_gas), + expected_receipt=TransactionReceipt(cumulative_gas_used=consumed_gas), ) post = { diff --git a/tests/cancun/eip5656_mcopy/test_mcopy_memory_expansion.py b/tests/cancun/eip5656_mcopy/test_mcopy_memory_expansion.py index 7dcc5fecc5..23f32896ed 100644 --- a/tests/cancun/eip5656_mcopy/test_mcopy_memory_expansion.py +++ b/tests/cancun/eip5656_mcopy/test_mcopy_memory_expansion.py @@ -135,7 +135,7 @@ def tx( # noqa: D103 access_list=tx_access_list, data=initial_memory, gas_limit=tx_gas_limit, - expected_receipt=TransactionReceipt(gas_used=tx_gas_limit), + expected_receipt=TransactionReceipt(cumulative_gas_used=tx_gas_limit), ) diff --git a/tests/prague/eip7623_increase_calldata_cost/test_execution_gas.py b/tests/prague/eip7623_increase_calldata_cost/test_execution_gas.py index cef1bb2a6f..7e8bc2c80f 100644 --- a/tests/prague/eip7623_increase_calldata_cost/test_execution_gas.py +++ b/tests/prague/eip7623_increase_calldata_cost/test_execution_gas.py @@ -87,7 +87,9 @@ def test_full_gas_consumption( Test executing a transaction that fully consumes its execution gas allocation. """ - tx.expected_receipt = TransactionReceipt(gas_used=tx.gas_limit) + tx.expected_receipt = TransactionReceipt( + cumulative_gas_used=tx.gas_limit + ) state_test( pre=pre, post={}, @@ -163,7 +165,9 @@ def test_gas_consumption_below_data_floor( """ Test executing a transaction that almost consumes the floor data cost. """ - tx.expected_receipt = TransactionReceipt(gas_used=tx_floor_data_cost) + tx.expected_receipt = TransactionReceipt( + cumulative_gas_used=tx_floor_data_cost + ) state_test( pre=pre, post={}, diff --git a/tests/prague/eip7623_increase_calldata_cost/test_refunds.py b/tests/prague/eip7623_increase_calldata_cost/test_refunds.py index 7e61fa058b..5d11c57cf4 100644 --- a/tests/prague/eip7623_increase_calldata_cost/test_refunds.py +++ b/tests/prague/eip7623_increase_calldata_cost/test_refunds.py @@ -330,7 +330,7 @@ def test_gas_refunds_from_data_floor( # (t8n) is verified against the expected receipt. # - During test consumption, this is reflected in the balance difference # and the state root. - tx.expected_receipt = TransactionReceipt(gas_used=gas_used) + tx.expected_receipt = TransactionReceipt(cumulative_gas_used=gas_used) state_test( pre=pre, post={ diff --git a/tests/prague/eip7702_set_code_tx/test_gas.py b/tests/prague/eip7702_set_code_tx/test_gas.py index 93c2747019..27cd2725ef 100644 --- a/tests/prague/eip7702_set_code_tx/test_gas.py +++ b/tests/prague/eip7702_set_code_tx/test_gas.py @@ -940,7 +940,7 @@ def test_gas_cost( authorization_list=authorization_list, access_list=access_list, sender=sender, - expected_receipt=TransactionReceipt(gas_used=gas_used), + expected_receipt=TransactionReceipt(cumulative_gas_used=gas_used), ) state_test( diff --git a/tests/prague/eip7702_set_code_tx/test_set_code_txs.py b/tests/prague/eip7702_set_code_tx/test_set_code_txs.py index ac5685a759..9cda00b380 100644 --- a/tests/prague/eip7702_set_code_tx/test_set_code_txs.py +++ b/tests/prague/eip7702_set_code_tx/test_set_code_txs.py @@ -2930,7 +2930,9 @@ def test_set_code_to_precompile_not_enough_gas_for_precompile_execution( value=1, authorization_list=[auth], # explicitly check expected gas, no precompile code executed - expected_receipt=TransactionReceipt(gas_used=intrinsic_gas - discount), + expected_receipt=TransactionReceipt( + cumulative_gas_used=intrinsic_gas - discount + ), ) state_test( diff --git a/tests/shanghai/eip3860_initcode/test_initcode.py b/tests/shanghai/eip3860_initcode/test_initcode.py index bc645c494d..cb7b3ae91e 100644 --- a/tests/shanghai/eip3860_initcode/test_initcode.py +++ b/tests/shanghai/eip3860_initcode/test_initcode.py @@ -336,7 +336,7 @@ def tx( error=tx_error, sender=sender, # The entire gas limit is expected to be consumed. - expected_receipt=TransactionReceipt(gas_used=gas_limit), + expected_receipt=TransactionReceipt(cumulative_gas_used=gas_limit), ) @pytest.fixture