Skip to content

Commit

Permalink
reorder Cancun, to ignore cancun tests when fill for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
spencer-tb committed May 17, 2024
1 parent 73cab80 commit 4f276cc
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 70 deletions.
122 changes: 61 additions & 61 deletions src/ethereum_test_forks/forks/forks.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,67 @@ def pre_allocation_blockchain(cls) -> Mapping:
return new_allocation | super(Shanghai, cls).pre_allocation_blockchain()


# 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
"""

@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 = 0
) -> bool:
"""
Verkle conversion starts in this fork.
"""
return True


class Cancun(Shanghai):
"""
Cancun fork
Expand Down Expand Up @@ -488,64 +549,3 @@ def engine_new_payload_beacon_root(cls, block_number: int = 0, timestamp: int =
Starting at Cancun, payloads must have a parent beacon block root.
"""
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
"""

@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 = 0
) -> bool:
"""
Verkle conversion starts in this fork.
"""
return True
18 changes: 9 additions & 9 deletions src/ethereum_test_forks/forks/transition.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,6 @@ class ParisToShanghaiAtTime15k(Paris, blockchain_test_network_name="ParisToShang
pass


@transition_fork(to_fork=Cancun, at_timestamp=15_000)
class ShanghaiToCancunAtTime15k(Shanghai):
"""
Shanghai to Cancun transition at Timestamp 15k
"""

pass


@transition_fork(to_fork=Prague, at_timestamp=32)
class ShanghaiToPragueAtTime32(Shanghai):
"""
Expand Down Expand Up @@ -65,3 +56,12 @@ class ShanghaiToPragueAtTime32(Shanghai):
# """
#
# return VERKLE_PRE_ALLOCATION | super(Shanghai, cls).pre_allocation()


@transition_fork(to_fork=Cancun, at_timestamp=15_000)
class ShanghaiToCancunAtTime15k(Shanghai):
"""
Shanghai to Cancun transition at Timestamp 15k
"""

pass

0 comments on commit 4f276cc

Please sign in to comment.