Conversation
Adds EIP-8038 parameters (gated at AMSTERDAM alongside EIP-7904/EIP-8037). Per the user-supplied rule, every TBD value in the draft spec is set to `previous_value + 1`: WARM_ACCESS 100 -> 101 COLD_ACCOUNT_ACCESS 2,600 -> 2,601 ACCOUNT_WRITE 6,700 -> 6,701 COLD_STORAGE_ACCESS 2,100 -> 2,101 STORAGE_WRITE 2,800 -> 2,801 STORAGE_CLEAR_REFUND 4,800 -> 4,801 CREATE_ACCESS 7,000 -> 7,001 ACCESS_LIST_ADDRESS_COST 2,400 -> 2,401 ACCESS_LIST_STORAGE_KEY_COST 1,900 -> 1,901 Wires the new values through the GasParams table (account/storage access, SSTORE charges and refunds, CREATE/CREATE2, EIP-7702 per-auth regular cost, access-list per-item costs) and bumps the static gas table for warm-access opcodes. EXTCODESIZE and EXTCODECOPY get an extra WARM_ACCESS baked into their static cost per the EIP "EXT* family update" rule. Existing EIP-8037 snapshot tests refreshed; one Amsterdam access-list unit test updated.
Adds EIP-2780 (Reduce intrinsic transaction gas) on top of EIP-8037 / EIP-8038, tracking the https://github.com/misilva73/EIPs/blob/update-eip-2780/EIPS/eip-2780.md draft. Replaces the legacy 21,000 stipend with a decomposed model: TX_BASE_COST 12,300 (sender base + ECDSA + sender access/write) + to-based (per recipient kind) - cold EOA/contract COLD_ACCOUNT_ACCESS (sourced from eip8038) - create CREATE_ACCESS (sourced from eip8038) + value-based - zero 0 - create with value TRANSFER_LOG_COST - other TRANSFER_LOG_COST + ACCOUNT_WRITE The current draft's self-transfer and precompile zero-charge carve-outs are intentionally not implemented — a future revision is expected to drop them, so self-transfers and precompile transfers pay the same to/value charges as any other recipient. Adds an `enable_amsterdam_eip2780` config flag (auto-enabled at AMSTERDAM, paired with `Cfg::is_amsterdam_eip2780_enabled`) and `Eip2780TxInfo` (just the transferred value) plumbed into `GasParams::initial_tx_gas`. Validation in the handler builds the info when EIP-2780 is enabled. `tx_transfer_log_cost`, `tx_account_write_cost`, and `tx_create_access_cost` GasIds are added and populated in the AMSTERDAM block. Implements the top-level execution charges from EIP-2780 in `EthFrame::make_call_frame` (depth == 0): - If recipient is EIP-7702-delegated, charge an additional `COLD_ACCOUNT_ACCESS` of regular gas. - If recipient is empty per EIP-161 and `tx.value > 0`, charge `new_account_state_gas(cpsb)` of state gas. The existing `last_frame_result` reservoir reconciliation refunds it on revert. Existing EIP-8037 helpers in `eip8037.rs` explicitly disable EIP-2780 so the state-gas-reservoir tests stay focused. Bumps one EIP-7708 test's gas limit to fit the new ~207k intrinsic for value transfer creating a new account. Adds an `eip2780.rs` ee-tests module covering self-transfer, EOA, empty-with-value, create with/without value, and the legacy-fallback path.
Reconcile EIP-8038 gas overrides (this branch) with EIP-2780 intrinsic-gas decomposition (glam-devnet-5) in `gas_params.rs`. Both blocks live inside the AMSTERDAM activation; they touch disjoint table slots so the resolution keeps both.
Merging this PR will not alter performance
Comparing Footnotes
|
…3707) Raises EIP-7954 limits for the glam devnet: MAX_CODE_SIZE from 0x8000 → 0x10000 (65,536 bytes) and MAX_INITCODE_SIZE from 0x10000 → 0x20000 (131,072 bytes). Updates the affected validation test to push the new oversize threshold and refreshes related comments.
Replace the EIP-7708 burn-log mechanism with EIP-8246 semantics: at transaction finalization, self-destructed accounts that still hold a balance keep it and have their code, storage and nonce cleared instead of the balance being burned. Self-destruct to self no longer burns the balance either. - Rename `eip7708_emit_burn_remaining_balance_logs` to `eip8246_clear_selfdestructed_accounts`; clear accounts (code, storage, nonce) and drop the self-destruct flag instead of emitting burn logs, preserving the balance. - Stop zeroing the balance / emitting a burn log for self-destruct to self under Amsterdam. - Remove the now-dead `eip7708_burn_log` helper. - Rename the `eip7708_delayed_burn_disabled` flag to `eip8246_delayed_clear_disabled` (CfgEnv field, Cfg accessor and JournalCfg field).
…3719) * fix(eip-8037): apply EIP-7778 branching to block_regular_gas_used Replace `max(total_gas_spent - state_gas_spent, floor_gas)` with the conditional formula from EIP-8037 + EIP-7778 (PR ethereum/EIPs#11706): - Floor-dominant (floor_gas >= total_gas_spent - refunded): block_regular = tx_gas_used - state_gas_spent - Refund-dominant: block_regular = total_gas_spent - state_gas_spent (pre-refund, since refunds are excluded from block accounting) Floor gas no longer participates as a `max(...)` against the regular component; it only contributes through `tx_gas_used` when it dominates the post-refund total. * fix(eip-8037): exclude floor and refund from block_regular_gas_used Per EIP-8037 + EIP-7778, block-level regular gas accounting is the pre-refund regular component of execution. Refund and floor are scalar adjustments on the combined `state + regular` total and only affect the receipt's `tx_gas_used`, not the block-level split. block_regular_gas_used = total_gas_spent - state_gas_spent
# Conflicts: # crates/context/interface/src/cfg.rs # crates/context/interface/src/cfg/gas.rs # crates/context/interface/src/cfg/gas_params.rs # crates/context/src/cfg.rs # crates/ee-tests/src/eip8037.rs # crates/ee-tests/src/snapshots/revm_ee_tests__eip8037__eip8037_tx_create_initcode_selfdestruct_after_sstore.snap # crates/handler/src/handler.rs # crates/handler/src/validation.rs
Member
Author
|
This is moved to glam-devnet-6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Glamsterdam devnet-5 EIP bundle. Status of included EIPs:
Test plan
cargo check --workspacecargo nextest run --workspacecargo clippy --workspace --all-targets --all-featurescargo fmt --all --check