Repository navigation
cherry-pick 14 commits from release/3.4 to main #20497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
ffd088e
agg: workers presets. ressplit workers (#19677)
AskAlexSharov 340323e
Revert "flush: use etl.IdentityLoadFunc instead custom. part2" (#19919)
AskAlexSharov b2937b5
etl: zero-copy memDataProvider (#19780)
AskAlexSharov 895a2c7
d_lru: disable for commitment (it's useful for re-exec from 0, but i …
AskAlexSharov 827eb44
TemporalMemBatch: re-use vals-slice when can (#19942)
AskAlexSharov cc8902b
etl: pool of bufwriter (#19996)
AskAlexSharov e23ce1d
collate: replace bitmap by array (#19995)
AskAlexSharov f92d008
skill creator review results (#20002)
AskAlexSharov 1d4d3c5
seg: revert global limiter (#20033)
AskAlexSharov d54a767
Caplin: prevent calling `glob` per file in `BuildMissingIndices` (#20…
AskAlexSharov e731bda
seg: more usage of bufio (#20113)
AskAlexSharov 6efa001
[r3.4] execution/state: revert CodeSizePath in codeChange journal ent…
lystopad 4c62ced
remove `flush complete` log line (#20431)
AskAlexSharov 0030cb8
[r3.4] etl: munmap temp files in Dispose to prevent disk space leak (…
sudeepdino008 4594677
Merge remote-tracking branch 'origin/main' into alex/cherry_pick_34_t…
a8a24b9
address CR comments: fix sentinel flush underflow, remove dead code
AskAlexSharov 7ebab54
Merge remote-tracking branch 'origin/main' into alex/cherry_pick_34_t…
57b4e4c
save
AskAlexSharov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,70 @@ | ||
| --- | ||
| name: erigon-exec-from-0 | ||
| description: Re exec all blocks from 0 to reproduce bugs | ||
| description: > | ||
| Re-execute all Ethereum blocks from block 0 to reproduce bugs, validate state, or test | ||
| correctness after code changes. Use this skill whenever the user wants to re-run execution | ||
| from scratch, reset execution stage, reproduce a state mismatch, validate a fix by re-exec, | ||
| or run blocks from the beginning on a specific chain/datadir. | ||
| --- | ||
|
|
||
| # Re-execute all blocks from 0 | ||
|
|
||
| Use this workflow to wipe execution state and re-run all blocks from block 0. | ||
| Common reasons: reproducing a state root mismatch, validating a bug fix, testing | ||
| new execution logic end-to-end. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| You need: | ||
| - `--datadir` — path to the Erigon data directory (block snapshots must be present) | ||
| - `--chain` — chain name (e.g. `chiado`, `mainnet`, `gnosis`, `sepolia`) | ||
|
|
||
| ## Step 1: Remove state snapshots (keep block snapshots) | ||
|
|
||
| ```bash | ||
| go run ./cmd/erigon snapshots rm-all-state-snapshots --datadir <datadir> | ||
| ``` | ||
| # remove all State files (not Block files) | ||
| go run ./cmd/erigon snapshots rm-all-state-snapshots --datadir ~/data/chiado34_regen | ||
|
|
||
| # clean database tables related to stage_exec | ||
| go run ./cmd/integration stage_exec --datadir ~/data/chiado34_regen --chain=chiado --reset | ||
| This removes `.kv` state snapshot files but leaves `.seg` block snapshot files intact, | ||
| so you don't need to re-download block data. | ||
|
|
||
| # exec blocks | ||
| go run ./cmd/integration stage_exec --datadir ~/data/chiado34_regen --chain=chiado --batchSize=8m | ||
| ## Step 2: Reset the execution stage | ||
|
|
||
| # flags for profiler | ||
| ```bash | ||
| go run ./cmd/integration stage_exec --datadir <datadir> --chain=<chain> --reset | ||
| ``` | ||
|
|
||
| This clears the execution-stage progress in the database so the next run starts from block 0. | ||
|
|
||
| ## Step 3: Run execution | ||
|
|
||
| ```bash | ||
| go run ./cmd/integration stage_exec --datadir <datadir> --chain=<chain> --batchSize=8m | ||
| ``` | ||
|
|
||
| Adjust `--batchSize` to control how frequently state is flushed to disk. Larger = faster | ||
| but more RAM; `8m` is a reasonable default. | ||
|
|
||
| ## Useful optional flags | ||
|
|
||
| **Profiling** (add when you want pprof): | ||
| ``` | ||
| --pprof --pprof.port=6160 | ||
| ``` | ||
|
|
||
| # flags for correctness | ||
| `ERIGON_ASSERT=true` | ||
| **Correctness assertions** (add when hunting state bugs — slows execution): | ||
| ``` | ||
| ERIGON_ASSERT=true | ||
| ``` | ||
|
|
||
| **Stop at a specific block** (useful to reproduce a bug at block N): | ||
| ``` | ||
| --block=<N> | ||
| ``` | ||
|
|
||
| ### tools for files correctness check | ||
| ## Verifying snapshot integrity | ||
|
|
||
| If you suspect corrupted snapshot files before running: | ||
| ```bash | ||
| go run ./cmd/erigon seg integrity --datadir <datadir> --sample=0.001 | ||
| ``` | ||
| go run ./cmd/erigon seg integrity --datadir ~/data/chiado34_archive --sample=0.001 | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.