Skip to content

Latest commit

 

History

History
45 lines (25 loc) · 3.26 KB

wiki.md

File metadata and controls

45 lines (25 loc) · 3.26 KB

Wiki - overview

This section describes the underlying architecture and features of the CudosBuilders repo.

Chain architecture

Architecture and node types

Each chain starts with a initializator. It is so called root-node. This node must has a validator and this validator is created by default during the initialization of the chain. Validators are very important nodes and their IP address MUST not be disposed in a public space therefore all connections to validators MUST happen in a private network.

Once we have our root-node we can start connecting other nodes to it. Any node that is running in the chain is called full-node

In order to connect a node to the network we must expose at least one IP address of the chain. As said above, we must not expose our validators' IP addresses. That's why we MUST set 1 or more nodes that are connected to the validator in a private network and then we can safely expose these nodes' IP addresses. These type of nodes are called sentry-node. In short - sentry-node is a full-node that hide validator's existance.

Each node have a configuration parameter that makes the node a seed-node. seed-node is a regular full/sentry-node that scrapes the chain on a regular basis and stores a list of IP addresses of active nodes. When someone connects to a seed node, it respond with a list of active peers that the sender could connect it.

Ports

A node is using several ports in order to function propertly.

You are not supposed to specify these ports anywhere. They are configured in the dockerfiles. You could only need to open the ports if you are trying to run a network on a multiple machines. In this case you must open the corresponding ports on the host machines.

Here is a list of ports and their descriptions:

  • 1317: API port
  • 9090: gRPC port
  • 26656: P2P port used by transfering internal data between nodes.
  • 26657: Tendermint RPC server. Reference: https://docs.tendermint.com/master/rpc/
  • 26660: Port for prometheus monitoring

Full/Seed nodes use the following points: 26656, 26657, 26660

Sentry nodes use the following ports: 1317, 9090, 26656, 26657, 26660

Data folder

Each build-variant of a node has a data folder. All blockchain information is stored date. Deleting this folder is equivalemnt of deleting a node.

As you can see in Overview, the location of data folder is /parentDir/CudosData. Each build-variant creates a sub-folder inside. The resulting structure is like /parentDir/CudosData/{build-variant}. The exact name of the build-variant's sub-folder is defined in the corresponding .arg file.

The data folder could potencially grow in size. So if you are running a build-variant in a cloud or similar environment, where main disk storage is usually limited, make you have a symbolic link from /parentDir/CudosData/{build-variant} to a mounted volume that has >= 500GB.

In the /parentDir/CudosData/{build-variant} folder you can find tendermint.nodeid.

In the /parentDir/CudosData/{build-variant}/config folder you can find genesis.json, config.toml and app.toml.