Skip to content

Commit

Permalink
small hack to fill all test at the transition.
Browse files Browse the repository at this point in the history
  • Loading branch information
spencer-tb committed May 17, 2024
1 parent 83273d8 commit 00b7474
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 16 deletions.
47 changes: 31 additions & 16 deletions src/ethereum_test_forks/forks/forks.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,37 @@ def engine_new_payload_beacon_root(cls, block_number: int = 0, timestamp: int =
return True


# TODO: Just a small hack to fill all tests using the transition
class ShanghaiToPragueAtTime32(Shanghai):
"""
Shanghai to Prague transition at Timestamp 32
"""

@classmethod
def is_deployed(cls) -> bool:
"""
Flags that the fork has not been deployed to mainnet; it is under active
development.
"""
return False

@classmethod
def solc_min_version(cls) -> Version:
"""
Returns the minimum version of solc that supports this fork.
"""
return Version.parse("1.0.0") # set a high version; currently unknown

@classmethod
def environment_verkle_conversion_starts(
cls, block_number: int = 0, timestamp: int = 32
) -> bool:
"""
Verkle conversion starts in this fork.
"""
return True


class Prague(Shanghai):
"""
Prague fork
Expand Down Expand Up @@ -518,19 +549,3 @@ def environment_verkle_conversion_starts(
Verkle conversion starts in this fork.
"""
return True

# @classmethod
# def pre_allocation_blockchain(cls) -> Mapping:
# """
# Prague requires pre-allocation of the beacon chain deposit contract for EIP-6110,
# the exits contract for EIP-7002, and history storage contract for EIP-2935.
# """
# new_allocation = {}

# # Add the beacon chain deposit contract
# DEPOSIT_CONTRACT_TREE_DEPTH = 32
# storage = {}
# next_hash = sha256(b"\x00" * 64).digest()
# for i in range(DEPOSIT_CONTRACT_TREE_DEPTH + 2, DEPOSIT_CONTRACT_TREE_DEPTH * 2 + 1):
# storage[i] = next_hash
# next_hash = sha256(next_hash + next_hash).digest()
1 change: 1 addition & 0 deletions whitelist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ textwrap
tf
ThreeHrSleep
time15k
Time32
timestamp
todo
toml
Expand Down

0 comments on commit 00b7474

Please sign in to comment.