Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.
andresalo edited this page Feb 28, 2019 · 13 revisions

F.A.Q.

Technical resources

  1. How to pull request to alastria-node
  2. If you have made a pull request and don't get any peers
    1. Case 1
    2. Case 2
    3. Case 3
    4. Case 4
  3. Node network_id does not match nomenclature
  4. Update from branch change (network is changed)
  5. Too many open files
  6. Create a swap file
  7. Error Workarounds
  8. Update Geth binary version
  9. Private Transactions in Alastria

How to pull request to alastria-node

  1. Log in with Your account on https://github.com.
  2. Browse to https://github.com/alastria/alastria-node.
  3. Click on the Fork button, this will create a copy of t the current repository in our user space, ex.: https://github.com/marcossanlab/alastria-node
  4. In this repository, we navigate to the data/constellation-node.json file and click on the pencil icon to edit, then we add the changes at the end of the list inside the brackets. Once changes are ready, we'll press on the Commit changes button.
  5. Next, go to data/permissioned-nodes_validator.json and again with the pencil icon, add the changes made during the configuration process on your node. Once you're ready, press Commit changes button again.
  6. Browse to DIRECTORY_REGULAR.md and edit it adding a new line at the bottom of the file with your information following this example:
| Test Alastria |  Marcos Serradilla (@mserradilla, [email protected]) | Amazon AWS (2C/8Gb/100Gb)| BAKMjJL7xeRjUt1za/Ax8pKIb9T66tSJWxW3QfTmOSY= | enode://d0f067fdf960ee637037b1a8dbfe8cabfce64a1fed87b3dcb8c2bab834f1f56e398e30dc10692e82b60e665d3870c18308abff1e03adc3ad24024a272275b8d3@35.176.34.215:21000?discport=0 |
  1. Once done, press Commit changes button like before.
  2. Go to the Pull request tab and press on New Pull Request button. Verify on the left you see alastria\alastria-node repository and your_user/alastria-node on the right side.
  3. Use Create pull request button to send the pull request to alastria-node so the platform team can accept it and add your node to the network.

Comparing Changes

If you have made a pull request and don't get any peers

Case 1

Even if the Pull request is accepted, this does not mean the node is updated, so you should verify you're alastria-node app is in the last version.

You can use update.sh script to do so.

Case 2

If this is the case, check UPD 21000 port is active on your node and opened in your firewall.

You can check from outside your network (phone tethering for example) with the following command

sudo map -sT -sU -Pn -p 21000 YOUR_IP

Case 3

If previous checks fail and you still don't get synchronized, verify that the enode running on your host is the same you've published on your pull request. You can get your enode with:

$ geth attach ~/alastria/data/geth.ipc
> admin.nodeInfo

Case 4

In case the IP public address from your node is not the same that init.sh auto detects, you've to make a new Pull request modifying the directory and .json permissioned and constellation files.

Node network_id does not match nomenclature

In case the NETWORK_ID is changed, it's only necessary to stop the node, update the repository and start again the services.

$ cd ~/alastria-node/scripts
$ git pull
$ ./update.sh

Update from branch change (network is changed)

If an old branch is being used on the node to keep it running, it would be like doing a new fresh install. A new rule has been defined for node nomenclature and looks like this: TYPE_COMPANY_NET_CORES_RAM_SEQ

  • Type: VAL | REG.
  • Company: Your company name.
  • NET: TestNet | DevNet | MainNet.
  • Cores: Number of cores the node has.
  • RAM: Ram memory in GB on the node.
  • SEQ: Sequential starting at 00.

The process would be:

$ rm -Rf alastria-node
$ pkill -f monitor
$ pkill -f bee
$ pkill -f constellation-node
$ pkill -f geth
$ rm ~/alastria/logs/*.log
$ rm -Rf ~/alastria/workspace
$ git clone https://github.com/alastria/alastria-node
$ cd alastria-node
$ git checkout develop
$ cd scripts
$ sudo -H ./bootstrap.sh
$ ./init.sh backup general YOUR_ACTUAL_ID
$ ./update.sh
$ ./monitor.sh update
$ ./monitor.sh start

Too many open files

We've identified that sometimes, nodes stop synchronizing between them and logs show an error.

ERROR[05-04|08:51:10] parsePermissionedNodes: Failed to access nodes err="open /home/ubuntu/alastria/data/permissioned-nodes.json: too many open files"

If you experience this issue, please follow these steps taken from 'Ubuntu 16 - how to increase maximum file open limit ( ulimit -n )' tutorial, which says:

$ sudo nano /etc/sysctl.conf

Add at the end of the file:

fs.file-max = 131072

Execute:

sudo sysctl -p

Edit:

sudo nano /etc/security/limits.conf

Add the following at the end of the file:

* soft     nproc          131072    
* hard     nproc          131072   
* soft     nofile         131072   
* hard     nofile         131072
root soft     nproc          131072    
root hard     nproc          131072   
root soft     nofile         131072   
root hard     nofile         131072

Edit:

sudo nano /etc/pam.d/common-session

Add:

session required pam_limits.so

Restart server.

Create a swap file

During the transactions executions, Quorum makes very high memory reservations on the node, and we've detected that sometimes this produces a Panic error leaving the node out of order.

To avoid these problems, you can create a swap file to help the application survive. The following is an example of how to create a swapfile.

$ sudo fallocate -l 1G /mnt/1GB.swap
$ sudo dd if=/dev/zero of=/mnt/1GB.swap bs=1024 count=1048576
$ sudo mkswap /mnt/1GB.swap
$ sudo swapon /mnt/1GB.swap
$ sudo nano /etc/fstab

Add at the end of fstab:

/mnt/1GB.swap  none  swap  sw 0  0

Edit:

$ sudo nano /etc/sysctl.conf

Add at the end:

vm.swappiness=10

Last thing:

$ sudo chmod 600 /mnt/1GB.swap

Error Workarounds

  • An error appears "Blockchain not empty, fast sync disabled" in Quorum log at node start.

Quorum is started with the script ./start.sh con --fast-sync. This error appears when the node tries to start and it's not synchronized and the blockchain is not empty. In this case, you can't use --fast-sync mode and need to use --full mode to start. This makes the app to start slowly and spend a few minutes to be completely up and accessible via RPC for it's use.Issue #63

Update Geth binary version

$ cd ~/alastria-node/scripts
$ pkill -f geth
$ pkill -f monitor
$ pkill -f bee
$ cd ~/
$ wget https://github.com/alastria/quorum/releases/download/v2.2.0-0.Alastria_EthNetstats_IBFT/geth
$ chmod +x geth
$ sudo mv geth /usr/local/bin/geth
$ cd ~/alastria-node/scripts
$ ./update.sh