@@ -430,12 +430,6 @@ class BlockchainTest(BaseTest):
430
430
Exclude the post state from the fixture output.
431
431
In this case, the state verification is only performed based on the state root.
432
432
"""
433
- expected_block_access_list : BlockAccessListExpectation | None = None
434
- """
435
- Expected block access list for verification.
436
- If set, verifies that the block access list returned by the client matches expectations.
437
- Use BlockAccessListExpectation to define partial validation expectations.
438
- """
439
433
440
434
supported_fixture_formats : ClassVar [Sequence [FixtureFormat | LabeledFixtureFormat ]] = [
441
435
BlockchainFixture ,
@@ -612,15 +606,18 @@ def generate_block_data(
612
606
requests_list = block .requests
613
607
614
608
if fork .header_bal_hash_required (header .number , header .timestamp ):
615
- if transition_tool_output .result .block_access_list is not None :
616
- rlp = transition_tool_output .result .block_access_list .rlp ()
617
- computed_bal_hash = Hash (rlp .keccak256 ())
618
- if computed_bal_hash != header .block_access_list_hash :
619
- raise Exception (
620
- "Block access list hash in header does not match the "
621
- f"computed hash from BAL: { header .block_access_list_hash } "
622
- f"!= { computed_bal_hash } "
623
- )
609
+ assert transition_tool_output .result .block_access_list is not None , (
610
+ "Block access list is required for this block but was not provided "
611
+ "by the transition tool"
612
+ )
613
+
614
+ rlp = transition_tool_output .result .block_access_list .rlp ()
615
+ computed_bal_hash = Hash (rlp .keccak256 ())
616
+ assert computed_bal_hash == header .block_access_list_hash , (
617
+ "Block access list hash in header does not match the "
618
+ f"computed hash from BAL: { header .block_access_list_hash } "
619
+ f"!= { computed_bal_hash } "
620
+ )
624
621
625
622
if block .rlp_modifier is not None :
626
623
# Modify any parameter specified in the `rlp_modifier` after
@@ -708,28 +705,6 @@ def verify_post_state(self, t8n, t8n_state: Alloc, expected_state: Alloc | None
708
705
print_traces (t8n .get_traces ())
709
706
raise e
710
707
711
- def verify_block_access_list (
712
- self , actual_bal : BlockAccessList | None , expected_bal : BlockAccessListExpectation | None
713
- ):
714
- """
715
- Verify that the actual block access list matches expectations.
716
-
717
- Args:
718
- actual_bal: The BlockAccessList returned by the client
719
- expected_bal: The expected BlockAccessList object
720
-
721
- """
722
- if expected_bal is None :
723
- return
724
-
725
- if actual_bal is None :
726
- raise Exception ("Expected block access list but got none." )
727
-
728
- try :
729
- expected_bal .verify_against (actual_bal )
730
- except Exception as e :
731
- raise Exception ("Block access list verification failed." ) from e
732
-
733
708
def make_fixture (
734
709
self ,
735
710
t8n : TransitionTool ,
0 commit comments