Skip to main content

Run a validator node

This guide covers running a Morph validator node using run-morph-node. If you are unfamiliar with validator duties, refer to the optimistic zkEVM design overview.

Quick Start

1. Clone the repository

git clone https://github.com/morph-l2/run-morph-node.git
cd run-morph-node/morph-node

2. Configure L1 RPC endpoints

A validator requires L1 access to fetch rollup data. Set the following in morph-node/.env (mainnet) or morph-node/.env_hoodi (Hoodi):

L1_ETH_RPC=<your L1 execution client RPC URL>
L1_BEACON_CHAIN_RPC=<your L1 beacon chain RPC URL>

3. Select a snapshot version (optional)

The default snapshot is pre-configured in morph-node/.env / morph-node/.env_hoodi. To use a different version, update the following variables in the env file before downloading:

# Snapshot name (find available versions in the repo README)
MAINNET_MPT_SNAPSHOT_NAME=mpt-snapshot-YYYYMMDD-N # mainnet
HOODI_MPT_SNAPSHOT_NAME=mpt-snapshot-YYYYMMDD-N # Hoodi

# Heights must match your snapshot — find the correct values in the repo README
DERIVATION_START_HEIGHT=<height matching your snapshot>
L1_MSG_START_HEIGHT=<height matching your snapshot>
MORPH_NODE_DERIVATION_BASE_HEIGHT=<base height matching your snapshot>

See Snapshot Information for available snapshots and their corresponding height values.

4. Download the snapshot

make download-and-decompress-mainnet-snapshot

5. Set up the snapshot data

mv ./mpt-snapshot-*/geth ../mainnet/geth-data
mkdir -p ../mainnet/node-data/data
mv ./mpt-snapshot-*/data/* ../mainnet/node-data/data

6. Run the validator

make run-validator

# To stop:
make stop-validator

# To remove containers:
make rm-validator

Verify the Node

# Check sync status
curl http://localhost:26657/status

When catching_up is false, the node is in sync. If the validator detects a state root mismatch, you will see a log line like:

root hash or withdrawal hash is not equal  originStateRootHash=0x... deriveStateRootHash=0x...

This means the validator found an inconsistency between the sequencer submission and its own derivation.