You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tracking issue for consolidating execution pipeline ownership into execmodule. This work makes the execution module more self-contained and aligns with the broader 2-cache rationalization (#19623).
Work Streams
1. PipelineExecutor (feat/pipeline-executor)
Consolidate all staged sync pipeline invocations into a single PipelineExecutor struct:
ProcessFrozenBlocks (startup)
RunLoop (FCU catchup)
ValidateBlock (fork validation)
Move ForkValidator from engine_helpers to execmodule, remove the validatePayloadFunc closure, decouple stage_finish from ForkValidator.
Status: Branch feat/pipeline-executor — complete, waiting for review of dependencies.
Move Hook.AfterRun to fire before DB commit. No consumer reads from DB after receiving a notification — all payloads are self-contained. The pipeline's RwTx/overlay has all data needed for reads.
Status: Branch feat/pre-commit-notifications — complete, waiting for review of dependencies.
3. Eliminate fcuOverlay in updateForkChoice
The fcuOverlay (MemoryMutation) in updateForkChoice is redundant — the SD already has blockOverlay for table-level writes (headers, bodies, canonical hashes, stage progress, forkchoice hashes). Consolidate:
Remove the separate fcuOverlay; use sd.BlockOverlay() as the pipeline tx
sd.Flush() handles both domain + table writes in one call
Simplifies CommitCycle (no separate overlay to flush/recreate)
Currently RunLoop, Sync.Run, RunUnwind, RunPrune, and every stage func take (sd, tx) separately. Now that tx == sd.BlockOverlay(), the tx parameter is redundant. Remove it:
RunLoop(ctx, sd, cfg) instead of RunLoop(ctx, sd, tx, cfg)
Sync.Run(sd, initialCycle, firstCycle) instead of Sync.Run(sd, tx, ...)
Each stage calls sd.BlockOverlay() when it needs table access
Purely mechanical refactor across all stages
Status: Deferred to last — big diff, easier when everything else is stable.
5. Cache cleanup (future)
The execmodule.Cache shim bridges RPC reads to SharedDomains for domain data. It predates SD's current capabilities. Cleanup deferred until #19623 Phase 5 stabilizes the StateReader/CacheView interfaces.
Summary
Tracking issue for consolidating execution pipeline ownership into
execmodule. This work makes the execution module more self-contained and aligns with the broader 2-cache rationalization (#19623).Work Streams
1. PipelineExecutor (feat/pipeline-executor)
Consolidate all staged sync pipeline invocations into a single
PipelineExecutorstruct:ProcessFrozenBlocks(startup)RunLoop(FCU catchup)ValidateBlock(fork validation)Move
ForkValidatorfromengine_helperstoexecmodule, remove thevalidatePayloadFuncclosure, decouplestage_finishfromForkValidator.Status: Branch
feat/pipeline-executor— complete, waiting for review of dependencies.2. Pre-commit notifications (#19957)
Move
Hook.AfterRunto fire before DB commit. No consumer reads from DB after receiving a notification — all payloads are self-contained. The pipeline's RwTx/overlay has all data needed for reads.Status: Branch
feat/pre-commit-notifications— complete, waiting for review of dependencies.3. Eliminate fcuOverlay in updateForkChoice
The
fcuOverlay(MemoryMutation) inupdateForkChoiceis redundant — the SD already hasblockOverlayfor table-level writes (headers, bodies, canonical hashes, stage progress, forkchoice hashes). Consolidate:fcuOverlay; usesd.BlockOverlay()as the pipelinetxsd.Flush()handles both domain + table writes in one callrunForkchoiceCommitOverlay(drops overlay parameter)sd.Close()discards everythingStatus: Design complete, implementation pending.
4. Remove
txparameter from pipeline (final step)Currently
RunLoop,Sync.Run,RunUnwind,RunPrune, and every stage func take(sd, tx)separately. Now thattx == sd.BlockOverlay(), thetxparameter is redundant. Remove it:RunLoop(ctx, sd, cfg)instead ofRunLoop(ctx, sd, tx, cfg)Sync.Run(sd, initialCycle, firstCycle)instead ofSync.Run(sd, tx, ...)sd.BlockOverlay()when it needs table accessStatus: Deferred to last — big diff, easier when everything else is stable.
5. Cache cleanup (future)
The
execmodule.Cacheshim bridges RPC reads to SharedDomains for domain data. It predates SD's current capabilities. Cleanup deferred until #19623 Phase 5 stabilizes theStateReader/CacheViewinterfaces.Relationship to #19623
These changes prepare the ground for the 2-cache rationalization:
controlServerinterface narrowing (future)Order of Operations
PipelineExecutor(done)Pre-commit notifications(done)txfrom pipeline ← last (mechanical, big diff)Related Issues