ethereum / ethereum/execution-specs

chore(tests): update EIP-4844 tests to be dynamic with regards to the reserve price (EIP-7918)

Open
#1,567 1 comment 0 reactions 0 assignees View on GitHub
A-test-tests C-chore stale
Dominant language
Python
Stars
1.2k
Forks
505
Avg merge
2d 14h
Merged PRs (30d)
116

Description

### Description

Currently we use hardcode a `parent.base_fee_per_gas = 16|23|100` within some of the EIP-4844 tests, to trigger the reserve mechanism from EIP-7918 implicitly. These were updated within this PR: https://github.com/ethereum/execution-spec-tests/pull/1685/files.

### Problem

The values of 16|23|100 are not ideal as they may only work for Osaka. Any other future forks that have a different updateFraction may require a higher base fee per gas to trigger this. Other existing tests may benefit from setting this field.

### Solution

Set these values to be dynamic based on the fork's reserve price threshold calculation.

> The reserve mechanism from EIP-7918 activates when:
> `
> BLOB_BASE_COST * base_fee_per_gas > GAS_PER_BLOB * blob_base_fee
> `

> Where:
> `blob_base_fee = fake_exponential(MIN_BLOB_BASE_FEE, parent.excess_blob_gas, BLOB_BASE_FEE_UPDATE_FRACTION)`
>

Thus we should use the values defined within `src/ethereum_test_forks/forks/forks.py`, to determine these values dynamically, such as `fork.blob_base_fee_update_fraction()`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.