// current consensus block to check if out of sync
ConsensusBlockchan*BFTBlockInfo
// verified block to state sync broadcast
// verified block to state sync broadcast
VerifiedNewBlockchan*types.Block
VerifiedNewBlockchan*types.Block
// will trigger state syncing when consensus ID is low
ConsensusIDLowChanchanstruct{}
// Channel for DRG protocol to send pRnd (preimage of randomness resulting from combined vrf randomnesses) to consensus. The first 32 bytes are randomness, the rest is for bitmap.
// Channel for DRG protocol to send pRnd (preimage of randomness resulting from combined vrf randomnesses) to consensus. The first 32 bytes are randomness, the rest is for bitmap.
PRndChannelchan[]byte
PRndChannelchan[]byte
// Channel for DRG protocol to send the final randomness to consensus. The first 32 bytes are the randomness and the last 32 bytes are the hash of the block where the corresponding pRnd was generated
// Channel for DRG protocol to send the final randomness to consensus. The first 32 bytes are the randomness and the last 32 bytes are the hash of the block where the corresponding pRnd was generated
@ -115,13 +118,6 @@ type Consensus struct {
OfflinePeerList[]p2p.Peer
OfflinePeerList[]p2p.Peer
}
}
// BFTBlockInfo send the latest block that was in BFT consensus process as well as its consensusID to state syncing
// consensusID is necessary to make sure the out of sync node can enter the correct view
typeBFTBlockInfostruct{
Block*types.Block
ConsensusIDuint32
}
// BlockConsensusStatus used to keep track of the consensus status of multiple blocks received so far
// BlockConsensusStatus used to keep track of the consensus status of multiple blocks received so far
// This is mainly used in the case that this node is lagging behind and needs to catch up.
// This is mainly used in the case that this node is lagging behind and needs to catch up.
// For example, the consensus moved to round N and this node received message(N).
// For example, the consensus moved to round N and this node received message(N).
@ -133,16 +129,6 @@ type BlockConsensusStatus struct {
stateState// the latest state of the consensus
stateState// the latest state of the consensus
}
}
// UpdateConsensusID is used to update latest consensusID for nodes that out of sync