一键导入
erigon-seg-rebase
Use the 'erigon seg step-rebase' command to change the step size of an existing datadir. Use when the user wants to rebase segments or modify step sizes.
菜单
Use the 'erigon seg step-rebase' command to change the step size of an existing datadir. Use when the user wants to rebase segments or modify step sizes.
Run the full Erigon test suite locally using GOGC=80 make test-all. Use this before marking a PR ready for review. Equivalent to the "All tests" CI workflow.
Run Erigon tests with Go race detector to find data races and concurrency bugs. Use this for concurrency-sensitive changes (parallel executor, p2p, txpool). Takes 30-60 minutes.
Run Erigon CI checks locally and/or trigger them remotely on a branch via GitHub Actions workflow_dispatch. Use this when you need to verify a branch passes all CI before or after pushing — especially for branches like bal-devnet-2 that don't auto-trigger on push/PR events.
Implement a new EIP for a hardfork under development in Erigon. Use when the user asks to implement, port, or wire up an EIP — covers spec lookup, dep analysis, prior-work check, implementation, lint, tests, and a wrap-up saved to `agentspecs/`.
Run benchmarkoor performance benchmarks against a locally-built Erigon binary and produce per-test MGas/s comparison tables. Covers image build, dataset reset, run invocation, result parsing, and before/after comparisons.
Run an ephemeral Erigon instance with a temporary datadir. Use this whenever the user wants to spin up a temporary, throwaway, or sandboxed Erigon node for quick testing, launch a second Erigon instance alongside an existing one, clone a datadir into a temp copy for safe experimentation, or find and clean up leftover ephemeral datadirs and processes from previous sessions. Handles port conflict detection and automatic port offsetting. Trigger on any mention of temporary/throwaway/ephemeral/disposable Erigon instances, running erigon briefly for testing or debugging, starting a second/additional erigon node, or cleaning up old temp erigon data.
| name | erigon-seg-rebase |
| description | Use the 'erigon seg step-rebase' command to change the step size of an existing datadir. Use when the user wants to rebase segments or modify step sizes. |
| allowed-tools | Bash, Read, Glob |
The erigon seg step-rebase command changes the step size of an existing Erigon datadir. This is used to modify the granularity of snapshot segments.
./build/bin/erigon seg step-rebase --datadir=<path> --new-step-size=<size> [other-flags]
--datadir: Path to the Erigon datadir (required)--new-step-size: New step size to rebase to (required; must be an exact divisor or multiple of the current step size from snapshots/erigondb.toml)--keep-blocks: Keep chaindata instead of deleting it. Resets only execution state (domains, history, changesets, prune progress) via the same logic as integration stage_exec --reset, so already-downloaded blocks stay in the DB and get re-executed on next start. Without this flag the whole chaindata DB is deleted and the block tail must be re-downloaded from the network.The command is interactive: it prints the full rename/delete plan and waits for a y/N confirmation on stdin (echo y | erigon seg step-rebase ... when scripting).
1562500: Default/full stepsize781250: stepsize/2 (half step)390625: stepsize/4 (quarter step)./build/bin/erigon seg step-rebase --datadir=/path/to/datadir --new-step-size=781250
./build/bin/erigon seg step-rebase --datadir=/path/to/datadir --new-step-size=390625
./build/bin/erigon seg step-rebase --datadir=/path/to/datadir --new-step-size=781250 --keep-blocks
Run erigon seg retire first to minimize the re-execution window, then after the rebase start erigon (or run integration stage_exec) to re-execute the kept blocks from the snapshot files' end.
make erigon to build itCommon step sizes used in Erigon:
1562500: Full/default stepsize781250: Half step (stepsize/2)390625: Quarter step (stepsize/4)The step size affects:
When the user wants to rebase step size:
Confirm parameters
Safety checks
Execute rebase
./build/bin/erigon seg step-rebase --datadir=/path/to/datadir --new-step-size=<size>
Verify results
Common issues:
./build/bin/erigon seg step-rebase --datadir=./chaindata --new-step-size=781250
./build/bin/erigon seg step-rebase --datadir=/mnt/erigon/datadir --new-step-size=390625
make erigon to build the binary at build/bin/erigon