Versions in this module Expand all Collapse all v0 v0.0.1 Mar 27, 2024 Changes in this version + const EnvVarByzantine + const MinimumReplicaCount + const NetworkTimeout + const Protocol + const RequestTimeout + var DefaultConfig = Config + var ErrActiveView = errors.New("replica is currently in an active view") + var ErrConflictingPreprepare = errors.New("conflicting pre-prepare") + var ErrInvalidSignature = errors.New("invalid signature") + var ErrViewChange = errors.New("view change in progress") + var NullRequest = Request + func MinClusterResults(n uint) uint + type Commit struct + Digest string + SequenceNumber uint + Signature string + View uint + func (c *Commit) UnmarshalJSON(data []byte) error + func (c Commit) MarshalJSON() ([]byte, error) + type Config struct + NetworkTimeout time.Duration + PostProcessors []PostProcessFunc + RequestTimeout time.Duration + type MessageType uint + const MessageCommit + const MessageNewView + const MessagePrePrepare + const MessagePrepare + const MessageRequest + const MessageViewChange + func (m MessageType) String() string + type NewView struct + Messages map[peer.ID]ViewChange + PrePrepares []PrePrepare + Signature string + View uint + func (n *NewView) UnmarshalJSON(data []byte) error + func (v NewView) MarshalJSON() ([]byte, error) + type Option func(*Config) + func WithNetworkTimeout(d time.Duration) Option + func WithPostProcessors(callbacks ...PostProcessFunc) Option + func WithRequestTimeout(d time.Duration) Option + type PostProcessFunc func(requestID string, origin peer.ID, request execute.Request, ...) + type PrePrepare struct + Digest string + Request Request + SequenceNumber uint + Signature string + View uint + func (p *PrePrepare) UnmarshalJSON(data []byte) error + func (p PrePrepare) MarshalJSON() ([]byte, error) + type Prepare struct + Digest string + SequenceNumber uint + Signature string + View uint + func (p *Prepare) UnmarshalJSON(data []byte) error + func (p Prepare) MarshalJSON() ([]byte, error) + type PrepareInfo struct + Digest string + PrePrepare PrePrepare + Prepares map[peer.ID]Prepare + SequenceNumber uint + View uint + func (p *PrepareInfo) UnmarshalJSON(data []byte) error + func (p PrepareInfo) MarshalJSON() ([]byte, error) + type Replica struct + func NewReplica(log zerolog.Logger, host *host.Host, executor blockless.Executor, ...) (*Replica, error) + func (r *Replica) Consensus() consensus.Type + func (r *Replica) Execute(client peer.ID, requestID string, timestamp time.Time, req execute.Request) (codes.Code, execute.Result, error) + func (r *Replica) Shutdown() error + type Request struct + Execute execute.Request + ID string + Origin peer.ID + Timestamp time.Time + func (r *Request) UnmarshalJSON(data []byte) error + func (r Request) MarshalJSON() ([]byte, error) + type ViewChange struct + Prepares []PrepareInfo + Signature string + View uint + func (v *ViewChange) UnmarshalJSON(data []byte) error + func (v ViewChange) MarshalJSON() ([]byte, error)