Skip to content

alastria/alastria-node-besu

main
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

ALASTRIA red B

Slack Status License

Introduction

Alastria red B Network is a public-permissioned Blockchain network that uses the Hyperledger BESU technology, IBFT 2.0 consensus algorithm, and it's managed by Alastria partners, 🖖.

There are 2 main steps to set up an Alatria Node:

1. Installation & configuration: Follow the Docker installation steps and your node will be ready.

2. Getting permissioned: In order to use Alastria Network, your node must be previously accepted.

If you are a rookie in Blockchain or Ethereum please consider reading these references:

If you would like you to know more about Hyperledger Ecosystem, this link is a good start.

Administrative requirements

Alastria partners can add its own node. Otherwise contact support@alastria.io to start with administrative permissioning.

There are 2 main steps to set up an Alatria Node:

1. Installation: Follow the installation process and your node will be ready to be permissioned.

2. Getting permissioned: In order to use Alastria Network, your node must be previously accepted, after filling the form.

If a member wants to remove a node from the network, please send us a removal request using the same electronic form.

1) Installation

Before starting, consider the following guide to add a dedicated disk for the node database, independent of the system disk.

The following process explains the installation for a node:

  • Clone or download this repository into /data directory:
$ sudo mount /data
$ cd /data
$ sudo git clone https://github.com/alastria/alastria-node-besu.git
  • Edit the .env file in the docker-compose directory and modify the NODE_NAME attribute:

Set the NODE_NAME attribute according to the name you want for this node. The name SHOULD follow the convention: REG_<COMPANY>_B_<Y>_<Z>_<NN>

Where <COMPANY> is your company/entity name, <Y> is the number of processors of the machine, <Z> is the amount of memory in Gb and <NN> is a sequential counter for each machine that you may have (starting at 00). For example:

NODE_NAME="REG_ExampleOrg_B_2_8_00"

This is the name that will be given to the docker container.

  • To start the node run:
$ docker-compose up -d

We are done. Now, we will have the followings available:

  • Node's database at /data/alastria-node-besu/database

  • Node's logging files at /data/alastria-node-besu/logs

Keeping control over the keys

The keys of the node will be available inside the container, and are keept through restarts thanks to the keys docker volume. We can create the /data/alastria-node-besu/keys directory and copy there the key, key.pub and nodeAddress files from the container. Editting the docker-compose.yaml file to make this change:

- keys:/data/alastria-node-besu/keys → - /data/alastria-node-besu/keys:/data/alastria-node-besu/keys

we can now remove the container and start a new one keeping the logs, the database and the keys accesible outside the container:

$ docker-compose down
$ docker-compose up -d

2) Permissioning new node

All nodes in Alastria Networks must be permissioned. To ask for permission you must enter your data in this electronic form, providing these information of your node:

1. ENODE: String ENODE from ENODE_ADDRESS (enode://ENODE@IP:30303)

2. Public IP: The external IP of your node.

3. System details: Hosting provider, number of cores (vCPUs), RAM Memory and Hard disk size.

In order to get permissioning, follow these steps to get the information that you will be asked for in the previous form:

  • You can find the ENODE_ADDRESS using curl -X POST --data '{"jsonrpc":"2.0","method":"admin_nodeInfo","params":[],"id":1}' http://127.0.0.1:8545.

  • Get the IP address of your node, as seen from the external world.

$ curl https://ifconfig.me/
  • Once your request is fulfilled after form submission, you will see that your node starts connecting to its peers and starts synchronizing the blockchain. The process of synchronization can take hours or even one or two days depending on the speed of your network and machine.

Adding automatic checking for updates in node lists

If your installation was done with docker-compose everything is set up in the container and there's nothing else to do 🎉

However, if your installation was done prior to June 2022, ensure you have the more up-to-date code running in your machine following these steps:

  • Stop the node with docker-compose down
  • Do a backup of the docker-compose.yml and the .env files to make sure you don't lose any configuration
  • Pull the more current code from the repository with git pull
  • Edit the docker-compose.yml and the .env files if you need a custom configuration in volumes and ports sections, and to set the type and the name of your node
  • Start the container forcing the image to be build again with docker-compose up --build -d

Infraestructure details

System requirements

  • Operating System: Ubuntu 16.04/18.04/20.04 LTS 64 bits. CentOS, Redhat,... and other rpm systems are also allowed.

  • Hosting: Euro Zone; in order to complain with GDPR directives.

  • Hardware:

Hardware Minimum Desired
CPU's: 2 4
Memory: 4 Gb 8 Gb
Hard Disk: 32 Gb 256 Gb

Blockchain database is about 16Gb at mid-2021 and grows at rate of 2Gb/month. Take this into consideration when provisioning space for cache, logs etc.

Firewall configuration

You need to open the following ports to deploy a node:

Incoming rules

Port Type From Definition
30303 TCP 0.0.0.0 Ethereum client data transfer ports
30303 UDP 0.0.0.0 Ethereum client listener and discovery ports
9545 TCP 185.180.8.152 External Prometheus metrics

Notes:

Optional ports:

Port Type From Definition
8080 TCP (orion parners) Orion port (in case you use private transactions)
8545 TCP (web3 client) json+rpc (in case you use remix/truffle/.../web3)
8546 TCP (web3 client) json+ws (in case you use remix/truffle/.../web3)

Notes:

  • ⚠️ Please, be very carefull opening web3 ports: this protocol does not have enabled (natively) neither authentication nor encryption!
  • ⚠️ Opening web3 ports, can be tuned in /data/alastria-node-besu/config/config.toml file: listening interface, web3 methods available,...
  • Ninja sysadmins don't use outbound firewall rules 😂

Help! 🧯

Slack

Alastria has a group of channels available on Slack message platform, url: alastria.slack.com. You need to be invited, for it, please send a email to support@alastria.io asking to join the channel. Provide the following information:

  • Name and organization.
  • e-mail address to be added.
  • Channel list where to be joined.

Available channels by default

Once accepted in the Alastria Slack group you are automatically included in:

  • #general General purpose channel (public)
  • #notificaciones Notifications Github channel (public)

You can add yourself to the following channels:

  • #besu-group Channel for the red B team, 🍺

FAQ

  • How to launch an interactive console for debugging purposes?
$ sudo /data/alastria-node-besu/bin/besu --config-file="/data/alastria-node-besu/config/config.toml"
  • How to know if the node is already permissioned?
2021-04-29 14:58:44.465+00:00 | EthScheduler-Services-5 (importBlock) | INFO  | FullImportBlockStep | Import reached block 10145800 (0x82c9..ea34), Peers: 1

The last column should show, at least, one "Peer".

  • How to know if the node has finished syncing?

Use eth_syncing method to see the synchronization progress:

$ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' http://127.0.0.1:8545
  • How can I manage the node?

Enable this object at the node: add "ADMIN" to the list of supported methods:

$ sudo vim /data/alastria-node-besu/config/config.toml

[...]
rpc-http-api=["ADMIN", "ETH","NET","WEB3"]
[...]
$ curl -X POST --data '{"jsonrpc":"2.0","method":"admin_peers","params":[],"id":1}' http://127.0.0.1:8545
$ curl -X POST --data '{"jsonrpc":"2.0","method":"admin_nodeInfo","params":[],"id":1}' http://127.0.0.1:8545

Other ADMIN methods, in https://besu.hyperledger.org/en/stable/Reference/API-Methods/

  • Will the functionality (docker | ansible | whatever) be supported soon?

It's in your hands! Alastria is an open group and everyone is welcome to contribute. If you need any support we are here to help 🤗

  • Connection from Remix (TBD)

  • Connection from Truffle (TBD)

Links

Operation documents of Alastria nodes

  • Alastria Networks Operation and Government Policies (en_GB), (es_ES)

  • Alastria Network Operational Conditions for Regular Nodes (en_GB), (es_ES)

  • Alastria Network Operational Conditions for Critial Nodes (boot && validator) Nodes (en_GB), (es_ES)

About

How to install a node in Alastria Red-B (Besu Technology) and tips to deploy and use it

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published