blockchain/vX reactor priority was decreased because during the normal operation (i.e. when the node is not fast syncing) blockchain priority can't be the same as consensus reactor priority. Otherwise, it's theoretically possible to slow down consensus by constantly requesting blocks from the node. NOTE: ideally blockchain/vX reactor priority would be dynamic. e.g. when the node is fast syncing, the priority is 10 (max), but when it's done fast syncing - the priority gets decreased to 5 (only to serve blocks for other nodes). But it's not possible now, therefore I decided to focus on the normal operation (priority = 5). evidence and consensus critical messages are more important than the mempool ones, hence priorities are bumped by 1 (from 5 to 6). statesync reactor priority was changed from 1 to 5 to be the same as blockchain/vX priority. Refs https://github.com/tendermint/tendermint/issues/5816
Maverick
A byzantine node used to test Tendermint consensus against a plethora of different faulty misbehaviors. Designed to easily create new faulty misbehaviors to examine how a Tendermint network reacts to the misbehavior. Can also be used for fuzzy testing with different network arrangements.
Misbehaviors
A misbehavior allows control at the following stages as highlighted by the struct below
type Misbehavior struct {
String string
EnterPropose func(cs *State, height int64, round int32)
EnterPrevote func(cs *State, height int64, round int32)
EnterPrecommit func(cs *State, height int64, round int32)
ReceivePrevote func(cs *State, prevote *types.Vote)
ReceivePrecommit func(cs *State, precommit *types.Vote)
ReceiveProposal func(cs *State, proposal *types.Proposal) error
}
At each of these events, the node can exhibit a different misbehavior. To create a new misbehavior define a function that builds off the existing default misbehavior and then overrides one or more of these functions. Then append it to the misbehaviors list so the node recognizes it like so:
var MisbehaviorList = map[string]Misbehavior{
"double-prevote": DoublePrevoteMisbehavior(),
}
Setup
The maverick node takes most of the functionality from the existing Tendermint CLI. To install this, in the directory of this readme, run:
go build
Use maverick init to initialize a single node and maverick node to run it. This will run it normally unless you use the misbehaviors flag as follows:
maverick node --proxy_app persistent_kvstore --misbehaviors double-vote,10
This would cause the node to vote twice in every round at height 10. To add more misbehaviors at different heights, append the next misbehavior and height after the first (with comma separation).
