Skip to content

About Chain Specification

Tin Chung edited this page May 5, 2024 · 1 revision

Chain Spec contains a series of configuration information, which is used by the node program to connect to the specified blockchain network, connectable boot node information, and the status of the initial block. The specific information is as follows:

  • Meta information such as the name and id of the chain;
  • The type of chain chainType, commonly used ones are Development to start a local single-node network, Local to start a local multi-node test network, and Live to be a public test network or official network;
  • Start the boot node bootNodes, that is, after the program starts, what are the initial connectable network nodes, used to obtain block information and other connectable node information;
  • Monitor the service address telemetryEndpoints. After the node is started, it will regularly send the node's own status such as CPU usage, memory consumption, current block information, etc. to this address;
  • protocolId is used to identify non-libp2p protocols used in point-to-point network transmission. The Substrate network transport layer relies on libp2p. In addition to the protocols specified by libp2p, the non-libp2p protocols specified in Substrate need to use protocolId to distinguish different blockchain networks. For more information, please refer to the document sc_network ;
  • properties can contain some optional attribute information, such as tokenSymbol representing token characters and tokenDecimals, and the front end can obtain the corresponding information for display;
  • Genesis is the initial block information, which is the collection of initial information of all available modules.