lacchain / besu-pro-testnet

Blockchain Pro Test-Net, running on Hyperledger Besu
Apache License 2.0
51 stars 50 forks source link

Tests after each deployment/update on a node #33

Open eum602 opened 4 years ago

eum602 commented 4 years ago

It would be a good practice to make some test after an deployment/update is made on an existing node. Test could include the capability to check if the node is able to communicate with other besu/orion nodes, also testing over private transactions and so on.

AllendeMarcos commented 4 years ago

Once you are permissioned, you start connecting to the nodes in LACChain's network. Checking that you are connected to other nodes is a good way of verifying that you have been permissioned. In order to do so, access your node and follow the next steps:

sudo -i cd lacchain vi config.toml

Now you need to add the "ADMIN" word in the line "rpc-http-api" as shown in the capture below. This will allow you to access your API via RPC from your localhost so you can get the information on the nodes you are connected to.

ADMIN

After modifying the "config.toml" file you need to restart the pantheon service. Don't do this every time you check. Only after modifying the file.

service pantheon restart

In order to get the information, now you can run the following:

curl -X POST --data '{"jsonrpc":"2.0","method":"admin_peers","params":[],"id":1}' http://127.0.0.1:4545

As you are restarting the pantheon service as part of the process, you are re-connecting to all the nodes. Take this into account if you are already registering transactions in the network.

If instead of granting access to your local host you want to grant access to an external IP, for example for the technical team of LACChain to check your connections, you have to uncomment the lines that are commented in the capture above. For granting access to a specific IP, type it inside the brackets. You shouldn't allow this permanently.