|
10 | 10 | from semver import Version |
11 | 11 |
|
12 | 12 | from ..base_fork import BaseFork |
| 13 | +from ..transition_base_fork import transition_fork |
13 | 14 |
|
14 | 15 | CURRENT_FILE = Path(realpath(__file__)) |
15 | 16 | CURRENT_FOLDER = CURRENT_FILE.parent |
@@ -188,6 +189,20 @@ def pre_allocation_blockchain(cls) -> Mapping: |
188 | 189 | """ |
189 | 190 | return {} |
190 | 191 |
|
| 192 | + @classmethod |
| 193 | + def environment_verkle_conversion_starts(cls) -> bool: |
| 194 | + """ |
| 195 | + Returns true if the fork starts the verkle conversion process. |
| 196 | + """ |
| 197 | + return False |
| 198 | + |
| 199 | + @classmethod |
| 200 | + def environment_verkle_conversion_completed(cls) -> bool: |
| 201 | + """ |
| 202 | + Returns true if verkle conversion must have been completed by this fork. |
| 203 | + """ |
| 204 | + return False |
| 205 | + |
191 | 206 |
|
192 | 207 | class Homestead(Frontier): |
193 | 208 | """ |
@@ -604,7 +619,65 @@ def engine_forkchoice_updated_version( |
604 | 619 | return 3 |
605 | 620 |
|
606 | 621 |
|
607 | | -class CancunEIP7692( # noqa: SC200 |
| 622 | +class ShanghaiEIP6800( |
| 623 | + Shanghai, |
| 624 | + transition_tool_name="Prague", |
| 625 | + blockchain_test_network_name="Prague", |
| 626 | + solc_name="shanghai", |
| 627 | +): |
| 628 | + """ |
| 629 | + Shanghai + EIP-6800 (Verkle) fork |
| 630 | + """ |
| 631 | + |
| 632 | + @classmethod |
| 633 | + def is_deployed(cls) -> bool: |
| 634 | + """ |
| 635 | + Flags that the fork has not been deployed to mainnet; it is under active |
| 636 | + development. |
| 637 | + """ |
| 638 | + return False |
| 639 | + |
| 640 | + @classmethod |
| 641 | + def environment_verkle_conversion_completed(cls) -> bool: |
| 642 | + """ |
| 643 | + Verkle conversion has already completed in this fork. |
| 644 | + """ |
| 645 | + return True |
| 646 | + |
| 647 | + @classmethod |
| 648 | + def pre_allocation_blockchain(cls) -> Mapping: |
| 649 | + """ |
| 650 | + Verkle requires pre-allocation of the history storage contract for EIP-2935 on blockchain |
| 651 | + type tests. |
| 652 | + """ |
| 653 | + new_allocation = { |
| 654 | + 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE: { |
| 655 | + "nonce": 1, |
| 656 | + "code": ( |
| 657 | + "0x60203611603157600143035f35116029575f35612000014311602957612000" |
| 658 | + "5f3506545f5260205ff35b5f5f5260205ff35b5f5ffd00" |
| 659 | + ), |
| 660 | + } |
| 661 | + } |
| 662 | + # TODO: Utilize when testing for large init MPT |
| 663 | + # return VERKLE_PRE_ALLOCATION | super(Shanghai, cls).pre_allocation() |
| 664 | + return new_allocation | super(Shanghai, cls).pre_allocation_blockchain() |
| 665 | + |
| 666 | + |
| 667 | +# TODO: move back to transition.py after filling and executing ShanghaiEIP6800 tests successfully |
| 668 | +@transition_fork(to_fork=ShanghaiEIP6800, at_timestamp=32) |
| 669 | +class EIP6800Transition( |
| 670 | + Shanghai, |
| 671 | + blockchain_test_network_name="ShanghaiToPragueAtTime32", |
| 672 | +): |
| 673 | + """ |
| 674 | + Shanghai to Verkle transition at Timestamp 32. |
| 675 | + """ |
| 676 | + |
| 677 | + pass |
| 678 | + |
| 679 | + |
| 680 | +class CancunEIP7692( |
608 | 681 | Cancun, |
609 | 682 | transition_tool_name="Prague", # Evmone enables (only) EOF at Prague |
610 | 683 | blockchain_test_network_name="Prague", # Evmone enables (only) EOF at Prague |
|
0 commit comments