Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/configs/feature.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ benchmark_develop:

bal:
evm-type: develop
fill-params: --fork=Amsterdam ./tests/amsterdam/eip7928_block_level_access_lists
# TODO: Turn on block rlp limit tests after making filling them more flexible.
fill-params: --fork=Amsterdam -k "not eip7934"
feature_only: true
2 changes: 2 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Test fixtures for use by clients are available for each release on the [Github r

### 📋 Misc

- 🐞 Fix duplicate storage write issues for block access lists EIP-7928 implementation ([#1743](https://github.com/ethereum/execution-specs/pull/1743)).

### 🧪 Test Cases

- 🐞 Fix BALs opcode OOG test vectors by updating the Amsterdam commit hash in specs and validating appropriately on the testing side ([#2293](https://github.com/ethereum/execution-spec-tests/pull/2293)).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@
BPO2,
BPO3,
BPO4,
BPO5,
Amsterdam,
Berlin,
BerlinToLondonAt5,
BPO1ToBPO2AtTime15k,
BPO2ToBPO3AtTime15k,
BPO3ToBPO4AtTime15k,
BPO4ToBPO5AtTime15k,
BPO5ToAmsterdamAtTime15k,
Byzantium,
Cancun,
CancunToPragueAtTime15k,
Expand Down Expand Up @@ -53,10 +56,27 @@ def get_blob_schedule_entries(fork: Fork) -> Dict[str, int]:
entries: Dict = {}
forks_with_blobs: List[Fork] = []
current_fork = fork

# Walk up the parent chain to collect all forks with blob support
while current_fork.supports_blobs():
forks_with_blobs.append(current_fork)
current_fork = current_fork.parent() # type: ignore

# Special case: For forks that come after BPOs but don't inherit from them
# (e.g., Amsterdam and any future forks), include BPO fork configs.
# This allows the genesis to support both:
# - Osaka -> Amsterdam (skips BPOs, uses Osaka blob params)
# - Osaka -> BPO1 -> ... -> Amsterdam (uses BPO params chronologically)
bpo_forks = [BPO1, BPO2, BPO3, BPO4, BPO5]
has_bpo_in_chain = any(bpo_fork in forks_with_blobs for bpo_fork in bpo_forks)

# If this fork doesn't have BPO in its inheritance chain but comes after Osaka,
# add all BPO forks so they can be configured in the genesis
if not has_bpo_in_chain and Osaka in forks_with_blobs:
for bpo_fork in bpo_forks:
forks_with_blobs.append(bpo_fork)

# Generate blob schedule entries for all collected forks
for fork_to_process in forks_with_blobs:
prefix = fork_to_process.__name__.upper()
entries[f"HIVE_{prefix}_BLOB_TARGET"] = (
Expand Down Expand Up @@ -480,6 +500,76 @@ def get_blob_schedule_entries(fork: Fork) -> Dict[str, int]:
"HIVE_BPO4_TIMESTAMP": 15000,
**get_blob_schedule_entries(BPO4),
},
BPO5: {
"HIVE_FORK_HOMESTEAD": 0,
"HIVE_FORK_TANGERINE": 0,
"HIVE_FORK_SPURIOUS": 0,
"HIVE_FORK_BYZANTIUM": 0,
"HIVE_FORK_CONSTANTINOPLE": 0,
"HIVE_FORK_PETERSBURG": 0,
"HIVE_FORK_ISTANBUL": 0,
"HIVE_FORK_BERLIN": 0,
"HIVE_FORK_LONDON": 0,
"HIVE_FORK_MERGE": 0,
"HIVE_TERMINAL_TOTAL_DIFFICULTY": 0,
"HIVE_SHANGHAI_TIMESTAMP": 0,
"HIVE_CANCUN_TIMESTAMP": 0,
"HIVE_PRAGUE_TIMESTAMP": 0,
"HIVE_OSAKA_TIMESTAMP": 0,
"HIVE_BPO1_TIMESTAMP": 0,
"HIVE_BPO2_TIMESTAMP": 0,
"HIVE_BPO3_TIMESTAMP": 0,
"HIVE_BPO4_TIMESTAMP": 0,
"HIVE_BPO5_TIMESTAMP": 0,
**get_blob_schedule_entries(BPO5),
},
BPO4ToBPO5AtTime15k: {
"HIVE_FORK_HOMESTEAD": 0,
"HIVE_FORK_TANGERINE": 0,
"HIVE_FORK_SPURIOUS": 0,
"HIVE_FORK_BYZANTIUM": 0,
"HIVE_FORK_CONSTANTINOPLE": 0,
"HIVE_FORK_PETERSBURG": 0,
"HIVE_FORK_ISTANBUL": 0,
"HIVE_FORK_BERLIN": 0,
"HIVE_FORK_LONDON": 0,
"HIVE_FORK_MERGE": 0,
"HIVE_TERMINAL_TOTAL_DIFFICULTY": 0,
"HIVE_SHANGHAI_TIMESTAMP": 0,
"HIVE_CANCUN_TIMESTAMP": 0,
"HIVE_PRAGUE_TIMESTAMP": 0,
"HIVE_OSAKA_TIMESTAMP": 0,
"HIVE_BPO1_TIMESTAMP": 0,
"HIVE_BPO2_TIMESTAMP": 0,
"HIVE_BPO3_TIMESTAMP": 0,
"HIVE_BPO4_TIMESTAMP": 0,
"HIVE_BPO5_TIMESTAMP": 15000,
**get_blob_schedule_entries(BPO5),
},
BPO5ToAmsterdamAtTime15k: {
"HIVE_FORK_HOMESTEAD": 0,
"HIVE_FORK_TANGERINE": 0,
"HIVE_FORK_SPURIOUS": 0,
"HIVE_FORK_BYZANTIUM": 0,
"HIVE_FORK_CONSTANTINOPLE": 0,
"HIVE_FORK_PETERSBURG": 0,
"HIVE_FORK_ISTANBUL": 0,
"HIVE_FORK_BERLIN": 0,
"HIVE_FORK_LONDON": 0,
"HIVE_FORK_MERGE": 0,
"HIVE_TERMINAL_TOTAL_DIFFICULTY": 0,
"HIVE_SHANGHAI_TIMESTAMP": 0,
"HIVE_CANCUN_TIMESTAMP": 0,
"HIVE_PRAGUE_TIMESTAMP": 0,
"HIVE_OSAKA_TIMESTAMP": 0,
"HIVE_BPO1_TIMESTAMP": 0,
"HIVE_BPO2_TIMESTAMP": 0,
"HIVE_BPO3_TIMESTAMP": 0,
"HIVE_BPO4_TIMESTAMP": 0,
"HIVE_BPO5_TIMESTAMP": 0,
"HIVE_AMSTERDAM_TIMESTAMP": 15000,
**get_blob_schedule_entries(Amsterdam),
},
Amsterdam: {
"HIVE_FORK_HOMESTEAD": 0,
"HIVE_FORK_TANGERINE": 0,
Expand All @@ -500,6 +590,7 @@ def get_blob_schedule_entries(fork: Fork) -> Dict[str, int]:
"HIVE_BPO2_TIMESTAMP": 0,
"HIVE_BPO3_TIMESTAMP": 0,
"HIVE_BPO4_TIMESTAMP": 0,
"HIVE_BPO5_TIMESTAMP": 0,
"HIVE_AMSTERDAM_TIMESTAMP": 0,
**get_blob_schedule_entries(Amsterdam),
},
Expand Down
4 changes: 4 additions & 0 deletions packages/testing/src/execution_testing/forks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
BPO1ToBPO2AtTime15k,
BPO2ToBPO3AtTime15k,
BPO3ToBPO4AtTime15k,
BPO4ToBPO5AtTime15k,
BPO5ToAmsterdamAtTime15k,
CancunToPragueAtTime15k,
OsakaToBPO1AtTime15k,
ParisToShanghaiAtTime15k,
Expand Down Expand Up @@ -118,7 +120,9 @@
"BPO3",
"BPO3ToBPO4AtTime15k",
"BPO4",
"BPO4ToBPO5AtTime15k",
"BPO5",
"BPO5ToAmsterdamAtTime15k",
"get_transition_forks",
"forks_from",
"forks_from_until",
Expand Down
16 changes: 16 additions & 0 deletions packages/testing/src/execution_testing/forks/forks/transition.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

from ..transition_base_fork import transition_fork
from .forks import (
Amsterdam,
BPO1,
BPO2,
BPO3,
BPO4,
BPO5,
Berlin,
Cancun,
London,
Expand Down Expand Up @@ -78,3 +80,17 @@ class BPO3ToBPO4AtTime15k(BPO3):
"""BPO3 to BPO4 transition at Timestamp 15k."""

pass


@transition_fork(to_fork=BPO5, at_timestamp=15_000)
class BPO4ToBPO5AtTime15k(BPO4):
"""BPO4 to BPO5 transition at Timestamp 15k."""

pass


@transition_fork(to_fork=Amsterdam, at_timestamp=15_000)
class BPO5ToAmsterdamAtTime15k(BPO5):
"""BPO5 to Amsterdam transition at Timestamp 15k."""

pass
20 changes: 20 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@ packages = [
"ethereum.forks.osaka.vm.instructions",
"ethereum.forks.osaka.vm.precompiled_contracts",
"ethereum.forks.osaka.vm.precompiled_contracts.bls12_381",
"ethereum.forks.amsterdam",
"ethereum.forks.amsterdam.block_access_lists",
"ethereum.forks.amsterdam.utils",
"ethereum.forks.amsterdam.vm",
"ethereum.forks.amsterdam.vm.instructions",
"ethereum.forks.amsterdam.vm.precompiled_contracts",
"ethereum.forks.amsterdam.vm.precompiled_contracts.bls12_381",
]

[tool.setuptools.package-data]
Expand Down Expand Up @@ -349,8 +356,21 @@ ignore = [
"src/ethereum_spec_tools/evm_tools/t8n/evm_trace.py" = [
"N815" # The traces must use camel case in JSON property names
]
"src/ethereum/forks/amsterdam/blocks.py" = [
"E501" # Line too long - needed for long ref links
]
"src/ethereum/forks/amsterdam/block_access_lists/builder.py" = [
"E501" # Line too long - needed for long ref links
]
"src/ethereum/forks/amsterdam/block_access_lists/rlp_utils.py" = [
"E501" # Line too long - needed for long ref links
]
"tests/*" = ["ARG001"]

[tool.ruff.lint.mccabe]
# Set the maximum allowed cyclomatic complexity. C901 default is 10.
max-complexity = 7

[tool.codespell]
builtin = "clear,code,usage" # Built-in dictionaries to use
skip = [ # Don't check these files/folders
Expand Down
55 changes: 55 additions & 0 deletions src/ethereum/forks/amsterdam/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
"""
The Amsterdam fork ([EIP-7607]) includes networking changes (peerDAS), increases
the gas cost while limiting the input size of the `MODEXP` precompile, limits
the maximum gas per transaction, raises the blob base fee to always be above
the execution cost, limits the RLP-encoded size of blocks, introduces a count
leading zeros (`CLZ`) instruction, and adds a new precompile supporting the
secp256r1 curve.

### Notices

- [EIP-7935: Set default gas limit to 60M][EIP-7935]

### Changes

- [EIP-7594: PeerDAS - Peer Data Availability Sampling][EIP-7594]
- [EIP-7823: Set upper bounds for MODEXP][EIP-7823]
- [EIP-7825: Transaction Gas Limit Cap][EIP-7825]
- [EIP-7883: ModExp Gas Cost Increase][EIP-7883]
- [EIP-7918: Blob base fee bounded by execution cost][EIP-7918]
- [EIP-7934: RLP Execution Block Size Limit][EIP-7934]
- [EIP-7939: Count leading zeros (CLZ) opcode][EIP-7939]
- [EIP-7951: Precompile for secp256r1 Curve Support][EIP-7951]
- [EIP-7892: Blob Parameter Only Hardforks][EIP-7892]
- [EIP-7642: eth/69 - history expiry and simpler receipts][EIP-7642]
- [EIP-7910: eth_config JSON-RPC Method][EIP-7910]

### Upgrade Schedule

| Network | Timestamp | Date & Time (UTC) | Fork Hash | Beacon Chain Epoch |
|---------|--------------|-------------------------|--------------|--------------------|
| Holesky | `1759308480` | 2025-10-01 08:48:00 | `0x783def52` | `165120` |
| Sepolia | `1760427360` | 2025-10-14 07:36:00 | `0xe2ae4999` | `272640` |
| Hoodi | `1761677592` | 2025-10-28 18:53:12 | `0xe7e0e7ff` | `50688` |
| Mainnet | `1764798551` | 2025-12-03 21:49:11 | `0x5167e2a6` | `411392` |

### Releases

[EIP-7607]: https://eips.ethereum.org/EIPS/eip-7607
[EIP-7594]: https://eips.ethereum.org/EIPS/eip-7594
[EIP-7823]: https://eips.ethereum.org/EIPS/eip-7823
[EIP-7825]: https://eips.ethereum.org/EIPS/eip-7825
[EIP-7883]: https://eips.ethereum.org/EIPS/eip-7883
[EIP-7918]: https://eips.ethereum.org/EIPS/eip-7918
[EIP-7934]: https://eips.ethereum.org/EIPS/eip-7934
[EIP-7935]: https://eips.ethereum.org/EIPS/eip-7935
[EIP-7939]: https://eips.ethereum.org/EIPS/eip-7939
[EIP-7951]: https://eips.ethereum.org/EIPS/eip-7951
[EIP-7892]: https://eips.ethereum.org/EIPS/eip-7892
[EIP-7642]: https://eips.ethereum.org/EIPS/eip-7642
[EIP-7910]: https://eips.ethereum.org/EIPS/eip-7910
""" # noqa: E501

from ethereum.fork_criteria import Unscheduled

FORK_CRITERIA = Unscheduled(order_index=0)
57 changes: 57 additions & 0 deletions src/ethereum/forks/amsterdam/block_access_lists/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
"""
Block Access Lists (EIP-7928) implementation for Ethereum Amsterdam fork.
"""

from .builder import (
BlockAccessListBuilder,
add_balance_change,
add_code_change,
add_nonce_change,
add_storage_read,
add_storage_write,
add_touched_account,
build_block_access_list,
)
from .rlp_utils import (
compute_block_access_list_hash,
rlp_encode_block_access_list,
validate_block_access_list_against_execution,
)
from .tracker import (
StateChangeTracker,
begin_call_frame,
commit_call_frame,
rollback_call_frame,
set_block_access_index,
track_address_access,
track_balance_change,
track_code_change,
track_nonce_change,
track_storage_read,
track_storage_write,
)

__all__ = [
"BlockAccessListBuilder",
"StateChangeTracker",
"add_balance_change",
"add_code_change",
"add_nonce_change",
"add_storage_read",
"add_storage_write",
"add_touched_account",
"begin_call_frame",
"build_block_access_list",
"commit_call_frame",
"compute_block_access_list_hash",
"rollback_call_frame",
"set_block_access_index",
"rlp_encode_block_access_list",
"track_address_access",
"track_balance_change",
"track_code_change",
"track_nonce_change",
"track_storage_read",
"track_storage_write",
"validate_block_access_list_against_execution",
]
Loading
Loading