Public testnet has been restarted. If you have already set up and used the Public Testnet you need to:
1) Remove the folder, where you have pointed the
2) Replace the old genesis block file with the new file and run the Testnet again
Without completing these steps, the blockchain will not be able to synchronize.
The network consists of nodes, DCore daemons that interact with each other using p2p connectivity. The network has a specially configured miner nodes, which generate blocks and keep the network running. The document describes how to do the configuration. This special node is called miner node.
Public Testnet Set up¶
The Public Testnet provides a 'playground'
for the community, where anybody can test and run APIs, the
CLI Wallet and use
the DCore network in general without using any real tokens.
The public testnet is isolated from the mainnet and transactions on the testnet do not appear there.
Everything that happens on public testnet stays only on the public testnet!
Synchronize the Public Testnet Locally¶
Download the genesis block file for Public Testnet
and move it to your data folder
The daemon has the possibility to specify the directory where all blockchain
data will be stored.
To define this parameter, you can use:
For defining the location of your genesis json file you can use the parameter:
Finally, there is a need to specify the IP and port of one node of the testnet
to connect to. The address is
At the end the full startup command for running decentd in a shell should look similar to:
$ decentd --data-dir /home/my-testnet-folder/public_testnet --genesis-json /home/my-testnet-folder/genesis-public-testnet.json --seed-node testnet.dcore.io:40000
The usage of
data-dir parameter is crucial. In case you will skip it,
there will be an issue to distinguish blockchain databases.
Additionally, the code structure for initial setup is descriptive. After the
first run there will be
config.ini file created and you can directly, to
that folder, specify and save all arguments and make the list of arguments
Run the Daemon in a Shell¶
After starting your daemon with the previous command, you will have to wait for
the blockchain to synchronize. After it is up to date, you can connect the
CLI Wallet to your local daemon instance:
$ cli_wallet --wallet-file /home/my-testnet-folder/wallet-public-testnet.json
Once the wallet is running, and is connected properly to the daemon, you can setup a password and unlock it.
Then import one or more test
accounts using these
account_name : public-account-1 Private key: 5KfatbpE1zVdnHgFydT7Cg9hJmUVLN7vQXJkBbzGrNSND3uFmAa account_name : public-account-2 Private key: 5K1RA287ocAsZR36PxC7xKCwJ7jBbjrwNswznoi2DnR9uTEYWqu account_name : public-account-3 Private key: 5Hs5VxmZf3P87remYbduVU5TrsdDxyAc6gxYkU8NVP6SGtB1Lxj account_name : public-account-4 Private key: 5JnV8u1qP6J1mN9zYbcLDmcjtijJbFYMXFVURA6nqMTJcLKQkRx account_name : public-account-5 Private key: 5JaDAz6qfDwY64SuFhF5VVr98k77tZvETMx1DZEYwCj2U9H2Xb3 account_name : public-account-6 Private key: 5KNdLJzt6A5soo2RHBHbi7FksexxMGPh19gD75tfCwUKuEN2tth account_name : public-account-7 Private key: 5JFkwdzPNgxfdfpsNhhNjFZX1osT3o5NCZDGc6NQcsSkCVVGXnq account_name : public-account-8 Private key: 5JLZmqPbdicGnSGySVCVJxxDpkcbuQZEBuSfZDsPwL5KmZcwVP7 account_name : public-account-9 Private key: 5Hxwqx6JJUBYWjQNt8DomTNJ6r6YK8wDJym4CMAH1zGctFyQtzt account_name : public-account-10 Private key: 5JMpT5C75rcAmuUB81mqVBXbmL1BKea4MYwVK6voMQLvigLKfrE
After you have managed to import some accounts into the
CLI Wallet, we suggest
create your own account to use.
The pre-defined test accounts DCT amount is 10000 DCT. All the test accounts are checked on an hourly basis - when the balance falls below 50 DCT they are automatically topped up to 100 DCT. There is also max amount of DCT set to 500 DCT.
Create your own Testnet¶
We can start by running decentd simply to create directory structure, configuration file and default genesis file by running the following code.
$ decentd --data-dir /path/my-testnet-dir --create-genesis-json /path/my-testnet-dir/my-genesis.json
We need to prepare the
Set path to the genesis file
genesis-json = /path/my-testnet-dir/my-genesis.json
enable-stale-production = true.
Add miner ids, in the section
"ID of miner controlled by this node". Add 11 entries as it is the minimal required number of active miners:
miner-id = 1.4.1 miner-id = 1.4.2 ... miner-id = 1.4.10 miner-id = 1.4.11
There is configuration for private key generated by default, which we need to change as is shown below.
miner-private-key = 5JuJbrKZgAATcouJnwpaxPbHMAMDXSgUpQSfxTXzkSUufcnpTUa
The key is actually used by default generated genesis.json file, as the key of initial accounts and miner accounts. Also predefined
"decent"account has the same key.
Optional step. Set
"p2p-endpoint = 0.0.0.0:40000". Here we specify the port that the other nodes will use to connect to the seed node, which in turn will be configured as
"seed-node = 192.168.1.1:40000"for those nodes.
Genesis file lists initial accounts and miner accounts with corresponding
public keys. Feel free to customize your genesis file by your needs. You can
also use other keys, but miners' public keys have to match public key/keys
Simply run the decent daemon.
$ decentd --data-dir /path/my-testnet-dir
This greets with big title, telling that it is starting a new chain. On the successful start we see lines such as following:
“Generated block #10 with timestamp 2017-05-25T13:36:05 at ... .”
Decent daemon throws some red errors from time to time, but mostly it's temporary.
"not producing blocks because node didn’t wake up within 500ms of the slot time".
It sometimes hangs up in ntp on this initial start - if there is no progress in like minute or two kill the process and start again.
Start another node (decentd) on the network, configure
--seed-node 192.168.1.1:40000, where
192.168.1.1 is the IP address of the
host running previously configured node and 40000 is the port that seed node is
listening to. It's configured with
--p2p-endpoint parameter. Start
CLI Wallet and run the command
Serve up and Run¶
Right after the network has started we have a network with 12 accounts by default (see initial accounts field in genesis file), but only decent account has nonzero balance.