Skip to content

feat(test-fill, tests): cover a stale sync target and simplify a fee-cap test - #62

Merged
fselmo merged 2 commits into
fselmo:tests/fee-caps-recreation-bal-redeliveryfrom
LouisTsai-Csie:tests/fee-caps-redelivery-followups
Dec 3, 2026
Merged

fselmo merged 2 commits into
fselmo:tests/fee-caps-recreation-bal-redeliveryfrom
LouisTsai-Csie:tests/fee-caps-redelivery-followups

Conversation

@LouisTsai-Csie

Copy link
Copy Markdown
Collaborator

Description

Two follow-ups for ethereum#3875.

  • Stale sync target (test only, no fix). Only leaves reach record_sync_payload_leaf, so an accepted copy replaces the rejected one only if it is the final block. With [bad X, good X, good Y], good X never gets there, and bad X's target, built on X's parent state, stays in syncPayloads. test_redelivered_block_below_a_later_leaf_has_no_target expects only Y's target and fails on this branch on purpose (assert 2 == 1). Locally, dropping the rejected copy's candidate when a non-leaf copy is accepted makes it pass; the fix is left out so you can choose how to handle it.
  • test_fee_cap_at_balance_limit readability. Each branch now states only its fee cap, expected error and post state; building the transaction, the premise check and the funding run once after it. The filled fixtures are byte-identical before and after (compared with _info stripped).

Only ruff format --check and ruff check were run on the touched files; just static was not run.

Related Issues or PRs

ethereum#3875

Checklist

  • Ran fast static checks to avoid CI fails, see Code Standards & Verifying Changes: just static
  • PR title has the form <type>(<area>): <description>, where <type> and <area> come from an appropriate C-<type>, respectively A-<area>, label. The title should match the target squash commit message.

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

A block first rejected for its delivered list and then accepted below a
later leaf is never a sync-payload leaf, so the rejected copy's target,
built on the block's parent state, stays in syncPayloads. The test
expects only the final block's target and fails until that is fixed.
Each branch now states only its fee cap, expected error and post state;
building the transaction, the premise check and the funding run once
after it. The filled fixtures are unchanged.
@fselmo
fselmo merged commit 5f39be8 into fselmo:tests/fee-caps-recreation-bal-redelivery Dec 3, 2026
@fselmo

fselmo commented Dec 3, 2026

Copy link
Copy Markdown
Owner

lovely, ty!

fselmo pushed a commit that referenced this pull request Dec 3, 2026
…cap test (#62)

* feat(test-fill): cover a redelivered block accepted below a later leaf

A block first rejected for its delivered list and then accepted below a
later leaf is never a sync-payload leaf, so the rejected copy's target,
built on the block's parent state, stays in syncPayloads. The test
expects only the final block's target and fails until that is fixed.

* refactor(tests): separate the cases in test_fee_cap_at_balance_limit

Each branch now states only its fee cap, expected error and post state;
building the transaction, the premise check and the funding run once
after it. The filled fixtures are unchanged.
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.

2 participants