Skip to content

fix(tests,tools): make the EIP-7805 FOCIL tests fill on the current Amsterdam - #3370

Merged
marioevz merged 3 commits into
ethereum:eips/bogota/eip-7805from
ilitteri:fix/focil-tests-fill
Aug 13, 2026
Merged

fix(tests,tools): make the EIP-7805 FOCIL tests fill on the current Amsterdam#3370
marioevz merged 3 commits into
ethereum:eips/bogota/eip-7805from
ilitteri:fix/focil-tests-fill

Conversation

@ilitteri

Copy link
Copy Markdown
Contributor

Description

The FOCIL tests on this branch don't fill: 21 of 24 fail. Three independent causes, none of them in the tests' assertions. With these fixed all 24 fill, and the expected outcomes are unchanged.

1. t8n passes decoded transactions where raw ones are expected

check_inclusion_list_transactions takes Tuple[LegacyTransaction | Bytes, ...] and calls get_transaction_hash, which asserts isinstance(tx, (LegacyTransaction, Bytes)). The t8n caller passes convert_transaction(...), which returns a decoded fork transaction, so every typed-transaction case dies on AssertionError. Both tuples now go through encode_transaction.

2. The scenarios leave no gas budget for the block's own access list

They size block_gas_limit to their transactions alone. The EIP-7928 budget is block_gas_limit // GAS_BLOCK_ACCESS_LIST_ITEM, and the system-contract predeploys touched every block plus senders, recipients and coinbase come to ~30 items against a limit of ~22, so filling stops at BlockAccessListGasLimitExceededError.

Raising the limit alone would change what the scenarios assert, because the gas a pending inclusion-list transaction is allowed derives from block_gas_limit - gas_used_by_included_txs. So build_block raises the limit and spends exactly the same amount on ballast transactions, leaving remaining_gas — and therefore every "fits" / "does not fit" boundary — unchanged. The ballast is a whole number of empty transfers so the amount is always representable on the fork's calldata-cost lattice.

3. One funding transfer predates value-carrying transactions costing extra intrinsic gas

test_unsatisfied_when_block_tx_funds_pending_il_sender sizes and funds alice's transfer with calc(), but it carries value, so it needs calc(sends_value=True) and was failing INTRINSIC_GAS_BELOW_FLOOR_GAS_COST.

Assertions are untouched

Of the changed lines in test_focil.py, none touch expected_status, pytest.param, assertions, sender balances, nonces or inclusion-list composition — they are gas-limit plumbing, imports, and the sends_value fix. Scenario ids are unchanged, and the reference implementation validates all 24 expected outcomes during fill.

Deliberately not included

This branch's Amsterdam differs from glamsterdam-devnet-8 (ACCOUNT_WRITE 8000 vs 9000, CREATE_ACCESS derived from COLD_STORAGE_ACCESS rather than COLD_ACCOUNT_ACCESS), so a contract creation's intrinsic gas is 23000 here against devnet-8's 24000. That is a rebase question rather than a bug, so the gas schedule is left alone — flagging it because unsatisfied_with_contract_creating_pending_il_tx is the one scenario whose outcome moves with it.

Also worth noting: #3307 relocates evm_tools, so change 1 will need rebasing onto the new path if that lands first.

Testing

uv run fill tests/bogota/eip7805_focil --fork Bogota → 24 passed.

The filled fixtures were additionally run against a client implementation (ethrex) as a cross-check.

…msterdam

21 of the 24 FOCIL tests do not fill on this branch. Three independent causes,
none of them in the tests' assertions.

t8n passed decoded transactions where raw ones are expected.
check_inclusion_list_transactions takes Tuple[LegacyTransaction | Bytes, ...]
and calls get_transaction_hash, which asserts isinstance(tx, (LegacyTransaction,
Bytes)); the caller passed convert_transaction(...), which returns a decoded
fork transaction, so every typed-transaction case died on AssertionError. Both
tuples now go through encode_transaction.

The scenarios left no gas budget for the block's own access list. They size
block_gas_limit to their transactions alone, but the EIP-7928 budget is
block_gas_limit // GAS_BLOCK_ACCESS_LIST_ITEM, and the system-contract
predeploys touched every block plus senders, recipients and coinbase come to
about 30 items against a limit of about 22.

Raising the limit alone would change what the scenarios assert, because the gas
a pending inclusion-list transaction is allowed comes from block_gas_limit minus
the gas the included transactions use. So build_block raises the limit and
spends exactly the same amount on ballast transactions, leaving remaining_gas --
and therefore every "fits" and "does not fit" boundary -- unchanged. The ballast
is a whole number of empty transfers so the amount is always representable on
the fork's calldata-cost lattice.

One funding transfer predated value-carrying transactions costing extra
intrinsic gas. test_unsatisfied_when_block_tx_funds_pending_il_sender sizes and
funds alice's transfer with calc(), but it carries value, so it needs
calc(sends_value=True) and was failing INTRINSIC_GAS_BELOW_FLOOR_GAS_COST.

Assertions are untouched: of the changed lines in test_focil.py, none touch
expected_status, pytest.param, assertions, sender balances, nonces or
inclusion-list composition. Scenario ids are unchanged and the reference
implementation validates all 24 expected outcomes during fill.
@ilitteri
ilitteri marked this pull request as ready for review August 13, 2026 13:54
@jihoonsong

Copy link
Copy Markdown
Member

cc @marioevz

@marioevz
marioevz self-requested a review August 13, 2026 15:43
@marioevz

Copy link
Copy Markdown
Member

@ilitteri we need to rebase after #3307 lands anyway. I'll review this once we:

  1. have merged 3307
  2. rebased focil branch on top of the latest forks/amsterdam that contains 3307

@marioevz marioevz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I'll merge and then rebase on top of latest forks/amsterdam. Thanks!

Comment thread tests/bogota/eip7805_focil/helpers.py Outdated
Comment thread tests/bogota/eip7805_focil/helpers.py Outdated
Co-authored-by: Mario Vega <marioevz@gmail.com>
@marioevz
marioevz merged commit ab829bb into ethereum:eips/bogota/eip-7805 Aug 13, 2026
1 check passed
@ilitteri
ilitteri deleted the fix/focil-tests-fill branch August 13, 2026 21:54
marioevz added a commit that referenced this pull request Aug 13, 2026
…msterdam (#3370)

* fix(tests,tools): make the EIP-7805 FOCIL tests fill on the current Amsterdam

21 of the 24 FOCIL tests do not fill on this branch. Three independent causes,
none of them in the tests' assertions.

t8n passed decoded transactions where raw ones are expected.
check_inclusion_list_transactions takes Tuple[LegacyTransaction | Bytes, ...]
and calls get_transaction_hash, which asserts isinstance(tx, (LegacyTransaction,
Bytes)); the caller passed convert_transaction(...), which returns a decoded
fork transaction, so every typed-transaction case died on AssertionError. Both
tuples now go through encode_transaction.

The scenarios left no gas budget for the block's own access list. They size
block_gas_limit to their transactions alone, but the EIP-7928 budget is
block_gas_limit // GAS_BLOCK_ACCESS_LIST_ITEM, and the system-contract
predeploys touched every block plus senders, recipients and coinbase come to
about 30 items against a limit of about 22.

Raising the limit alone would change what the scenarios assert, because the gas
a pending inclusion-list transaction is allowed comes from block_gas_limit minus
the gas the included transactions use. So build_block raises the limit and
spends exactly the same amount on ballast transactions, leaving remaining_gas --
and therefore every "fits" and "does not fit" boundary -- unchanged. The ballast
is a whole number of empty transfers so the amount is always representable on
the fork's calldata-cost lattice.

One funding transfer predated value-carrying transactions costing extra
intrinsic gas. test_unsatisfied_when_block_tx_funds_pending_il_sender sizes and
funds alice's transfer with calc(), but it carries value, so it needs
calc(sends_value=True) and was failing INTRINSIC_GAS_BELOW_FLOOR_GAS_COST.

Assertions are untouched: of the changed lines in test_focil.py, none touch
expected_status, pytest.param, assertions, sender balances, nonces or
inclusion-list composition. Scenario ids are unchanged and the reference
implementation validates all 24 expected outcomes during fill.

* Apply suggestions from code review

Co-authored-by: Mario Vega <marioevz@gmail.com>

* fix: lint

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants