execmodule: combine notification metadata and state readers

Open
#26,384 1 comment 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@yperbasis is already working on this.

Since Nov 16, 2026.

Assessment

This issue has not been assessed yet.

Description

tech debt reduction

Follow-up to #25515, related to #26013.

Dispatcher.Dispatch and prepareStateChanges accept blockTx kv.Tx and stateReader kv.TemporalGetter separately. Callers must keep these readers tied to the same announced head. Committed callers pass tx twice; overlay callers pass overlay and sd.AsSnapshotGetter(overlay).

Combine this pair into one read-view parameter using the existing kv.TemporalTx interface, which already embeds both interfaces. Update stageloop.NotificationSender, callers and tests accordingly.

The implementation must preserve the current read semantics. A plain block overlay is insufficient: its GetLatest reads the backing transaction, while the snapshot getter also sees unflushed SharedDomains writes and respects snapshot visibility and unwind bounds. Reuse or adapt the existing view implementation so block metadata and domain reads describe the same execution view, with a clear caller-owned lifetime and consistent behavior across the exposed read methods.

Keep committedTx for receipt recovery separate: it serves a different purpose and must not expose uncommitted blocks. This cleanup should preserve notification timing and recovery behavior.

Retain coverage for committed dispatch and pre-commit dispatch with updated or deleted accounts. Verify that the combined view reads the announced block metadata and matching account state, including staged unwinds, without falling back to old account values or admitting newer cached values.

Dominant language
Go
Stars
3.6k
Forks
1.6k
Avg merge
1d 17h
Merged PRs (30d)
820

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from erigontech/erigon

All issues in erigontech/erigon

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.