Stellar is an open-source network that connects multiple nodes. They are computers that maintain a shared distributed ledger. To validate and add transactions, the nodes communicate with one other. Stellar Core is an implementation the Stellar Consensus Protocol. It is used by nodes to keep in sync while validating transactions and applying them into the ledger.
Types of nodes
Stellar nodes have the same basic functions: Stellar Core runs, connects to peers, handles transactions, stores the ledger’s status in SQL database, and keeps a copy of it in flat XDR file called buckets. Horizon is the Stellar API that all nodes support. Two key configuration options are what determine the behavior of a node. A node can:
- Participate in consensus for transitions validity
- Publishing an archive allows other nodes to access it and view its complete history.
These are the key points that help to classify nodes into the four types of nodes:
- Watcher
- Basic validator
- Validator Full
- Archiver
Horizon is supported by all types of nodes. All types of transactions can be submitted to the network. The difference lies in validating transactions, and publishing history.
Watcher
A Watcher is responsible for keeping track of the ledger, submitting transactions and registering them. It is not able to validate transactions or create an archived history. A watcher is not able to contribute to the network or improve decentralization. It is the most lightweight node. A Watcher can pair well with Horizon. If the requirement is for Horizon only, a watcher would be the right option.
Basic validator
A Basic validator provides the same operational requirements as a Watcher and has similar advantages. The basic validator is equipped with a secret key, and can participate in the consensus.
Full Validator
The Full validator is similar to the Basic validator. However, it performs all the same tasks but publishes a history archive that contains the ledger’s snapshots. It is expensive to operate and can be difficult to maintain, but it provides support for the network’s resilience. For a complete history of the network, you can check the archives maintained by Full validators.
Horizon can be supported by Full validator, but organizations that manage them don’t use them to query the network or submit transactions. Watcher is preferred by organizations to manage Horizon.
Archiver
A Full validator is an archiver that publishes network activities but does not take part in consensus. Its utility is very limited. Archives are necessary to support a Stellar-facing Stellar service, such as blockchain explorer. You can referee the network using an archiver, but this is unlikely.
Environment set up
Stellar core can be installed in many ways. You can configure it to join the network at different levels. Watcher, Basic Validator, or Full Validator. No matter how Stellar Core is installed it is essential to connect to a peer–to–peer network, to store the ledger’s status in the database and to connect to the Stellar API, Horizon.
- Calculate your requirements
Stellar Core PostgreSQL is well-suited for an m5.large AWS server with dual-core Intel Xenon processors and 8GB RAM. Storage-wise, 1TB of storage space is recommended. Stellar Core must be run in conjunction to Horizon. Make sure that your system is equipped for Horizon’s computing requirements.
- Network access
Stellar Core connects via peer-to-peer networks to keep the ledger synchronized. It is necessary that each node has specific TCP ports open for outbound and inbound communication.
Inbound: Stellar Core’s node allows IPs to connect over TCP to its PEER_PORT. Stellar Core allows you to specify a port while configuring it, but the default (11625), will be used most of the time.
Outbound: Stellar Core will need to connect with other nodes via PEER_PORT and TCP. Stellarbeat has information on other PEER_PORT nodes.
Read More : https://www.leewayhertz.com/run-stellar-core-node/