Documentation ¶
Overview ¶
Package comet defines the Comet Service interface and BlockInfo types which applications should use in order to get access to the current block's evidence, validators hash, proposer address.
This information is specific to Comet
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockIDFlag ¶ added in v0.8.0
type BlockIDFlag int32
BlockIdFlag indicates which BlockID the signature is for
const ( BlockIDFlagUnknown BlockIDFlag = 0 // BlockIDFlagAbsent - no vote was received from a validator. BlockIDFlagAbsent BlockIDFlag = 1 // BlockIDFlagCommit - voted for the Commit.BlockID. BlockIDFlagCommit BlockIDFlag = 2 // BlockIDFlagNil - voted for nil. BlockIDFlagNil BlockIDFlag = 3 )
type BlockInfo ¶
type BlockInfo interface { GetEvidence() EvidenceList // Evidence misbehavior of the block // ValidatorsHash returns the hash of the validators // For Comet, it is the hash of the next validator set GetValidatorsHash() []byte GetProposerAddress() []byte // ProposerAddress returns the address of the block proposer GetLastCommit() CommitInfo // DecidedLastCommit returns the last commit info }
BlockInfo is the information comet provides apps in ABCI
type BlockInfoService ¶
BlockInfoService is an interface that can be used to get information specific to Comet
type CommitInfo ¶
CommitInfo is the commit information of ABCI
type Evidence ¶
type Evidence interface { Type() MisbehaviorType Validator() Validator Height() int64 Time() time.Time TotalVotingPower() int64 }
Evidence is the misbehavior information of ABCI
type MisbehaviorType ¶
type MisbehaviorType int32
MisbehaviorType is the type of misbehavior for a validator
const ( Unknown MisbehaviorType = 0 DuplicateVote MisbehaviorType = 1 LightClientAttack MisbehaviorType = 2 )
type Validator ¶
Validator is the validator information of ABCI
type VoteInfo ¶
type VoteInfo interface { Validator() Validator GetBlockIDFlag() BlockIDFlag }
VoteInfo is the vote information of ABCI