Stellar, a decentralized network that connects many nodes (computers that keep a common distributed ledger), is a network that allows for multiple nodes to communicate with each other. Each node communicates with the other to verify and add transactions to a shared ledger. Stellar Core uses the Stellar Consensus Protocol. It is used to maintain synchronization between nodes while they work on validating transactions as well applying them to a ledger.
Types of nodes
Stellar nodes share the same basic functionality: Stellar Core, connecting with peers, processing transactions, storing ledger state in SQL database, keeping a copy of ledger in flat XDR XDR files called Buckets, and running Stellar Core. Horizon is the Stellar API which is supported by all nodes. Beyond the basic functionality, there are two important configuration options that determine a node’s behavior. A node’s behavior can be:
- Participate at consensus for transitions validation
- Create an archive that can be accessed by other nodes so they can see the full history of the network.
These are the two main points that lead to nodes being classified into four types.
- Watcher
- Basic validator
- Full Validator
- Archiver
Horizon can be used by all types and types of nodes. However, validating transactions is the key to ensuring that transactions are published and validated.
Watcher
A Watcher tracks the ledger and submits transactions. But it isn’t configured to participate or publish an archives history. It doesn’t support the network, or increase decentralization. It is considered the lightest node. It pairs well with Horizon. A Watcher would also work well if you need to use Horizon.
Basic validator
A Basic validator offers the same benefits and operational requirements as a watcher, but has similar operational requirements. The Basic validator, however, uses a secret code and is designed to join the consensus.
Full validator
The Full validator works in the same way as the Basic validator. It also performs similar tasks, except that it publishes an archive with the ledger’s snapshots. While it is more expensive and takes longer to operate, it can help with decentralization and resilience of the network. If you need to review the history of the network’s predecessors, or if there are nodes that have been added to it temporarily, Full validators has the archive.
Horizon can also be supported by Full Validator. However, organizations that run them do not use them to query network data nor submit transactions. Watcher and Full validator are preferred by the organizations for Horizon management.
Archiver
An archiver is similar to a Full validator. However, it publishes activity of the network but not in consensus. Its use is quite limited. Archive need to be available if you need to run a Stellar-facing Stellar-facing services like blockchain explorer. An archiver is needed if you wish to referee a network. This is not common.
Environment Setup
Stellar Core is available in several ways. It can then be configured to participate at different levels in the network: watcher, basic validator or full validator. No matter how Stellar Core has been installed, it will need to connect with a peer-to_peer network and store the ledger’s state in a database. Then, connect to Horizon, the Stellar API and Stellar API.
- Calculate the requirements
Stellar Core PostgreSQL performs well on an m5.large AWS machine with dual-core Intel Xenon 2.5GHz processors and 8GB RAM. 1 TB of storage is recommended. Stellar Core will run in conjunction Horizon. Make sure the system setup can handle Horizon’s computing demands.
- Access to the network
Stellar Core connects directly to a peer–to–peer network in order to maintain the ledger in sync. It also means that the node must have specific TCP ports available to allow inbound or outbound communication.
Inbound: Stellar Core node permits all IPs connect to its peer_port over TCP. Stellar Core can have a port specified, but the default (11625), should be used.
Outbound: Stellar Core should connect to other nodes over PEER_PORT instead of TCP. Stellarbeat provides information about the PEER_PORT of other nodes.
Read More : https://www.leewayhertz.com/run-stellar-core-node/