1010from hive .testing import HiveTestSuite
1111
1212from ethereum_test_base_types import to_json
13- from ethereum_test_fixtures import BlockchainEngineReorgFixture
13+ from ethereum_test_fixtures import BlockchainEngineXFixture
1414from ethereum_test_fixtures .blockchain import FixtureHeader
15- from ethereum_test_fixtures .shared_alloc import SharedPreStateGroup
15+ from ethereum_test_fixtures .pre_alloc_groups import PreAllocGroup
1616from pytest_plugins .consume .consume import FixturesSource
1717from pytest_plugins .consume .simulators .helpers .ruleset import (
1818 ruleset , # TODO: generate dynamically
2626
2727
2828@pytest .fixture (scope = "session" )
29- def shared_pre_state_cache () -> Dict [str , SharedPreStateGroup ]:
29+ def shared_pre_state_cache () -> Dict [str , PreAllocGroup ]:
3030 """Cache for shared pre-state groups to avoid reloading from disk."""
3131 return {}
3232
3333
3434@pytest .fixture (scope = "function" )
3535def shared_pre_state_group (
36- fixture : BlockchainEngineReorgFixture ,
36+ fixture : BlockchainEngineXFixture ,
3737 fixtures_source : FixturesSource ,
38- shared_pre_state_cache : Dict [str , SharedPreStateGroup ],
39- ) -> SharedPreStateGroup :
38+ shared_pre_state_cache : Dict [str , PreAllocGroup ],
39+ ) -> PreAllocGroup :
4040 """Load the shared pre-state group for the current test case."""
4141 pre_hash = fixture .pre_hash
4242
@@ -50,20 +50,20 @@ def shared_pre_state_group(
5050
5151 # Look for shared pre-allocation file using FixtureOutput path structure
5252 fixture_output = FixtureOutput (output_path = fixtures_source .path )
53- shared_alloc_path = fixture_output .shared_pre_alloc_folder_path / f"{ pre_hash } .json"
53+ shared_alloc_path = fixture_output .pre_alloc_groups_folder_path / f"{ pre_hash } .json"
5454 if not shared_alloc_path .exists ():
5555 raise FileNotFoundError (f"Shared pre-allocation file not found: { shared_alloc_path } " )
5656
5757 # Load and cache
5858 with open (shared_alloc_path ) as f :
59- shared_group = SharedPreStateGroup .model_validate_json (f .read ())
59+ shared_group = PreAllocGroup .model_validate_json (f .read ())
6060
6161 shared_pre_state_cache [pre_hash ] = shared_group
6262 return shared_group
6363
6464
65- def create_environment (shared_pre_state_group : SharedPreStateGroup , check_live_port : int ) -> dict :
66- """Define environment using SharedPreStateGroup data."""
65+ def create_environment (shared_pre_state_group : PreAllocGroup , check_live_port : int ) -> dict :
66+ """Define environment using PreAllocGroup data."""
6767 fork = shared_pre_state_group .fork
6868 assert fork in ruleset , f"fork '{ fork } ' missing in hive ruleset"
6969 return {
@@ -75,7 +75,7 @@ def create_environment(shared_pre_state_group: SharedPreStateGroup, check_live_p
7575 }
7676
7777
78- def client_files (shared_pre_state_group : SharedPreStateGroup ) -> Mapping [str , io .BufferedReader ]:
78+ def client_files (shared_pre_state_group : PreAllocGroup ) -> Mapping [str , io .BufferedReader ]:
7979 """Define the files that hive will start the client with."""
8080 genesis = to_json (shared_pre_state_group .genesis ) # type: ignore
8181 alloc = to_json (shared_pre_state_group .pre )
@@ -105,7 +105,7 @@ def reorg_client_manager() -> Generator[ReorgClientManager, None, None]:
105105
106106
107107@pytest .fixture (scope = "function" )
108- def genesis_header (shared_pre_state_group : SharedPreStateGroup ) -> FixtureHeader :
108+ def genesis_header (shared_pre_state_group : PreAllocGroup ) -> FixtureHeader :
109109 """Provide the genesis header from the shared pre-state group."""
110110 return shared_pre_state_group .genesis # type: ignore
111111
@@ -115,8 +115,8 @@ def client(
115115 test_suite : HiveTestSuite ,
116116 client_type : ClientType ,
117117 total_timing_data : TimingData ,
118- fixture : BlockchainEngineReorgFixture ,
119- shared_pre_state_group : SharedPreStateGroup ,
118+ fixture : BlockchainEngineXFixture ,
119+ shared_pre_state_group : PreAllocGroup ,
120120 reorg_client_manager : ReorgClientManager ,
121121 fixtures_source : FixturesSource ,
122122) -> Generator [Client , None , None ]:
@@ -127,7 +127,7 @@ def client(
127127 # Set pre-alloc path in manager if not already set
128128 if reorg_client_manager .pre_alloc_path is None :
129129 fixture_output = FixtureOutput (output_path = fixtures_source .path )
130- reorg_client_manager .set_pre_alloc_path (fixture_output .shared_pre_alloc_folder_path )
130+ reorg_client_manager .set_pre_alloc_path (fixture_output .pre_alloc_groups_folder_path )
131131
132132 # Check for existing client
133133 existing_client = reorg_client_manager .get_client_for_test (pre_hash )
0 commit comments