Skip to content

Staketab/autonity-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Autonity Node and Validator setup

Setup Autonity RPC and Validator nodes.

Content:

Requirements:

Python v3.8 or v3.10, pipx v1.3.3, pip, make, httpie

Initialise the repository:

git clone https://github.com/Staketab/autonity-node.git
cd autonity-node
git checkout piccadilly

Install components:

You can set them up yourself or use the commands provided below:

make check-env                   # Check .env file configuration
make pipx                        # Install Pipx
make httpie                      # Install http
make aut                         # Install aut binary
make aut-upgrade                 # Upgrade aut binary to latest version
make autrc                       # Create .autrc file
# or
make all                         # Install Pipx, httpie, make, aut binary, and create .autrc file

Setup the nodes

Set variables:

First, copy the example configuration file and edit it:

cp example.env .env

Then carefully fill in the variables in the .env file:

KEYPASS             # Account key password
ORACLE_KEYPASS      # Oracle Account key password
YOUR_IP             # Your server's public IP address (Required for enode generation)
CHAIN               # Network: piccadilly or bakerloo

Important: Make sure to set YOUR_IP to your server's public IP address. This is required for:

  • Generating proper enode URLs with make get-enode-offline
  • Network connectivity for validator nodes

Example:

YOUR_IP=192.168.1.100
CHAIN=piccadilly

Check your configuration:

make check-env                   # Verify .env file is properly configured

Start the Autonity node:

make up

View node logs:

make log

Stop the node:

make down

Keys

Create an account

Your account will be generated in the ${DATADIR}/keystore folder

make acc                         # Create an account

Also get json account data or account balance in the specified tokens:

make get-acc                     # Get the account address
make acc-balance                 # Get the account balance. Pass the NTN variable if you need ntn balance or TOKEN=12c1... if token balance. Example: `make acc-balance NTN=1` or `make acc-balance TOKEN=12c1...`

Create an Oracle account

Your account will be generated in the ${DATADIR}/keystore folder

make acc-oracle                  # Create an Oracle account

Also get json oracle account data or oracle account balance in the specified tokens:

make get-oracle-acc              # Get the Oracle account address
make oracle-balance              # Get the Oracle account balance. Pass the NTN variable if you need ntn balance or TOKEN=12c1... if token balance. Example: `make oracle-balance NTN=1` or `make oracle-balance TOKEN=12c1...`

Register in the Piccadilly Circus Games

To register in the Game you need to generate a signature and send your account address generated in section Create an account and signature hash to the registration form:

make sign                        # Make a signature "I have read and agree ..."

And fill out the form at the following link: https://game.autonity.org/getting-started/register.html

To proceed further it is important to wait for your account to be funded.

Sign Validator

All generated data will be displayed and saved to the ${DATADIR}/sign folder:

make validator                   # Run the script to create the "validator onboarded" signature for the Validator node.
make get-enode                   # Get ENODE

Or use each command in order:

make dir                         # Will create all necessary folders
make get-priv                    # Get the PRIVATE KEY of the Oracle account
make save-priv                   # Save the PRIVATE KEY to a file, pass the PRIVKEY variable. Example: "make save-priv PRIVKEY=9190..."
make genOwnershipProof           # Get the genOwnershipProof proof
make add-validator               # Add the validator address to the .autrc file to avoid specifying the --validator flag in commands
make get-ckey
make register                    # Register the validator in the network
make import                      # Import Validator nodekey
make sign-onboard                # Create the "validator onboarded" signature for the validator node
make get-enode                   # Get ENODE

And fill out the form at the following link: https://game.autonity.org/awards/register-validator.html

Sign RPC

All generated data will be displayed and saved to the ${DATADIR}/sign folder:

make rpc                         # Run the script to create the "validator onboarded" signature for the Validator node.
make get-enode                   # Get ENODE

Or use each command in order:

make dir                         # Will create all necessary folders
make import                      # Import RPC nodekey
make sign-rpc                    # Create the "public rpc" signature for the RPC node
make get-enode                   # Get ENODE

And fill out the form at the following link: https://game.autonity.org/awards/register-node.html

Start the Oracle node

make up-oracle

View oracle logs:

make log-o

Stop the node:

make down

CEX commands

To start using CEX you need to generate API keys: All generated data will be displayed and saved to the ${DATADIR}/api-key file:

make api                         # Generate an API KEY

Commands to work with CEX:

make cex-balance                 # GET all account balances
make get-orderbooks              # GET all order books
make ntn-quote                   # GET order book ntn quote
make atn-quote                   # GET order book atn quote
make buy-ntn                     # POST buy-ntn order. Pass the PRICE and AMOUNT variable. Example: "make buy-ntn PRICE=10.00 AMOUNT=10"
make sell-ntn                    # POST sell-ntn order. Pass the PRICE and AMOUNT variable. Example: "make sell-ntn PRICE=10.00 AMOUNT=10"
make ntn-withdraw                # Withdraw ntn to your account. Pass the AMOUNT variable. Example: "make ntn-withdraw AMOUNT=10"
make buy-atn                     # POST buy-atn order. Pass the PRICE and AMOUNT variable. Example: "make buy-atn PRICE=10.00 AMOUNT=10" 
make sell-atn                    # POST sell-atn order. Pass the PRICE and AMOUNT variable. Example: "make sell-atn PRICE=10.00 AMOUNT=10"
make atn-withdraw                # Withdraw ntn to your account. Pass the AMOUNT variable. Example: "make atn-withdraw AMOUNT=10"
make get-orders                  # GET only open orders.
make get-orders-all              # GET all your orders.
make get-order-id                # GET order by ID. Pass the ID variable. Example: "make get-order-id ID=1231"
make delete-order-id             # DELETE order by ID. Pass the ID variable. Example: "make get-order-id ID=1231"

Other useful commands

make check-env                   # Check .env file configuration
make up-oracle                   # Start the Oracle node container
make down                        # Stop all containers
make log-o                       # View Oracle node logs
make clean                       # Stop all containers and clean the DATADIR with the blockchain database
make get-enode                   # Get ENODE from running node
make get-enode-offline           # Generate validator keys and ENODE offline using Docker
make get-account-offline         # Extract account address from keyfile (no running node required)
make generate-ownership-proof    # Generate ownership proof for validator registration
make prepare-validator-offline   # Complete validator setup offline (recommended)
make compute                     # Get the validator address
make bond                        # Bond tokens, pass the AMOUNT variable. Example: `make bond AMOUNT=0.5`
make unbond                      # UnBond tokens, pass the AMOUNT variable. Example: `make unbond AMOUNT=0.5`
make list                        # Check if your validator is in the list of all validators
make get-comm                    # Check if your validator is in the list of all committees
make send                        # Create a token transfer transaction. Pass the RECIPIENT and AMOUNT. Example: "make send RECIPIENT=0xf14 AMOUNT=0.2". Pass the NTN variable if you need to transfer ntn or TOKEN=12c1... if transfer token. Example: `make send RECIPIENT=0xf14 AMOUNT=0.2 NTN=1` or `make send RECIPIENT=0xf14 AMOUNT=0.2 TOKEN=12c1...`
make val-info                    # View validator status
make aut-upgrade                 # Upgrade aut binary to latest version (fixes ImportError issues)

Offline Operations

Individual Commands:

  • make get-enode-offline - Generate validator keys and enode URL
  • make get-account-offline [KEYFILE] - Extract address from keyfile (adds 0x prefix)
  • make generate-ownership-proof - Generate ownership proof for validator registration
  • make prepare-validator-offline - Complete validator setup (combines all steps)

Complete Offline Validator Setup:

The make prepare-validator-offline command performs a complete validator setup without requiring a running node:

What it does:

  1. Generates validator keys and enode URL
  2. Extracts consensus public key
  3. Gets oracle account address from keyfile (using separate script)
  4. Generates ownership proof (using separate script)
  5. Creates comprehensive summary

Individual Steps:

  • make get-enode-offline - Generate validator keys and enode
  • make generate-ownership-proof - Generate ownership proof (requires oracle keyfile and validator keys)
  • make prepare-validator-offline - Run all steps together

Requirements:

  • YOUR_IP set in .env file
  • Oracle account created (make acc-oracle)

Generates:

  • $(DATADIR)/signs/enode-offline - Enode URL for registration
  • $(DATADIR)/signs/proof - Ownership proof
  • $(DATADIR)/signs/validator-setup-summary.txt - Complete summary
  • All necessary keys and certificates

Usage:

# 1. Create oracle account first
make acc-oracle

# 2. Run complete validator setup
make prepare-validator-offline

# 3. View summary
cat $(DATADIR)/signs/validator-setup-summary.txt

Support

For any questions related to Autonity Tool script you can contact here:

Discord: duccaofficial

About

Node and Validator Setup tool! Easily install, configure, and manage RPC and validator nodes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published