Skip to content

Commit ea9ac45

Browse files
committed
fixed broken links
1 parent ce8f60d commit ea9ac45

File tree

18 files changed

+74
-165
lines changed

18 files changed

+74
-165
lines changed

docs/running_tests/test_formats/blockchain_test_engine_x.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The key optimization is that **clients need only be started once per group** ins
1414

1515
Instead of including large pre-allocation state in each test fixture, this format references a pre-allocation groups folder (`pre_alloc`) which contains all different pre-allocation combinations organized by group.
1616

17-
A single JSON fixture file is composed of a JSON object where each key-value pair is a different [`BlockchainTestEngineXFixture`](#BlockchainTestEngineXFixture) test object, with the key string representing the test name.
17+
A single JSON fixture file is composed of a JSON object where each key-value pair is a different [`BlockchainTestEngineXFixture`](#blockchaintestenginexfixture) test object, with the key string representing the test name.
1818

1919
The JSON file path plus the test name are used as the unique test identifier.
2020

@@ -48,7 +48,7 @@ Each file in the `pre_alloc` folder corresponds to a pre-allocation group identi
4848

4949
## Consumption
5050

51-
For each [`BlockchainTestEngineXFixture`](#BlockchainTestEngineXFixture) test object in the JSON fixture file, perform the following steps:
51+
For each [`BlockchainTestEngineXFixture`](#blockchaintestenginexfixture) test object in the JSON fixture file, perform the following steps:
5252

5353
1. **Load Pre-Allocation Group**:
5454
- Read the appropriate file from the `pre_alloc` folder in the same directory

docs/running_tests/test_formats/common_types.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ State allocation represented as a JSON object, where the keys are the addresses
8686

8787
Maps forks to blob schedule configurations as defined by [EIP-7840](https://eips.ethereum.org/EIPS/eip-7840).
8888

89+
### `Environment`
90+
91+
Contains blockchain-related configuration that provides the context in which a test is run.
92+
8993
### `ForkBlobSchedule`
9094

9195
A fork blob schedule as defined by [EIP-7840](https://eips.ethereum.org/EIPS/eip-7840) as a JSON dictionary with the following entries:

docs/writing_tests/tutorials/state_transition.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Finally, we execute the test by calling the state test wrapper with all our defi
170170

171171
This line calls the wrapper to the `StateTest` object that provides all the objects required in order to fill the test, generate the test fixtures and write them to file (by default, `./fixtures/<blockchain,state>_tests/example/state_test_example/test_state_test_example.json`).
172172

173-
Note that even though we defined a `StateTest`, the `fill` command will also generate other derivative test fixtures: `BlockchainTest`, `BlockchainTestEngine`, and `BlockchainTestEngineX`. For more information about test types and when to use each, see [Test Types: Prefer StateTest for Single Transactions](../../writing_tests/types_of_tests/#prefer-state_test-for-single-transactions).
173+
Note that even though we defined a `StateTest`, the `fill` command will also generate other derivative test fixtures: `BlockchainTest`, `BlockchainTestEngine`, and `BlockchainTestEngineX`. For more information about test types and when to use each, see [Test Types: Prefer StateTest for Single Transactions](../types_of_tests.md#prefer-state_test-for-single-transactions).
174174

175175
## Conclusion
176176

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ dependencies = [
4949
"pytest-regex>=0.2.0,<0.3",
5050
"eth-abi>=5.2.0",
5151
"joblib>=1.4.2",
52+
"ckzg>=2.1.1",
5253
]
5354

5455
[project.urls]

pytest.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ addopts =
1313
-p pytest_plugins.filler.pre_alloc
1414
-p pytest_plugins.filler.filler
1515
-p pytest_plugins.filler.ported_tests
16+
-p pytest_plugins.filler.static_filler
1617
-p pytest_plugins.shared.execute_fill
1718
-p pytest_plugins.forks.forks
1819
-p pytest_plugins.eels_resolver

src/ethereum_test_forks/__init__.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,13 @@
3535
TransitionFork,
3636
forks_from,
3737
forks_from_until,
38-
get_closest_fork_with_solc_support,
38+
get_closest_fork,
3939
get_deployed_forks,
4040
get_development_forks,
4141
get_fork_by_name,
4242
get_forks,
4343
get_forks_with_no_descendants,
4444
get_forks_with_no_parents,
45-
get_forks_with_solc_support,
46-
get_forks_without_solc_support,
4745
get_from_until_fork_set,
4846
get_last_descendants,
4947
get_relative_fork_markers,
@@ -85,16 +83,14 @@
8583
"get_transition_forks",
8684
"forks_from",
8785
"forks_from_until",
88-
"get_closest_fork_with_solc_support",
86+
"get_closest_fork",
8987
"get_deployed_forks",
9088
"get_development_forks",
9189
"get_transition_fork_predecessor",
9290
"get_transition_fork_successor",
9391
"get_fork_by_name",
9492
"get_forks_with_no_descendants",
9593
"get_forks_with_no_parents",
96-
"get_forks_with_solc_support",
97-
"get_forks_without_solc_support",
9894
"get_relative_fork_markers",
9995
"get_forks",
10096
"get_from_until_fork_set",

src/ethereum_test_forks/base_fork.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
Union,
1717
)
1818

19-
from semver import Version
20-
2119
from ethereum_test_base_types import AccessList, Address, BlobSchedule
2220
from ethereum_test_base_types.conversions import BytesConvertible
2321
from ethereum_test_vm import EVMCodeType, Opcodes
@@ -576,12 +574,6 @@ def solc_name(cls) -> str:
576574
"""Return fork name as it's meant to be passed to the solc compiler."""
577575
pass
578576

579-
@classmethod
580-
@abstractmethod
581-
def solc_min_version(cls) -> Version:
582-
"""Return minimum version of solc that supports this fork."""
583-
pass
584-
585577
@classmethod
586578
def is_deployed(cls) -> bool:
587579
"""

src/ethereum_test_forks/forks/forks.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
from pathlib import Path
77
from typing import List, Literal, Mapping, Optional, Sized, Tuple
88

9-
from semver import Version
10-
119
from ethereum_test_base_types import AccessList, Address, BlobSchedule, Bytes, ForkBlobSchedule
1210
from ethereum_test_base_types.conversions import BytesConvertible
1311
from ethereum_test_vm import EVMCodeType, Opcodes
@@ -46,11 +44,6 @@ def solc_name(cls) -> str:
4644
return cls._solc_name
4745
return cls.name().lower()
4846

49-
@classmethod
50-
def solc_min_version(cls) -> Version:
51-
"""Return minimum version of solc that supports this fork."""
52-
return Version.parse("0.8.20")
53-
5447
@classmethod
5548
def header_base_fee_required(cls, block_number: int = 0, timestamp: int = 0) -> bool:
5649
"""At genesis, header must not contain base fee."""
@@ -929,11 +922,6 @@ def get_blob_constant(cls, name: str) -> int | Literal["big"]:
929922
)
930923
return retrieved_constant
931924

932-
@classmethod
933-
def solc_min_version(cls) -> Version:
934-
"""Return minimum version of solc that supports this fork."""
935-
return Version.parse("0.8.24")
936-
937925
@classmethod
938926
def header_excess_blob_gas_required(cls, block_number: int = 0, timestamp: int = 0) -> bool:
939927
"""Excess blob gas is required starting from Cancun."""
@@ -1131,11 +1119,6 @@ def is_deployed(cls) -> bool:
11311119
"""
11321120
return False
11331121

1134-
@classmethod
1135-
def solc_min_version(cls) -> Version:
1136-
"""Return minimum version of solc that supports this fork."""
1137-
return Version.parse("1.0.0") # set a high version; currently unknown
1138-
11391122
@classmethod
11401123
def precompiles(cls, block_number: int = 0, timestamp: int = 0) -> List[Address]:
11411124
"""
@@ -1421,11 +1404,6 @@ def valid_opcodes(
14211404
Opcodes.CLZ,
14221405
] + super(Prague, cls).valid_opcodes()
14231406

1424-
@classmethod
1425-
def solc_min_version(cls) -> Version:
1426-
"""Return minimum version of solc that supports this fork."""
1427-
return Version.parse("1.0.0") # set a high version; currently unknown
1428-
14291407
@classmethod
14301408
def precompiles(cls, block_number: int = 0, timestamp: int = 0) -> List[Address]:
14311409
"""
@@ -1514,8 +1492,3 @@ def is_deployed(cls) -> bool:
15141492
development.
15151493
"""
15161494
return False
1517-
1518-
@classmethod
1519-
def solc_min_version(cls) -> Version:
1520-
"""Return minimum version of solc that supports this fork."""
1521-
return Version.parse("1.0.0") # set a high version; currently unknown

src/ethereum_test_forks/helpers.py

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -77,30 +77,11 @@ def get_parent_fork(fork: Type[BaseFork]) -> Type[BaseFork]:
7777
return parent_fork
7878

7979

80-
def get_forks_with_solc_support(solc_version: Version) -> List[Type[BaseFork]]:
81-
"""Return list of all fork classes that are supported by solc."""
82-
return [fork for fork in get_forks() if solc_version >= fork.solc_min_version()]
83-
84-
85-
def get_forks_without_solc_support(solc_version: Version) -> List[Type[BaseFork]]:
86-
"""Return list of all fork classes that aren't supported by solc."""
87-
return [fork for fork in get_forks() if solc_version < fork.solc_min_version()]
88-
89-
90-
def get_closest_fork_with_solc_support(
91-
fork: Type[BaseFork], solc_version: Version
92-
) -> Optional[Type[BaseFork]]:
93-
"""
94-
Return closest fork, potentially the provided fork itself, that has
95-
solc support.
96-
"""
80+
def get_closest_fork(fork: Type[BaseFork], solc_version: Version) -> Optional[Type[BaseFork]]:
81+
"""Return None if BaseFork is passed, otherwise return the fork itself."""
9782
if fork is BaseFork:
9883
return None
99-
return (
100-
fork
101-
if solc_version >= fork.solc_min_version()
102-
else get_closest_fork_with_solc_support(get_parent_fork(fork), solc_version)
103-
)
84+
return fork
10485

10586

10687
def get_transition_forks() -> Set[Type[BaseFork]]:

src/ethereum_test_forks/tests/test_forks.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import pytest
66
from pydantic import BaseModel
7-
from semver import Version
87

98
from ethereum_test_base_types import BlobSchedule
109

@@ -31,10 +30,8 @@
3130
Fork,
3231
forks_from,
3332
forks_from_until,
34-
get_closest_fork_with_solc_support,
3533
get_deployed_forks,
3634
get_forks,
37-
get_forks_with_solc_support,
3835
transition_fork_from_to,
3936
transition_fork_to,
4037
)
@@ -298,18 +295,6 @@ def test_tx_types(): # noqa: D103
298295
Cancun.tx_types() == list(range(4)) # noqa: B015
299296

300297

301-
def test_solc_versioning(): # noqa: D103
302-
assert len(get_forks_with_solc_support(Version.parse("0.8.20"))) == 13
303-
assert len(get_forks_with_solc_support(Version.parse("0.8.24"))) > 13
304-
305-
306-
def test_closest_fork_supported_by_solc(): # noqa: D103
307-
assert get_closest_fork_with_solc_support(Paris, Version.parse("0.8.20")) == Paris
308-
assert get_closest_fork_with_solc_support(Cancun, Version.parse("0.8.20")) == Shanghai
309-
assert get_closest_fork_with_solc_support(Cancun, Version.parse("0.8.24")) == Cancun
310-
assert get_closest_fork_with_solc_support(Prague, Version.parse("0.8.24")) == Cancun
311-
312-
313298
@pytest.mark.parametrize(
314299
"fork",
315300
[

0 commit comments

Comments
 (0)