Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,16 @@
EIP-8198: Quick Slots.

Reduce the consensus-layer slot duration. The execution layer lowers the
maximum per-block base fee change and updates the blob schedule so that fee
dynamics and blob throughput per unit of wall-clock time stay close to their
previous values.
maximum per-block base fee change so that fee dynamics per unit of wall-clock
time stay close to their previous values.

https://eips.ethereum.org/EIPS/eip-8198
"""

from ....base_fork import BaseFork


class EIP8198(
BaseFork,
# Provisional values, pending a joint decision with the consensus layer.
update_blob_constants={
"TARGET_BLOBS_PER_BLOCK": 12,
"MAX_BLOBS_PER_BLOCK": 18,
"BLOB_BASE_FEE_UPDATE_FRACTION": 12018519,
},
):
class EIP8198(BaseFork):
"""EIP-8198 class."""

@classmethod
Expand Down
12 changes: 3 additions & 9 deletions src/ethereum/forks/bogota/vm/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,19 +128,13 @@ class GasCosts:
)

# Blobs
#
# The target, maximum, and update fraction are provisional pending a
# joint decision with the consensus layer. They keep both the fastest
# rise and the fastest fall of the blob base fee, per unit of
# wall-clock time, and the ratio of maximum to target unchanged under
# more frequent blocks.
PER_BLOB: Final[U64] = U64(2**17)
BLOB_SCHEDULE_TARGET: Final[U64] = U64(12)
BLOB_SCHEDULE_TARGET: Final[U64] = U64(14)
BLOB_TARGET_GAS_PER_BLOCK: Final[U64] = PER_BLOB * BLOB_SCHEDULE_TARGET
BLOB_BASE_COST: Final[Uint] = Uint(2**13)
BLOB_SCHEDULE_MAX: Final[U64] = U64(18)
BLOB_SCHEDULE_MAX: Final[U64] = U64(21)
BLOB_MIN_GASPRICE: Final[Uint] = Uint(1)
BLOB_BASE_FEE_UPDATE_FRACTION: Final[Uint] = Uint(12018519)
BLOB_BASE_FEE_UPDATE_FRACTION: Final[Uint] = Uint(11684671)

# Block Access Lists
BLOCK_ACCESS_LIST_ITEM: Final[ExecutionGas] = ExecutionGas(Uint(2000))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
general/code_coverage/eels = EIP-8198 changes the base fee update in forks/bogota/fork.py (calculate_base_fee_per_gas, BASE_FEE_MAX_CHANGE_NUMERATOR, BASE_FEE_MAX_CHANGE_DENOMINATOR) and the blob schedule constants in forks/bogota/vm/gas.py; both directions of every changed branch are driven by this suite, and mutating any of the five changed constants back to its Amsterdam value makes tests in this suite fail
general/code_coverage/eels = EIP-8198 changes the base fee update in forks/bogota/fork.py (calculate_base_fee_per_gas, BASE_FEE_MAX_CHANGE_NUMERATOR, BASE_FEE_MAX_CHANGE_DENOMINATOR); both directions of every changed branch are driven by this suite, and mutating either changed constant back to its Amsterdam value makes tests in this suite fail
general/code_coverage/test_coverage = Fill the suite with `uv run fill --cov=ethereum.forks.bogota --cov-branch --cov-report=term-missing --until Bogota tests/bogota/eip8198_quick_slots`
general/code_coverage/missed_lines = In calculate_base_fee_per_gas, only the `raise InvalidBlock` for an out-of-bounds gas limit is missed at fill time; it runs only in block validation and is covered by the one_beyond cases of test_gas_limit_adjustment_unchanged when their fixtures are validated with `just validate-blocks <fixtures>/blockchain_tests`
blob_count_changes/test/eip4844_blobs_changes = tests/cancun/eip4844_blobs and tests/osaka/eip7918_blob_reserve_price read the blob schedule from the fork, so at Bogota they run against the new target, maximum, and update fraction; at the Amsterdam to Bogota transition, test_fork_transition_excess_blob_gas_post_blob_genesis and test_reserve_price_at_transition cover the excess carry-over and the reserve price under the new schedule; re-verify with `uv run fill --collect-only tests/cancun/eip4844_blobs tests/osaka/eip7918_blob_reserve_price --from Bogota --until Bogota`
general/code_coverage/second_client = Optional
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ block_header_field = EIP does not add any new block header fields
block_body_field = EIP does not add any new block body fields
gas_refunds_changes = EIP does not change any refund rules
execution_layer_request = EIP does not introduce an execution layer request
new_transaction_validity_constraint = EIP adds no transaction validity constraint; the blob fee check is unchanged apart from the blob base fee it compares against, which test_insufficient_max_fee_per_blob_gas covers
new_transaction_validity_constraint = EIP adds no transaction validity constraint
modified_transaction_validity_constraint = EIP changes no transaction validity constraint
gas_cost_changes/test/gas_updates_measurement = EIP changes no opcode or intrinsic gas cost; the base fee update it changes is measured by test_base_fee_update
gas_cost_changes/test/out_of_gas = EIP changes no gas cost a transaction can run out of
block_level_constraint/test/content = The blob limit counts blobs only, so no transaction type, log, receipt, or withdrawal content affects it
block_level_constraint = EIP adds or changes no block-level constraint; test_blob_count_limit_unchanged_at_fork pins the parent fork's blob limit at the fork block
blob_count_changes = EIP does not change the blob schedule; test_blob_schedule_unchanged_across_fork pins the parent fork's schedule across the fork
4 changes: 2 additions & 2 deletions tests/bogota/eip8198_quick_slots/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ class Spec(EIP4844Spec):
"""
Parameters from the EIP-8198 specifications. Extends the EIP-4844 spec.

The new base fee change and blob schedule are read from the fork, which
carries them from the EIP-8198 fork class.
The new base fee change is read from the fork, which carries it from the
EIP-8198 fork class.
"""

GAS_LIMIT_ADJUSTMENT_FACTOR = 1024
231 changes: 0 additions & 231 deletions tests/bogota/eip8198_quick_slots/test_blob_schedule.py

This file was deleted.

Loading
Loading