This repository contains a complete setup for running an Arcium ARX node on the Solana Devnet testnet. The node is configured to participate in MPC (Multi-Party Computation) computations within a cluster.
Before setting up your node, ensure you have the following installed:
- Docker & Docker Compose
- Solana CLI
- OpenSSL
- Git
- Python 3 (for wallet creation script)
If you're on Ubuntu or Debian, you can install the required system dependencies with:
sudo apt update
sudo apt install -y docker.io docker-compose openssl curl git python3 python3-pip netstat ss lsof
sudo usermod -aG docker $USERAfter running these commands, you may need to log out and log back in for the Docker group changes to take effect.
Install the required Python dependencies:
pip3 install -r requirements.txtOr if you prefer to install them manually:
pip3 install base58The scripts in this repository need to be executable to function properly. To set the correct permissions, run:
chmod +x start-arcium-node.sh view-logs.sh create_wallet_from_private_key.py generate_wallet.py generate_offset.py show_offset.pyTo get your public IP address, you can use one of these commands:
# Get your public IP
curl ifconfig.me
# Alternative command
curl ipinfo.io/ip
# Get your local IP
hostname -IThe node requires several keypair and configuration files. These files are automatically generated when you run the setup scripts:
node-keypair.json- Node authority keypaircallback-kp.json- Callback authority keypairidentity.pem- Node identity keypair (PKCS#8 format)node-config.toml- Node configuration file (generated from template)
Note: The node offset can be configured in two ways:
- Environment variable: Set
NODE_OFFSETenvironment variable before starting the node (will update the generated config file)- Generated automatically: If no NODE_OFFSET is set and the offset in the template is 0, a random offset will be generated
The environment variable takes precedence over the generated value.
Important: The required files are automatically generated when you run the setup scripts described below. The
node-config.tomlfile contains your actual node offset and should not be shared publicly.
The node offset is a unique identifier for your Arcium node. It can be managed automatically by the start script or manually using helper scripts:
Show current node offset:
python3 show_offset.pyThis script displays the current node offset, checking first for the NODE_OFFSET environment variable, then falling back to the value in node-config.toml.
Generate a new node offset (manual):
python3 generate_offset.pyThis script generates a random large number and updates your node-config.toml file.
Note: The start script automatically handles offset generation and management, so you typically don't need to run these scripts manually. Set the
NODE_OFFSETenvironment variable before starting the node if you want to use a specific offset.
You can either generate a new wallet or import an existing private key:
Option 1: Generate a new wallet (recommended for new users)
python3 generate_wallet.pyOption 2: Import an existing private key
python3 create_wallet_from_private_key.py <your_private_key>Both options will create a user-wallet.json file that you can use to fund your node accounts.
Note: The wallet creation scripts automatically generate all required keypair files:
user-wallet.json- Your personal walletnode-keypair.json- Node authority keypaircallback-kp.json- Callback authority keypairburner-wallet.json- Test walletThe
identity.pemfile is automatically generated by the start script if missing.
You need to fund the node and callback accounts with Devnet SOL:
# Get your node public key
solana address --keypair node-keypair.json
# Get your callback public key
solana address --keypair callback-kp.json
# Fund each account (replace with your actual public keys)
solana airdrop 2 <node_pubkey> -u devnet
solana airdrop 2 <callback_pubkey> -u devnetIf airdrops don't work, use the Solana web faucet at https://faucet.solana.com/
Initialize your node accounts on the blockchain:
solana config set --url https://api.devnet.solana.com
# Automatically get your public IP address
PUBLIC_IP=$(curl -s ifconfig.me)
arcium init-arx-accs \
--keypair-path node-keypair.json \
--callback-keypair-path callback-kp.json \
--peer-keypair-path identity.pem \
--node-offset $(grep "^offset = " node-config.toml | cut -d '=' -f 2 | tr -d ' ') \
--ip-address $PUBLIC_IP \
--rpc-url https://api.devnet.solana.comNote: The command above automatically retrieves your public IP address. If you prefer to set a specific IP address, replace
$PUBLIC_IPwith your desired IP. For nodes running behind NAT or on private networks, you may need to specify your public IP manually.
You can either join an existing cluster or create your own:
Join existing cluster:
# Automatically get your public IP address
PUBLIC_IP=$(curl -s ifconfig.me)
arcium join-cluster true \
--keypair-path node-keypair.json \
--node-offset $(grep "^offset = " node-config.toml | cut -d '=' -f 2 | tr -d ' ') \
--cluster-offset <cluster_offset> \
--ip-address $PUBLIC_IP \
--rpc-url https://api.devnet.solana.comCreate your own cluster:
arcium init-cluster \
--keypair-path node-keypair.json \
--offset <cluster_offset> \
--max-nodes <max_nodes> \
--rpc-url https://api.devnet.solana.comNote: The join-cluster command automatically retrieves your public IP address. For nodes running behind NAT or on private networks, you may need to specify your public IP manually by editing the
--ip-addressparameter.
Use the provided script to start the node with automatic port checking:
./start-arcium-node.shOr use Docker Compose directly:
docker-compose up -dNote: The start script automatically:
- Checks for required dependencies (docker, openssl, python3)
- Generates the
identity.pemfile if it's missing- Generates the
node-config.tomlfile fromnode-config.templateif it's missing- Uses the NODE_OFFSET environment variable if set, otherwise generates a new offset if the template has offset = 0
- Updates the node offset in the configuration file based on the NODE_OFFSET environment variable
- Checks for available ports using multiple tools (netstat, ss, lsof) with fallbacks
The generated
node-config.tomlfile will contain your actual node offset value.
Check if your node is active:
arcium arx-active $(grep "^offset = " node-config.toml | cut -d '=' -f 2 | tr -d ' ') --rpc-url https://api.devnet.solana.comView node information:
arcium arx-info $(grep "^offset = " node-config.toml | cut -d '=' -f 2 | tr -d ' ') --rpc-url https://api.devnet.solana.comCheck logs:
The recommended way to view logs is using the provided script which handles both Docker and file-based logs:
# View recent logs and follow new entries
./view-logs.sh
# View complete log history
./view-logs.sh --historyAlternative methods (less recommended):
# Direct file logs (if not using Docker)
tail -f arx-node-logs/arx_log_*.log
# Docker logs (may be empty as the node writes to files)
docker logs -f arx-nodeIf the node doesn't start:
- Check that all required ports are available
- Verify all configuration files are present
- Ensure your wallet is funded with sufficient SOL
- Check the logs for specific error messages
- Keep all keypair files secure and private
- Don't share your private keys with anyone
- The node keys are like master keys to your node
- Store backups of your keypairs in secure locations
- Use environment variables for sensitive values like NODE_OFFSET
- The
node-config.tomlfile is automatically generated and excluded from version control via.gitignore - Always keep your
node-config.templatefile with safe default values (offset = 0) in version control