How to create a configuration file for mining SCDO

SCDO
3 min readJun 5, 2024

--

Create a configuration file

In the previous article we have demonstrated how to create a SCDO account. You have one more step to do before starting officially mining a SCDO node, which is to create a configuration file.

We will start from a configuration template and explain each of its sections. Then users can edit the template file to create configuration files of their own.

By Slowlifetrader

A configuration file template

Copy

{
"basic": {
"name": "scdo node1",
"version": "1.0",
"dataDir": "Snode1",
"address": "0.0.0.0:8027",
"coinbase": "1S01cf0b32593068f2ace7c472d5f127d3422d3b61",
"algorithm": "zpow"
},
"p2p": {
"privateKey": "0xf65e40c6809643b25ce4df33153da2f3338876f181f83d2281c6ac4a987b1479",
"staticNodes": [
"74.208.207.184:8057",
"74.208.207.184:8058",
"74.208.207.184:8059",
"74.208.207.184:8056",
"74.208.136.152:8056",
"74.208.136.152:8057",
"74.208.136.152:8058",
"74.208.136.152:8059"
],
"address": "0.0.0.0:8057",
"networkID": "scdo"
},
"log": {
"isDebug": false,
"printLog": true
},
"httpServer": {
"address": "0.0.0.0:8037",
"crossorigins": [
"*"
],
"whiteHost": [
"*"
]
},
"wsserver": {
"address": "0.0.0.0:8047",
"crossorigins": [
"*"
]
},
"ipcconfig": {
"name": "scdo1.ipc"
},
"metrics": {
"address": "0.0.0.0:8087",
"duration": 10,
"database": "influxdb",
"username": "test",
"password": "test123"
},
"genesis": {
"difficult": 1900000,
"shard": 1,
"timestamp": 1596942480
}
}

Explanation of the configuration template file

basic section

Copy

"basic": {
"name": "scdo node1",
"version": "1.0",
"dataDir": "Snode1",
"address": "0.0.0.0:8027",
"coinbase": "1S01cf0b32593068f2ace7c472d5f127d3422d3b61",
"algorithm": "zpow"
}

“name”: the name of the node, just for your information. This name indicates which shard the node belongs to.

“version”: The version number of SCDO release. It is the version number of node you are running.

“dataDir”: The directory for storing the data produced by the node, such as blockchain data, the network connection data file, etc. One can use the same as the “name” string.

“address”: ip address and port number — your local ip address and the port number to the mining node. This information will be used when executing the “client” command. For a mining node in shard 1, the port number is set to 8027 (actually it can be any port number as long as there is no conflict)

“coinbase”: The address of your account. Please refer to the section Create an account to create it.

“algorithm”: “zpow” — no change is needed.

p2p section

Copy

"p2p": {
"privateKey": "0xf65e40c6809643b25ce4df33153da2f3338876f181f83d2281c6ac4a987b1479",
"staticNodes": [
"74.208.207.184:8057",
"74.208.207.184:8058",
"74.208.207.184:8059",
"74.208.207.184:8056",
"74.208.136.152:8056", "74.208.136.152:8057",
"74.208.136.152:8058",
"74.208.136.152:8059"
],
"address": "0.0.0.0:8057",
"networkID": "scdo"
},

The “privatekey”: It is a unique network identifier for your running node. You need to create one to replace the one in the example. It is created by command “./client key “, also see Create an account. you can use the private key in the output of the command to replace the privateKey and cast the account string away. This private key has nothing to do with your account private key.

“staticNodes”: These ip addresses are the starting nodes that your mining node tries to connect. In general, you do not need to replace them from the templates (you may add more later). The port numbers: 8057 is for shard 1, 8058 shard 2, 8059 shard 3, 8056 shard 4. These static nodes are usually managed by the SCDO project team. And they are for data synchronization of the SCDO blockchain.

“address”: the local ip address and port number of your node. If you mine in shard 1, the port number shall be 8057, etc. If other mining nodes want to connect your node, that is the port number to be used.

“networkID”: This is the id of the SCDO network. No modification is needed, otherwise it will prevent your mining node from joining the SCDO network.

The other sections

No changes are needed.

After editing the configuration template, you can save it to a file in json format, example node1_1.json (or any name can work as long as you know for which shard).

In the next article, we will show you how to run the SCDO mining node and check the connections to the SCDO network.

Follow us: https://x.com/scdolab

--

--

SCDO

SCDO is a Depin public chain based on the ZPoW algorithm. It pays tribute to Sotoshi's POW spirit of fairness. It also uses four-sharding technology.