What is a Node?
This module will guide you through the complete installation and setup of your own Mavryk node on various operating systems.
In this chapter, you will also learn what a node is and its importance in a Blockchain network.
What is a node?
The node is the main actor of the Mavryk blockchain and has two main functions: running the gossip network and updating the context.
The gossip network is where all Mavryk nodes exchange blocks and operations (see the Admin Client to monitor P2P connections). On this peer-to-peer network, an operation spreads through the network and is then validated into a block.
The shell receives blocks from the gossip network and uses them to keep the current context up to date: A full state of the blockchain shared by all peers. Approximately every 15 seconds, a new block is created. When the shell receives it, it applies each operation to its current context and computes a new context.
The last block received on a chain is also called the "head" of that chain. Each new head is then advertised by the node to its peers, disseminating this information to build a consensus across the network.
Other than passively observing the network, your node can inject its own operations when instructed by the mavkit-client application, and even register as a delegate to validate new blocks with the mavkit-baker- prefix. The node can also view multiple branches of the chain that may exist concurrently due to temporary forks during consensus and select the best one based on its fitness (a score representing the chain's validity and weight) (see Liquid Proof-of-Stake chapter in Mavryk Basics module).