Versions in this module Expand all Collapse all v0 v0.4.0 Dec 6, 2021 v0.3.1 Aug 29, 2021 v0.3.0 Aug 27, 2021 v0.2.2 Feb 17, 2021 v0.2.1 Feb 17, 2021 v0.2.0 Feb 12, 2021 Changes in this version + func BlockFromProto(block *Block) *hotstuff.Block + func PartialCertFromProto(cert *PartialCert) *ecdsa.PartialCert + func QuorumCertFromProto(qc *QuorumCert) *ecdsa.QuorumCert + func RegisterHotstuffServer(srv *gorums.Server, impl Hotstuff) + func SignatureFromProto(sig *Signature) *ecdsa.Signature type Block + Command []byte + Parent []byte + Proposer uint32 + View uint64 + func (x *Block) GetCommand() []byte + func (x *Block) GetParent() []byte + func (x *Block) GetProposer() uint32 + func (x *Block) GetView() uint64 + type BlockHash struct + Hash []byte + func (*BlockHash) Descriptor() ([]byte, []int) + func (*BlockHash) ProtoMessage() + func (x *BlockHash) GetHash() []byte + func (x *BlockHash) ProtoReflect() protoreflect.Message + func (x *BlockHash) Reset() + func (x *BlockHash) String() string type Configuration + func (c *Configuration) Fetch(ctx context.Context, in *BlockHash, opts ...gorums.CallOption) type Hotstuff + Deliver func(context.Context, *Block) + Fetch func(context.Context, *BlockHash) + type NewViewMsg struct + QC *QuorumCert + View uint64 + func (*NewViewMsg) Descriptor() ([]byte, []int) + func (*NewViewMsg) ProtoMessage() + func (x *NewViewMsg) GetQC() *QuorumCert + func (x *NewViewMsg) GetView() uint64 + func (x *NewViewMsg) ProtoReflect() protoreflect.Message + func (x *NewViewMsg) Reset() + func (x *NewViewMsg) String() string type Node + func (n *Node) Deliver(ctx context.Context, in *Block, opts ...gorums.CallOption) + type Signature struct + R []byte + ReplicaID uint32 + S []byte + func SignatureToProto(sig hotstuff.Signature) *Signature + func (*Signature) Descriptor() ([]byte, []int) + func (*Signature) ProtoMessage() + func (x *Signature) GetR() []byte + func (x *Signature) GetReplicaID() uint32 + func (x *Signature) GetS() []byte + func (x *Signature) ProtoReflect() protoreflect.Message + func (x *Signature) Reset() + func (x *Signature) String() string v0.1.0 Jul 29, 2020 Changes in this version + const LevelNotSet + var Error = func(n1, n2 *Node) bool + var File_internal_proto_hotstuff_proto protoreflect.FileDescriptor + var ID = func(n1, n2 *Node) bool + var Latency = func(n1, n2 *Node) bool + var Port = func(n1, n2 *Node) bool + func Equal(a, b *Configuration) bool + func ManagerCreationError(err error) error + type Block struct + Commands []*Command + Height int64 + ParentHash []byte + QC *QuorumCert + func BlockToProto(n *data.Block) *Block + func (*Block) Descriptor() ([]byte, []int) + func (*Block) ProtoMessage() + func (pn *Block) FromProto() *data.Block + func (x *Block) GetCommands() []*Command + func (x *Block) GetHeight() int64 + func (x *Block) GetParentHash() []byte + func (x *Block) GetQC() *QuorumCert + func (x *Block) ProtoReflect() protoreflect.Message + func (x *Block) Reset() + func (x *Block) String() string + type Command struct + Data []byte + func CommandToProto(cmd data.Command) *Command + func (*Command) Descriptor() ([]byte, []int) + func (*Command) ProtoMessage() + func (cmd *Command) FromProto() data.Command + func (x *Command) GetData() []byte + func (x *Command) ProtoReflect() protoreflect.Message + func (x *Command) Reset() + func (x *Command) String() string + type ConfigNotFoundError uint32 + func (e ConfigNotFoundError) Error() string + type Configuration struct + func NewConfig(qspec QuorumSpec, opts ...ManagerOption) (*Configuration, func(), error) + func (c *Configuration) ID() uint32 + func (c *Configuration) NodeIDs() []uint32 + func (c *Configuration) Nodes() []*Node + func (c *Configuration) Propose(in *Block) error + func (c *Configuration) Size() int + func (c *Configuration) String() string + func (c *Configuration) SubError() <-chan GRPCError + type GRPCError struct + Cause error + NodeID uint32 + func (e GRPCError) Error() string + type GorumsServer struct + func NewGorumsServer(opts ...ServerOption) *GorumsServer + func (s *GorumsServer) GracefulStop() + func (s *GorumsServer) RegisterHotstuffServer(srv Hotstuff) + func (s *GorumsServer) Serve(listener net.Listener) error + func (s *GorumsServer) Stop() + type Hotstuff interface + NewView func(context.Context, *QuorumCert) + Propose func(context.Context, *Block) + Vote func(context.Context, *PartialCert) + type IllegalConfigError string + func (e IllegalConfigError) Error() string + type Manager struct + func NewManager(opts ...ManagerOption) (*Manager, error) + func (m *Manager) AddNode(addr string) error + func (m *Manager) Close() + func (m *Manager) Configuration(id uint32) (config *Configuration, found bool) + func (m *Manager) ConfigurationIDs() []uint32 + func (m *Manager) Configurations() []*Configuration + func (m *Manager) NewConfiguration(ids []uint32, qspec QuorumSpec) (*Configuration, error) + func (m *Manager) Node(id uint32) (node *Node, found bool) + func (m *Manager) NodeIDs() []uint32 + func (m *Manager) Nodes() []*Node + func (m *Manager) Size() (nodes, configs int) + type ManagerOption func(*managerOptions) + func WithBackoff(backoff backoff.Config) ManagerOption + func WithDialTimeout(timeout time.Duration) ManagerOption + func WithGrpcDialOptions(opts ...grpc.DialOption) ManagerOption + func WithLogger(logger *log.Logger) ManagerOption + func WithMetadata(md metadata.MD) ManagerOption + func WithNoConnect() ManagerOption + func WithNodeList(addrsList []string) ManagerOption + func WithNodeMap(idMap map[string]uint32) ManagerOption + func WithPerNodeMetadata(f func(uint32) metadata.MD) ManagerOption + func WithSendBufferSize(size uint) ManagerOption + func WithTracing() ManagerOption + type MultiSorter struct + func OrderedBy(less ...lessFunc) *MultiSorter + func (ms *MultiSorter) Len() int + func (ms *MultiSorter) Less(i, j int) bool + func (ms *MultiSorter) Sort(nodes []*Node) + func (ms *MultiSorter) Swap(i, j int) + type Node struct + func (n *Node) Address() string + func (n *Node) FullString() string + func (n *Node) ID() uint32 + func (n *Node) LastErr() error + func (n *Node) Latency() time.Duration + func (n *Node) NewView(in *QuorumCert) error + func (n *Node) Port() string + func (n *Node) String() string + func (n *Node) Vote(in *PartialCert) error + type NodeNotFoundError uint32 + func (e NodeNotFoundError) Error() string + type PartialCert struct + Hash []byte + Sig *PartialSig + func PartialCertToProto(p *data.PartialCert) *PartialCert + func (*PartialCert) Descriptor() ([]byte, []int) + func (*PartialCert) ProtoMessage() + func (ppc *PartialCert) FromProto() *data.PartialCert + func (x *PartialCert) GetHash() []byte + func (x *PartialCert) GetSig() *PartialSig + func (x *PartialCert) ProtoReflect() protoreflect.Message + func (x *PartialCert) Reset() + func (x *PartialCert) String() string + type PartialSig struct + R []byte + ReplicaID int32 + S []byte + func PartialSigToProto(p *data.PartialSig) *PartialSig + func (*PartialSig) Descriptor() ([]byte, []int) + func (*PartialSig) ProtoMessage() + func (pps *PartialSig) FromProto() *data.PartialSig + func (x *PartialSig) GetR() []byte + func (x *PartialSig) GetReplicaID() int32 + func (x *PartialSig) GetS() []byte + func (x *PartialSig) ProtoReflect() protoreflect.Message + func (x *PartialSig) Reset() + func (x *PartialSig) String() string + type QuorumCallError struct + Errors []GRPCError + Reason string + ReplyCount int + func (e QuorumCallError) Error() string + type QuorumCert struct + Hash []byte + Sigs []*PartialSig + func QuorumCertToProto(qc *data.QuorumCert) *QuorumCert + func (*QuorumCert) Descriptor() ([]byte, []int) + func (*QuorumCert) ProtoMessage() + func (pqc *QuorumCert) FromProto() *data.QuorumCert + func (x *QuorumCert) GetHash() []byte + func (x *QuorumCert) GetSigs() []*PartialSig + func (x *QuorumCert) ProtoReflect() protoreflect.Message + func (x *QuorumCert) Reset() + func (x *QuorumCert) String() string + type QuorumSpec interface + type ServerOption func(*serverOptions) + func WithGRPCServerOptions(opts ...grpc.ServerOption) ServerOption + func WithServerBufferSize(size uint) ServerOption