RPC & Node Provider
HashKey Chain relies on a decentralized network of RPC (Remote Procedure Call) nodes that enable developers to interact with the blockchain. This guide covers how to set up and operate your own RPC node for both mainnet and testnet environments.
Running Your Own Node
Self-hosting a HashKey Chain node gives you improved reliability, privacy, and control over your blockchain interactions. The following steps will help you set up a full node using Docker.
Prerequisites
- Git
- Docker and Docker Compose
- OpenSSL
- Access to an Ethereum L1 RPC endpoint
- Access to an Ethereum L1 Beacon endpoint
- Minimum system requirements:
- 16GB RAM
- 4 CPU cores
- 1TB SSD storage (for archive node)
- 500GB SSD storage (for full node)
Setup Instructions
- Clone the repository and checkout the appropriate version
git clone https://github.com/alt-research/opstack-fullnode-sync
cd opstack-fullnode-sync
git checkout -b branch-v1.3.0 v1.3.0
- Generate JWT secret
This JWT secret is used for secure communication between the execution and consensus layers.
openssl rand -hex 32 > ./jwt.txt
- Configure environment variables
Create a .env
file in the root directory of the cloned repository with the appropriate configuration for either mainnet or testnet.
- Start the node
docker compose up -d
- Monitor the node
docker compose logs -f
Configuration Templates
Mainnet Configuration
Create a .env
file with the following content for HashKey Chain Mainnet, replacing <L1_RPC_URL>
and <BEACON_URL>
with your Ethereum mainnet endpoints:
# geth image
GETH_IMAGE=us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:v1.101503.3
# l1 rpc url
# node image
NODE_IMAGE=us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:v1.13.1
L1_RPC=<L1_RPC_URL>
# l1 rpc kind(standard/basic/quicknode/alchemy/erigon)
# https://docs.optimism.io/builders/node-operators/tutorials/node-from-docker
L1_RPC_KIND=standard
# node libp2p bootnodes
P2P_STATIC="/dns/hashkey-mainnet-bootnodes.altlayer.network/tcp/31112/p2p/16Uiu2HAm1UX8Lx4XKnHXncKCw5Q4r6jsajKDEukHk9S9NXuroVKY,/dns/hashkey-mainnet-bootnodes.altlayer.network/tcp/31114/p2p/16Uiu2HAm2PzcWR3pgBkCSUC8Co6WsKHhyyxJysQqzeZpHoX2RaAf,/dns/hashkey-mainnet-bootnodes.altlayer.network/tcp/31116/p2p/16Uiu2HAm6s2pY65dcXi8zM4EfD7oCP4o64C6a8XbxwgLU1q6WAUe,/dns/hashkey-mainnet-bootnodes.altlayer.network/tcp/31118/p2p/16Uiu2HAmQEAZhJTPSdrJpH2NqZ5X368XPXGq68XxL1r8wQamdbwQ"
# rollup config file url link
ROLLUP_CONFIG_URL="https://operator-public.s3.us-west-2.amazonaws.com/hashkeychain/mainnet/rollup.json"
# tx forward endpoint
SEQUENCER_HTTP=https://mainnet.hsk.xyz
# op-l2 geth bootnodes
GETH_STATICNODES='[
"enode://e3d83751cba1f5fd806a73e9701baaa93eb729474eb6c246050e76f9cde32915d4904e1fa12be4196ad7296aba61d4ffebfb7a9c5eeff2b9578e0d7a55cc5ed5@hashkey-mainnet-bootnodes.altlayer.network:31111",
"enode://b3714bf5e75760fcbb4de393b75bbcf046be7aa6fb47bd928c4ad6405717a5e67cb01a31dc820ce6b51cfb6c8268ec6c1166fdb2a66f9c92ea67f2fdfdf130fc@hashkey-mainnet-bootnodes.altlayer.network:31113",
"enode://6ad0903b679bed251393813042f2452f55ec4e6f120347d412c203072e58bb2e3c1d68247eba25a89b920995bed3b043819d49577a8c1fe4f1c0d762d7d6763a@hashkey-mainnet-bootnodes.altlayer.network:31115",
"enode://17162151981152707b855e1e67ab9027dcad7af7a2dbcfa40352c6940f1a977f490b2522986736a8c20327abd5f50afd39f23031b3b103d99c0c03c4449bd172@hashkey-mainnet-bootnodes.altlayer.network:31117",
]'
# genesis file url link
GENESIS_URL="https://operator-public.s3.us-west-2.amazonaws.com/hashkeychain/mainnet/genesis.json"
# sync mode(full or snap)
SYNC_MODE=full
# gc mode(archive or full)
GC_MODE=archive
# geth http api
HTTP_API="web3,eth,net,engine"
# geth ws api
WS_API="web3,eth,net,engine"
# altda enabled(true or false)
ALTDA_ENABLED=
# altda da server url
ALTDA_DA_SERVER=
# beacon url
L1_BEACON=<BEACON_URL>
Testnet Configuration
Create a .env
file with the following content for HashKey Chain Testnet, replacing <BEACON_URL>
with your Ethereum Sepolia testnet beacon endpoint:
# geth image
GETH_IMAGE=us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:v1.101503.1
# l1 rpc url
# node image
NODE_IMAGE=us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:v1.12.2
L1_RPC=https://ethereum-sepolia-rpc.publicnode.com
# l1 rpc kind(standard/basic/quicknode/alchemy/erigon)
# https://docs.optimism.io/builders/node-operators/tutorials/node-from-docker
L1_RPC_KIND=standard
# node libp2p bootnodes
P2P_STATIC="/dns/testnet-mux2-aws.altlayer.network/tcp/30515/p2p/16Uiu2HAmUSM5U3LBW6DfFRV6g1JHZ5un27XcCTkDB69MzksmyMTh,/dns/testnet-mux2-aws.altlayer.network/tcp/31604/p2p/16Uiu2HAmSTbcZKAk3y11HGdVJuvWQD6de6Y6JJ5Cbx4GqdaQRjt4"
# rollup config file url link
ROLLUP_CONFIG_URL="https://operator-public.s3.us-west-2.amazonaws.com/hashkeychain/testnet/rollup.json"
# tx forward endpoint
SEQUENCER_HTTP=http://hashkeychain-testnet.alt.technology/
# op-l2 geth bootnodes
GETH_STATICNODES='[
"enode://43b4bce4f2234d735a39224b1dabb4fe17e852a442cfa5eb0e616c070593b87e5c75d25176064ad616224b45b726749ece551e7cecc00405891b38842e5ff29c@testnet-mux2-aws.altlayer.network:30495",
"enode://ff7dabb4344bfbd58e04356ef89d3ba5bd9e727257995edd1ac66518feb6090cd1394064fea4404ba6d1698d44f2cdec766bc92568f432a1fee4842769227386@testnet-mux2-aws.altlayer.network:30803"
]'
# genesis file url link
GENESIS_URL="https://operator-public.s3.us-west-2.amazonaws.com/hashkeychain/testnet/genesis.json"
# sync mode(full or snap)
SYNC_MODE=full
# gc mode(archive or full)
GC_MODE=archive
# geth http api
HTTP_API="web3,eth,net,engine"
# geth ws api
WS_API="web3,eth,net,engine"
# plasma enabled(true or false)
PLASMA_ENABLED=false
# plasma da server url
PLASMA_DA_SERVER=
# beacon url
L1_BEACON="<BEACON_URL>"