Versions in this module Expand all Collapse all v0 v0.5.0 Oct 27, 2025 Changes in this version + func IDSetToString(set IDSet) string + type AggregateQC struct + func NewAggregateQC(qcs map[ID]QuorumCert, sig QuorumSignature, view View) AggregateQC + func (aggQC AggregateQC) QCs() map[ID]QuorumCert + func (aggQC AggregateQC) Sig() QuorumSignature + func (aggQC AggregateQC) String() string + func (aggQC AggregateQC) View() View type Block + func (b *Block) SetTimestamp(ts time.Time) + func (b *Block) Timestamp() time.Time + type CommitEvent struct + Commands int + type ConsensusLatencyEvent struct + Latency time.Duration + type IDSet interface + Add func(id ID) + Contains func(id ID) bool + ForEach func(f func(ID)) + Len func() int + RangeWhile func(f func(ID) bool) + func NewIDSet() IDSet + type NewViewMsg struct + ID ID + SyncInfo SyncInfo type PartialCert + func NewPartialCert(signature QuorumSignature, blockHash Hash) PartialCert + func (pc PartialCert) Signer() ID + func (pc PartialCert) ToBytes() []byte type PrivateKey + Public func() PublicKey + type ProposeMsg struct + AggregateQC *AggregateQC + Block *Block + ID ID + func (p ProposeMsg) String() string type QuorumCert + func NewQuorumCert(signature QuorumSignature, view View, hash Hash) QuorumCert + func (qc QuorumCert) Equals(other QuorumCert) bool + func (qc QuorumCert) Signature() QuorumSignature + func (qc QuorumCert) String() string + func (qc QuorumCert) ToBytes() []byte + func (qc QuorumCert) View() View + type QuorumSignature interface + Participants func() IDSet + type SyncInfo struct + func NewSyncInfo() SyncInfo + func (si SyncInfo) AggQC() (_ AggregateQC, _ bool) + func (si SyncInfo) QC() (_ QuorumCert, _ bool) + func (si SyncInfo) String() string + func (si SyncInfo) TC() (_ TimeoutCert, _ bool) + func (si SyncInfo) WithAggQC(aggQC AggregateQC) SyncInfo + func (si SyncInfo) WithQC(qc QuorumCert) SyncInfo + func (si SyncInfo) WithTC(tc TimeoutCert) SyncInfo + type ThresholdSignature = QuorumSignature + type TimeoutCert struct + func NewTimeoutCert(signature QuorumSignature, view View) TimeoutCert + func (tc TimeoutCert) Signature() QuorumSignature + func (tc TimeoutCert) String() string + func (tc TimeoutCert) ToBytes() []byte + func (tc TimeoutCert) View() View + type TimeoutMsg struct + ID ID + MsgSignature QuorumSignature + SyncInfo SyncInfo + View View + ViewSignature QuorumSignature + func (timeout TimeoutMsg) String() string + func (timeout TimeoutMsg) ToBytes() []byte type View + func (v View) ToBytes() []byte + type VoteMsg struct + Deferred bool + ID ID + PartialCert PartialCert + func (v VoteMsg) String() string v0.4.0 Dec 6, 2021 v0.3.1 Aug 29, 2021 v0.3.0 Aug 27, 2021 Changes in this version + func NumFaulty(n int) int + func QuorumSize(n int) int type ID + func (id ID) ToBytes() []byte v0.2.2 Feb 17, 2021 v0.2.1 Feb 17, 2021 v0.2.0 Feb 12, 2021 Changes in this version + type Acceptor interface + Accept func(Command) bool + type Block struct + func GetGenesis() *Block + func NewBlock(parent Hash, cert QuorumCert, cmd Command, view View, proposer ID) *Block + func (b *Block) Command() Command + func (b *Block) Hash() Hash + func (b *Block) Parent() Hash + func (b *Block) Proposer() ID + func (b *Block) QuorumCert() QuorumCert + func (b *Block) String() string + func (b *Block) ToBytes() []byte + func (b *Block) View() View + type BlockChain interface + Get func(Hash) (*Block, bool) + Store func(*Block) + type Command string + type CommandQueue interface + GetCommand func() *Command + type Config interface + Fetch func(ctx context.Context, hash Hash) + ID func() ID + Len func() int + PrivateKey func() PrivateKey + Propose func(block *Block) + QuorumSize func() int + Replica func(ID) (replica Replica, ok bool) + Replicas func() map[ID]Replica + type Consensus interface + BlockChain func() BlockChain + Config func() Config + CreateDummy func() + HighQC func() QuorumCert + LastVote func() View + Leaf func() *Block + NewView func() + OnDeliver func(block *Block) + OnNewView func(msg NewView) + OnPropose func(block *Block) + OnVote func(cert PartialCert) + Propose func() + type Credentials interface + type Executor interface + Exec func(Command) + type Hash [32]byte + func (h Hash) String() string + type ID uint32 + type LeaderRotation interface + GetLeader func(View) ID + type NewView struct + ID ID + QC QuorumCert + View View + func (n NewView) String() string + type PartialCert interface + BlockHash func() Hash + Signature func() Signature + type PrivateKey interface + PublicKey func() PublicKey + type PublicKey interface + type QuorumCert interface + BlockHash func() Hash + type Replica interface + Deliver func(block *Block) + ID func() ID + NewView func(msg NewView) + PublicKey func() PublicKey + Vote func(cert PartialCert) + type Signature interface + Signer func() ID + type Signer interface + CreateQuorumCert func(block *Block, signatures []PartialCert) (cert QuorumCert, err error) + Sign func(block *Block) (cert PartialCert, err error) + type ToBytes interface + ToBytes func() []byte + type Verifier interface + VerifyPartialCert func(cert PartialCert) bool + VerifyQuorumCert func(qc QuorumCert) bool + type View uint64 + type ViewSynchronizer interface + Init func(Consensus) + OnFinishQC func() + OnNewView func() + OnPropose func() + Start func() + Stop func() v0.1.0 Jul 29, 2020 Changes in this version + type HotStuff struct + func New(conf *config.ReplicaConfig, pacemaker Pacemaker, tls bool, ...) *HotStuff + func (hs *HotStuff) Close() + func (hs *HotStuff) Propose() + func (hs *HotStuff) SendNewView(id config.ReplicaID) + func (hs *HotStuff) Start() error + type Pacemaker interface + GetLeader func(view int) config.ReplicaID + Init func(*HotStuff)