This repository contains the relevant configuration to run your own node on the Unichain network.
If you encounter problems with your node, please open a GitHub issue
| Network | Status |
|---|---|
| Mainnet | ✅ |
| Testnet (Sepolia) | ✅ |
-
Ensure you have an Ethereum L1 full node RPC available, and set
OP_NODE_L1_ETH_RPC&OP_NODE_L1_BEACON(in the.env.mainnetfile).If running your own L1 node:
-
It needs to be synced before Unichain will be able to fully sync.
-
Use Docker host gateway IP as containers cannot access host services via
localhostor127.0.0.1.OP_NODE_L1_ETH_RPC=http://172.17.0.1:8545 OP_NODE_L1_BEACON=http://172.17.0.1:3500 -
Your L1 node needs to allow connections from Docker containers.
-
-
Select your network in the docker compose file by uncommenting .env.sepolia or .env.mainnet in both op-node and the execution client.
-
Run:
docker compose up -d
- You should now be able to
curlyour Unichain node:
curl -d '{"id":1,"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest",false]}' \
-H "Content-Type: application/json" http://localhost:8545
- To stop your node, run:
docker compose down
By default, the data directory is stored in ${PROJECT_ROOT}/geth-data. You can override this by modifying the value of
HOST_DATA_DIR variable in the .env file.
