Skip to content

stageloop, execmodule: add ERIGON_IN_MEM_HISTORY env flag for faster exec#20245

Merged
sudeepdino008 merged 2 commits into
mainfrom
inmemhistoory_flag
Apr 1, 2026
Merged

stageloop, execmodule: add ERIGON_IN_MEM_HISTORY env flag for faster exec#20245
sudeepdino008 merged 2 commits into
mainfrom
inmemhistoory_flag

Conversation

@sudeepdino008

Copy link
Copy Markdown
Member
  • inMemHistoryReads = true is needed when rpc queries have to be made.
  • sd records history values in memory, exposing them for reads, so rpc queries can be responded to correctly
  • but it also slows stage execution down, since the 512mb buffer gets filled up faster.
  • stage_exec and some other places already use SetInMemHistoryReads(false). Adding an env here so in dev flow we can disable it too.

@sudeepdino008 sudeepdino008 enabled auto-merge March 31, 2026 14:46
@sudeepdino008 sudeepdino008 added this pull request to the merge queue Apr 1, 2026
Merged via the queue into main with commit 86f5c53 Apr 1, 2026
35 checks passed
@sudeepdino008 sudeepdino008 deleted the inmemhistoory_flag branch April 1, 2026 07:59
github-merge-queue Bot pushed a commit that referenced this pull request Apr 1, 2026
#20270)

Follow-up to #20245.

`ProcessFrozenBlocks` already respected the `ERIGON_IN_MEM_HISTORY` env
flag, but the remaining `SharedDomains` creation sites did not. This
applies the flag to:

- `StageLoopIteration` — ExecV3 live execution path
- `ValidateChain` — fork validation path  
- `updateForkChoice` — FCU path

Setting `ERIGON_IN_MEM_HISTORY=false` now disables in-memory history
reads across all execution paths, not just frozen block processing.
sudeepdino008 added a commit that referenced this pull request Apr 2, 2026
…mem history reads (#20245) (#20262)

Cherry-pick of #20245 to `release/3.4`.

**Conflict resolution**: `execution/execmodule/executor.go` doesn't
exist in `release/3.4` (the `PipelineExecutor` abstraction was
introduced in `main` after the branch point). The equivalent change —
adding the `ERIGON_IN_MEM_HISTORY` env flag and wiring it to
`SetInMemHistoryReads` — was applied to
`execution/stagedsync/stageloop/stageloop.go` which is the relevant call
site in `release/3.4`.
AskAlexSharov pushed a commit that referenced this pull request Apr 6, 2026
…mem history reads (#20245) (#20262)

Cherry-pick of #20245 to `release/3.4`.

**Conflict resolution**: `execution/execmodule/executor.go` doesn't
exist in `release/3.4` (the `PipelineExecutor` abstraction was
introduced in `main` after the branch point). The equivalent change —
adding the `ERIGON_IN_MEM_HISTORY` env flag and wiring it to
`SetInMemHistoryReads` — was applied to
`execution/stagedsync/stageloop/stageloop.go` which is the relevant call
site in `release/3.4`.
AskAlexSharov pushed a commit that referenced this pull request Apr 18, 2026
…mem history reads (#20245) (#20262)

Cherry-pick of #20245 to `release/3.4`.

**Conflict resolution**: `execution/execmodule/executor.go` doesn't
exist in `release/3.4` (the `PipelineExecutor` abstraction was
introduced in `main` after the branch point). The equivalent change —
adding the `ERIGON_IN_MEM_HISTORY` env flag and wiring it to
`SetInMemHistoryReads` — was applied to
`execution/stagedsync/stageloop/stageloop.go` which is the relevant call
site in `release/3.4`.
AskAlexSharov pushed a commit that referenced this pull request Apr 18, 2026
…mem history reads (#20245) (#20262)

Cherry-pick of #20245 to `release/3.4`.

**Conflict resolution**: `execution/execmodule/executor.go` doesn't
exist in `release/3.4` (the `PipelineExecutor` abstraction was
introduced in `main` after the branch point). The equivalent change —
adding the `ERIGON_IN_MEM_HISTORY` env flag and wiring it to
`SetInMemHistoryReads` — was applied to
`execution/stagedsync/stageloop/stageloop.go` which is the relevant call
site in `release/3.4`.
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