Setup Autonity RPC and Validator nodes.
- Requirements
- Initialise the repository
- Install components
- Setup the nodes
- Start the Oracle node
- CEX commands
- Other useful commands
- Support
Python v3.8 or v3.10, pipx v1.3.3, pip, make, httpie
git clone https://github.com/Staketab/autonity-node.git
cd autonity-node
git checkout piccadilly
You can set them up yourself or use the commands provided below:
make pipx # Install Pipx
make httpie # Install http
make aut # Install aut binary
make autrc # Create .autrc file
# or
make all # Install Pipx, httpie, make, aut binary, and create .autrc file
Carefully fill in the Variables in the .env
file.
You can also change other variable values as you see fit. This includes ports, key names, etc.
KEYPASS # Account key password
ORACLE_KEYPASS # Oracle Account key password
YOUR_IP # Node IP
make up
make log
make down
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...`
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...`
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.
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
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
make up-oracle
make log-o
make down
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"
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
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 RECEPIENT and AMOUNT. Example: "make send RECEPIENT=0xf14 AMOUNT=0.2". Pass the NTN variable if you need to transfer ntn or TOKEN=12c1... if transfer token. Example: `make send RECEPIENT=0xf14 AMOUNT=0.2 NTN=1` or `make send RECEPIENT=0xf14 AMOUNT=0.2 TOKEN=12c1...`
make val-info # View validator status
For any questions related to Autonity Tool script you can contact here:
Discord: duccaofficial