How to run a DBC validator?
How to run a DBC validator?
Recommended hardware
- RAM:8G
- CPU:2 cores
- Disk:100G
Generate stash account (If you already have stash account, you can skip this)
Option 1: Install
polkadot{.js}adds-on- Chrome, install via Chrome web store
- Firefox, install via Firefox add-ons
Then generate by
polkadot{.js}Option 2: Generate account from https://www.dbcwallet.io/?rpc=wss%3A%2F%2Finfo.dbcwallet.io#/accounts,click
Account--Add accountOption 3: Generate by command line:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh cargo install --force subkey --git https://github.com/paritytech/substrate --version 2.0.1 --locked subkey generate --scheme sr25519
Get
dbc-chainbinaryOption 1: use pre-build version (If any errors, please use Option 2).
wget https://github.com/DeepBrainChain/DeepBrainChain-MainChain/releases/download/v2/dbc_chain_linux_x64.tar.gz -O dbc_chain_linux_x64.tar.gz tar xf dbc_chain_linux_x64.tar.gz && cd dbc-chain-mainnetOption 2: compile from source (recommended)
# install dependency curl https://getsubstrate.io -sSf | bash -s -- --fast source ~/.cargo/env # compile dbc-chain git clone https://github.com/DeepBrainChain/DeepBrainChain-MainChain.git cd DeepBrainChain-MainChain cargo build --release
Synchronize Chain Data
./dbc-chain --base-path ./db_data --chain ./dbcSpecRaw.json --pruning=archive --bootnodes /ip4/47.74.88.41/tcp/8947/p2p/12D3KooWD87i4TKA68P7zpGNXxUaHgvnimbgihEzDyJrmG3iGJPw- If you compile from source, the binary path is
./target/release/dbc-chain
- If you compile from source, the binary path is
- After finished synchronize, type
Control + Cto close the above command. You can comparetargetandbestto infer if sync is finished. Whentargetis closed (100 blocks, for example) tobest, it can be regard sync is finished.
- Flags in detail:
--base-path:Specifies a directory where Substrate should store all the data related to this chain. If this value is not specified, a default path will be used. If the directory does not exist it will be created for you. If other blockchain data already exists there you will get an error. Either clear the directory or choose a different one.--chain ./dbcSpecRaw.json:Specifies which chain specification to use.--pruning=archive:synchronize chain data--bootnodes:specified a single boot node.
After synchronizing block data finished, stop the synchronizing command. Then run the node as a validator:
nohup ./dbc-chain --base-path ./db_data --chain ./dbcSpecRaw.json --validator --name YourNodeName --bootnodes /ip4/47.74.88.41/tcp/8947/p2p/12D3KooWD87i4TKA68P7zpGNXxUaHgvnimbgihEzDyJrmG3iGJPw 1>dbc_node.log 2>&1 &- If you compile from source, the binary path is
./target/release/dbc-chain - You can give your validator any name that you like, but note that others will be able to see it, and it will be included in the list of all servers using the same telemetry server. Since numerous people are using telemetry, it is recommended that you choose something likely to be unique.
- If you compile from source, the binary path is
generate
rotateKeyRun the following command in the terminal, and record the result.
curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}' http://localhost:9933Bond stash
open https://www.dbcwallet.io/?rpc=wss%3A%2F%2Finfo.dbcwallet.io#/accounts you will see your balance:

navigate to
Staking > Account actions,clickstash
You should set bond balance(Make sure not to bond all your DBC balance since you will be unable to pay transaction fees from your bonded balance.):

Description:
Stash account:Select your Stash account. In this example, we will bond 45 DBC - make sure that your Stash account contains at least this much. You can, of course, stake more than this.controller account:Select the Controller account created earlier. This account will also need a small amount of DBC in order to start and stop validating.value bonded:How much DBC from the Stash account you want to bond/stake. Note that you do not need to bond all of the DBC in that account. Also note that you can always bond more DBC later.payment destination:The account where the rewards from validating are sent.
Set Session Keys
After bond your stash,you can see in Polkadot UI
Session Keybutton:
click it and input the result in step 5
rotateKeys
Now, check in Telemetry and you can see your node.

Validate
After steps above you can see
Validatebutton and click it,
You should set your preference as a validator.

In
reward commission percentageyou should input your commission preference. Then clieckValidateto send this transaction。Then,inWaitingpage,you are waiting statusErato be a validator.
How to get your rewards payout?
Navigate to Staking > Payouts > Max, 84 eras ,you may see all the rewards to be payout:

chick Payout all button to send a transaction.