Skip to content

undercover-cactus/Skyneth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Skyneth

A private Ethereum testnet running with reth (Execution Layer) and Lighthouse (Consensus Layer + Validator Client), orchestrated with Docker Compose.

Prerequisites

  • Docker
  • openssl
  • make

Directory structure

network/
  config.yaml                        # Beacon chain config (chain parameters, fork settings)
  genesis.json                       # EL genesis file (pre-funded accounts, chain ID, etc.)
  genesis.ssz                        # CL genesis state (generated by make regen)
  mnemonics.yaml                     # Validator mnemonics used to derive keys
  jwt.hex                            # Shared JWT secret between reth and lighthouse (generated by make jwt)
  deposit_contract.txt               # Deposit contract address
  deposit_contract_block.txt         # Block number of the deposit contract deployment
  deposit_contract_block_hash.txt    # Block hash of the deposit contract deployment
  bootstrap_nodes.txt                # ENR bootstrap nodes list (empty for local testnet)
  validator-keys/
    validators/                      # EIP-2335 keystore directories (one per validator)
    secrets/                         # Keystore password files (one per validator)

First-time setup

1. Generate the JWT secret

make jwt

Generates ./network/jwt.hex used by reth and lighthouse to authenticate over the Engine API.

2. Generate validator keystores

make keys

Generates EIP-2335 keystore files directly into ./network/validator-keys/ using eth2-val-tools (via Docker).

3. Generate the genesis state

make regen

This will:

  • Stop any running containers (docker compose down)
  • Update MIN_GENESIS_TIME in config.yaml and timestamp in genesis.json to the current UTC time
  • Regenerate genesis.ssz from the updated config

4. Start the network

make run

Starts reth, lighthouse beacon node, and the validator client. Validators should begin attesting within a few slots.

Day-to-day usage

Command Description
make run Start the network
make regen Regenerate genesis with current timestamp (run make clean first for a full reset)
make clean Wipe all chain data without touching genesis or key files
make keys Regenerate validator keystores
make jwt Regenerate the JWT secret

Resetting the chain

To fully reset and restart from a new genesis:

make clean && make regen && make run

Troubleshooting

Head block is not reachable

This log line from reth during init can be safely ignored:

ERROR Head block is not reachable

Validators not attesting

If validators are not attesting after a few minutes, the most likely cause is a stale genesis time. Run make clean && make regen && make run.

Permission denied on volume mounts

The containers run as your current user (UID:GID). If you see permission errors on /tmp/reth, /tmp/lighthouse, or /tmp/validator, those directories are root-owned from a previous run. Remove them and let make run recreate them:

sudo rm -rf /tmp/reth /tmp/lighthouse /tmp/validator
make run

About

Ethereum devnet private network with docker compose

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors