Run a Full Node

Please be aware that Steps 1, 2, and 3 are intended to be executed specifically on the primary node. These steps involve retrieving critical information such as the Known Validators, genesis hash, and gossip ports, which are essential for the setup process.

1. Navigate to the svm-rollup Directory

Open your terminal and navigate to the directory where svm-rollup is located on the primary node. Use the cd command to change the directory:

cd path/to/svm-rollup

2. Run the ./air-solana Command

Execute the following command to get information about the chain:

./air-solana

This command will display information about the chain, including the Identity Genesis Hash and Gossip Address

Ledger location: test-ledger
Log: test-ledger/validator.log
Identity: EPhgPANa5Rh2wa4V2jxt7YbtWa3Uyw4sTeZ13cQjDDB8
Genesis Hash: 4754oPEMhAKy14CZc8GzQUP93CB4ouELyaTs4P8ittYn
Version: 1.6.7
Shred Version: 13286
Gossip Address: 127.0.0.1:1024
TPU Address: 127.0.0.1:1027
JSON RPC URL: http://127.0.0.1:8899
⠈ 00:36:02 | Processed Slot: 5142 | Confirmed Slot: 5142 | Finalized Slot: 5110 | Snapshot Slot: 5100 | Transactions: 5142 | ◎499.974295000

3. Note Down Required Information:

From the output, identify and note down the following information:

  • Identity: The value associated with "Identity."

  • Genesis Hash: The value associated with "Genesis Hash."

  • Gossip Address: The IP address and port associated with "Gossip Address." If the new node system is local, you can use the local address (127.0.0.1); otherwise, replace it with the public address of the primary node.

Please note that all subsequent steps are required to be executed on the system where the new node is to be started. This is crucial for the successful setup and operation of your new node. Ensure you are performing these actions on the correct system designated for the node's deployment and operation

4. Clone GitHub Repositories

Start by cloning the necessary repositories from GitHub. Use the following commands in your terminal:

git clone https://github.com/airchains-network/rollup-svm

5. Initialize Node

To initiate the node, follow these commands:

Switch to the 'rollup-svm' directory, which you cloned earlier. Use the command:

cd rollup-svm

Run the setup script provided in the 'rollup-svm' directory. This script will initialize the node with the configuration you've set:

sh setup.sh

Executing the setup.sh shell file will initialize the node. The initialization process may take 15-20 minutes to build properly. Please be patient during this time.

Make sure to allow sufficient time for the setup to complete before expecting the node to be fully operational.

6. Configure Node

Set RPC URL:

Replace <url> with the RPC URL and port from the primary node of the chain:

./solana config set --url <url>

Generate Validator Keypair:

./solana-keygen new -o validator-keypair.json

Generate Vote Account Keypair:

./solana-keygen new -o vote-account-keypair.json

Generate Authorized Withdrawer Keypair:

./solana-keygen new -o authorized-withdrawer-keypair.json

Set Keypair for Configuration:

./solana config set --keypair ./validator-keypair.json

Run Solana Validator

Replace <gossip_address>, <genesis-hash>, and <identifier> with the details fetched from the primary node:

nohup ./solana-validator \
    --identity validator-keypair.json \
    --known-validator <identifier> \
    --only-known-rpc \
    --full-rpc-api \
    --no-voting \
    --ledger ledger \
    --accounts accounts \
    --log solana-rpc.log \
    --rpc-port 8899 \
    --rpc-bind-address 0.0.0.0 \
    --dynamic-port-range 8000-8020 \
    --entrypoint <gossip_address> \
    --expected-genesis-hash <genesis-hash> \
    --allow-private-addr \
    > validator.log 2>&1 &

This command uses nohup to run the Solana Validator process in the background. It redirects both standard output and standard error to a log file named validator.log. Adjust the filename as needed.

Make sure to replace <identifier>, <gossip_address>, and <genesis-hash> with the actual values obtained from the primary node.

Last updated