Catalog
fauziyasin-s2m4qw/erigon-seg-retire

fauziyasin-s2m4qw

erigon-seg-retire

Run the Erigon segment retire command to build, merge, and clean snapshot files. Use this for snapshot publication readiness preparation.

v1.0LATEST
NewUpdated Aug 20, 2026

Erigon Segment Retire Command

The erigon seg retire command prepares snapshot files for publication by performing build, merge, and cleanup operations on segment files.

Prerequisites

  1. Erigon must be stopped - The command requires exclusive access to the datadir
  2. Binary must be built - Run /erigon-build first if the binary doesn't exist
  3. Datadir must exist - A synced Erigon datadir with blockchain data

Command

./build/bin/erigon seg retire --datadir=<path>

Replace <path> with the actual path to your Erigon data directory.

What the Command Does

The retire command performs these operations in sequence:

  1. Build Missing Indices - Creates any missing indices for block and Caplin snapshots
  2. Retire Blocks - Freezes blocks from the database into snapshot files
  3. Remove Overlaps - Cleans up overlapping snapshot files
  4. Prune Ancient Blocks - Removes block data from the database that has been successfully snapshotted
  5. Build State History - Creates missing accessors and builds state history snapshot files
  6. Prune State History - Removes state history that has been snapshotted
  7. Merge and Cleanup - Merges smaller snapshot files into larger ones and removes overlaps

Usage in Snapshot Release Workflow

This command is part of the "Publishable v2" snapshot release flow:

  1. Shutdown Erigon
  2. Run seg retire (this command)
  3. Optionally run seg clearIndexing
  4. Run seg index
  5. Create torrent files
  6. Run integrity check
  7. Run publishable command

Example

# Build the binary first (if needed)
make erigon

# Ensure Erigon is stopped, then run seg retire
./build/bin/erigon seg retire --datadir=/data/erigon

Important Notes

  • File Lock: If Erigon is running, the command will fail due to file lock
  • Long running: This command can take significant time on mainnet
  • Disk I/O intensive: Performs extensive read/write operations
  • Resource intensive: Designed to maximize resource utilization

Overall Score

76/100

Grade

B

Good

Grades are signals, not a certification. Always review a skill yourself before use.

Safety

82

Quality

73

Clarity

78

Completeness

68

Summary

The skill provides instructions for running the Erigon `seg retire` command, which prepares snapshot files for publication by building, merging, and cleaning blockchain data files. It documents prerequisites, usage patterns, and the sequential operations performed by the command within the context of a snapshot release workflow.

Detected Capabilities

binary executionfile system access (read-write)database operationsprocess coordination

Trigger Keywords

Phrases that agents use to match this skill to user intent.

prepare snapshots for releaseerigon segment retirebuild snapshot filesmerge snapshot segmentssnapshot publication workflow

Risk Signals

INFO

Command requires exclusive datadir access and file-level I/O operations

Prerequisites section and 'What the Command Does' section
INFO

Long-running and resource-intensive operations with significant disk I/O

Important Notes section
INFO

Requires Erigon process to be stopped before execution

Prerequisites and File Lock note

Use Cases

  • Prepare Erigon snapshots for publication
  • Build and merge segment snapshot files
  • Clean up overlapping snapshot files during snapshot release
  • Maintain snapshot readiness in Erigon nodes
  • Execute snapshot maintenance tasks as part of release workflow

Quality Notes

  • Clear prerequisites clearly document the operational constraints (Erigon must be stopped)
  • Well-documented sequential operations help users understand what the command does
  • Contextualizes command within the broader snapshot release workflow
  • Important notes section appropriately flags performance characteristics and potential issues
  • Example commands provided with practical usage pattern
  • No edge case handling guidance for common failure scenarios (disk full, permissions errors)
  • Documentation does not address recovery procedures if the command is interrupted
  • No performance expectations or timing estimates provided for different scenarios (mainnet vs testnet)
Model: claude-haiku-4-5-20251001Analyzed: Aug 20, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Use fauziyasin-s2m4qw/erigon-seg-retire in your dev environment

Command Palette

Search for a command to run...