How To

Via DECENT GO service

DECENT GO service offers free signup by entering email and password. Fee is paid by Master Account owned by DECENT Foundation (this serves as a network protection). GO Master account gets DCTs from the Foundation account . Fee is 0,005 DCT per account and fees are going back to network pool. During registration process, user has to accept the Privacy policy & Terms of use and he/she needs to confirm an email address by opening unique link which arrives in his/her mailbox. DECENT Network account is created right after such confirmation.

By signing in, the following options are available:

  1. Generate and save your recovery phrase
  2. Save your password hint
  3. Skip and do it later

Password requirements:

  • A minimum of 8 characters
  • An UPPERCASE letter
  • A lowercase letter
  • A number or symbol


The CLI wallet interface for DECENT network, also offers the possibility of creating user account independently of the centralized DECENT GO service. But it has a catch, it is only possible to be created by knowing someone who is already an existing user and is able to pay the fee for creation of the account. This condition is required and the payment is 0,005 DCT.

register_account “new_account_name” public-key-owner public-key-active “my_account_name” true

API details for registering a third party’s account:

signed_transaction graphene::wallet::wallet_api::register_account(string name, public_key_type owner, public_key_type active, string registrar_account, bool broadcast = false)

This function is used to register an account for which you do not own the private keys. When acting as a registrar, an end user will generate their own private keys and send you the public keys. The registrar will use this function to register the account on behalf of the end user.


the signed transaction registering the account


  • name:the name of the account, must be unique on the blockchain. Shorter names are more expensive to register; the rules are still in flux, but in general names of more than 8 characters with at least one digit will be cheap.
  • owner:the owner key for the new account
  • active: the active key for the new account, can be the same as the owner key
  • registrar_account: the account which will pay the fee to register the user
  • broadcast: true to broadcast the transaction on the network

signed_transaction create_account_with_brain_key(string brain_key, string account_name, string registrar_account, bool broadcast = false)

Creates a new account and registers it on the blockchain.


the signed transaction registering the account


  • brain_key: the brain key used for generating the account’s private keys
  • account_name: the name of the account, must be unique on the blockchain. Shorter names are more expensive to register; the rules are still in flux, but in general names of more than 8 characters with at least one digit will be cheap.
  • registrar_account: the account which will pay the fee to register the user
  • broadcast: true to broadcast the transaction on the network

Have your account name and private key ready.

Start the local node by running:

./decentd --rpc-endpoint

Start cli_wallet, and set the password and import key when running for the first time:

./cli_wallet -s ws://
new>>> set_password <password>
locked>>> unlock <password>
unlocked>>> import_key <accountname> <private-key>

Create miner object.

unlocked »> create_miner <accountname> “url-to-proposal” true

“url-to-proposal” is a url of a web page with your intentions, info about your system, … May be blank.

  "ref_block_num": 8335,
  "ref_block_prefix": 760912907,
  "expiration": "2017-05-24T11:45:45",
  "operations": [[
        "fee": {
          "amount": "5000000000",
          "asset_id": "1.3.0"
        "miner_account": "1.2.16",
        "url": "decentdev-ejossev",
        "block_signing_key": "DCT7RZAJu7fLM5RS6GujZ8b9EjE3KLUzrXmAAi6QaUeiZTGHEVQXp"
  "extensions": [],
  "signatures": [   "20038dc5a699b030204ec3f70150d13c6a7b8a2ecb96aeddfe0927a4969e26ab1818b17f149a5e4def18653626db3cf53b9bfe570adb257455b62c1207da29dacf"

Check the ID and signing key:

unlocked>>> get_miner <accountname>
  "id": "1.4.12",
  "miner_account": "1.2.16",
  "last_aslot": 0,
  "signing_key": "DCT7RZAJu7fLM5RS6GujZ8b9EjE3KLUzrXmAAi6QaUeiZTGHEVQXp",
  "vote_id": "0:11",
  "total_votes": 0,
  "url": "decentdev-ejossev",
  "total_missed": 0,
  "last_confirmed_block_num": 0

Now, your miner object is ready.

Next, you need to start the miner, so shut down the wallet (ctrl-d), and shut down decentd (ctrl-c). Re-launch the miner, now mentioning the new miner 1.4.12 and its keypair:

./decentd --rpc-endpoint --miner-id "1.4.12" --private-key
["DCT7RZAJu7fLM5RS6GujZ8b9EjE3KLUzrXmAAi6QaUeiZTGHEVQXp", "<private-key>"]

Alternatively, you can also add this line into your config.ini:

miner-id = "1.4.12"
private-key = ["DCT7RZAJu7fLM5RS6GujZ8b9EjE3KLUzrXmAAi6QaUeiZTGHEVQXp", "<private-key>"]

Now, get some support for your miner -

unlocked>>> vote_for_miner <accountname> <miner name> true true
[a transaction in json format]

Only voted miners will be mining.


  • Find the IPFS binary, and “cd” to the directory where it is located. If you are running IPFS binary for the first time, initialize IPFS local configuration by executing a command:
./ipfs init
  • optionally start the “screen”, so ipfs keeps running when terminal is closed.
  • start ipfs daemon manually
./ipfs daemon
  • locate decentd binary, and “cd” to the directory where it is located.
  • optionally start the “screen”, so decentd keeps running when terminal is closed.
  • start decentd by command:
./decentd --rpc-endpoint=
  • cd to the binary dir and start cli_wallet in other terminal:
./cli_wallet -s ws://
  • in the wallet, generate your unique content (el-gamal) key and retrieve your account information:
locked>>> generate_el_gamal_keys
  "private_key": "9929825202538904525106109715118390731307867060424773269806671642582808014388431220063738899822276719239811537373767212483489421362837444007489350876354517.",
  "public_key": "3648917272837948840111820214699156582057756326092170692394831096647015694006097575449253578125567465803655043496246107225444630380402263661429117826904742."
locked>>> get_account_id decentuser0985
get_account_id decentuser0985
  • you will see, e.g.:

Option 1: Start seeding plugin

  • Close the cli_wallet and decentd binaries and then run decentd binary with the following arguments:
--seeding-price - how much will be received for each MB of shared data every day, in satoshi (1DCT=100,000,000 satoshi)
--free-space - space allocated for seeding
--seeder - your account ID, retrieved in previous step
--seeder-private-key - your private key, received in the information e-mail
--content-private-key - the private key generated in previous step
--rpc-endpoint= - optionally specify new listening endpoint, so it will not interfere with gui application
  • Example:
./decentd —seeding-price=5 —free-space=10000 —seeder=1.2.147 —seeder-private-key=5KWqD3VgtamUrq1sM6tK4hBQvJrJHqBsHTJonoJ5TXrsSejWPoH —content-private-key=8350062629259001565868362551941857436696436206897745031831346012489628303440637181214912450434908814625379986214241979043322759883531042603154115677476020 —packages-path=./existing_folder_created_for_packages –rpc-endpoint=

Option 2: Start seeding plugin via cli_wallet

  • Execute these commands in the terminal where cli_wallet is running:
import_key type_your_username type_your_private_key
  • Please note, that the command above should only be used if your private key has not been imported yet. Insert the parameters in the following order and fill with the data:
seeding_startup seeder content-private-key seeder-private-key free-space seeding-price packages-path
  • Example:
seeding_startup 1.2.1009 8350062629259001565868362551941857436696436206897745031831346012489628303440637181214912450434908814625379986214241979043322759883531042603154115677476020 5KWqD3VgtamUrq1sM6tK4hBQvJrJHqBsHTJonoJ5TXrsSejWPoH 10000 5 ./existing_folder_created_for_packages


  • Wait until the node is selected for seeding
  • Please note that authors prefer seeders with a higher rating
  • This rating is used as a reliability metric and is derived from various seeding statistics
  • In regular intervals there will be performed proof-of-custody by DECENT network which validates promoted values against reality: free size, etc.

Installing prerequisites in Linux

For Ubuntu 16.04 LTS (for extra actions needed for 14.04 LTS, 14.10, or 16.10 see notes below), execute in console:

$ sudo apt-get update
$ sudo apt-get install build-essential autotools-dev automake autoconf libtool make cmake checkinstall realpath gcc g++ flex bison doxygen gettext git qt5-default libqt5svg5-dev libreadline-dev libcrypto++-dev libgmp-dev libdb-dev libdb++-dev libssl-dev libncurses5-dev libboost-all-dev libcurl4-openssl-dev python-dev libicu-dev libbz2-dev

(Ubuntu 16.10 only) Note, that the default version of Boost installed in Ubuntu 16.10 is too high and not supported. In order to install a supported one, in addition to the common commands above, execute the following in console:

# Uninstall the default Boost and install Boost 1.60.0
$ sudo apt-get remove libboost-all-dev
$ sudo apt-get autoremove
$ sudo apt-get install libboost1.60-all-dev

(Ubuntu 14.04 LTS and 14.10 only; and only boost part for Ubuntu 16.04 LTS case) Note, that the default versions of GCC, CMake, and Boost installed in Ubuntu 14.04 LTS or 14.10 are too old and not supported. In order to install and use the supported ones, in addition to the common commands above, execute the following in console (in the same shell session, where you are going to build Decent itself):

# Install GCC5
$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
$ sudo apt-get update
$ sudo apt-get install gcc-5 g++-5
# Now use gcc-5 and g++-5 as C and C++ compilers.
$ export CC=gcc-5
$ export CXX=g++-5

# Download and build CMake 3.7.2
$ mkdir -p ~/dev/DECENTfoundation/DECENT-Network-third-party
$ cd ~/dev/DECENTfoundation/DECENT-Network-third-party
$ rm -rf cmake-3.7.2*
$ wget
$ tar xvf cmake-3.7.2.tar.gz
$ mkdir cmake-3.7.2_prefix
$ cd cmake-3.7.2
$ CMAKE_ROOT=$(realpath ../cmake-3.7.2_prefix)
$ ./configure --prefix=$CMAKE_ROOT
$ make
$ make install
$ cd ..
$ rm -rf cmake-3.7.2 cmake-3.7.2.tar.gz
$ export PATH=$CMAKE_ROOT/bin:$PATH

# Download and build Boost 1.60.0
$ mkdir -p ~/dev/DECENTfoundation/DECENT-Network-third-party
$ cd ~/dev/DECENTfoundation/DECENT-Network-third-party
$ rm -rf boost_1_60_0* boost-1.60.0*
$ wget
$ tar xvf boost_1_60_0.tar.gz
$ mkdir boost-1.60.0_prefix
$ cd boost_1_60_0
$ export BOOST_ROOT=$(realpath ../boost-1.60.0_prefix)
$ ./ --prefix=$BOOST_ROOT
$ ./b2 install
$ cd ..
$ rm -rf boost_1_60_0 boost_1_60_0.tar.gz

At this point, $CC and $CXX should be set to your compilers, cmake command should be picked up from $CMAKE_ROOT/bin, and CMake configure should find the Boost distribution in the exported $BOOST_ROOT.

For Fedora 24 or later, execute in console:

$ sudo dnf clean metadata
$ sudo dnf install automake autoconf libtool make cmake gcc flex bison doxygen gettext-devel git qt5-qtbase-devel qt5-qtsvg-devel readline-devel cryptopp-devel gmp-devel libdb-devel libdb-cxx-devel openssl-devel libcurl-devel ncurses-devel boost-devel boost-static python-devel libicu-devel bzip2-devel

Installing prerequisites in macOS

Then, execute in console:

$ brew doctor
$ brew tap homebrew/versions
$ brew update
$ brew install automake autoconf libtool cmake berkeley-db [email protected] qt5 cryptopp doxygen byacc flex gettext git pbc gmp ipfs openssl readline

Obtaining the sources, building, and installing Decent in *nix (macOS or Linux)

After all the prerequisites are installed, execute the following commands in console, in order to clone the repo, build, and install/stage Decent:

# Clone the repo.
$ mkdir -p ~/dev/DECENTfoundation
$ cd ~/dev/DECENTfoundation
$ git clone [email protected]:DECENTfoundation/DECENT-Network.git
$ cd DECENT-Network
$ git submodule update --init --recursive

# Build and install Decent.
$ mkdir -p ~/dev/DECENTfoundation/DECENT-Network-build
$ cd ~/dev/DECENTfoundation/DECENT-Network-build
$ cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug ~/dev/DECENTfoundation/DECENT-Network
$ cmake --build . --target all -- -j -l 3.0
$ cmake --build . --target install

Note that, in case of “Unix Makefiles” CMake generator, the last two commands are equivalent to:

$ make -j -l 3.0
$ make install

By this time you should have Decent files installed at ~/dev/DECENTfoundation/DECENT-Network-build/artifacts/prefix directory. You can specify any other custom install prefix for cmake during the initial configuration, for example, by adding -D CMAKE_INSTALL_PREFIX=~/dev/DECENTfoundation/DECENT-Network-prefix to the command line.

You can use any path instead of ~/dev/DECENTfoundation in the steps above.

You can use Xcode, or any other CMake generator, and then, if it is an IDE generator, instead of building and installing via cmake in terminal, open the generated project/solution file in the corresponding IDE and perform ALL_BUILD and INSTALL (or install) actions from there.

Installing prerequisites, obtaining the sources, building, and installing DECENT in Windows

You need Microsoft Visual Studio 2015 with Update 3. MS VS 2017 should also be ok, but currently we still use MS VS 2015 . You need CMake 3.8.1. Windows build uses the same common libraries as Linux/Mac. The difference is only in GMP library. Install Mpir-3.0.0 instead of GMP and build the library for generic target (under build.vc14lib_mpir_gc or build.vc14dll_mpir_gc). It generates gmp.h and mpir.lib which must be used instead of gmp.lib, used on Linux/Mac.

Because the CMake on Windows cannot rely on installed development packages with headers and libraries as on Linux, you must run CMake command line which specifies where are your libraries installed. After pulling sources from git set command line current directory to root of sources and run CMake from there. This command line is used in our environment to generate all needed MS VS 2015 projects:

cmake -DCMAKE_CXX_FLAGS="/DWIN32 /D_WIN32_WINNT=0x0601; /IC:/Projects" -DBOOST_ROOT=c:/local/boost_1_60_0 -DBoost_COMPILER=-vc140 -DBOOST_INCLUDEDIR=c:/local/boost_1_60_0/boost -DBOOST_LIBRARYDIR=c:/local/boost_1_60_0/lib64-msvc-14.0 -DCMAKE_PREFIX_PATH=c:/Projects -DCMAKE_INCLUDE_PATH=c:/Projects -DCMAKE_LIBRARY_PATH=C:/Projects/cryptopp/x64/DLL_Output/Release -DOPENSSL_ROOT_DIR=c:/Projects/OpenSSLx64 -DZLIB_LIBRARY=C:\Projects\zlib123\projects\visualc6\Win64_LIB_Release\zlib.lib -DZLIB_INCLUDE_DIR=c:/Projects/zlib123 -DCURL_LIBRARY="C:/Projects/cUrl/build/Win64/VC14/DLL Release - DLL Windows SSPI/libcurl.lib" -DCURL_INCLUDE_DIR=c:/Projects/cUrl/include -DGENERATEDGMP=C:/Projects/mpir-3.0.0/build.vc14/lib_mpir_gc/x64/Release -DPBCROOT=C:\Projects\pbc -DQt5Core_DIR=C:\Qt2\5.8\msvc2015_64\lib\cmake\Qt5Core -DQt5Widgets_DIR=C:\Qt2\5.8\msvc2015_64\lib\cmake\Qt5Widgets -DQt5Svg_DIR=C:\Qt2\5.8\msvc2015_64\lib\cmake\Qt5Svg -DQt5Core_DIR=C:\Qt2\5.8\msvc2015_64\lib\cmake\Qt5Core -DQt5Widgets_DIR=C:\Qt2\5.8\msvc2015_64\lib\cmake\Qt5Widgets -G "Visual Studio 14 2015 Win64" .

In above example C:Projects is root for all extracted libraries with exception of boost which was installed to c:local.

CMake generates all MS VS 2015 project files. First try to build decentd project, which builds all dependencies and decentd.exe . Then build cli_wallet which builds cli_wallet.exe and finally build decent project which builds GUI.

Starting DECENT

In the commands below, change ~/dev/DECENTfoundation/DECENT-Network-build/artifacts/prefix to ~/dev/DECENTfoundation/DECENT-Network-prefix or to any other install location, that you specified during initial configuration.

On first run decentd will create .decentin the home directory, if doesn't exist already.

$ ~/dev/DECENTfoundation/DECENT-Network-build/artifacts/prefix/bin/decentd

Then, in a separate console, start the command-line wallet by executing:

$ cd ~/dev/DECENTfoundation/DECENT-Network-working-dir
$ ~/dev/DECENTfoundation/DECENT-Network-build/artifacts/prefix/bin/cli_wallet

To set your initial password to mypassword, execute:

>>> set_password mypassword>>> unlock mypassword

To import your account keys, execute:

>>> import_key [name] [private_wif_key]

Decent daemon

The role of the decent daemon is to broadcast transactions, download blocks, and optionally sign them.

$ ~/dev/DECENTfoundation/DECENT-Network-build/artifacts/prefix/bin/decentd –rpc-endpoint –enable-stale-production -w '"1.4.0"'

Seeder plugin

Seeder plugin is responsible for automatically announce seeder's capability, downloading content, seeding it and distributing keys. In order to enable it, follow these steps:

  1. Generarate El-Gamal keys using cli_wallet command (first one is private, second one is public)
  2. generate_el_gamal_keys
  3. Add parameters to the witness_node
  4. –seeder [account-id] –seeder-private-key [private_wif_key] –content-private-key [el_gamal_private_key] –packages-path [path] –seeding-price [price] –free-space [free-space]
  5. where [account-id] is one of your accounts, [private_wif_key] corresponding active key, [el_gamal_private_key] is the generated El-Gamal key, [path] is a filesystem location with at least [space] Megabytes available, and [price] is publishing price per MB per day, in satoshis.

Using the API

We provide several different APIs. Each API has its own ID. When running decentd, initially two APIs are available: API 0 provides read-only access to the database, while API 1 is used to login and gain access to additional, restricted APIs.

Here is an example using wscat package from npm for websockets:

$ npm install -g wscat
$ wscat -c ws://> {"id":1, "method":"call", "params":[0,"get_accounts",[["1.2.0"]]]}
connected (press CTRL+C to quit)> {"id":1, "method":"call", "params":[ 1, "login", ["", ""]]}
<{"id":1,"result":true}> {"id":2, "method":"call", "params":[ 1, "network_broadcast", []  ]}
<{"id":2,"result":2}> { "id":4,"method":"call","params":[2, "broadcast_transaction"  ,[{"ref_block_num": 6707,"ref_block_prefix": 4229622607,"expiration": "2017-06-05T08:59:05","operations": [[0,{"fee": {"amount": 10000000,"asset_id": "1.3.0"},"from": "1.2.15", "to": "1.2.16""amount": {"amount": "1000000000000","asset_id": "1.3.0"},"extensions": []}]],"extensions": [],"signatures": ["1f0a72cd1dc25f01d91168de7dd13e81119f4e6468a56b521628f7c307444e98991e3543e9549ee9d49a9e4b002439f320abf2fb0c60eecbc093906dd4824f29dd"] } ] ] }

We can do some thing using an HTTP client such as curl for APIs which do not require login or other session state:

$ curl --data '{"jsonrpc": "2.0", "method": "lookup_accounts", "params": ["", 10], "id": 1}'

This is a DECENT community powered guide thanks to roelandp.

DECENT is a network for publishing content and runs on Graphene based software. Graphene has many advantages, such as very low blocktimes which result in nearly instantaneous transfers and high TX throughput.

Graphene software is based on the Delegated Proof of Stake (DPoS) model and not on the Proof-of-Work model. There is NO need for heavy computing power to calculate algorithms to find solutions and create new blocks and get rewarded.

It is not an environmentally unfriendly game of 'who has the biggest CPU/GPU'. Rather a low latency network is the key to success. A dedicated (or at least a low aggregation rate) high speed network and a fast SSD, being the most crucial elements to producing blocks.

The system is designed to remain stable through decentralization, with a sufficient number of active miner witnesses who run copies of the ./decentd software on their dedicated servers and make sure transactions on the network are pushed in blocks, verified, signed off and finally accepted into the chain. The system is self healing, designed to fix itself when blocks are missed, in other words, when the assigned witness fails to verify the block in time. When a block is missed 2/3 of active miners have to validate it, so the 5s average block production may be delayed a bit (could be 15-20s). There are algorithms that do not allow a cascade effect to result from such behaviour. Making sure the most reliable miners are active acts like an immunsystem. So if you have a stake (DCT balance), a bit of knowhow and a dedicated system maybe it’s time to consider becoming a miner witness.

To become a miner witness for DECENT you must understand the following:

  1. You must be reliable: This is not a 'come & go' job. If you are voted in the 'active miner witness list’ your server will get a block to produce / validate / sign every minute or so. If you have not setup your hardware and software correctly, or there is too much latency in your network, you will miss the block and keep missing blocks until you have figured it out. If you miss blocks, the transactions which are waiting to be added to the blockchain will be moved to the next block & block producer. The network has fail safe protocols and algorithms to prevent cascading effects for missed blocks. That said, if you are missing blocks often you are not adequately contributing to the network and you will be replaced by another more reliable miner.
  2. Your server must run 24/7.
  3. Your server must run on a good infrastructure, preferably in a professional hosting environment.

Remember this is not a case of 'who has the biggest CPU/GPU' but there should be a healthy competition of who has the least 'missed blocks'

Vote responsibly!

If you have DCT in an account you can vote for miners witnesses to influence the 'active miner witness list.' Changes in the list take effect (every 24 hours) at the next MAINTENANCE_INTERVAL.

PLEASE VOTE RESPONSIBLY. Do your research and vote for reliable, consistent and stable miners. Votes are weighted with miners DCT balance. To increase the weight of your stake you can transfer DCT from exchanges (currently trading on Bittrex and HitBTC).

To vote for a miner witness: vote_for_miner YOURACCOUNTNAME MINERNAME true true

Be verifiable!

It is advisable to set up your miner witness with an identifiable username. So don't use the default DECENT foundation encrypted u1234123XXXX formed username. It also helps to have some sort of profile info made available to the stakeholders. See roelandp’s info page for a nice example.

Steps involved in setting up a miner witness:

**1. Setting up a server and securing it:**

  1. Setup a server (16.04 LTS 2 recommended) on a dedicated hosting environment (recommended SSD and a low latency network) and it’s worth noting that currently the gcc compiler only works under Linux.
  2. Secure your server: No root login, no password login, install UFW, and fail2ban and such.
  3. Manually install the DECENTD node software as instructed here:

2: Perform all cli_wallet actions (need help? use the function gethelp FUNCTIONNAME):

  1. Import your DECENT account with the weird name with import_key and make sure it is funded with some DCT.
  2. Set up an identifiable username for your miner witness with register_account (you need suggest_brain_key twice to get new pub/private key pairs for both the owner and active keys.
  3. Fund the newly created account from your original DECENT account with transfer
  4. Upgrade your newly identifiable username account to become a miner witness with create_miner. Be sure to add a url where we can read more about your intentions of being a 24/7 reliable miner witness for DECENT. This will return a result with 'signing key' as well as your miner-id (starts with 1.4. !!! NOT 1.2. !!!)
  5. Update your config.ini for the ./decentd software: Go to /home/LINUXUSER/.decent/data/config.ini
  6. Update/Add/Uncomment the miner-id=“1.4.XX” (note! starts with 1.4. not 1.2.) with your mining-id retrievable via get_miner
  7. Update/Add/Uncomment the private-key=[“DCTPUBLIC”,“PRIVATEKEY”] with your SIGNING PUBLIC KEY, PRIVATE KEY pair in the correct order Get your Public Key retrievable via get_miner and seeing the 'signing key'-value. Then get your private key corresponding to that public signing key via get_private_key.
  8. Double check that you are absolutely sure you have setup config.ini correctly with miner-id=1.4.XX (not 1.2.XX !!) and have the correct order and keypair for private-key=.
  9. Restart your ./decentd software in a dedicated screen session on your 24/7 reliable dedicated server. In the startup on your screen session you should see it listing some details about your configed miner
  10. Announce your intentions on #mining and/or #witness-proposals on Slack

This is a community powered Guide much of the contents come from one of our top miner-wits roelandp, a witness for several graphene chains and you can learn more this member here:

And the original post can be found here: