How To Build Your Own Seele Network¶
Steps to build your own seele-network¶
Refer to Getting Started With Seele to start a single node
- If you need to start one or multiple nodes to form a network,modify
the list in the staticNodes field found in the file nodes1.json under
go-seele\cmd\node\config. The format for the staticNodes address follows is of the form “ip:port”,so that to add one or more addresses, use ”staticNodes”:[“ip:port”,…],where ip address is the ip of the servers in the cluster (do not add your own machine address as it will be invalid. The addresses must be the nodes within the cluster) Refer to pic1 and pic2.
"p2p": {
"privateKey":"0xf65e40c6809643b25ce4df33153da2f3338876f181f83d2281c6ac4a987b1479",
"staticNodes": [],
"address": "0.0.0.0:8057",
"networkID": 1
}
"p2p": {
"privateKey":"0xf65e40c6809643b25ce4df33153da2f3338876f181f83d2281c6ac4a987b1479",
"staticNodes": ["ip:8057","ip1:8057"],
"address": "0.0.0.0:8057",
"networkID": 1
}
- The coinbase, privateKey, and shard are in matching pairs on each
node in the cluster. Each node’s coinbase, privateKey, and shard can
be generated by running the
go buildcommand undergithub.com\seeleteam\go-seele\cmd\client,then running.\client key --shard 1(Linux and mac) or.\client.exe key --shard 1(windows), where shard is the designated shard, This shard could be the shard of the node address or the shard of the user address. The result should look like the following:
public key: 0xf5a6264d9b50af8ea9575b06c56a8f8b890ed051
private key: 0xe5f1566a2dc7325c8a906f361864162d4f29d1c4c06af749f1fd513577c97c2d
- Enter the corresponding public key information for coinbase,enter the privateKey information for private key,and enter the shard information for the shard field
"basic":{
"name": "seele node1",
"version": "1.0",
"dataDir": "node1",
"address": "0.0.0.0:8027",
"coinbase": "0x4c10f2cd2159bb432094e3be7e17904c2b4aeb21"
},
"p2p": {
"privateKey":"0xf65e40c6809643b25ce4df33153da2f3338876f181f83d2281c6ac4a987b1479",
"staticNodes": [],
"address": "0.0.0.0:8057",
"networkID": 1
},
"genesis": {
"difficult":8000000,
"shard":1
}
When modifications are complete, the nodes will form a cluster when started(Getting Started With Seele).