Break down the node architecture
Last updated
Last updated
A blockchain node is an application that allows users to participate in a blockchain network. Substrate-based blockchain nodes expose a number of capabilities:
Networking: Substrate nodes use the networking stack to allow the nodes in the network to communicate with one another.
Consensus: Blockchains must have a way to come to on the state of the network. Substrate makes it possible to supply custom consensus engines and also ships with several consensus mechanisms that have been built on top of .
RPC Server: A remote procedure call (RPC) server is used to interact with Substrate nodes.
There are several files in the node
directory. Take special note of the following:
: A is a source code file that defines a Substrate chain's initial (genesis) state. Chain specifications are useful for development and testing, and critical when architecting the launch of a production chain. Take note of the development_config
and testnet_genesis
functions. These functions are used to define the genesis state for the local development chain configuration. These functions identify some and use them to configure the blockchain's initial state.
: This file defines the node implementation. Take note of the libraries that this file imports and the names of the functions it invokes. In particular, there are references to consensus-related topics, such as the and other such as Aura for block authoring and GRANDPA for finality.