erigon-ephemeral

Launch temporary Erigon nodes with automatic port conflict detection and cleanup.

3.6k|1.5k|Updated May 27, 2019
One-click install
npx skills add https://github.com/erigontech/erigon --skill erigon-ephemeral
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: erigon-ephemeral
Source: https://github.com/erigontech/erigon/tree/main/.claude/skills/erigon-ephemeral
Command: npx skills add https://github.com/erigontech/erigon --skill erigon-ephemeral

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Running a throwaway Erigon node for testing or debugging normally requires manually picking non-conflicting ports, creating temp datadirs, and remembering to clean up processes and data afterward. This Skill automates that entire lifecycle so a sandboxed instance can be started and removed safely alongside any existing node.

Core Features & Use Cases

  • Ephemeral Datadir Creation: Creates a unique temp datadir via mktemp, either empty or cloned from an existing datadir using copy-on-write.
  • Automatic Port Offsetting: Detects port conflicts with lsof and offsets all Erigon ports (+100, +200, +300) across HTTP, WebSocket, Engine API, torrent, devp2p, Caplin, and sentinel ports.
  • Lifecycle Cleanup: Kills the background process and deletes the datadir on request, and can scan for leftover ephemeral datadirs and processes from previous sessions.
  • Use Case: A developer wants to test a new flag against a dev chain without touching their main node. The Skill spins up a second Erigon instance on offset ports, prints the exact launch command, and later tears everything down.

Quick Start

Start a temporary Erigon instance with a fresh datadir for quick testing, using ports that do not conflict with my running node.

Frequently Asked Questions about erigon-ephemeral

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a temporary Erigon node for testing?

Create a temp datadir with mktemp, then launch the erigon binary in the background with that datadir and offset ports. The Skill automates this, printing the full command and PID so you can stop and delete it later.

How to run a second Erigon instance without port conflicts?

Offset every port by +100 or more from the defaults, including HTTP 8545, authrpc 8551, WebSocket 8546, torrent 42069, devp2p 30303, and Caplin discovery ports. Check each candidate port with lsof before launching.

Can I clone an existing Erigon datadir for safe experimentation?

Yes, the Skill supports a clone mode that duplicates a source datadir into a temp directory using the erigon-datadir skill's copy-on-write procedure on APFS. The original datadir remains untouched while you experiment on the copy.

How do I clean up leftover Erigon temp datadirs and processes?

List leftover directories matching erigon-ephemeral.* under $TMPDIR, check each with pgrep for a running process, then kill the process and delete the directory with rm -rf. The Skill reports sizes and asks before removing anything.

Does the ephemeral Erigon instance clean up automatically on session exit?

No, the process and datadir persist if the session closes without explicit cleanup. You must run the leftover detection step in a later session to find and remove orphaned datadirs and processes.