Xai Network
Xai Network
Xai Network
  • About Xai
    • Welcome to Xai
    • Xai Introduction
      • Xai Blockchain
      • Xai Foundation
      • Xai Token
      • Blockchain Gaming
        • Current Limitations
        • The Future of Gaming
        • Gaming Evolved
      • Ex Populus Partnership
      • Offchain Labs Partnership
      • Vanguard League
      • FAQ
      • Important Links
      • Xai Brand Kit
    • Xai Protocol
      • Xai Basic Concepts
      • AnyTrust: Revolutionizing Blockchain Infrastructure
        • Reducing Costs through Trust Assumptions
        • Keysets for Flexibility
        • Data Availability Certificates (DACerts)
        • Dual Data Posting Mechanisms
        • Data Availability Servers (DAS)
        • Sequencer-Committee Interaction
      • Security considerations
    • Xai Governance Voting Guide
    • XAI Tokenomics
      • XAI Token’s Utility & Purpose
      • esXAI Token’s Utility & Purpose
      • The Redemption Process
      • Token metrics and initial allocation
      • XAI & esXAI Emissions & Burning
      • Network Rewards
      • Sentry Key Pricing Tiers
    • Sentry Keys Explained
      • How do Sentry Nodes Work
      • Who Can Operate A Sentry Node
      • Referee Smart Contract
        • Submission of Assertions
        • Claiming Rewards
        • Creating Assertion Hash and Checking Payout
      • Challenger Component
      • Key (NFT-based)
      • Sentry Download and Operation
      • Sentry Wallet Functionality
      • Licensing Impact
      • Sentry Node Hardware Requirements
      • Sentry Node Utility
      • Accruing Key Rewards
    • Sentry Key Purchase & Setup
      • Step 1: Purchase a Sentry Key
        • Option 1: Buy Sentry Key via the website
        • Option 2: Buy Sentry Key via Xai Sentry Node desktop app
        • Option 3: Buy Sentry Key via Xai Sentry Node CLI (command line interface)
          • How to view the price of a Key via the CLI
        • Option 4: Buy Sentry Key via Node License Contract on Arbiscan
      • Step 2: Download & Run the Xai Sentry Node
      • Step 3: Complete Requirements to Accrue esXAI
        • Step 3a: Set Up & Fund the Sentry Wallet
          • How to Obtain Arbitrum ETH
          • How to import your wallet as the Sentry Wallet in the desktop app
        • Step 3b: Start the Sentry Wallet (a.k.a Operator)
          • How to create a wallet using the CLI
        • Step 3c: Assign Keys to the Sentry Wallet
      • Step 4: Complete KYC (or KYB) to Claim XAI redemptions
        • How to interpret a Pending KYC status
      • Common Troubleshooting Steps
        • How do I run a Xai Node on VPS?
          • Step 1: Choose a VPS
          • Step 2: Log in to a server
          • Step 3: Set up Xai Sentry Node
          • Step 4: Set up a Screen
          • Step 5: Start Xai Sentry Node
          • Step 6: Monitor your Node via Screen
          • Step 7: Updating your node
        • How do I prevent others from using my Sentry Wallet or Operator?
        • Why don't I see the KYC link on the desktop app?
        • How do I know my Node is running in the CLI?
        • How do I KYC if I'm using the CLI?
        • How can I see my rewards?
        • Crashing, inconsistent Emissions / missing revert data errors
        • According to BlockPass, my KYC is approved, but the desktop app still says I am not approved
        • I see "Transaction in progress" message after assigning my wallet. Did my wallet not get assigned?
        • How do I delegate my Keys to another user's operator?
        • Why did my Accrued esXAI balance decrease?
        • What are the legitimate contracts owned & operated by Xai Foundation?
        • Why do I get an error for challenge 2012?
      • How To Videos
        • Desktop Client
          • Download & Install Xai Node Desktop Client
          • Import & Start Your Sentry Wallet
          • Assign Wallets Containing Keys to the Sentry Wallet
          • Fund Sentry Wallet with Arbitrum One ETH
          • Submit KYC
          • Claim Node Rewards after Passing KYC
        • Command Line Interface (CLI)
          • Download & Install Xai Node CLI
          • Boot Operator & Interpret Status Logs
          • Add Custom Operator
          • Track Accrued esXAI
          • KYC When Using CLI
      • Redeem Referral Rewards
    • Open Initiatives
      • Completed Initiatives
      • Xai & Sentry Nodes Initiatives
      • Xai Protocol Initiatives
  • Staking Explained
    • Staking v1 and v2
    • Staking Pool Guide
      • Create a Pool
      • Stake esXAI
      • Stake Sentry Keys
      • Generating Rewards
      • Unstaking
    • Staking Rewards & Tiers
    • Time Cooldown
    • Gas Optimizations
  • Tiny Sentry Key FAQ
    • FAQ (Indonesian / Bahasa Indonesia)
    • FAQ (Korean / 한국어)
    • FAQ (Hindi / हिन्दी) - कुंजी विभाजन सामान्य प्रश्न
    • FAQ (Chinese / 中文)
  • Key Sale Referrals
  • Key Split Update (technical)
  • Build on Xai
    • Xai Chains & Parameters
      • Connect to Xai Mainnet
      • Bridge to Xai Mainnet
      • Connect to Xai Testnet (Sepolia)
      • Bridge to Xai Testnet
      • Bridged Token Addresses
      • Contract Addresses
    • How to run a full node for Xai chain
    • How to get $XAI
      • Centralized Exchanges
      • Decentralized Exchanges
        • Camelot
    • Developer Tools
      • Block Explorers
      • RPC
        • Ankr
        • Nirvana
        • QuickNode
      • Token Bridges
        • Xai native bridge
        • Gas.zip
        • Relay
      • Wallets
      • Marketplace
        • Reservoir
        • Snag Solutions
        • RaribleX
      • On chain randomisation
        • Supra VRF
  • Xai Gaming Dev Resources
    • Xai Connect
      • Overview
      • Integrate with Xai Connect
    • Build with thirdweb
      • Overview
      • Connect
      • Contracts
      • Wallets
      • Account Abstraction
      • SDKs
      • Engine
      • Web3 APIs
    • Build with Sequence
    • Subgraph
    • Xai Gas Subsidy
  • Xai Vanguard: Genesis
    • Getting Started
      • Leaderboard
      • Discord
    • Chapter 01: Onboarding
    • Chapter 02: Minting
      • Minting from Contract
    • Chapter 03: Discord
      • Obtaining esXAI
      • Obtaining XAI
      • Buy Sentry Key
    • Chapter 04: Xai Staking Pools
    • Chapter 05: Unicorn Bingo
    • Chapter 06: Bridging
    • Chapter 08: Build on Xai
      • Thirdweb: Creator Portal Walkthrough
      • Sequence: Xai Builder Walkthrough
    • Chapter 09: Camelot
    • Chapter 10: Crypto Unicorns
    • Chapter 11: Tarochi
    • Chapter 12 - My Angry Yakuza Girlfriend
    • Chapter 13 - Rainbow Rumble
    • Chapter 14 - The Lost Glitches
  • Xai Vanguard: Previous Seasons
    • XAI Token Claim
      • Claim Details
  • Play Games on Xai
    • Connect your wallet to Xai
    • Xai Games Catalog
    • Final Form
      • Card Sets
      • Card System
      • Where to Get Cards
      • ❔FAQ
Powered by GitBook
On this page
  • Prerequisites​
  • Required parameters​
  • 1. Parent chain parameters​
  • 2. Child chain parameters​
  • 3. Important ports​
  • 4. Putting it all together​
  • Optional parameters​
  1. Build on Xai

How to run a full node for Xai chain

PreviousContract AddressesNextHow to get $XAI

Last updated 11 months ago

Note: For steps on how to run a Xai Sentry Node (unrelated to running a full node for Xai chain), go .

This how-to provides step-by-step instructions for running a full Xai node on your local machine.

Prerequisites

Latest Docker Image: offchainlabs/nitro-node:v2.3.3-6a1c1a7

Minimum Hardware Configuration

RAM: 16 GB

CPU: 4 core CPU

Storage: 1 TB

Required parameters

1. Parent chain parameters

The parent-chain argument needs to provide a standard RPC endpoint for an EVM node, whether self-hosted or obtained from a node service provider:

--parent-chain.connection.url=<Parent chain RPC URL>

NOTE

rate-limit connections. To avoid hitting a bottleneck, you can run a local node for the parent chain (Arbitrum) or rely on third-party RPC providers.

2. Child chain parameters

Xai is the child chain and the required parameters are chain.info-json and chain.name

--chain.info-json is a JSON string that contains required information about Xai chain.

--chain.info-json=<Xai Chain's chain info>

An example of chain.info-json is available in the next section.

--chain.name is a mandatory flag that needs to match the chain name used in --chain.info-json:

--chain.name=<My Xai Chain>

For Anytrust chains, you need to to add the following flags to the command or configuration:

--node.data-availability.enable

And:

--node.data-availability.rest-aggregator.urls=<A list of DAS REST endpoints>

Or:

--node.data-availability.rest-aggregator.online-url-list=<A url that returns a list of the DAS REST endpoints>
Protocol
Port

RPC/http

8547

RPC/websocket

8548

Sequencer Feed

9642

  • Please note: the RPC/websocket protocol requires some ports to be enabled, you can use the following flags:

    • --ws.port=8548

    • --ws.addr=0.0.0.0

    • --ws.origins=\*

  • When running a Docker image, an external volume should be mounted to persist the database across restarts. The mount point inside the Docker image should be /home/user/.arbitrum

  • Example:

    docker run --rm -it  -v /some/local/dir/arbitrum:/home/user/.arbitrum -p 0.0.0.0:8547:8547 -p 0.0.0.0:8548:8548 offchainlabs/nitro-node:v2.3.3-6a1c1a7 --parent-chain.connection.url=<Parent chain RPC URL> --chain.id=<XaiChainId> --chain.name=<My Xai Chain> --http.api=net,web3,eth --http.corsdomain=* --http.addr=0.0.0.0 --http.vhosts=* --chain.info-json=<Xai Chain's chain info>
    • Ensure that /some/local/dir/arbitrum already exists otherwise the directory might be created with root as owner, and the Docker container won't be able to write to it

    • When using the flag --chain.info-json=<Xai Chain's chain info>, replace <Xai Chain's chain info> with the specific chain info JSON string of the Xai chain for which you wish to run the node:

  • Example:

    --chain.info-json="[{\"chain-id\":94692861356,\"parent-chain-id\":421614,\"chain-name\":\"My Xai Chain\",\"chain-config\":{\"chainId\":94692861356,\"homesteadBlock\":0,\"daoForkBlock\":null,\"daoForkSupport\":true,\"eip150Block\":0,\"eip150Hash\":\"0x0000000000000000000000000000000000000000000000000000000000000000\",\"eip155Block\":0,\"eip158Block\":0,\"byzantiumBlock\":0,\"constantinopleBlock\":0,\"petersburgBlock\":0,\"istanbulBlock\":0,\"muirGlacierBlock\":0,\"berlinBlock\":0,\"londonBlock\":0,\"clique\":{\"period\":0,\"epoch\":0},\"arbitrum\":{\"EnableArbOS\":true,\"AllowDebugPrecompiles\":false,\"DataAvailabilityCommittee\":false,\"InitialArbOSVersion\":10,\"InitialChainOwner\":\"0xAde4000C87923244f0e95b41f0e45aa3C02f1Bb2\",\"GenesisBlockNum\":0}},\"rollup\":{\"bridge\":\"0xde835286442c6446E36992c036EFe261AcD87F6d\",\"inbox\":\"0x0592d3861Ea929B5d108d915c36f64EE69418049\",\"sequencer-inbox\":\"0xf9d77199288f00440Ed0f494Adc0005f362c17b1\",\"rollup\":\"0xF5A42aDA664E7c2dFE9DDa4459B927261BF90E09\",\"validator-utils\":\"0xB11EB62DD2B352886A4530A9106fE427844D515f\",\"validator-wallet-creator\":\"0xEb9885B6c0e117D339F47585cC06a2765AaE2E0b\",\"deployed-at\":1764099}}]"
  • When shutting down the Docker image, it is important to allow a graceful shutdown so that the current state can be saved to disk. Here is an example of how to do a graceful shutdown of all Docker images currently running

    docker stop --time=300 $(docker ps -aq)
  • The Docker image is configured to run as non-root UID 1000. If you are running Linux or macOS and you are getting permission errors when trying to run the Docker image, run this command to allow all users to update the persistent folders:

    mkdir /data/arbitrum
    chmod -fR 777 /data/arbitrum

Nitro nodes can be configured to receive real time ordered transactions from the sequencer feed. If you don't set the feed input url, your node will listen to the parent chain's inbox contract to get the ordered transactions, which will cause your node to be unable to synchronize the latest state.

Set the following configurations to your fullnode to make it can receive the sequencer feed:

--node.feed.input.url=<Sequencer feed url>

After that, your node can synchronize the latest state from the sequencer feed.

(Chain owners only) In order for a node to read the sequencer feed, the chain's sequencer needs to be configured with the following parameters:

--node.feed.output.enable=true --node.feed.output.addr=<Sequencer feed url> --node.feed.output.port=<Sequencer feed port>

We show here a list of the parameters that are most commonly used when running your Xai node. You can also use the flag --help for a full comprehensive list of the available parameters.

Flag
Description

--execution.rpc.classic-redirect=<RPC>

Redirects archive requests for pre-nitro blocks to this RPC of an Arbitrum Classic node with archive database. Only for Arbitrum One.

--http.api

Offered APIs over the HTTP-RPC interface. Default: net,web3,eth,arb. Add debug for tracing.

--http.corsdomain

Accepts cross origin requests from these comma-separated domains (browser enforced).

--http.vhosts

Accepts requests from these comma-separated virtual hostnames (server enforced). Default: localhost. Accepts *.

--http.addr

Address to bind RPC to. May require 0.0.0.0 for Docker networking.

--execution.caching.archive

Retains past block state. For archive nodes.

--node.feed.input.url=<feed address>

--execution.forwarding-target=<RPC>

Defaults to the L2 Sequencer RPC based on provided L1 and L2 chain IDs.

--execution.rpc.evm-timeout

Default: 5s. Timeout for eth_call. (0 == no timeout).

--execution.rpc.gas-cap

Default: 50000000. Gas cap for eth_call/estimateGas. (0 = no cap).

--execution.rpc.tx-fee-cap

Default: 1. Transaction fee cap (in ether) for RPC APIs. (0 = no cap).

--ipc.path

Filename for IPC socket/pipe within datadir. 🔉 Not supported on macOS. Note the path is within the Docker container.

--init.prune

Prunes database before starting the node. Can be "full" or "validator".

--init.url="<snapshot file>"

--init.download-path="/path/to/dir"

(Non-Orbit Nitro nodes only) Temporarily saves the downloaded database snapshot. Defaults to /tmp/. Used with --init.url.

--node.batch-poster.post-4844-blobs

Boolean. Default: false. Used to enable or disable the posting of transaction data using Blobs to L1 Ethereum. If using calldata is more expensive and if the parent chain supports EIP4844 blobs, the batch poster will use blobs when this flag is set to true. Can be true or false.

--node.batch-poster.ignore-blob-price

Boolean. Default: false. If the parent chain supports EIP4844 blobs and ignore-blob-price is set to true, the batch poster will use EIP4844 blobs even if using calldata is cheaper. Can be true or false.

1. chain.info-json

2. chain.name

3. AnyTrust chains

3. Important ports

4. Putting it all together

Note on permissions

Note on Sequencer feed

Optional parameters

Default: wss://<chainName>.arbitrum.io/feed. ⚠️ One feed relay per datacenter is advised. See .

(Non-Orbit Nitro nodes only) URL to download the genesis database from. Required only for the first startup of an Arbitrum One node. Reference to and .

here
​
​
​
Public Xai RPC endpoints
​
​
​
​
​
​
​
​
​
feed relay guide
snapshots
archive node guide