Connect to an external node
There are many usecases where not all nodes are running on the SettleMint platform. For example, you might want to connect to a node running on a different server, you might want to connect to a node running on a different blockchain platform or just for development purposes. In this guide, we will show you how to connect to an external node.
Prerequisites
- A running Hyperledger Besu network on the SettleMint platform with at least one node hosted on either Amazon Web Services (AWS) or Microsoft Azure.
- For this guide we will use Docker and Docker Compose, but you can also use your own setup.
Step 1: Getting the genesis file
The genesis file of a network contains all the information about your network, including a list of bootnodes. This list is automatically updated upon each change you make in the platform. If you add or remove nodes it makes sense to redownload the file.
You can download the genesis file by going to the network details page and clicking on the genesis.json link in the Info box.
Create a folder (e.g. MyNetwork) on your computer and add the file into it:
Step 2: Create the docker compose file
Create a docker-compose.yml file in the same folder:
Add the following content to the docker-compose.yml file:
Step 3: Start your node
Your node will now search for peers and connect to them. You can check the logs to see if it is working correctly:
When it connects, it will sync the chain locally and stay up to date from now on
Step 4: Validators
This is a dangerous step that can break your network without a way to recover. You can assign this new node as a validator in the platform. This will make it sign blocks and transactions. Note that more than 66% of your validators need to be online for the network to keep functioning.
Execute qbft_proposeValidatorVote on all your validator nodes. You can find the enode address of your new node in the logs of the container or by executing admin_nodeInfo.
Similarly you can make a platform validator a regular node by executing qbft_proposeValidatorVote with proposal "false" on every validator node.