Skip to content
Closed
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
20 changes: 20 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,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 @@ -348,8 +355,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 XX0M][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 | ` ` | - - : : | `0x ` | |
| Sepolia | ` ` | - - : : | `0x ` | |
| Hoodi | ` ` | - - : : | `0x ` | |
| Mainnet | ` ` | - - : : | `0x ` | |

### 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=1)
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