Giter Site home page Giter Site logo

alejandroalffer / alastria-node Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alastria/alastria-node

0.0 0.0 0.0 5.24 MB

How to install a node in Alastria Red-T (Quorum technology) and tips to deploy and use it

Home Page: https://alastria.io/

License: Apache License 2.0

Shell 91.29% Dockerfile 8.71%

alastria-node's Introduction

ALASTRIA Red T

License Slack Status

This page contains technical information needed to work in the Alastria ecosystem on the possible different ways.

You'll need at least a host/node to interact with the network, please read the technical requirements for it.

IMPORTANT NEWS:

IF YOU HAVE ALREADY INSTALLED A NODE, PLEASE UPDATE TO THE LAST VERSION FOLLOWING (THESE INSTRUCTIONS)[https://github.com/alastria/alastria-node/blob/testnet2/UPGRADE_TO_LAST_VERSION.md]

System requirements

Operating System: Ubuntu 16.04 64 bits; Ubuntu 18.04 64 bits

Hardware:

Hardware minimum desired
CPU's: 2 4
Memory: 4 Gb 8 Gb
Hard Disk: 100 Gb 1000 Gb

Important Requirement

A DNS resolver must be available and accessible to make the installation process possible.

E.g. the command
dig +short netstats.telsius.alastria.io @resolver1.opendns.com 
must yield a valid, routable IPv4 address

TCP/UDP PORTS

You'll need to open the following ports in your firewall, inbound and outbound to deploy a node:

Port Type Definition
21000 TCP/UDP Geth process application port (inbound and outbound for ethereum traffic)
9000 TCP Constellation port (private transactions, inbound and outbound)
80 TCP Outbound for Websockets feed to netstats server
80 and 443 TCP Inbound RPC Port if using the automatic installation with Alastria Open Access Component
8086 TCP Outbound for InfluxDB statistics collection
53 TCP/UDP Access to external Internet based resolvers

IP ADDRESSES

The IP resulting out of the installation process (e.g. the IPv4 part of the enode) , must not be an RFC1918 IPv4 address

10.0.0.0/8 172.16.0.0/12 192.168.0.0/16

These IP addresses are non-routable and will result in your node being unreachable and unable to participate in the blockchain.

In case the installation process yields a non-routable IP address, you must verify if your node is behind a firewall, in which case you might use the firewall's external address only in the case the firewall provides for Full-cone NAT.

Restricted-Cone NAT has not been tested yet for p2p functionality.

Installation & configuration of

[Regular node] Quorum node + Constellation + Access point + Monitor

[Regular node] Quorum node installation using Ansible from host machine

[Validator node] Quorum node + Access point + Monitor

[Bootnode node] Quorum node

Deployment of Smart Contracts on Alastria Network

To know more about the use of Alastria Network, you can visit the Smart Contract Deployment Guides:

(IMPORTANT) Be aware that the actual's Alastria network EVM version is byzantium and , therefore, the Smart Contracts must be compiled for this EVM's versión:

  • Remix:

    EVM Version - Remix

  • Truffle: in truffle.js configuration file

    compilers: {
        solc: {
          version: "0.5.17", // A version or constraint - Ex. "^0.5.0"
          settings: {
            optimizer: {
              enabled: true,
              runs: 100   // Optimize for how many times you intend to run the code
            },
            evmVersion: "byzantium" // for T network
          }
        }
      }
  • Buidler: in buidler.config.ts configuration file

    const config: BuidlerConfig = {
      solc: {
        version: '0.5.17',
        evmVersion: 'byzantium',
        optimizer: {
          enabled: true,
          runs: 100
        }
      },

Connection from External Applications using WebSockets

Checking Node's Health

In order to check if your node is operational, you can establish monitoring based on your node's ingress and egress P2P traffic during the last 5 minutes.

As soon as the node comes up, e.g. starts to run, it will send metrics points to Alastria InfluxDB server.

These are queries to the InfluxDB API you can translate into your preferred language and/or framework:

Ingress traffic:

curl -G 'http://geth-metrics.planisys.net:8086/query?pretty=true' --data-urlencode "db=alastria" --data-urlencode "user=EDITED_USER" --data-urlencode "password=EDITED_PASSWORD" --data-urlencode "q=select mean(m1) from \"geth.p2p/InboundTraffic.meter\" where (time > now()-5m AND host =~ /^REG_YOUR_NODE_NAME$/)"

Egress traffic:

curl -G 'http://geth-metrics.planisys.net:8086/query?pretty=true' --data-urlencode "db=alastria" --data-urlencode "user=EDITED_USER" --data-urlencode "password=EDITED_PASSWORD" --data-urlencode "q=select mean(m1) from \"geth.p2p/OutboundTraffic.meter\" where (time > now()-5m AND host =~ /^REG_YOUR_NODE_NAME$/)"

The output are jsons that need to parsed and look like this (value is a pair where the second field should be > 0)

{
    "results": [
        {
            "statement_id": 0,
            "series": [
                {
                    "name": "geth.p2p/OutboundTraffic.meter",
                    "columns": [
                        "time",
                        "mean"
                    ],
                    "values": [
                        [
                            "2020-06-15T08:40:12.772770668Z",
                            1225.7697298713392
                        ]
                    ]
                }
            ]
        }
    ]
}

Alastria network resources

List of links with resources for the Alastria Network

alastria-node's People

Contributors

adlrocha avatar agathapj avatar alejandroalffer avatar amartinez-cloud avatar andresag avatar carlosho17 avatar cmoralesdiego avatar cryptobenkei avatar davidcontrerasicai avatar dlanda-tecnalia avatar esanchma avatar estebanmontenegro avatar fjmacon avatar fooock avatar go2chain avatar jabdov avatar jasonpsiemens avatar jcarovestigia avatar jhernandezgroupbme avatar jiroman1985 avatar juanluisgozalofdez avatar marcosio avatar miguel-briales avatar nachodelavega avatar netmanito avatar patofet avatar quintanilha6 avatar svel91 avatar victorns69 avatar vmunozre avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.