Skip to content
DBC-WikiDBC-Wiki
github icon
  • DBC Staking Model

    • How to join DBC network
      • Generate new DBC account
        • How to run as DBC validator?
          • 0. Recommended hardware
            • 1. Generate stash account
              • 2. Get dbc-chain binary
                • Option 1: use pre-build version
                  • Option 2: compile from source (recommended)
                    • 3. Synchronize Chain Data
                    • 4.Then run the node as a validator:
                      • 5. generaterotateKey
                        • 6. Bond stash
                          • 7. Set Session Keys
                            • 8. Validate
                              • 9. Claim your rewards payout?
                              • How to nominate on DBC?
                                • Fast-track Process
                                  • Staking/Unbond common questions

                                  How to run as DBC validator?

                                  calendar iconJanuary 6, 2022timer iconAbout 3 min

                                  On This Page
                                  • 0. Recommended hardware
                                  • 1. Generate stash account
                                  • 2. Get dbc-chain binary
                                    • Option 1: use pre-build version
                                    • Option 2: compile from source (recommended)
                                    • 3. Synchronize Chain Data
                                  • 4.Then run the node as a validator:
                                  • 5. generaterotateKey
                                  • 6. Bond stash
                                  • 7. Set Session Keys
                                  • 8. Validate
                                  • 9. Claim your rewards payout?

                                  # How to run as DBC validator?

                                  # 0. Recommended hardware

                                  • RAM:8G
                                  • CPU:2 cores
                                  • Disk:100G

                                  # 1. Generate stash account

                                  (If you already have stash account, you can skip this)

                                  Reference: Generate new dbc account

                                  # 2. Get dbc-chain binary

                                  # Option 1: use pre-build version

                                  If any errors, please use Option 2

                                  wget https://github.com/DeepBrainChain/DeepBrainChain-MainChain/releases/download/v2.2/dbc_chain_linux_x64.tar.gz -O dbc_chain_linux_x64.tar.gz
                                  tar xf dbc_chain_linux_x64.tar.gz && cd dbc-chain-mainnet
                                  
                                  1
                                  2

                                  # Option 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
                                  
                                  1
                                  2
                                  3
                                  4
                                  5
                                  6
                                  7
                                  8

                                  # 3. Synchronize Chain Data

                                  ./dbc-chain --base-path ./db_data --pruning archive
                                  
                                  1
                                  • If you compile from source, the binary path is ./target/release/dbc-chain

                                  • After finished synchronize, type Control + C to close the above command. You can compare target and best to infer if sync is finished. When target is closed (100 blocks, for example) to best , 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.

                                  # 4.Then run the node as a validator:

                                  After synchronizing block data finished, stop the synchronizing command.

                                  nohup ./dbc-chain --base-path ./db_data --validator --name YourNodeName 1>dbc_node.log 2>&1 &
                                  
                                  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.

                                  # 5. generaterotateKey

                                  Run 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:9933
                                  
                                  1

                                  # 6. Bond stash

                                  • open https://www.dbcwallet.io/?rpc=wss%3A%2F%2Finfo.dbcwallet.io#/accountsopen in new window you will see your balance: image-20210121194808850

                                  • navigate toStaking > Account actions,click stashimage-20210121194953014

                                  • 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.):image-20210121195033167

                                  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.

                                  # 7. Set Session Keys

                                  • After bond your stash,you can see in Polkadot UI Session Keybutton:image-20210121195307711

                                  • click it and input the result in step 5rotateKeysimage-20210121200709277

                                  • Now, check in Telemetryopen in new window and you can see your node.image-20210121234945030

                                  # 8. Validate

                                  • After steps above you can seeValidate button and click it,

                                  image-20210121235144583

                                  • You should set your preference as a validator.

                                  image-20210121235217665

                                  • In reward commission percentage you should input your commission preference. Then clieck Validate to send this transaction。Then,in Waiting page,you are waiting statusEra to be a validator.

                                  image-20210121235451552

                                  # 9. Claim your rewards payout?

                                  Navigate to Staking > Payouts > Max, 84 eras ,you may see all the rewards to be payout:

                                  image-20210329095933403

                                  chick Payout all button to send a transaction.

                                  edit iconEdit this pageopen in new window
                                  Last update: 4/18/2022, 4:00:16 AM
                                  Contributors: kaigedong
                                  Prev
                                  Generate new DBC account
                                  Next
                                  How to nominate on DBC?