Chains

BNB Smart Chain

Build Web3 dApps effortlessly

BNB Beacon Chain

Sunset soon

BNB Chain ecosystem’s staking & governance layer

DocumentationGitHubFaucetStake BNBBscScanBSCTraceDev ToolsLearn more about FusionDocumentationBeacon Chain ExplorerStake BNBDocumentationGitHubFaucetBridgeGreenfieldScanDCellarDev ToolsDocumentationGitHubFaucetBridgeopBNBScanDev ToolsDocumentationGitHubFaucetBridgezkBNBScanMarketplace

Developers

Developers

Start building on BNB Chain

Start Building
Developers
BNB Smart ChainBNB Beacon ChainBNB GreenfieldopBNBzkBNBDAU Incentive ProgramTVL Incentive ProgramKickstartMVB Accelerator ProgramBuilder GrantsSpace BMEME Innovation ProgramSee All Programs
Contact UsStart Building
Contact UsStart Building

How to Keep BNB Chain Validator “Active”

2021.12.1  •  5 min read
Blog post image.

Making BNB Chain Attractive through transparency and confidence

On the BNB Chain network, validators are responsible for securing the network by processing transactions and signing blocks. Validator nodes are incentivized in the form of transaction fees for their good behavior. Currently, there are 8 validators on the testnest and 21 validators on the mainnet. Validators are selected every 24 hours making the network highly decentralized. Anyone can become a candidate for the validator. To become part of the selection process of validators, the nodes have to stake their BNB. Validators can self-delegate (self-bound) BNB to themselves and can also receive delegations from any other BNB holders. The minimum amount for self-delegation is 10,000 BNB. Only the top 21 highest-staked nodes are chosen to be part of the validator set.

To make sure that validators do not abuse the power entrusted to them, BNB Chain has different on-chain slashing mechanism to monitor their behavior. In this article, some tips are shared.

Jailed and Slashed!!

Breaking bad habits

BNB Chain introduces Slashing logic to penalize Byzantine validators for double signing or inavailability. The slashed validator will eventually be jailed. Validators who are in jail status cannot participate in the consensus mechanism or earn rewards during that period of time. Slashing ensures that validators who act maliciously or show bad behavior are not rewarded. Furthermore, it is designed to expose attackers and make execution attempts extremely expensive. BNB Chain slash requests can be submitted by any public users. All BNB Chain slash requests require slash evidence and transaction cost fees, and reward will be given to successful slash requests. To ensure that the delegators are not punished for the validator’s bad behavior, only self-bonded BNB of the validator are slashed. Currently, slashing is applied on any node that processes any invalid transaction, double-signing or unavailable for a defined period of time. The consensus mechanism will automatically accuse the offline validator within its block by generating a slash transaction, the other fullnode will verify the correctness of the slash transaction to avoid abusing.

Guide to send BNB Chain Slash Evidence :

To submit BNB Chain slash evidence, download the bnbcli binary.

Command for submitting evidence is as below:

Bnbcli slashing bsc-submit-evidence --from={Name or address of private key with which to sign} --evidence={Evidence details, including two bsc block headers with json format} --evidence-file={File of evidence details } --chain-id={the chain id of binance chain}

In the above command, --evidence and --evidence-file are optional parameters. If --evidence-file is not empty, --evidence will be ignored. --from and --chain-id are mandatory parameters.

Example:

bnbcli slashing bsc-submit-evidence --from= bnb19awsmku5ch689lp0rj0c6su7x0n5wxhjm65hdd --chain-id=Binance-Chain-Tigris--home ~/home_cli

Build Good Habits and Break Bad Ones?

What are the activities that can be considered bad habits?

Double Signing

Double signing refers to an event when the validator node proposes two different blocks at the same block height. Validator will be removed from the validator set, if they try signing two different blocks and broadcasting them. For BNB Chain slash request on double signing the supporting evidence should indicate two block headers having the same block height and same parent block hash sealed by the same validator. The time of these two blocks must be within the validity of the evidence, which is 24 hours. Rewards for successful submission of double-sign evidence is 100 BNB. In the event evidence and slash request is valid, the validators will face a slashing of 10,000 BNB from their self-delegated BNB and will be ‘jailed’ for a time period of 292 years.

Unavailability/Downtime

The slash fee for a validator being offline is self-delegated 50 BNB along with jail time of 2 days. If a validator missed 50 blocks (~52 minutes of downtime) within 24 hours, their collected reward will be re-distributed among other better performing validators of the set. Another case of unavailability is when a validator misses over 150 blocks (~157.5 minutes of downtime) within 24 hours. In this case, the validator will lose its reward and be kicked out of the validator set immediately.

Self‐bond below minimum

Validators will be jailed for 1 day if their self‐bond falls below 10,000 BNB.

Release from Jailed

Jailed validator nodes due to their malicious or bad behavior, may request for release by sending side-unjail transactions provided they passed initial validation. After release, to re-join the validator set again, the validator must wait for the following UTC 0:00. The fees to un-jail a smart contract validator is 1 BNB. Whereas, the fee for submitting a byzantine behavior evidence of a validator is 10 BNB.

The un-jail transaction must fulfill the following criterias:

  • Validator address must not be empty.
  • The side chain id exists.
  • Self-delegation of the validator exists and must be greater than the min-self-delegation setting by 10,000 BNB.
  • Requestor is in ‘jailed’ state when requesting to be un-jailed.
  • Complete the required jailed term.

The command to get a validator node un-jailed is as follow:

Bnbcli slashing side-unjail --from= {this address has to be the operator address of the validator to be unjailed. Name or address of private key with which to sign} --side-chain-id= {chain-id of the side chain the validator belongs to} --chain-id={the chain id of binance chain}

All of the parameters of the unjail command are required.

Example:

bnbcli slashing side-unjail --from bnb19awsmku5ch689lp0rj0c6su7x0n5wxhjm65hdd --side-chain-id=bsc --chain-id=Binance-Chain-Tigris

--home ~/home_cli

Be aware of Slashing Events!!

How to monitor and query slashing events.

As best practise, it is advisable to keep monitoring the event log of the slash contract on the BNB Chain scanner on the following link - https://bscscan.com/address/0x0000000000000000000000000000000000001001#events. Additionally, you can also check the slash indicator by reading the contract and pay attention to those above 30. Once it exceeds 150, the validator contract will be jailed.

There are multiple commands for querying the side chain slash history of a validator.

  • The command to query the slash history of a validator is

bnbcli slashing side-slash-history [address of the validator contract] --infraction-height [infraction height] --infraction-type [infraction type; DoubleSign or Downtime] --side-chain-id=[chain-id of the side chain the validator belongs to] –chain-id=[the chain id of binance chain]

Example:

bnbcli slashing side-slash-history 0x625448c3f21AB4636bBCef84Baaf8D6cCdE13c3F --infraction-height 100 --infraction-type DoubleSign --side-chain-id=bsc --chain-id=Binance-Chain-Tigris --home ~/home_cli

  • The command to query all side chain slash histories is

bnbcli slashing side-all-slash-histories --side-chain-id=[chain-id of the side chain the validator belongs to] --chain-id=[the chain id of binance chain]

Example:

bnbcli slashing side-all-slash-histories --side-chain-id=bsc --chain-id=test-chain-8d7sJz --home ~/home_cli

Conclusion

As BNB Chain grows and expands the ecosystem, it is important that we build good habits and break away from those bad ones. Through these efforts, BNB Chain aims to promote a healthy chain environment and instill confidence among users.

Do check out our validators FAQ and join our discussion on Discord (#node-support and #validator-support)for more updates.

Share