Skip to main content

Gate Layer RPC Node Deployment

This document describes how to deploy a Gate Layer L2 RPC node, including dependency installation, configuration file preparation, node startup, and Blob parameter descriptions.

This document provides two deployment methods:

  • Binary Method: Directly use compiled binary files to start (see Chapter 3)
  • Docker Method: Use Docker containers to start (see Chapter 4)

Before You Start

  • RPC nodes used only for synchronization/querying (not sending transactions): No whitelist application required, deploy directly according to this document.
  • Nodes that need to submit transactions to the network (including public RPC services that can send transactions): Please submit an application form first. After approval, you can proceed with transaction submission and public RPC configuration.

Obtaining Binaries and Example Configuration​

You can directly obtain Gate Layer binaries and example configurations (including rollup.json / genesis.json, etc.) from GitHub:


1. Environment Preparation​

Dependencies: golang 1.22+ · make · git · gcc · libc-dev

Components:

  • gatelayer-geth: L2 execution client (op-geth)
  • gatelayer-node: L2 RPC/service node (op-node)

Set up workspace directory:

export GATELAYER_WORKSPACE=/tmp/gatelayer
mkdir -p "$GATELAYER_WORKSPACE"
cd "$GATELAYER_WORKSPACE"

2. Configuration File Preparation​

2.1 Download/Prepare Main Node Configuration Files​

  • rollup.json
  • genesis.json

Save the above files to the $GATELAYER_WORKSPACE root directory.

2.2 Generate JWT Secret​

openssl rand -hex 32 > jwt.txt

2.3 Copy to Corresponding Directories​

  • Place genesis.json and jwt.txt in the $GATELAYER_WORKSPACE root directory
  • Place rollup.json and jwt.txt in the $GATELAYER_WORKSPACE root directory

Note: jwt.txt will be used by both op-geth and op-node (Engine API authentication), and both ends must be exactly the same.


3. Starting L2 Node​

3.1 Initialize op-geth (gatelayer-geth)​

Re-execute if genesis.json changes:

mkdir -p datadir

gatelayer-geth init \
--state.scheme=hash \
--datadir=datadir \
genesis.json

3.2 Start gatelayer-geth (Execution Layer)​

gatelayer-geth \
--datadir ./datadir \
--http \
--http.corsdomain="*" \
--http.vhosts="*" \
--http.addr=0.0.0.0 \
--http.api=web3,eth,txpool,net,engine,miner \
--ws \
--ws.addr=0.0.0.0 \
--ws.port=8546 \
--ws.origins="*" \
--ws.api=eth,txpool,net,engine,miner \
--syncmode=full \
--gcmode=archive \
--nodiscover \
--maxpeers=0 \
--networkid=10088 \
--authrpc.vhosts="*" \
--authrpc.addr=0.0.0.0 \
--authrpc.port=8551 \
--authrpc.jwtsecret=./jwt.txt \
--rollup.sequencerhttp=https://gatelayer-seq-mainnet.gatenode.cc

3.3 Start gatelayer-node (Consensus/Coordination + RPC)​

gatelayer-node \
--l2=http://localhost:8551 \
--l2.jwt-secret=./jwt.txt \
--sequencer.l1-confs=0 \
--verifier.l1-confs=0 \
--rollup.config=./rollup.json \
--rpc.addr=0.0.0.0 \
--l1=https://evm.nodeinfo.cc \
--l1.trustrpc=true \
--l1.rpckind=basic \
--l1.epoch-poll-interval=10s \
--log.level=debug \
--l1.beacon.ignore=false \
--l1.beacon=https://api.nodeinfo.cc \
--l1.beacon.fetch-all-sidecars=true \
--p2p.sync.onlyreqtostatic=true

Notes:

  • p2p.static can be replaced with seed/discovery methods (choose according to actual operational strategy).
  • Ensure that --l2.jwt-secret and op-geth's --authrpc.jwtsecret point to the same file (with identical content).

(Optional) Configure full Blob archiver​

By default, a regular L1 beacon node only retains around 18 days of blob data. If you need to sync blob data older than 18 days, configure a “full blob archiver” endpoint for gatelayer-node:

# Add to gatelayer-node start flags:
--l1.beacon-archiver=https://blob-archiver.gatenode.cc

Notes:

  • The official archiver provides all blob data starting from 2025-11-28.
  • If your node stays up-to-date and doesn’t require historical blobs, you can skip this option.

4. Starting L2 Node with Docker​

The Docker method provides a simpler deployment experience, with scripts automatically handling configuration file downloads, JWT secret generation, data directory initialization, and other steps.

4.1 Environment Preparation​

Dependencies:

  • Docker (version 20.10+)
  • Docker Compose (version 2.0+ or docker-compose 1.29+)

Check Docker Environment:

# Check if Docker is installed
docker --version

# Check if Docker Compose is available
docker compose version

Obtain Docker Startup Files:

Get the files needed for Docker startup from the GitHub repository:

cd /node-binary/gatelayer/mainnet/docker
tree
.
├── archive
│ ├── README.md
│ └── docker-compose.yml
└── full
├── README.md
└── docker-compose.yml

Repository address: https://github.com/gatechain/node-binary

4.2 Start Node​

4.2.1 Start Full Node​

Basic Startup:

cd /node-binary/gatelayer/mainnet/docker/full

cp .env.example .env

# Start
docker compose up -d

4.2.2 Start Archive Node​

cd /node-binary/gatelayer/mainnet/docker/archive

cp .env.example .env

# Start
docker compose up -d

4.3 Verify Node Status​

Check Container Status:

cd /node-binary/gatelayer/mainnet/docker/full  # or cd /node-binary/gatelayer/mainnet/docker/archive

docker compose -f docker-compose.yml ps

View Logs:

docker compose logs -f

Check RPC Endpoint:

# Check HTTP RPC
curl -X POST http://localhost:8545 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

4.4 Stop Node​

docker compose down

4.5 Data Directory​

Default data directory: /tmp/gatelayer

Directory structure:

/tmp/gatelayer/
├── datadir/ # geth data directory
│ └── geth/
│ └── chaindata/
├── rollup.json # Rollup configuration
├── genesis.json # Genesis configuration
└── jwt.txt # JWT secret

4.6 Troubleshooting​

Docker Permission Issues:

If you encounter permission errors, add the user to the docker group:

sudo usermod -aG docker $USER
newgrp docker
# or log out and log back in

Last updated on 2025/12/03