A testnet node is connected to our testnet network, when you join this network you are participating as a writer node, that is, your transactions will be seen by other users of the testnet network, this environment will allow you to test in a completely reliable way. your application to make sure everything will work correctly on mainnet
Currently there are 2 ways to deploy a testnet node:
Deploy Testnet Node Using Ansible Script
Deploy Testnet Node Using Kubernetes
If you are looking to deploy a local node for development refer to this documentation
If you are looking to deploy a Mainnet Node refer to this documentation
After you deploy a Testnet Node remember to permissioning your node
Here you will find instructions for the deployment of nodes on Kubernetes using HELM. This implies that it will be executed from a local machine on a remote server. The local machine and the remote
server will communicate via helm. The installation with kubernetes manifests is compatible with Google Kubernetes Engine.
During the process of node deploying, you will be asked about the network in which you would like to deploy your nodes. In order for your node to get permissioned, you need to complete the permissioning process first. In order to understand better what are the types of networks available and the permissioning processes for each network, please read permissioning process.
Minimum System Requirements
Recommended hardware features for Besu node:
Recommended Hardware
CPU 4 vCPUs compute optimized
RAM Memory 16 GB
Hard Disk 50 GB SSD
IOPs 70,000 IOPS READ 50,000 IOPS WRITE
Kubernetes: Google Kubernestes Engine GKE.
It is necessary to enable the following network ports in the machine in which we are going to deploy the node:
Besu Node:
Port 60606: TCP/UDP – To establish communication p2p between nodes.
Port 4545: TCP – To establish RPC communication. This port is used for applications that communicate with the node and may be leaked to the Internet.
Nginx:
Port 80: TCP – To establish RPC communication to Gas Model.
For this installation we will use Kubectl. It is necessary to install Kubectl on a local machine that will perform the installation of the node on a kubernetes cluster. Following the instructions to install kubectl in your local machine.
For this installation we will use Helm. It is necessary to install helm on a local machine that will perform the installation of the node on a kubernetes cluster. Following the instructions to install helm in your local machine.
To configure and install Besu you must clone this git repository in your local machine.
git clone https://github.com/LACNetNetworks/besu-networks
cd besu-networks/helm/
Preparing installation of a New Node
There are three types of nodes (Bootnode / Validator / Writer) that can be created in the LACChain networks orchestrated by LACNet at this moment.
There are three types of values which corresponde to the four types of nodes: bootnode.yml, validator.yml, writer.yml. The values you have to set are in the deploy section. These are the following:
Values:
network: Type Network – open-protest-net.
typenode: Type of Node – writer | validator | bootnode .
publicIP: TCP Public IP Ingress.
p2p – host: P2P Public IP Egress.
p2p – port: P2P PORT – Default (60606).
workerName: Name of the node worker where always the pod will be installed.
dnsName: Organization domain name (e.g. lacchain.com).
nodeName: Name you want for your node in the network monitoring tool.
nodeEmail: email address you want to register for your node in the network monitoring tool.
It’s a good idea to provide the e-mail of the technical contact identified or to be identified in the registration form as part of the on-boarding process.
Note: set Environment variable on values helm at directory /helm/values. type node bootnode file bootnode.yml, validator file validator.yml and write file writer.yml
e.g. set Environment on helm values at file /helm/values/writer.yml.
TCP Public IP Ingress: Generate a static public IP in your cloud provider. Then replace the public ip in the load balance (loadBalancerIP) service manifest. finally update the publicIP environment variable with this IP.
P2P Public IP Egress: Outgoing p2p traffic to synchronize besu nodes. This is the permissioned IP for the network. Therefore, the pod must always be installed on the same worker node so that the IP does not change. We obtain the name and IP of the cluster nodes with the following command.
kubectl get nodes -o wide
We choose a worker and update the “nodeName” value in the manifest of the pod we are going to deploy. finally update the p2p – host environment variable with worker IP external .
Note: We validate that the pod has been deployed in the selected worker with the following command.
kubectl get pod -o wide
Deploying the New Node
Depending type node you want to deploy, you need execute the following command (this deployment is compalitible only Google Kubernestes Engine GKE):
To deploy a Node Writer
helm install <chart-name> ./charts/besu-node --namespace <namespace-name> --create-namespace --values ./values/writer.yml
To deploy a Node Bootnode
helm install <chart-name> ./charts/besu-node --namespace <namespace-name> --create-namespace --values ./values/bootnode.yml
To deploy a Node Validator
helm install <chart-name> ./charts/besu-node --namespace <namespace-name> --create-namespace --values ./values/validator.yml
e.g. deploy Node Writer on Mainnet-Omega network
helm install lacnet-writer-1 ./charts/besu-node --namespace lacchain-main-net --create-namespace --values ./values/writer.yml
At the end of the installation, if everything worked a BESU service will be created managed by Systemctl with Running status. Aditional objects created are namespace, service load balancer, configmap, and volume.
Don’t forget to write down your node’s “enode” :
curl -X POST --data '{"jsonrpc":"2.0","method":"net_enode","params":[],"id":1}' http://<PUBLIC_IP>:4545
Result:
"result" : "enode://d837cb6dd3880dec8360edfecf49ea7008e50cf3d889d4f75c0eb7d1033ae1b2fb783ad2021458a369db5d68cf8f25f3fb0080e11db238f4964e273bbc77d1ee@104.197.188.33:60606"
Don’t forget to write down your node’s “enode”. Remember that you need to provide the enode to be permissioned as indicated in the permissioning process. Also as part of the permissioning process, we need you to provide us your node address. Please get it by executing the following:
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_coinbase","params":[],"id":53}' http://<PUBLIC_IP>:4545
Result:
{"jsonrpc":"2.0","id":53,"result":"0xa08d3d8f68ba47deb401769e5ed39ff283e60a80"}
Configuring the Besu Node File
The default configuration should work for everyone. However, depending on your needs and technical knowledge you can modify your node’s settings in values folder writer.yml bootnode.yml validator.yml, for RPC access or authentication. Please refer to the reference documentation.
Checking your Connection
Once you have been permissioned, you can check if your node is connected to the network properly. Check that the node has stablished the connections with the peers:
$ curl -X POST --data '{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":1}' http://<PUBLIC_IP>:4545
You should get a result like this:
Now you can check if the node is syncing blocks by getting the log:
kubectl logs <pod name> -c <container name> -f -n <namespace>
e.g. Node Writer on Mainnet-Omega network
kubectl logs besu-node-lacnet-writer-1-0 -c lacnet-writer-1-besu -f -n lacchain-main-net
You should get something like this:
If you need to update the node, try redeploy the besu node: e.g. Node Writer
helm upgrade <chart-name> ./charts/besu-node --namespace <namespace-name> --values ./values/writer.yml
If any of these two checks doesn’t work, try to restart the besu service: e.g. Node Writer
kubectl delete pod <pod name> -n <namespace>
kubectl delete pod besu-node-lacnet-writer-1-0 -n lacchain-main-net
If that doesn’t solve the problem, open a ticket if you already have a membership or contact us at [email protected] .
If you find any issue, you can open an issue on Github and contact us at [email protected] If you already have a membership, you can also open a ticket.
Next Steps
Now that you have installed your writer node, you can follow our guides to deploy smart contracts, deploy private channels(using Ansible, using Dockers, or using Kubernetes).
Here you will find instructions for deploying a Testnet Node using Ansible. By following this guide, your nodes will be executed from your local machine on your remote server. Your local machine and your remote server will communicate via ssh. The installation with the provided ansible script is compatible with Ubuntu, Centos7 and Centos8 stream*.
During the process of node deploying, you will be asked about the network in which you would like to deploy your nodes. In order for your node to get permissioned, you need to complete the permissioning process first. In order to understand better what are the types of networks available and the permissioning processes for each network, please read the * permissioning process.
4 vCPUs compute optimized 4 vCPUs compute optimized 2 vCPUs
16 GB RAM Memory
50 GB SSD Hard Disk
IOPs 70,000 IOPS READ 50,000 IOPS WRITE
Operating System: 64 bits - Ubuntu 16.04, Ubuntu 18.04, Ubuntu 20.04, Ubuntu 22.04, Centos7, Centos8
It is rquired to enable the following network ports in the machine in which the blockchain node will be deployed:
To establish communication p2p between nodes:
Port 60606: TCP/UDP
To establish RPC communication. (this port is used for applications that communicate with the node and may be leaked to the Internet)
Port 4545: TCP
For this installation we will use Ansible. It is necessary to install Ansible on a local machine that will perform the installation of the node on a remote machine. Follow these instructions to insall ansible in your local machine:
run:
sudo apt-get update
sudo apt-get install software-properties-common
sudo apt-add-repository ppa:ansible/ansible
sudo apt-get update
sudo apt-get install ansible
To configure and install a LACChain node, you must clone this git repository in your local machine:
run:
git clone https://github.com/LACNet-Networks/besu-networks
cd besu-networks/
Obtain SSH access to your remote machine
Make sure you have SSH access to the remote machine where you are going to deploy the LACChain node. This step will vary depending on your context (physical machine, cloud provider, etc.). This document assumes that you are able to log into your remote machine using the following command:
run:
ssh remote_user@remote_host
Preparing installation of a new node
There are three types of LACChain nodes (validator, bootnode, and writer) that can be created in the LACChain networks orchestrated by LACNet at this moment. After cloning the repository in your local machine, create a copy of the “inventory.example" file and save it as “inventory". Edit this file to add a line for the remote server where you are creating the new node. You can do it with a graphical tool or inside the shell.
run:
cd besu-networks/
cp inventory.example inventory
vi inventory
inventory file:
[node] 192.168.10.72 node_ip=your.public.node.ip node_name=my_node_name node_email=your@email
Place the new line below the [node] line. Do not replace existing lines.
The first element on the new line is the IP or hostname where you can reach your remote machine from your local machine.
The value of node_name is the name you want for your node in the network monitoring tool.
The value of node_email is the email address you want to register for your node in the network monitoring tool. It’s a good idea to provide the e-mail of the technical contact provided as part of the on-boarding process.
Run the following script:
ansible-playbook -i inventory --private-key=~/.ssh/id_rsa -u remote_user site-lacchain-node.yml
You need to choose "writer" node and "open-protestnet"
[0]:validator
[1]:boot
[2]:writer
Please, choose which type of node are you deploying:
"type 2"
[0]:mainnet-omega
[1]:open-protestnet
[2]:legacy-protestnet (DEPRECATED)
Please, choose in which network are you deploying:
"type 1"
Don’t forget to write down your node’s “enode”. Remember that you need to provide the enode to be permissioned as indicated in the permissioning process.
TASK [lacchain-validator-node : print enode key] *********************************************** ok: [x.x.x.x] => { "msg": "enode://cb24877f329e0e3fff6c7d7b88d601b698a9df6efbe1d91ce77130f065342b523418b38cb3c92ea3bcca15344e68c7d85a696eb9f8c0152c51b9b7b74729064e@a.b.c.d:60606" }
Also as part of the permissioning process, we need you to provide us your node address. Please get it by executing the following:
cd /root/lacchain/data
cat nodeAddress
At the end of the installation, if everything worked a BESU service will be created managed by Systemctl with started status. After the installation has finished, you will have nginx installed on each instance chosen; it will be up and running and will allow secure and encrypted RPC connections (on the default 443 port). Certificates used to create the secure connections are self-signed; it is up to you decide another way to secure RPC connections or continue using the provided default service. Once you are permissioned, you can verify that you are connected to other nodes in the network by following the steps detailed in #issue33.
Configuring the Besu node file
The default configuration should work for everyone. However, depending on your needs and technical knowledge you can modify your local node’s settings in /root/lacchain/config.toml, e.g. for RPC access or authentication. Please refer to the reference documentation.
Once your node is ready, you can start it up with this command in remote machine:
<remote_machine>$ service pantheon start
If you need to restart the services, you can execute the following commands:
<remote_machine>$ service pantheon restart
To update your node, first change the inventory file. Replace the ip address with your node ip address. :
[node] #here put the role you are going to update
35.193.123.227
Optionally you can choose the sha_commit of the version you want to update. It is only needed to specify the version:
[node] #here put the role you are gong to update
35.193.123.227 besu_release_version='22.1.0'
Current Besu versions of LACChain nodes orchestrated by LACNet are obtained from here. Tested BESU versions are 21.1.6, 20.10.4, 1.5.3, 1.5.2, 1.4.4, 1.3.6.
Execute the following command to update the node:
$ ansible-playbook -i inventory --private-key=~/.ssh/id_rsa -u remote_user site-lacchain-update-
node.yml`
Checking your connection
Once you have been permissioned, you can check if your node is connected to the network properly. Check that the node has stablished the connections with the peers:
sudo -i
curl -X POST --data '{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":1}' localhost:4545
You should get a result like this:
Now you can check if the node is syncing blocks by getting the log of the last 100 blocks:
tail -100 /root/lacchain/logs/pantheon_info.log
You should get something like this:
If any of these two checks doesn’t work, try to restart the besu service:
service pantheon restart
If you have forgotten to write down your enode, you may get it, executing the following command:
curl -X POST --data '{"jsonrpc":"2.0","method":"net_enode","params":[],"id":1}' http://localhost:4545
To get your node address you may execute the following command:
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_coinbase","params":[],"id":53}' http://127.0.0.1:4545
If you find any issue, you can open an issue on Github and contact us at [email protected] If you already have a membership, you can also open a ticket.
After you deploy a Testnet Node remember to permissioning your node