Setting up custom networks
Custom Autonity networks
To connect your node to a custom Autonity network, you will need the network’s: - bootnodes, typically given in a static-nodes.json file or specified when running the node with the --bootnodes command-line option. - genesis configuration file, genesis.json.
See Local Autonity Network configuration in the Genesis reference for how to create these files.
Note that the client provides a command-line option for connecting to the Autonity Bakerloo Testnet --bakerloo. The node will not run if you specify both genesis and bootnodes for a custom network and a testnet flag. The client will create a genesis block for the custom network’s genesis configuration and the node’s local store will then have an incompatible genesis with the testnet.
Install Autonity in a working directory and create an
autonity-chaindatasub-directory as described in Running a node, Install Autonity.Create and copy the bootnode file into the
autonity-chaindatasub directory:
cp ./<PATH>/static-nodes.json ./autonity-chaindata/- Create and copy the genesis file into the working directory:
cp ./<PATH>/genesis.json ./- Run the node as described in Running a node, Run Autonity, specifying your custom network by the options:
--genesis: to provide the genesis file.--networkid: to provide the network identifier. This is typically the same value as thechainIdfile in the genesis configuration file, but may be different.
autonity \
--datadir ./autonity-chaindata \
--genesis ./genesis.json \
--networkid 65110000 \
--http \
--http.addr 0.0.0.0 \
--http.api aut,eth,net,txpool,web3,admin \
--http.vhosts * \
--ws \
--ws.addr 0.0.0.0 \
--ws.api aut,eth,net,txpool,web3,admin \
--nat extip:<IP_ADDRESS>
;