Skip to content

Commit

Permalink
chore: Updated fork names from Merge -> Paris
Browse files Browse the repository at this point in the history
  • Loading branch information
MukulKolpe committed Dec 19, 2023
1 parent 23fe412 commit db5d933
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 37 deletions.
4 changes: 2 additions & 2 deletions src/ethereum_test_forks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
Homestead,
Istanbul,
London,
Merge,
Paris,
MuirGlacier,
Shanghai,
)
Expand Down Expand Up @@ -52,7 +52,7 @@
"InvalidForkError",
"Istanbul",
"London",
"Merge",
"Paris",
"MergeToShanghaiAtTime15k",
"MuirGlacier",
"Shanghai",
Expand Down
4 changes: 2 additions & 2 deletions src/ethereum_test_forks/forks/forks.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ class GrayGlacier(ArrowGlacier):
pass


class Merge(London):
class Paris(London):
"""
Merge fork
"""
Expand Down Expand Up @@ -298,7 +298,7 @@ def engine_new_payload_version(
return 1


class Shanghai(Merge):
class Shanghai(Paris):
"""
Shanghai fork
"""
Expand Down
4 changes: 2 additions & 2 deletions src/ethereum_test_forks/forks/transition.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
List of all transition fork definitions.
"""
from ..transition_base_fork import transition_fork
from .forks import Berlin, Cancun, London, Merge, Shanghai
from .forks import Berlin, Cancun, London, Paris, Shanghai


# Transition Forks
Expand All @@ -16,7 +16,7 @@ class BerlinToLondonAt5(Berlin):


@transition_fork(to_fork=Shanghai, at_timestamp=15_000)
class MergeToShanghaiAtTime15k(Merge):
class MergeToShanghaiAtTime15k(Paris):
"""
Merge to Shanghai transition at Timestamp 15k
"""
Expand Down
22 changes: 11 additions & 11 deletions src/ethereum_test_forks/tests/test_forks.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import Mapping, cast

from ..base_fork import Fork
from ..forks.forks import Berlin, Cancun, Frontier, London, Merge, Shanghai
from ..forks.forks import Berlin, Cancun, Frontier, London, Paris, Shanghai
from ..forks.transition import BerlinToLondonAt5, MergeToShanghaiAtTime15k
from ..helpers import (
forks_from,
Expand All @@ -30,7 +30,7 @@ def test_transition_forks():
Test transition fork utilities.
"""
assert transition_fork_from_to(Berlin, London) == BerlinToLondonAt5
assert transition_fork_from_to(Berlin, Merge) is None
assert transition_fork_from_to(Berlin, Paris) is None
assert transition_fork_to(Shanghai) == [MergeToShanghaiAtTime15k]

# Test forks transitioned to and from
Expand All @@ -42,7 +42,7 @@ def test_transition_forks():
# Default values of transition forks is the transition block
assert BerlinToLondonAt5.fork() == "London"

assert MergeToShanghaiAtTime15k.fork(0, 14_999) == "Merge"
assert MergeToShanghaiAtTime15k.fork(0, 14_999) == "Paris"
assert MergeToShanghaiAtTime15k.fork(0, 15_000) == "Shanghai"
assert MergeToShanghaiAtTime15k.fork() == "Shanghai"

Expand All @@ -57,9 +57,9 @@ def test_transition_forks():


def test_forks_from(): # noqa: D103
assert forks_from(Merge) == [Merge, LAST_DEPLOYED]
assert forks_from(Merge, deployed_only=True) == [Merge, LAST_DEPLOYED]
assert forks_from(Merge, deployed_only=False) == [Merge, LAST_DEPLOYED] + DEVELOPMENT_FORKS
assert forks_from(Paris) == [Paris, LAST_DEPLOYED]
assert forks_from(Paris, deployed_only=True) == [Paris, LAST_DEPLOYED]
assert forks_from(Paris, deployed_only=False) == [Paris, LAST_DEPLOYED] + DEVELOPMENT_FORKS


def test_forks():
Expand All @@ -68,10 +68,10 @@ def test_forks():
"""
assert forks_from_until(Berlin, Berlin) == [Berlin]
assert forks_from_until(Berlin, London) == [Berlin, London]
assert forks_from_until(Berlin, Merge) == [
assert forks_from_until(Berlin, Paris) == [
Berlin,
London,
Merge,
Paris,
]

# Test fork names
Expand All @@ -83,9 +83,9 @@ def test_forks():
# Test some fork properties
assert Berlin.header_base_fee_required(0, 0) is False
assert London.header_base_fee_required(0, 0) is True
assert Merge.header_base_fee_required(0, 0) is True
assert Paris.header_base_fee_required(0, 0) is True
# Default values of normal forks if the genesis block
assert Merge.header_base_fee_required() is True
assert Paris.header_base_fee_required() is True

# Transition forks too
assert cast(Fork, BerlinToLondonAt5).header_base_fee_required(4, 0) is False
Expand All @@ -96,7 +96,7 @@ def test_forks():

assert is_fork(Berlin, Berlin) is True
assert is_fork(London, Berlin) is True
assert is_fork(Berlin, Merge) is False
assert is_fork(Berlin, Paris) is False


def test_get_forks(): # noqa: D103
Expand Down
4 changes: 2 additions & 2 deletions src/ethereum_test_tools/tests/test_filler.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import pytest
from semver import Version

from ethereum_test_forks import Berlin, Fork, Istanbul, London, Merge, Shanghai
from ethereum_test_forks import Berlin, Fork, Istanbul, London, Paris, Shanghai
from evm_transition_tool import GethTransitionTool

from ..code import Yul
Expand Down Expand Up @@ -90,7 +90,7 @@ def test_make_genesis(fork: Fork, hash: bytes): # noqa: D103
[
(Istanbul, False, "chainid_istanbul_filled.json"),
(London, False, "chainid_london_filled.json"),
(Merge, True, "chainid_merge_filled_hive.json"),
(Paris, True, "chainid_merge_filled_hive.json"),
(Shanghai, True, "chainid_shanghai_filled_hive.json"),
],
)
Expand Down
22 changes: 11 additions & 11 deletions src/pytest_plugins/forks/tests/test_bad_validity_markers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
(
"""
import pytest
@pytest.mark.valid_from("Merge")
@pytest.mark.valid_from("Merge")
@pytest.mark.valid_from("Paris")
@pytest.mark.valid_from("Paris")
def test_case(state_test):
assert 0
""",
Expand All @@ -23,8 +23,8 @@ def test_case(state_test):
(
"""
import pytest
@pytest.mark.valid_until("Merge")
@pytest.mark.valid_until("Merge")
@pytest.mark.valid_until("Paris")
@pytest.mark.valid_until("Paris")
def test_case(state_test):
assert 0
""",
Expand All @@ -36,8 +36,8 @@ def test_case(state_test):
(
"""
import pytest
@pytest.mark.valid_at_transition_to("Merge")
@pytest.mark.valid_at_transition_to("Merge")
@pytest.mark.valid_at_transition_to("Paris")
@pytest.mark.valid_at_transition_to("Paris")
def test_case(state_test):
assert 0
""",
Expand Down Expand Up @@ -85,7 +85,7 @@ def test_case(state_test):
(
"""
import pytest
@pytest.mark.valid_from("Merge", "Merge")
@pytest.mark.valid_from("Paris", "Paris")
def test_case(state_test):
assert 0
""",
Expand All @@ -97,7 +97,7 @@ def test_case(state_test):
(
"""
import pytest
@pytest.mark.valid_until("Merge", "Merge")
@pytest.mark.valid_until("Paris", "Paris")
def test_case(state_test):
assert 0
""",
Expand All @@ -109,7 +109,7 @@ def test_case(state_test):
(
"""
import pytest
@pytest.mark.valid_at_transition_to("Merge", "Merge")
@pytest.mark.valid_at_transition_to("Paris", "Paris")
def test_case(state_test):
assert 0
""",
Expand Down Expand Up @@ -158,7 +158,7 @@ def test_case(state_test):
"""
import pytest
@pytest.mark.valid_at_transition_to("Cancun")
@pytest.mark.valid_from("Merge")
@pytest.mark.valid_from("Paris")
def test_case(state_test):
assert 0
""",
Expand All @@ -183,7 +183,7 @@ def test_case(state_test):
(
"""
import pytest
@pytest.mark.valid_from("Merge")
@pytest.mark.valid_from("Paris")
@pytest.mark.valid_until("Frontier")
def test_case(state_test):
assert 0
Expand Down
2 changes: 1 addition & 1 deletion src/pytest_plugins/forks/tests/test_forks.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_all_forks(state_test):
)


@pytest.mark.parametrize("fork", ["London", "Merge"])
@pytest.mark.parametrize("fork", ["London", "Paris"])
def test_from_london_option_no_validity_marker(pytester, fork_map, fork):
"""
Test test parametrization with:
Expand Down
8 changes: 4 additions & 4 deletions src/pytest_plugins/test_filler/tests/test_test_filler.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ def count_keys_in_fixture(file_path): # noqa: D103
from ethereum_test_tools import Account, Environment, TestAddress
@pytest.mark.valid_from("Merge")
@pytest.mark.valid_from("Paris")
@pytest.mark.valid_until("Shanghai")
def test_merge_one(state_test):
state_test(env=Environment(),
pre={TestAddress: Account(balance=1_000_000)}, post={}, txs=[])
@pytest.mark.valid_from("Merge")
@pytest.mark.valid_from("Paris")
@pytest.mark.valid_until("Shanghai")
def test_merge_two(state_test):
state_test(env=Environment(),
Expand All @@ -51,14 +51,14 @@ def test_merge_two(state_test):
from ethereum_test_tools import Account, Environment, TestAddress
@pytest.mark.valid_from("Merge")
@pytest.mark.valid_from("Paris")
@pytest.mark.valid_until("Shanghai")
def test_shanghai_one(state_test):
state_test(env=Environment(),
pre={TestAddress: Account(balance=1_000_000)}, post={}, txs=[])
@pytest.mark.parametrize("x", [1, 2, 3])
@pytest.mark.valid_from("Merge")
@pytest.mark.valid_from("Paris")
@pytest.mark.valid_until("Shanghai")
def test_shanghai_two(state_test, x):
state_test(env=Environment(),
Expand Down
2 changes: 1 addition & 1 deletion tests/merge/security/test_selfdestruct_balance_bug.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from ethereum_test_tools.vm.opcode import Opcodes as Op


@pytest.mark.compile_yul_with("Merge") # Shanghai refuses to compile SELFDESTRUCT
@pytest.mark.compile_yul_with("Paris") # Shanghai refuses to compile SELFDESTRUCT
@pytest.mark.valid_from("Constantinople")
def test_tx_selfdestruct_balance_bug(blockchain_test: BlockchainTestFiller, yul: YulCompiler):
"""
Expand Down
2 changes: 1 addition & 1 deletion tests/shanghai/eip3651_warm_coinbase/test_warm_coinbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def test_warm_coinbase_call_out_of_gas(
]


@pytest.mark.valid_from("Merge") # these tests fill for fork >= Berlin
@pytest.mark.valid_from("Paris") # these tests fill for fork >= Berlin
@pytest.mark.parametrize(
"opcode,code_gas_measure",
gas_measured_opcodes,
Expand Down

0 comments on commit db5d933

Please sign in to comment.