Skip to content

exec3 finalizeTx/Simple: coinbase-handling tests stale post-merge #20962

@mh0lt

Description

@mh0lt

Spun out from #20805 review (B6 follow-up).

Two tests in execution/stagedsync/exec3_finalize_test.go are skipped with stale expectations after the parallel-calculator merge:

  1. TestFinalizeTxSimple_BasicFeeCredit

    • Setup: writes coinbase balance to versionMap at TxIndex=0, then runs finalizeTxSimple with current task at TxIndex=0.
    • Expects: priorBalance + FeeTipped (1e18 + 21000).
    • Actual: just FeeTipped (21000) — i.e. the prior versionMap write at TxIndex=0 is not visible to the floor-read at TxIndex=0.
    • Likely: vm.Read floor semantics tightened from <= to < (current TX cannot see its own prior writes from the same index).
    • The sibling test TestFinalizeTxSimple_AccumulatedFees passes because it iterates txIdx 1..N — only this single-TX setup is broken.
  2. TestFinalizeTx_AllScenarios/coinbase_is_recipient

    • Setup: coinbase is also the recipient of a transfer; TxOut already has coinbase = original + transferAmt; finalizeTx should add tip.
    • Expects: original + transfer + tip (5e9 + 1e9 + 21000 = 6_000_021_000).
    • Actual: 6_000_000_000 — tip not added when coinbase already has a TxOut write.
    • Likely: StripBalanceWrite logic now treats the existing TxOut coinbase write as "fee already applied", suppressing the tip credit.

Both look like coinbase-handling logic shifted but the test scenarios weren't updated. They are skipped with TODO references to this issue. Validating which behavior is correct (and updating either the code or the tests) is follow-up work — these scenarios aren't covered elsewhere in the suite.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions