Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsensusFault ¶
type ConsensusFault struct {
// Block1 and Block2 are two distinct blocks from an overlapping interval
// signed by the same miner
Block1, Block2 *block.Block
}
ConsensusFault is the information needed to submit a consensus fault
type ConsensusFaultChecker ¶
type ConsensusFaultChecker struct {
// contains filtered or unexported fields
}
Checks the validity of reported consensus faults.
func NewFaultChecker ¶
func NewFaultChecker(chain chainReader, fork fork.IFork) *ConsensusFaultChecker
func (*ConsensusFaultChecker) VerifyConsensusFault ¶
func (s *ConsensusFaultChecker) VerifyConsensusFault(ctx context.Context, h1, h2, extra []byte, view FaultStateView) (*runtime2.ConsensusFault, error)
Checks the validity of a consensus fault reported by serialized block headers h1, h2, and optional common-ancestor witness h3.
type ConsensusFaultDetector ¶
type ConsensusFaultDetector struct {
// contains filtered or unexported fields
}
ConsensusFaultDetector detects consensus faults -- misbehavior conditions where a single party produces multiple blocks at the same time.
func NewConsensusFaultDetector ¶
func NewConsensusFaultDetector(faultCh chan ConsensusFault) *ConsensusFaultDetector
NewConsensusFaultDetector returns a fault detector given a fault channel
func (*ConsensusFaultDetector) CheckBlock ¶
CheckBlock records a new block and checks for faults Preconditions: the signature is already checked and p is the parent
Click to show internal directories.
Click to hide internal directories.