SCDO wiki
Search
K

Mining

Getting Started with Mining

Overview

The SCDO mainnet consists of four shards and has a PoW consensus algorithm. Each shard acts like a single blockchain. While users can send transactions within a shard or between two different shards, a mining node (which is a piece of executable) can only mine in one shard. In order to mine SCDO tokens, you need an executable, named node, and a configuration file in json format. The configuration file has two key elements: coinbase - an address to receive tokens of reward, and a unique privateKey for the SCDO p2p network connection. In the next few sections, we will illustrate how to create a pair of address and private key, a p2p privateKey, and a configuration file. Once created, you are ready to mine SCDO.
For a complete guide of mining, please go to A complete guide

Download

Download the newest executables and configuration templates . The extracted directory has the following structure:
mac/linux/windows
├── node1.json //shard1 config template
├── node2.json //shard2 config template
├── node3.json //shard3 config template
├── node4.json //shard4 config template
└── build
├── client //client executable for getting info
├── discovery
├── light
├── node //node executable for running a SCDO network node
├── tool
└── vm
Our focus in the next section is on how to edit the json configuration template to create a configuration file. This file is necessary for running a mining node. We use a linux environment, and shard 1, node1.json configuration template for our illustration (Mac/windows command prompt execution is very similar) .
Let $PATH_TO_NODE_CLIENT denote the path to the directory where these template files and the executables "node" and "client" are.

Creating a configuration file

Open the configuration template node1.json in a text editor. The content is or similar to:
"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
}
}
For the time being, we only need to replace the coinbase in the basic section and the privateKey in the p2p section in order to create a configuration file.
To generate them, execute the following command:
$ $PATH_TO_NODE_CLIENT/client key --shard 1
The output is:
Account: 1S0113339046e140620a05ab98abdfadedbbd88191
Private key: 0x75b032e8c53aea77288d46a7e2b508292d4b41a2b4f8ef265220535bb0012c45
Use 1S0113339046e140620a05ab98abdfadedbbd99191 to replace the coinbase in the basic section. Please store the private key in a safe place. You will need the private key when you make a transaction later.
Then execute the same command again:
$ $PATH_TO_NODE_CLIENT/client key --shard 1
The output is:
Account: 1S018274d26bea7144a3d235620bc2ac6094e4f9d1
Private key: 0x442603781c5ea6993aa880cd991fefb167bc4fe9e68c25d9e7148b9872f07d5b
Use 0x442603781c5ea6993aa880cd991fefb167bc4fe9e68c25d9e7148b9872f07d5b to replace the privateKey in the p2p section. Discard the account string 1S018274d26bea7144a3d235620bc2ac6094e4f9d1.
Now we have:
"basic": {
"name": "scdo node1",
"version": "1.0",
"dataDir": "Snode1",
"address": "0.0.0.0:8027",
"coinbase": "1S0113339046e140620a05ab98abdfadedbbd88191",
"algorithm": "zpow"
},
"p2p": {
"privateKey": "0x442603781c5ea6993aa880cd991fefb167bc4fe9e68c25d9e7148b9872f07d5b",
"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
}
}
Save the file as node1_1.json or a different name as you like in json format. For simplicity, let‘s save it in the $PATH_TO_NODE_CLIENT directory.
Note: each execution of ./client key --shard # gives you a different outcome.
You can create the configuration file for mining other shards in a similar way. For more detailed instructions go to Create configuration file

Run a miner

Before running a mining node, your computer has to be connected to the internet.
Execute the command:
$ $PATH_TO_NODE_CLIENT/node start -c $PATH_TO_NODE_CLIENT/node1_1.json --threads 8
After the node is up and running, logs will be printed out on your computer screen.
Note: the number 8 means that there are 8 threads to do mining in parallel. A user can change the number based on his machine. For example if his machine's CPU has 16 cores, then the number may be 16 or larger.
When the node is up and running and has connected to the SCDO network, it may take a couple of hours to synchronize its data with SCDO network. After the data of the node is in sync with that of the SCDO network, the node will start to mine blocks and compete with other nodes in SCDO network.

Check connection to SCDO network

After your node is up and running, you may want to check if the node is connected to the SCDO network in order to win SCDO tokens. The following command will do that:
$ $PATH_TO_NODE_CLIENT/client getinfo --address ip:port
The string after "- -address" indicates the ip and port of the node. In this example, you can use "- -address 0.0.0.0:8027". The default ports are 8027 for shard 1, 8028 for shard 2, 8029 for shard 3 and 8026 for shard 4. Since the node is mining in shard 1, the following lines are the output message. If "PeerCnt" is not zero, then the node is connected to the SCDO network. The (3 3 1 3) indicates how many nodes from the SCDO network in each shard are connected to your mining node. For example, there are 3 nodes in shard 1,1 node in shard 3, etc, connected to your node.
{
"BlockAge": 23,
"Coinbase": "1S011c9dab11f953875fafc374a641bdaf58488771",
"CurrentBlockHeight": 3339035,
"HeaderHash": "0x53edbf3f80e3ffeefcb28cf6070939df7ea46926e94502f5e60a96e7459790b0",
"MinerStatus": "Running",
"PeerCnt": "10 (3 3 1 3)",
"Shard": 1,
"Version": "Scdo_V1.0.0"
}
After the mining node has connected to at least one other node in the same shard, the synchronization of the SCDO network/blockchain data will start. It may take a couple of hours dependent on your internet connection speed to complete the sync. After this the real mining will start. You will understand it when you see the output messages from the running node.
Later we will show the option of running a node just for data synchronization.

Check account balance

After your mining node has been up for a period of time, you want to check that if any SCDO tokens (named SCDO) have been awarded to your account. In this section, we explain how to check the account balance.
The the hex format string after "coinbase:" in the configuration file is the address of your mining account. In our example, it is 1S0113339046e140620a05ab98abdfadedbbd88191.
Execute the following command:
$ $PATH_TO_NODE_CLIENT/client getbalance --account 1S0113339046e140620a05ab98abdfadedbbd88191 --address 0.0.0.0:8027
The output will be like:
{
"Account": "1S0113339046e140620a05ab98abdfadedbbd88191",
"Balance": 400000000
}
The actual balance may be different. Note: The balance unit is Wen. 100,000,000 Wen = 1 SCDO. So 400,000,000 Wen = 4 SCDO in the above output.

A Complete Guide of Mining

A basic introduction of SCDO network and mining

The SCDO network is a peer-to-peer (p2p) network, and the network nodes are partitioned into 4 shards. The SCDO blockchain has a PoW consensus algorithm named ZPoW, which is based on random matrix generation and determinant computation. ZPoW is CPU friendly. From the testing results of ZPoW, we do not observe any advantage from GPU/ASIC chips. So any one with a computer can mine the SCDO blockchain. The rewarding token is named SCDO. The minimum unit of SCDO is WEN, and 1 SCDO =100,000,000 WENS.
For a mining node in shard n: it keeps one local chain and 3 light chains for storing information or data. The local chain stores all transactions which involve accounts in the shard. Each light chain stores the hashes of blocks in a related local chain. For example, if the mining node is in shard 1, then it has a local chain to store all blocks of transactions from and to the accounts in shard 1. It uses a light chain for each of other 3 shards. For example, the light chain 2 stores all block hashes from the local chain of shard 2, etc. With the local chain and the light chains, the SCDO blockchain can work correctly.
Since the SCDO network nodes are partitioned into 4 shards, so are the accounts. An account has a unique pair of address and private key. The address is used for holding the balance and the private key is used for signing off out-bounded transactions.
In order to mine SCDO, one needs to create an account (or several).
A mining node can only mine in one shard when it is running and is configured by the json configuration file.
To summarize the above, in order to run a mining node, one needs
  1. 1.
    An account (a pair of address and private key),
  2. 2.
    A configuration file.
Again, all illustrations in the following are in a linux/unix environment. We assume that readers have a basic understanding about the operating system. The executions of commands in MAC, Windows are very similar to linux/unix.

Download the executables

Download the newest [executables and configuration templates] . The extracted directory has the following structure:
mac/linux/windows
├── node1.json //shard1 config template
├── node2.json //shard2 config template
├── node3.json //shard3 config template
├── node4.json //shard4 config template
└── build
├── client //client executable for getting info
├── discovery
├── light
├── node //node executable for running a node
├── tool
└── vm
For mining, one only needs the executables of node and client, and creates his own configuration files from these templates. If one mines in shard 1, please use node1.json as a template. Use node2.json for shard 2, node3.json for shard 3, etc.

Dowload SCDO project source codes and compile

You may want to build the executables by yourself from the source codes. Here it is. Download the source codes from https://github.com/scdoproject and follow the instructions in README.md or go to Compile node section.
The configuration file templates shall be in the project source code directory $PROJECTRDIR/scdoproject/go-scdo/cmd/node/config where $PROJECTRDIR is the path to scdoproject in your local machine.

Create an account

An account is identified by a unique pair of address and private key. The first 4 characters of the address indicate which shard the account belongs to.
Let's assume that we are already in the directory which contains the executable node and client.
By executing the command,
$ ./client key --shard [option shard number]
The option can be any of 1,2,3,4.
For example, execute the following:
$ ./client key --shard 1
the output is like,
Account: 1S014f574f8b5749eff6d24f18640d820327c5daf1
Private key:0x1c18aaa42429e903aa4aba753e500e3e0061f7dbca6d1a2c6499b2226b72a0ec
Note the address is also labeled as "Account" in the output. The first 4 chars indicates which shard the account belongs to.
Note: each run of the same command line will produce a different outcome.
$ ./client key --shard 2
The output is
Account: 2S0215ac0412394ec2fa4215b72602a70724bf9b11
Private key: 0x4e19191ed142c5fb9af0425b16399a09e35ef1e913d68e4fd1cbbb538de74d7d
One can create in any shard as many accounts as he wants.
In general, an address and a private key has one-to-one correspondence. Since there are 4 shards, SCDO let you use only one private key to control four different accounts/addresses, one for each shard. Here is how:
Executing the command without shard option will always give a pair of address and private key in shard 1 :
./client key
The output is
Account: 1S01f18fd1317001c81d9cb8346521cdd9f486bb41
Private key: 0xa94c7bb78579585a8b1d3346034fc124ace2e79ba80c3107fbb3d72be86dcb8f
One may be already note that the first 4 chars in the Account string indicate which shard the account belongs to.
If one edits the account string in the output:
1S01f18fd1317001c81d9cb8346521cdd9f486bb41
to create the following
2S02f18fd1317001c81d9cb8346521cdd9f486bb41
3S03f18fd1317001c81d9cb8346521cdd9f486bb41
4S04f18fd1317001c81d9cb8346521cdd9f486bb41
then there will be four different pairs:
Account: 1S01f18fd1317001c81d9cb8346521cdd9f486bb41
Private key: 0xa94c7bb78579585a8b1d3346034fc124ace2e79ba80c3107fbb3d72be86dcb8f
Account:2S02f18fd1317001c81d9cb8346521cdd9f486bb41
Private key: 0xa94c7bb78579585a8b1d3346034fc124ace2e79ba80c3107fbb3d72be86dcb8f
Account: 3S03f18fd1317001c81d9cb8346521cdd9f486bb41
Private key: 0xa94c7bb78579585a8b1d3346034fc124ace2e79ba80c3107fbb3d72be86dcb8f
Account: 4S04f18fd1317001c81d9cb8346521cdd9f486bb41
Private key: 0xa94c7bb78579585a8b1d3346034fc124ace2e79ba80c3107fbb3d72be86dcb8f
These are all valid accounts in SCDO and with the same private key 0xa94c7bb78579585a8b1d3346034fc124ace2e79ba80c3107fbb3d72be86dcb8f. However we prefer to generate an account by executing the command line one by one.
$ ./client key --shard [option]
Now you know how to generate a pair of public and private keys. Let's move on to the next.

Create a configuration file

A configuration file is a must in order to start a mining node. 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.

A configuration file template

{
"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
"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
"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).

Run mining node

Execute the following command
$ ./node start -c [the configuration file] --threads [number]
For example, using the configuration file we created earlier, the command will be:
$ ./node start -c ./node1_1.json --threads 10
If this is your first time executing the command, it may take a few hours to synchronize all data, you will be better off if using the following option:
$ ./node start -c ./node1_1.json --threads 10 -m stop
This will speed up the synchronization of data.
You will see the logs line by line on your screen. These are information messages which you can "pipe" and save to a file. It shall start to synchronize the data with the SCDO network shortly if the connections of your node to the SCDO network are established.

Check connections to SCDO network

After your mining node is up and running, in order to have a chance to win some reward tokens, the node has to be connected to the SCDO network. In addition, it shall have connections to nodes in each shard in order to maintain robust connections to the network.
For getting the general connection information, use
$ ./client getinfo [--address ip:port]
The string after "- -address" indicates the ip and port of the node. In this example, you can skip it because the default value is 0.0.0.0:8027 (for shard 1). The outcome will be like
{
"BlockAge": 23,
"Coinbase": "1S011c9dab11f953875fafc374a641bdaf58488771",
"CurrentBlockHeight": 3339035,
"HeaderHash": "0x53edbf3f80e3ffeefcb28cf6070939df7ea46926e94502f5e60a96e7459790b0",
"MinerStatus": "Running",
"PeerCnt": "10 (3 3 1 3)",
"Shard": 1,
"Version": "Scdo_V1.0.0"
}
"BlockAge": 23 indicates the age of the most recent block in the shard mined.
"Coinbase": "1S011c9dab11f953875fafc374a641bdaf58488771", your mining address.
"CurrentBlockHeight": 3339035, the height of the most recent block.
"HeaderHash": "0x53edbf3f80e3ffeefcb28cf6070939df7ea46926e94502f5e60a96e7459790b0", the hash of the header of the most recent block of the shard, which is shard 1 in our example.
"MinerStatus": "Running", the status of the miner.
"PeerCnt": "10 (3 3 1 3)", indicates the total peers connected are 10, 3 in shard 1, shard 2, and shard 4 respectively, and 1 in shard 3. If you see no zero, that is good!
"Shard": 1, mining is in shard 1.
If you want to learn more about the connections, please execute the following:
$ ./client p2p peersinfo [--address ip:port]
The outcome will be similar to the following:
[
{
"caps": [
"lightScdo_3/1",
"lightScdo_4/1",
"scdo/1",
"lightScdo_1/1",
"lightScdo_2/1"
],
"id": "1S01759e0cbd1b801508924e90e35dc9c70bd601e1",
"network": {
"localAddress": "192.168.1.38:44056",
"remoteAddress": "74.208.207.184:8057"
},
"protocols": {
"lightScdo_1": "handshake",
"lightScdo_2": "handshake",
"lightScdo_3": "handshake",
"lightScdo_4": "handshake",
"scdo": {
"difficulty": 1696077961295,
"head": "f7b699259bca687a4760d96e8ea08a4ccf607bbdc99cd4432aaf1f534a60e471",
"version": 1
}
},
"shard": 1
},
{
"caps": [
"lightScdo_4/1",
"scdo/1",
"lightScdo_1/1",
"lightScdo_2/1",
"lightScdo_3/1"
],
"id": "2S024fdf4e2f59eb5fc16837c8419d971e17f99551",
"network": {
"localAddress": "192.168.1.38:47118",
"remoteAddress": "74.208.136.152:8058"
},
"protocols": {
"lightScdo_1": {
"difficulty": 1687915773901,
"head": "5128f82743db7b3d9dc9a45cb4ff717fa3dae9c796f65daa83c28da41fd6f14b",
"version": 1
},
"lightScdo_2": {
"difficulty": 1714829896315,
"head": "be33c8405a2f49eaf3e144f514b68be0e7c4924448404429cb0e966e803ab560",
"version": 1
},
"lightScdo_3": "handshake",
"lightScdo_4": "handshake",
"scdo": {
"difficulty": 1714829896315,
"head": "be33c8405a2f49eaf3e144f514b68be0e7c4924448404429cb0e966e803ab560",
"version": 1
}
},
"shard": 2
},
{
"caps": [
"lightScdo_1/1",
"lightScdo_2/1",
"lightScdo_3/1",
"lightScdo_4/1",
"scdo/1"
],
"id": "2S02b486bcfdc07ea6417225721dbfe0246325c7a1",
"network": {
"localAddress": "192.168.1.38:57300",
"remoteAddress": "74.208.207.184:8058"
},
"protocols": {
"lightScdo_1": {
"difficulty": 1687784917421,
"head": "6ddd3de03021a3aecbdd3dbd286d743d394b0d6a20f15dbc7c32b0699edd46ba",
"version": 1
},
"lightScdo_2": {
"difficulty": 1714824520587,
"head": "fe904ca61847dad5182e8b6dc95303db5b33b84048d47528b44aa0a32911af79",
"version": 1
},
"lightScdo_3": "handshake",
"lightScdo_4": "handshake",
"scdo": {
"difficulty": 1714824520587,
"head": "fe904ca61847dad5182e8b6dc95303db5b33b84048d47528b44aa0a32911af79",
"version": 1
}
},
"shard": 2
},
{
"caps": [
"lightScdo_2/1",
"lightScdo_3/1",
"lightScdo_4/1",
"scdo/1",
"lightScdo_1/1"
],
"id": "2S02d83dc671800300f80546b8cacd266bca9cab41",
"network": {
"localAddress": "192.168.1.38:47876",
"remoteAddress": "109.228.36.218:8058"
},
"protocols": {
"lightScdo_1": {
"difficulty": 1687759712020,
"head": "8d1fca279d826d85eba52a9f38fdac73390aa549853451a489b2729734bb0369",
"version": 1
},
"lightScdo_2": {
"difficulty": 1714829896315,
"head": "be33c8405a2f49eaf3e144f514b68be0e7c4924448404429cb0e966e803ab560",
"version": 1
},
"lightScdo_3": "handshake",
"lightScdo_4": "handshake",
"scdo": {
"difficulty": 1714829896315,
"head": "be33c8405a2f49eaf3e144f514b68be0e7c4924448404429cb0e966e803ab560",
"version": 1
}
},
"shard": 2
},
{
"caps": [
"lightScdo_4/1",
"scdo/1",
"lightScdo_1/1",
"lightScdo_2/1",
"lightScdo_3/1"
],
"id": "3S03c3fe4ba31da9246c065c4e15a93e9ae71c67b1",
"network": {
"localAddress": "192.168.1.38:41990",
"remoteAddress": "74.208.207.184:8059"
},
"protocols": {
"lightScdo_1": {
"difficulty": 1687794976919,
"head": "16f4a62b766dd6c1b6ba9324993d2f6b883fb4e21e57da117955ee8ed98ee5fc",
"version": 1
},
"lightScdo_2": "handshake",
"lightScdo_3": {
"difficulty": 1701944364685,
"head": "1399e67ef78aa19d3a4ffa99784fc276675d9906e8a837f29ae2bd4b520fe4a1",
"version": 1
},
"lightScdo_4": "handshake",
"scdo": {
"difficulty": 1701944364685,
"head": "1399e67ef78aa19d3a4ffa99784fc276675d9906e8a837f29ae2bd4b520fe4a1",
"version": 1
}
},
"shard": 3
},
{
"caps": [
"lightScdo_1/1",
"lightScdo_2/1",
"lightScdo_3/1",
"lightScdo_4/1",
"scdo/1"
],
"id": "4S04f17b6fc55cc58017aad9c5b33abeee5b1dbb41",
"network": {
"localAddress": "192.168.1.38:42890",
"remoteAddress": "104.254.244.44:8056"
},
"protocols": {
"lightScdo_1": {
"difficulty": 1685204026183,
"head": "c704b010291d3a2c25ebfe8f7123c088a177feed77c7d55c06a78d02bc62ca3d",
"version": 1
},
"lightScdo_2": "handshake",
"lightScdo_3": "handshake",
"lightScdo_4": {
"difficulty": 1704245912720,
"head": "0017ced433cb1fa47045110f7fffca291291c33b0e842057f4fc2cbc33e42c83",
"version": 1
},
"scdo": {
"difficulty": 1704245912720,
"head": "0017ced433cb1fa47045110f7fffca291291c33b0e842057f4fc2cbc33e42c83",
"version": 1
}
},
"shard": 4
}
]
In the above illustration, the mining node is in shard 1. Let's try to understand the messages. The outcome consists of multiple sections of the same data structure as
{
"caps": [
"lightScdo_3/1",
"lightScdo_4/1",
"scdo/1",
"lightScdo_1/1",
"lightScdo_2/1"
],
"id": "1S01759e0cbd1b801508924e90e35dc9c70bd601e1",
"network": {
"localAddress": "192.168.1.38:44056",
"remoteAddress": "74.208.207.184:8057"
},
"protocols": {
"lightScdo_1": "handshake",
"lightScdo_2": "handshake",
"lightScdo_3": "handshake",
"lightScdo_4": "handshake",
"scdo": {
"difficulty": 1696077961295,
"head": "f7b699259bca687a4760d96e8ea08a4ccf607bbdc99cd4432aaf1f534a60e471",
"version": 1
}
},
"shard": 1
},
The above tells that the connected remote node belongs to shard 1 which has the IP address "74.208.207.184:8057". You can ignore the other part of the message for now.
The following section tells that the connected remote node belongs to shard 4.
{
"caps": [
"lightScdo_1/1",
"lightScdo_2/1",
"lightScdo_3/1",
"lightScdo_4/1",
"scdo/1"
],
"id": "4S04f17b6fc55cc58017aad9c5b33abeee5b1dbb41",
"network": {
"localAddress": "192.168.1.38:42890",
"remoteAddress": "104.254.244.44:8056"
},
"protocols": {
"lightScdo_1": {
"difficulty": 1685204026183,
"head": "c704b010291d3a2c25ebfe8f7123c088a177feed77c7d55c06a78d02bc62ca3d",
"version": 1
},
"lightScdo_2": "handshake",
"lightScdo_3": "handshake",
"lightScdo_4": {
"difficulty": 1704245912720,
"head": "0017ced433cb1fa47045110f7fffca291291c33b0e842057f4fc2cbc33e42c83",
"version": 1
},
"scdo": {
"difficulty": 1704245912720,
"head": "0017ced433cb1fa47045110f7fffca291291c33b0e842057f4fc2cbc33e42c83",
"version": 1
}
},
"shard": 4
}
The other similar sections have similar meanings.

Check your balance

Even if your mining node is fully connected to the SCDO network, winning some rewards is not a sure thing. The number of SCDO that you win will depend on your machine's computing power. For example, an Intel i5 processor will be slower than an i9 most likely.
This is the command you execute to check the balance:
$ ./client getbalance --account 1S01cf0b32593068f2ace7c472d5f127d3422d3b61 --address 0.0.0.0:8027
you will see the balance from the outcome.
Note:
1S01cf0b32593068f2ace7c472d5f127d3422d3b61 -- this shall be replaced by the coinbase in your configuration file
0.0.0.0:8027 -- this is the default ip address for your mining node in shard 1. It can be replaced by a static node's ip address in shard 1, you will get the same result if your local node is in sync with the static node.

Compile Node

First you need to install git, gcc, go (linux/mac/windows) packages on your machine.
git version 2.17.1 or newer.
gcc version 7.3.0 or newer.
go version 1.12.7 (this has to be the exact version due to some linked libraries being used)
create the path go/src/github.com/scdoproject in the home directory

Download go-scdo

~$ cd
~$ cd go/src/github.com/scdoproject
~$ git clone https://github.com/scdoproject/go-scdo.git
Cloning into 'go-scdo'...
remote: Enumerating objects: 53, done.
remote: Counting objects: 100% (53/53), done.
remote: Compressing objects: 100% (48/48), done.
remote: Total 10032 (delta 13), reused 15 (delta 4), pack-reused 9979
Receiving objects: 100% (10032/10032), 12.25 MiB | 18.45 MiB/s, done.
Resolving deltas: 100% (5804/5804), done.

Compile go-scdo:

The following is for linux/mac
~$ cd go-scdo
~$ make all
go build -o ./build/discovery ./cmd/discovery
Done discovery building
go build -o ./build/node ./cmd/node
Done node building
go build -o ./build/client ./cmd/client
Done full node client building
go build -o ./build/light ./cmd/client/light
Done light node client building
go build -o ./build/tool ./cmd/tool
Done tool building
go build -o ./build/vm ./cmd/vm
Done vm building
All executables shall be in ./build
For Windows, instead of "make all", execute "buildall.bat" in a command prompt.