SKALE Node CLI, part of the SKALE suite of validator tools, is the command line to setup, register and maintain your SKALE node.
- Installation
- CLI usage
2.1 Top level commands
2.2 Node
2.3 Wallet
2.4 sChains
2.5 Health
2.6 SSL
2.7 Logs
2.8 Resources allocation
2.9 Validate - Sync CLI usage
3.1 Top level commands
3.2 Sync node commands - Exit codes
- Development
- Prerequisites
Ensure that the following package is installed: docker, docker-compose (1.27.4+)
- Download the executable
VERSION_NUM={put the version number here} && sudo -E bash -c "curl -L https://github.com/skalenetwork/node-cli/releases/download/$VERSION_NUM/skale-$VERSION_NUM-`uname -s`-`uname -m` > /usr/local/bin/skale"
For Sync node version:
VERSION_NUM={put the version number here} && sudo -E bash -c "curl -L https://github.com/skalenetwork/node-cli/releases/download/$VERSION_NUM/skale-$VERSION_NUM-`uname -s`-`uname -m`-sync > /usr/local/bin/skale"
- Apply executable permissions to the downloaded binary:
chmod +x /usr/local/bin/skale
- Test the installation
skale --help
Print build info
skale info
Print version number
skale version
Options:
--short
- prints version only, without additional text.
Prefix:
skale node
Get base info about SKALE node
skale node info
Options:
-f/--format json/text
- optional
Initialize a SKALE node on current machine
⚠️ Please avoid re-initialization: First runskale node info
to confirm current state of intialization.
skale node init [ENV_FILE]
Arguments:
ENV_FILE
- path to .env file (required parameters are listed in theskale node init
command)
You should specify the following environment variables:
SGX_SERVER_URL
- SGX server URLDISK_MOUNTPOINT
- disk mount point for storing sChains dataDOCKER_LVMPY_STREAM
- stream ofdocker-lvmpy
to useCONTAINER_CONFIGS_STREAM
- stream ofskale-node
to useENDPOINT
- RPC endpoint of the node in the network where SKALE Manager is deployedMANAGER_CONTRACTS_ABI_URL
- URL to SKALE Manager contracts ABI and addressesIMA_CONTRACTS_ABI_URL
- URL to IMA contracts ABI and addressesFILEBEAT_URL
- URL to the Filebeat log serverENV_TYPE
- environement type (mainnet, testnet, etc)
Optional variables:
TG_API_KEY
- Telegram API keyTG_CHAT_ID
- Telegram chat IDMONITORING_CONTAINERS
- will enable monitoring containers (filebeat
,cadvisor
,prometheus
)
Restore SKALE node on another machine
skale node restore [BACKUP_PATH] [ENV_FILE]
Arguments:
BACKUP_PATH
- path to the archive with backup data generated byskale node backup
commandENV_FILE
- path to .env file (required parameters are listed in theskale node init
command)
Generate backup file to restore SKALE node on another machine
skale node backup [BACKUP_FOLDER_PATH] [ENV_FILE]
Arguments:
BACKUP_FOLDER_PATH
- path to the folder where the backup file will be saved
skale node register
Required arguments:
--ip
- public IP for RPC connections and consensus--domain
/-d
- SKALE node domain name--name
- SKALE node name
Optional arguments:
--port
- public port - beginning of the port range for node SKALE Chains (default:10000
)
Update SKALE node on current machine
skale node update [ENV_FILEPATH]
Options:
--yes
- update without additional confirmation
Arguments:
ENV_FILEPATH
- path to env file where parameters are defined
You can also specify a file with environment variables which will update parameters in env file used during skale node init.
Turn-off SKALE node on current machine and optionally set it to the maintenance mode
skale node turn-off
Options:
--maintenance-on
- set SKALE node into maintenance mode before turning off--yes
- turn off without additional confirmation
Turn on SKALE node on current machine and optionally disable maintenance mode
skale node turn-on [ENV_FILEPATH]
Options:
--maintenance-off
- turn off maintenance mode after turning on the node--yes
- turn on without additional confirmation
Arguments:
ENV_FILEPATH
- path to env file where parameters are defined
You can also specify a file with environment variables which will update parameters in env file used during skale node init.
Set SKALE node into maintenance mode
skale node maintenance-on
Options:
--yes
- set without additional confirmation
Switch off maintenance mode
skale node maintenance-off
Set SKALE node domain name
skale node set-domain
Options:
--domain
/-d
- SKALE node domain name--yes
- set without additional confirmation
Prefix:
skale wallet
Commands related to Ethereum wallet associated with SKALE node
skale wallet info
Options:
-f/--format json/text
- optional
Set local wallet for the SKALE node
skale wallet set --private-key $ETH_PRIVATE_KEY
Send ETH tokens from SKALE node wallet to specific address
skale wallet send [ADDRESS] [AMOUNT]
Arguments:
ADDRESS
- Ethereum receiver addressAMOUNT
- Amount of ETH tokens to send
Optional arguments:
--yes
- Send without additional confirmation
Prefix:
skale schains
List of SKALE Chains served by connected node
skale schains ls
skale schains config SCHAIN_NAME
List DKG status for each SKALE Chain on the node
skale schains dkg
Show information about SKALE Chain on node
skale schains info SCHAIN_NAME
Options:
--json
- Show info in JSON format
Turn on repair mode for SKALE Chain
skale schains repair SCHAIN_NAME
Prefix:
skale health
List all SKALE containers running on the connected node
skale health containers
Options:
-a/--all
- list all containers (by default - only running)
Show health check results for all SKALE Chains on the node
skale health schains
Options:
--json
- Show data in JSON format
Status of the SGX server. Returns the SGX server URL and connection status.
$ skale health sgx
SGX server status:
┌────────────────┬────────────────────────────┐
│ SGX server URL │ https://0.0.0.0:1026/ │
├────────────────┼────────────────────────────┤
│ Status │ CONNECTED │
└────────────────┴────────────────────────────┘
Prefix:
skale ssl
Status of the SSL certificates on the node
skale ssl status
Admin API URL: [GET] /api/ssl/status
Upload new SSL certificates
skale ssl upload
-c/--cert-path
- Path to the certificate file-k/--key-path
- Path to the key file-f/--force
- Overwrite existing certificates
Admin API URL: [GET] /api/ssl/upload
Check ssl certificate be connecting to healthcheck ssl server
skale ssl check
-c/--cert-path
- Path to the certificate file (default: uploaded usingskale ssl upload
certificate)-k/--key-path
- Path to the key file (default: uploaded usingskale ssl upload
key)--type/-t
- Check type (openssl
- openssl cli check,skaled
- skaled-based check,all
- both)--port/-p
- Port to start healthcheck server (defualt:4536
)--no-client
- Skip client connection (only make sure server started without errors)
Prefix:
skale logs
Fetch node CLI logs:
skale logs cli
Options:
--debug
- show debug logs; more detailed output
Dump all logs from the connected node:
skale logs dump [PATH]
Optional arguments:
--container
,-c
- Dump logs only from specified container
Prefix:
skale resources-allocation
Show resources allocation file:
skale resources-allocation show
Generate/update allocation file:
skale resources-allocation generate [ENV_FILE]
Arguments:
ENV_FILE
- path to .env file (required parameters are listed in theskale node init
command)
Options:
--yes
- generate without additional confirmation-f/--force
- rewrite allocation file if it exists
Prefix:
skale validate
Check whether ABI files contain valid JSON data
skale validate abi
Options:
--json
- show validation result in json format
Print build info
skale info
Print version number
skale version
Options:
--short
- prints version only, without additional text.
Prefix:
skale sync-node
Initialize full sync SKALE node on current machine
skale sync-node init [ENV_FILE]
Arguments:
ENV_FILE
- path to .env file (required parameters are listed in theskale sync-node init
command)
You should specify the following environment variables:
DISK_MOUNTPOINT
- disk mount point for storing sChains dataDOCKER_LVMPY_STREAM
- stream ofdocker-lvmpy
to useCONTAINER_CONFIGS_STREAM
- stream ofskale-node
to useENDPOINT
- RPC endpoint of the node in the network where SKALE Manager is deployedMANAGER_CONTRACTS_ABI_URL
- URL to SKALE Manager contracts ABI and addressesIMA_CONTRACTS_ABI_URL
- URL to IMA contracts ABI and addressesSCHAIN_NAME
- name of the SKALE chain to syncENV_TYPE
- environement type (mainnet, testnet, etc)
Options:
--archive
- Run sync node in an archive node (disable block rotation)--historic-state
- Enable historic state (works only in pair with --archive flag)
Update full sync SKALE node on current machine
skale sync-node update [ENV_FILEPATH]
Options:
--yes
- update without additional confirmation
Arguments:
ENV_FILEPATH
- path to env file where parameters are defined
NOTE: You can just update a file with environment variables used during
skale sync-node init
.
Exit codes conventions for SKALE CLI tools
0
- Everything is OK1
- General error exit code3
- Bad API response**4
- Script execution error**5
- Transaction error*6
- Revert error*7
- Bad user error**8
- Node state error**
*
- validator-cli
only
**
- node-cli
only
pip install -e .[dev]
In file .git/hooks/pre-commit
add:
#!/bin/sh
flake8 .
Run commands in dev mode:
ENV=dev python main.py YOUR_COMMAND
Required environment variables:
ACCESS_KEY_ID
- DO Spaces/AWS S3 API Key IDSECRET_ACCESS_KEY
- DO Spaces/AWS S3 Secret access keyGITHUB_EMAIL
- Email of GitHub userGITHUB_OAUTH_TOKEN
- GitHub auth token
If you have any questions please ask our development community on Discord.
Copyright (C) 2018-present SKALE Labs