Skip to content

BaerChain Main Network Construction

weidong edited this page Apr 9, 2020 · 2 revisions

BearChain mainnet connection

1. File preparation

  • The main network connection requires config.json and the execution file brcd, as explained below

1.1 config.json file Back Dir

  • Mainly the NodeId and IP port of the main network node to be connected, the following are the 3 nodes connected to the main network
{
  "private_key":[
  ],
  "peer_host":[
        {
            "node_id":"0a829bd8bc46e26762c9af2907f3be232af90e324a8a9d0e7a19c2136e55c66cbf6a6ac36cb0114f307c072cdb0fdbd689b96cef108bac889b4e0689b0e101dc",
            "host":"47.56.22.178:30333"
        },
        {
            "node_id":"fec6c957215ca1f59178941f0de2aaf97db22b9e6ebc702723fa649cbc48b512421ffa9b704a7ee7940017a0e26f192ddd95c49abe203d5504a3ef58fda2f9ab",
            "host":"8.208.76.101:30333"
        },
        {
            "node_id":"8ecf79f7331bd3cf490c7779172b1414401cb9dc18bf9a50c07d2c12fe3927983761fdbc2a9301067ecd148ec1a27ef2884eacb0e371dcc71657d39deb898b23",
            "host":"161.117.85.168:30333"
        }
  ]
}
  • config.json file parameter description Back Dir
private_key : Default is empty
peer_host   : Connected node
			> node_id : Connected node NodeId
			> host    : Server ip and port

1.2 brcd execution file description Back Dir

  • please check BaerChain Compilation Guide, get the brcd execution file we need

  • Now the execution file brcd and file config.json are ready to be completed (recommended to be placed in the same directory), the following starts to connect to the main network

2. Start command Back Dir

  • ./brcd --accountJson ./config.json -d ./data --db-path ./db -v 2 --listen 36550 --http_port 8119

  • Parameter Description

--accountJson : This field means to read the configuration file, "./config.json" is the path and configuration file of the configuration file
-d            : The path behind is where the chain information is saved
--db-path     : Where to save the chain data
-v            : Is the log level after startup
--listen      : It is a port for chain data transmission. If you build a multi-node connection, this port
--http_port   : The port used for the rpc interface, the command is sent to the node through this port

Clone this wiki locally