Connecting to JOC Nodes
This document describes the steps to set up a Geth node in the user's environment and connect it to the Japan Open Chain Mainnet and Testnet. For connecting dApps using RPC Endpoints, please refer here.
- Mainnet
- Testnet
Connecting a Node to JOC Mainnet
The process for connection is as follows:
- 1. Install Required Packages
- 2. Create Data Directories
- 3. Download Configuration Files
- 4. Install Client
- 5. Generate JWT Secret
- 6. Initialize Geth
- 7. Run Geth
- 8. Run Lighthouse
- 9. Verification
1. Install Required Packages
# Ubuntu / Debian
sudo apt-get update
sudo apt-get install -y curl openssl
# Amazon Linux 2023 / RHEL-based
sudo dnf install -y curl openssl
2. Create Data Directories
sudo mkdir -p /data/ethereum
sudo mkdir -p /data/ethereum/consensus/config
3. Download Configuration Files
Download the files below and copy them to the correct locations:
| File | Link |
|---|---|
genesis.json | View |
config.yaml | View |
genesis.ssz | Download |
deposit_contract.txt | View |
deposit_contract_block.txt | View |
# genesis.json -> /data/ethereum/genesis.json
# config.yaml -> /data/ethereum/consensus/config/config.yaml
# genesis.ssz -> /data/ethereum/consensus/config/genesis.ssz
# deposit_contract_block.txt -> /data/ethereum/consensus/config/deposit_contract_block.txt
4. Install Client
Geth (Execution Client, verified working with v1.13.5):
https://geth.ethereum.org/docs/getting-started/installing-geth
Geth v1.14.0 or later is not currently supported.
Lighthouse (Consensus Client, verified working with v7.0.1):
https://lighthouse-book.sigmaprime.io/installation.html
5. Generate JWT Secret
The JWT secret authenticates internal communication between Geth and Lighthouse. Generate it once:
openssl rand -hex 32 | tr -d "\n" > /data/ethereum/jwtsecret
chmod 644 /data/ethereum/jwtsecret
6. Initialize Geth
geth init \
--datadir=/data/ethereum \
/data/ethereum/genesis.json
Run this only once.
7. Run Geth
The current BootNode list is fetched from enodes.yaml.
geth --datadir=/data/ethereum \
--networkid=81 \
--http \
--authrpc.vhosts="*" \
--authrpc.addr=127.0.0.1 \
--authrpc.jwtsecret=/data/ethereum/jwtsecret \
--bootnodes="$BOOTNODES"
8. Run Lighthouse
The current boot ENR list is fetched from bootstrap_nodes.yaml.
lighthouse beacon_node \
--datadir=/data/ethereum/consensus \
--http \
--execution-endpoint=http://127.0.0.1:8551 \
--execution-jwt=/data/ethereum/jwtsecret \
--testnet-dir=/data/ethereum/consensus/config \
--boot-nodes="$BOOT_ENRS"
9. Verification
Check Geth sync status:
curl -s -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}'
# false → fully synced
# object → syncing, shows currentBlock / highestBlock
Check Lighthouse sync status:
curl -s http://localhost:5052/eth/v1/node/peer_count
If the "Looking for peers" message continues, the connection is not successful. Check the bootnode/ENR values and your firewall settings (ports 30303 TCP+UDP for Geth, port 9000 TCP+UDP for Lighthouse).
Explorer
Connecting a Node to JOC Testnet
The process for connection is as follows:
- 1. Install Required Packages
- 2. Create Data Directories
- 3. Download Configuration Files
- 4. Install Client
- 5. Generate JWT Secret
- 6. Initialize Geth
- 7. Run Geth
- 8. Run Lighthouse
- 9. Verification
1. Install Required Packages
# Ubuntu / Debian
sudo apt-get update
sudo apt-get install -y curl openssl
# Amazon Linux 2023 / RHEL-based
sudo dnf install -y curl openssl
2. Create Data Directories
sudo mkdir -p /data/ethereum
sudo mkdir -p /data/ethereum/consensus/config
3. Download Configuration Files
Download the files below and copy them to the correct locations:
| File | Link |
|---|---|
genesis.json | View |
config.yaml | View |
genesis.ssz | Download |
deposit_contract.txt | View |
deposit_contract_block.txt | View |
# genesis.json -> /data/ethereum/genesis.json
# config.yaml -> /data/ethereum/consensus/config/config.yaml
# genesis.ssz -> /data/ethereum/consensus/config/genesis.ssz
# deposit_contract_block.txt -> /data/ethereum/consensus/config/deposit_contract_block.txt
4. Install Client
Geth (Execution Client, verified working with v1.13.5):
https://geth.ethereum.org/docs/getting-started/installing-geth
Lighthouse (Consensus Client, verified working with v7.0.1):
https://lighthouse-book.sigmaprime.io/installation.html
5. Generate JWT Secret
The JWT secret authenticates internal communication between Geth and Lighthouse. Generate it once:
openssl rand -hex 32 | tr -d "\n" > /data/ethereum/jwtsecret
chmod 644 /data/ethereum/jwtsecret
6. Initialize Geth
geth init \
--datadir=/data/ethereum \
/data/ethereum/genesis.json
Run this only once.
7. Run Geth
The current BootNode list is fetched from enodes.yaml.
geth --datadir=/data/ethereum \
--networkid=361257328 \
--http \
--authrpc.vhosts="*" \
--authrpc.addr=127.0.0.1 \
--authrpc.jwtsecret=/data/ethereum/jwtsecret \
--bootnodes="$BOOTNODES"
8. Run Lighthouse
The current boot ENR list is fetched from bootstrap_nodes.yaml.
lighthouse beacon_node \
--datadir=/data/ethereum/consensus \
--http \
--execution-endpoint=http://127.0.0.1:8551 \
--execution-jwt=/data/ethereum/jwtsecret \
--testnet-dir=/data/ethereum/consensus/config \
--boot-nodes="$BOOT_ENRS"
9. Verification
Check Geth sync status:
curl -s -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}'
# false → fully synced
# object → syncing, shows currentBlock / highestBlock
Check Lighthouse sync status:
curl -s http://localhost:5052/eth/v1/node/peer_count
If the "Looking for peers" message continues, the connection is not successful. Check the bootnode/ENR values and your firewall settings (ports 30303 TCP+UDP for Geth, port 9000 TCP+UDP for Lighthouse).