Creating an Autonity full node¶
This section takes you through how to initialise and launch a Bakerloo testnet full node using the Autonity Go Client (AGC). Make sure to meet the prerequisites.
The method outlined here will use a pre-configured Docker image to create a container running AGC. If, instead, you want to explore different deployment methods, you can find the Autonity Bakerloo testnet Genesis file here.
See also Run Autonity from a binary
Download the Docker image, and create and run a container¶
This will run a Docker container from an image, and configure it in such a way that it shares the
autonity directory outside the container. This directory is used for the node's identity (private key) and chain data.
On the machine that will host your node, download the Autonity Bakerloo testnet Docker image, and create and run a new Docker container from it:
docker run -d -ti --net=host \ --name services-testnet-agc \ --user $(id -u):$(id -g) \ -v $(pwd):/autonity \ ghcr.io/clearmatics/services-testnet-agc:v0.7.1-bakerloo06 \ --datadir=/autonity \ --nat extip:<IP_ADDRESS>
<IP_ADDRESS> is your node host's external-facing IP address.
If you want to run a node that acts as a validator node, you must enable mining and full sync mode. This will make the node take considerably longer (around 5x) to sync the block chain. To do this you must add the autonity arguments
--mine --minerthreads 1 --syncmode full. Hence the command to run the docker node becomes:
docker run -d -ti --net=host \ --name services-testnet-agc \ --user $(id -u):$(id -g) \ -v $(pwd):/autonity \ ghcr.io/clearmatics/services-testnet-agc:v0.7.1-bakerloo06 \ --datadir=/autonity \ --nat extip:<IP_ADDRESS> \ --mine --minerthreads 1 --syncmode full
Also, note that AGC functionalities for staking, delegation, and accountability are in Beta-stage development and therefore not yet fully usable and documented; therefore we do not currently encourage attempts to operate validator nodes.
Within the docker container, created from the image in this way, runs a version of the AGC pre-configured for the Bakerloo testnet.
Due to the
--net=host flag the Docker container will expose its network ports directly on the corresponding ports of the host machine it is running on
Here is a short Docker cheat sheet showing useful operations
Connect to your node from your local machine¶
Use the Autonity Node.JS Console installed on your local machine to connect to your node:
At the command line prompt of
>, enter the following command to be able to send calls to the blockchain:
You should see
0, since your node is not yet connected to the Bakerloo testnet.
To leave the command line interface, type