Skip to content

Capx-AI/Capx-Node

Repository files navigation

Capx Mainnet Full Node Setup

A Docker-based setup for running a full node on Capx Mainnet, an Arbitrum Orbit chain deployed on Ethereum Mainnet.

Chain Information

  • Chain Name: Capx Mainnet
  • Chain ID: 757
  • Settlement Layer: Ethereum Mainnet (Chain ID: 1)
  • Stack: Arbitrum Orbit
  • RPC Endpoint: https://capx-mainnet.calderachain.xyz/http
  • WebSocket: wss://capx-mainnet.calderachain.xyz/ws
  • Feed URL: wss://capx-mainnet.calderachain.xyz/feed

Recommended Hardware

Please refer to https://docs.arbitrum.io/node-running/how-tos/running-an-orbit-node#prerequisites

Prerequisites

  • Docker and Docker Compose installed
  • Access to an Ethereum Mainnet RPC endpoint
  • Access to an Ethereum Beacon Chain RPC endpoint
  • Minimum hardware requirements as per Arbitrum documentation

Setup Instructions

1. Clone this repository

git clone <repository-url>
cd Capx-Node

2. Configure Environment Variables

Copy the example environment file and configure your RPC endpoints:

cp .env.example .env

Edit .env and set:

  • ETH_RPC_URL: Your Ethereum Mainnet RPC endpoint
    • Example: https://mainnet.infura.io/v3/YOUR-API-KEY
    • You can get one from Infura, Alchemy, or other providers
  • BEACON_RPC_URL: Your Ethereum Beacon Chain RPC endpoint
    • Example: https://YOUR-BEACON-NODE:5052
    • You can use services like QuickNode or run your own beacon node

Operating the Node

Start the Node

Using Docker Compose:

docker-compose up -d

Or if you prefer the legacy script method:

./start.sh

View Logs

For Docker Compose:

docker-compose logs -f capx-mainnet-node

For legacy script:

docker logs -f capx-mainnet-node

Monitor Sync Progress

Run the progress monitoring script:

./progress.sh

This will show:

  • Current sync status
  • Blocks per minute being synced
  • Estimated time to complete sync
  • Blocks behind the chain head

Verification

Check Connection to Capx Mainnet

Once the node is running, verify it's connected to the correct network:

curl --location 'localhost:8545' \
--header 'Content-Type: application/json' \
--data '{
  "jsonrpc": "2.0",
  "method": "eth_chainId",
  "params": [],
  "id": 1
}'

Expected response:

{"jsonrpc":"2.0","id":1,"result":"0x2f5"}

(0x2f5 = 757 in decimal, confirming you're connected to Capx Mainnet)

Check Sync Status

curl --location 'localhost:8545' \
--header 'Content-Type: application/json' \
--data '{
  "jsonrpc": "2.0",
  "method": "eth_syncing",
  "params": [],
  "id": 2
}'

If the node is still syncing, you should see something like:

{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "batchProcessed": 927,
    "batchSeen": 927,
    "blockNum": 19086,
    "broadcasterQueuedMessagesPos": 0,
    "messageOfLastBlock": 19087,
    "messageOfProcessedBatch": 385836,
    "msgCount": 385837
  }
}

Or if the syncing has completed:

{"jsonrpc":"2.0","id":2,"result":false}

Check Current Block Number

curl --location 'localhost:8545' \
--header 'Content-Type: application/json' \
--data '{
  "jsonrpc": "2.0",
  "method": "eth_blockNumber",
  "id": 2
}'

This should return something like:

{
    "jsonrpc": "2.0",
    "id": 2,
    "result": "0x2139"
}

Stopping the Node

Using Docker Compose

docker-compose down

Using Legacy Script

./stop.sh

Note: Stopping the node will not remove the data volume. To completely reset:

docker-compose down -v  # This will remove the capx_mainnet_data volume

Troubleshooting

Connection Issues

  • Ensure your Ethereum RPC and Beacon endpoints are accessible
  • Check firewall settings for ports 8545 and 8546
  • Verify your .env file has correct RPC URLs

Sync Issues

  • Initial sync can take several hours to days depending on network conditions
  • Use ./progress.sh to monitor sync progress
  • Check logs for any error messages

Resources

About

Full node setup for Capx (Arbitrum Nitro L2)

Resources

License

Stars

Watchers

Forks

Languages