Upgrading the Verdikta Arbiter Node¶
This document explains how to use the upgrade-arbiter.sh
script to upgrade an existing Verdikta Arbiter installation with the latest code.
Overview¶
The upgrade process: 1. Checks for changes between your installed Arbiter and the current repository 2. Creates a backup of your current installation 3. Stops the Arbiter if it's running 4. Updates components while preserving your configuration 5. Restarts the Arbiter if it was running before the upgrade
Prerequisites¶
- An existing Verdikta Arbiter installation
- The latest version of the
verdikta-arbiter
repository - Sufficient disk space for a backup of your current installation
Upgrade Steps¶
-
Clone or update the Verdikta Arbiter repository:
-
Run the upgrade script:
-
When prompted, enter the path to your existing Arbiter installation:
The default will be the same directory used during initial installation. -
The script will check for changes in each component:
-
If changes are detected, you'll be asked to confirm the upgrade:
-
If your Arbiter is currently running, the script will inform you and ask for confirmation before stopping it:
-
The script will create a backup before making any changes:
-
The script will then upgrade each component that has changes:
-
If your Arbiter was running, you'll be asked if you want to restart it:
What Gets Preserved During Upgrade¶
The upgrade process preserves:
- AI Node:
.env.local
file with API keys- Log files
-
Node modules
-
External Adapter:
.env
file with configuration settings- Log files
-
Node modules
-
Chainlink Node:
- Configuration files (
.toml
files) - Log files
- Database data
-
.api
file with login credentials -
Contract Information:
.contracts
file with deployment addresses and configuration
Important Configuration Files and Their Locations¶
After installation or upgrade, important configuration and data files are stored in these locations:
Contract Information¶
- Path:
~/verdikta-arbiter-node/installer/.contracts
- Contains:
- Operator contract address
- Node address
- LINK token address
- Job ID (with and without hyphens)
- Aggregator address
- Classes ID (when registered with an aggregator)
Chainlink Node Credentials¶
- Path:
~/verdikta-arbiter-node/chainlink-node/info.txt
- Contains:
- UI login email
- UI login password
- Keystore password
- Configuration directory location
Environment Variables¶
- AI Node:
~/verdikta-arbiter-node/ai-node/.env.local
- External Adapter:
~/verdikta-arbiter-node/external-adapter/.env
- Chainlink Node:
~/.chainlink-sepolia/.api
(for UI credentials)
Querying Oracle Contract Information¶
The installer includes a script to query information about registered oracles:
Using query-oracle-classes.js¶
This script allows you to verify if your oracle is registered with an aggregator and check its class ID:
-
Navigate to the arbiter-operator directory:
-
Run the query script with your contract addresses:
-
You can get these values from your
.contracts
file: -
Example output:
ReputationKeeper: 0x6def65a003F9d9d80Cb9f6216dBF0282c8563a27 Querying information for Oracle: 0x91A5fe7FC3A729BD38602d4bD5a7F9b6aCA6C7A9 JobID: 517f743acd75461c840ea0a93164285c → 0x3531376637343361636437353436316338343065613061393331363432383563 Oracle Status: Active: true Reputation: 0 Min Reputation: 0 Fee: 0.0 LINK Staked Amount: 0.0 wVDKA Registered Class ID: 128
This information is useful for verifying your oracle's registration status and configuration when integrating with client applications.
Troubleshooting¶
The upgrade failed or caused issues¶
If you encounter problems after upgrading, you can restore from the backup:
# Stop the arbiter if it's running
cd /path/to/verdikta-arbiter-node
./stop-arbiter.sh
# Remove or rename the problematic directory
mv /path/to/verdikta-arbiter-node /path/to/verdikta-arbiter-node-broken
# Restore from backup
cp -r /path/to/verdikta-arbiter-node_backup_TIMESTAMP /path/to/verdikta-arbiter-node
# Restart the arbiter
cd /path/to/verdikta-arbiter-node
./start-arbiter.sh
The script doesn't detect my installation¶
Ensure your installation matches the expected structure: - It should have ai-node
, external-adapter
, and chainlink-node
directories - It should have the management scripts: start-arbiter.sh
, stop-arbiter.sh
, and arbiter-status.sh
Components fail to restart after upgrade¶
If components don't restart properly:
- Check the logs:
- AI Node:
/path/to/verdikta-arbiter-node/ai-node/logs/
- External Adapter:
/path/to/verdikta-arbiter-node/external-adapter/logs/
-
Chainlink Node:
docker logs chainlink
-
Try stopping and starting manually:
Additional Notes¶
- The upgrade process doesn't modify your database or blockchain state
- It's recommended to perform upgrades during maintenance windows
- Always ensure you have sufficient disk space for the backup
- If you've made custom modifications to the code, they may be overwritten during upgrade