hotstuffpb

package
v0.0.0-...-7cc9995 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package hotstuffpb contains protocol buffers message types and conversion functions for the HotStuff protocol.

Index

Constants

This section is empty.

Variables

View Source
var File_internal_proto_hotstuffpb_hotstuff_proto protoreflect.FileDescriptor

Functions

func AggregateQCFromProto

func AggregateQCFromProto(m *AggQC) consbench.AggregateQC

AggregateQCFromProto converts an AggregateQC from the protobuf type to the hotstuff type.

func BlockFromProto

func BlockFromProto(block *Block) *consbench.Block

BlockFromProto converts a hotstuffpb.Block to a consensus.Block.

func PartialCertFromProto

func PartialCertFromProto(cert *PartialCert) consbench.PartialCert

PartialCertFromProto converts a hotstuffpb.PartialCert to an ecdsa.PartialCert.

func ProposalFromProto

func ProposalFromProto(p *Proposal) (proposal consbench.ProposeMsg)

ProposalFromProto converts a protobuf message to a ProposeMsg.

func QuorumCertFromProto

func QuorumCertFromProto(qc *QuorumCert) consbench.QuorumCert

QuorumCertFromProto converts a hotstuffpb.QuorumCert to an ecdsa.QuorumCert.

func QuorumSignatureFromProto

func QuorumSignatureFromProto(sig *QuorumSignature) consbench.QuorumSignature

QuorumSignatureFromProto converts a protocol buffers message to a threshold signature.

func RegisterHotstuffServer

func RegisterHotstuffServer(srv *gorums.Server, impl Hotstuff)

func SyncInfoFromProto

func SyncInfoFromProto(m *SyncInfo) consbench.SyncInfo

SyncInfoFromProto converts a SyncInfo struct from the protobuf type to the hotstuff type.

func TimeoutCertFromProto

func TimeoutCertFromProto(m *TimeoutCert) consbench.TimeoutCert

TimeoutCertFromProto converts a timeout certificate from the protobuf type to the hotstuff type.

func TimeoutMsgFromProto

func TimeoutMsgFromProto(m *TimeoutMsg) consbench.TimeoutMsg

TimeoutMsgFromProto converts a TimeoutMsg proto to the hotstuff type.

Types

type AggQC

type AggQC struct {
	QCs  map[uint32]*QuorumCert `` /* 148-byte string literal not displayed */
	Sig  *QuorumSignature       `protobuf:"bytes,2,opt,name=Sig,proto3" json:"Sig,omitempty"`
	View uint64                 `protobuf:"varint,3,opt,name=View,proto3" json:"View,omitempty"`
	// contains filtered or unexported fields
}

func AggregateQCToProto

func AggregateQCToProto(aggQC consbench.AggregateQC) *AggQC

AggregateQCToProto converts an AggregateQC from the hotstuff type to the protobuf type.

func (*AggQC) Descriptor deprecated

func (*AggQC) Descriptor() ([]byte, []int)

Deprecated: Use AggQC.ProtoReflect.Descriptor instead.

func (*AggQC) GetQCs

func (x *AggQC) GetQCs() map[uint32]*QuorumCert

func (*AggQC) GetSig

func (x *AggQC) GetSig() *QuorumSignature

func (*AggQC) GetView

func (x *AggQC) GetView() uint64

func (*AggQC) ProtoMessage

func (*AggQC) ProtoMessage()

func (*AggQC) ProtoReflect

func (x *AggQC) ProtoReflect() protoreflect.Message

func (*AggQC) Reset

func (x *AggQC) Reset()

func (*AggQC) String

func (x *AggQC) String() string

type BLS12AggregateSignature

type BLS12AggregateSignature struct {
	Sig          []byte `protobuf:"bytes,1,opt,name=Sig,proto3" json:"Sig,omitempty"`
	Participants []byte `protobuf:"bytes,2,opt,name=participants,proto3" json:"participants,omitempty"`
	// contains filtered or unexported fields
}

func (*BLS12AggregateSignature) Descriptor deprecated

func (*BLS12AggregateSignature) Descriptor() ([]byte, []int)

Deprecated: Use BLS12AggregateSignature.ProtoReflect.Descriptor instead.

func (*BLS12AggregateSignature) GetParticipants

func (x *BLS12AggregateSignature) GetParticipants() []byte

func (*BLS12AggregateSignature) GetSig

func (x *BLS12AggregateSignature) GetSig() []byte

func (*BLS12AggregateSignature) ProtoMessage

func (*BLS12AggregateSignature) ProtoMessage()

func (*BLS12AggregateSignature) ProtoReflect

func (x *BLS12AggregateSignature) ProtoReflect() protoreflect.Message

func (*BLS12AggregateSignature) Reset

func (x *BLS12AggregateSignature) Reset()

func (*BLS12AggregateSignature) String

func (x *BLS12AggregateSignature) String() string

type BLS12Signature

type BLS12Signature struct {
	Sig []byte `protobuf:"bytes,1,opt,name=Sig,proto3" json:"Sig,omitempty"`
	// contains filtered or unexported fields
}

func (*BLS12Signature) Descriptor deprecated

func (*BLS12Signature) Descriptor() ([]byte, []int)

Deprecated: Use BLS12Signature.ProtoReflect.Descriptor instead.

func (*BLS12Signature) GetSig

func (x *BLS12Signature) GetSig() []byte

func (*BLS12Signature) ProtoMessage

func (*BLS12Signature) ProtoMessage()

func (*BLS12Signature) ProtoReflect

func (x *BLS12Signature) ProtoReflect() protoreflect.Message

func (*BLS12Signature) Reset

func (x *BLS12Signature) Reset()

func (*BLS12Signature) String

func (x *BLS12Signature) String() string

type Block

type Block struct {
	Parent   []byte      `protobuf:"bytes,1,opt,name=Parent,proto3" json:"Parent,omitempty"`
	QC       *QuorumCert `protobuf:"bytes,2,opt,name=QC,proto3" json:"QC,omitempty"`
	View     uint64      `protobuf:"varint,3,opt,name=View,proto3" json:"View,omitempty"`
	Command  []byte      `protobuf:"bytes,4,opt,name=Command,proto3" json:"Command,omitempty"`
	Proposer uint32      `protobuf:"varint,5,opt,name=Proposer,proto3" json:"Proposer,omitempty"`
	// contains filtered or unexported fields
}

func BlockToProto

func BlockToProto(block *consbench.Block) *Block

BlockToProto converts a consensus.Block to a hotstuffpb.Block.

func (*Block) Descriptor deprecated

func (*Block) Descriptor() ([]byte, []int)

Deprecated: Use Block.ProtoReflect.Descriptor instead.

func (*Block) GetCommand

func (x *Block) GetCommand() []byte

func (*Block) GetParent

func (x *Block) GetParent() []byte

func (*Block) GetProposer

func (x *Block) GetProposer() uint32

func (*Block) GetQC

func (x *Block) GetQC() *QuorumCert

func (*Block) GetView

func (x *Block) GetView() uint64

func (*Block) ProtoMessage

func (*Block) ProtoMessage()

func (*Block) ProtoReflect

func (x *Block) ProtoReflect() protoreflect.Message

func (*Block) Reset

func (x *Block) Reset()

func (*Block) String

func (x *Block) String() string

type BlockHash

type BlockHash struct {
	Hash []byte `protobuf:"bytes,1,opt,name=Hash,proto3" json:"Hash,omitempty"`
	// contains filtered or unexported fields
}

func (*BlockHash) Descriptor deprecated

func (*BlockHash) Descriptor() ([]byte, []int)

Deprecated: Use BlockHash.ProtoReflect.Descriptor instead.

func (*BlockHash) GetHash

func (x *BlockHash) GetHash() []byte

func (*BlockHash) ProtoMessage

func (*BlockHash) ProtoMessage()

func (*BlockHash) ProtoReflect

func (x *BlockHash) ProtoReflect() protoreflect.Message

func (*BlockHash) Reset

func (x *BlockHash) Reset()

func (*BlockHash) String

func (x *BlockHash) String() string

type Configuration

type Configuration struct {
	gorums.RawConfiguration
	// contains filtered or unexported fields
}

A Configuration represents a static set of nodes on which quorum remote procedure calls may be invoked.

func ConfigurationFromRaw

func ConfigurationFromRaw(rawCfg gorums.RawConfiguration, qspec QuorumSpec) *Configuration

ConfigurationFromRaw returns a new Configuration from the given raw configuration and QuorumSpec.

This function may for example be used to "clone" a configuration but install a different QuorumSpec:

cfg1, err := mgr.NewConfiguration(qspec1, opts...)
cfg2 := ConfigurationFromRaw(cfg1.RawConfig, qspec2)

func (Configuration) And

And returns a NodeListOption that can be used to create a new configuration combining c and d.

func (Configuration) Except

Except returns a NodeListOption that can be used to create a new configuration from c without the nodes in rm.

func (*Configuration) Fetch

func (c *Configuration) Fetch(ctx context.Context, in *BlockHash) (resp *Block, err error)

Fetch is a quorum call invoked on all nodes in configuration c, with the same argument in, and returns a combined result.

func (*Configuration) Nodes

func (c *Configuration) Nodes() []*Node

Nodes returns a slice of each available node. IDs are returned in the same order as they were provided in the creation of the Manager.

NOTE: mutating the returned slice is not supported.

func (*Configuration) Propose

func (c *Configuration) Propose(ctx context.Context, in *Proposal, opts ...gorums.CallOption)

Propose is a quorum call invoked on all nodes in configuration c, with the same argument in, and returns a combined result.

func (*Configuration) Timeout

func (c *Configuration) Timeout(ctx context.Context, in *TimeoutMsg, opts ...gorums.CallOption)

Timeout is a quorum call invoked on all nodes in configuration c, with the same argument in, and returns a combined result.

type ECDSAMultiSignature

type ECDSAMultiSignature struct {
	Sigs []*ECDSASignature `protobuf:"bytes,1,rep,name=Sigs,proto3" json:"Sigs,omitempty"`
	// contains filtered or unexported fields
}

func (*ECDSAMultiSignature) Descriptor deprecated

func (*ECDSAMultiSignature) Descriptor() ([]byte, []int)

Deprecated: Use ECDSAMultiSignature.ProtoReflect.Descriptor instead.

func (*ECDSAMultiSignature) GetSigs

func (x *ECDSAMultiSignature) GetSigs() []*ECDSASignature

func (*ECDSAMultiSignature) ProtoMessage

func (*ECDSAMultiSignature) ProtoMessage()

func (*ECDSAMultiSignature) ProtoReflect

func (x *ECDSAMultiSignature) ProtoReflect() protoreflect.Message

func (*ECDSAMultiSignature) Reset

func (x *ECDSAMultiSignature) Reset()

func (*ECDSAMultiSignature) String

func (x *ECDSAMultiSignature) String() string

type ECDSASignature

type ECDSASignature struct {
	Signer uint32 `protobuf:"varint,1,opt,name=Signer,proto3" json:"Signer,omitempty"`
	R      []byte `protobuf:"bytes,2,opt,name=R,proto3" json:"R,omitempty"`
	S      []byte `protobuf:"bytes,3,opt,name=S,proto3" json:"S,omitempty"`
	// contains filtered or unexported fields
}

func (*ECDSASignature) Descriptor deprecated

func (*ECDSASignature) Descriptor() ([]byte, []int)

Deprecated: Use ECDSASignature.ProtoReflect.Descriptor instead.

func (*ECDSASignature) GetR

func (x *ECDSASignature) GetR() []byte

func (*ECDSASignature) GetS

func (x *ECDSASignature) GetS() []byte

func (*ECDSASignature) GetSigner

func (x *ECDSASignature) GetSigner() uint32

func (*ECDSASignature) ProtoMessage

func (*ECDSASignature) ProtoMessage()

func (*ECDSASignature) ProtoReflect

func (x *ECDSASignature) ProtoReflect() protoreflect.Message

func (*ECDSASignature) Reset

func (x *ECDSASignature) Reset()

func (*ECDSASignature) String

func (x *ECDSASignature) String() string

type EDDSAMultiSignature

type EDDSAMultiSignature struct {
	Sigs []*EDDSASignature `protobuf:"bytes,1,rep,name=Sigs,proto3" json:"Sigs,omitempty"`
	// contains filtered or unexported fields
}

func (*EDDSAMultiSignature) Descriptor deprecated

func (*EDDSAMultiSignature) Descriptor() ([]byte, []int)

Deprecated: Use EDDSAMultiSignature.ProtoReflect.Descriptor instead.

func (*EDDSAMultiSignature) GetSigs

func (x *EDDSAMultiSignature) GetSigs() []*EDDSASignature

func (*EDDSAMultiSignature) ProtoMessage

func (*EDDSAMultiSignature) ProtoMessage()

func (*EDDSAMultiSignature) ProtoReflect

func (x *EDDSAMultiSignature) ProtoReflect() protoreflect.Message

func (*EDDSAMultiSignature) Reset

func (x *EDDSAMultiSignature) Reset()

func (*EDDSAMultiSignature) String

func (x *EDDSAMultiSignature) String() string

type EDDSASignature

type EDDSASignature struct {
	Signer uint32 `protobuf:"varint,1,opt,name=Signer,proto3" json:"Signer,omitempty"`
	Sig    []byte `protobuf:"bytes,2,opt,name=Sig,proto3" json:"Sig,omitempty"`
	// contains filtered or unexported fields
}

func (*EDDSASignature) Descriptor deprecated

func (*EDDSASignature) Descriptor() ([]byte, []int)

Deprecated: Use EDDSASignature.ProtoReflect.Descriptor instead.

func (*EDDSASignature) GetSig

func (x *EDDSASignature) GetSig() []byte

func (*EDDSASignature) GetSigner

func (x *EDDSASignature) GetSigner() uint32

func (*EDDSASignature) ProtoMessage

func (*EDDSASignature) ProtoMessage()

func (*EDDSASignature) ProtoReflect

func (x *EDDSASignature) ProtoReflect() protoreflect.Message

func (*EDDSASignature) Reset

func (x *EDDSASignature) Reset()

func (*EDDSASignature) String

func (x *EDDSASignature) String() string

type Hotstuff

type Hotstuff interface {
	Propose(ctx gorums.ServerCtx, request *Proposal)
	Vote(ctx gorums.ServerCtx, request *PartialCert)
	Timeout(ctx gorums.ServerCtx, request *TimeoutMsg)
	NewView(ctx gorums.ServerCtx, request *SyncInfo)
	Fetch(ctx gorums.ServerCtx, request *BlockHash) (response *Block, err error)
}

Hotstuff is the server-side API for the Hotstuff Service

type Manager

type Manager struct {
	*gorums.RawManager
}

Manager maintains a connection pool of nodes on which quorum calls can be performed.

func NewManager

func NewManager(opts ...gorums.ManagerOption) (mgr *Manager)

NewManager returns a new Manager for managing connection to nodes added to the manager. This function accepts manager options used to configure various aspects of the manager.

func (*Manager) NewConfiguration

func (m *Manager) NewConfiguration(opts ...gorums.ConfigOption) (c *Configuration, err error)

NewConfiguration returns a configuration based on the provided list of nodes (required) and an optional quorum specification. The QuorumSpec is necessary for call types that must process replies. For configurations only used for unicast or multicast call types, a QuorumSpec is not needed. The QuorumSpec interface is also a ConfigOption. Nodes can be supplied using WithNodeMap or WithNodeList, or WithNodeIDs. A new configuration can also be created from an existing configuration, using the And, WithNewNodes, Except, and WithoutNodes methods.

func (*Manager) Nodes

func (m *Manager) Nodes() []*Node

Nodes returns a slice of available nodes on this manager. IDs are returned in the order they were added at creation of the manager.

type Node

type Node struct {
	*gorums.RawNode
}

Node encapsulates the state of a node on which a remote procedure call can be performed.

func (*Node) NewView

func (n *Node) NewView(ctx context.Context, in *SyncInfo, opts ...gorums.CallOption)

NewView is a quorum call invoked on all nodes in configuration c, with the same argument in, and returns a combined result.

func (*Node) Vote

func (n *Node) Vote(ctx context.Context, in *PartialCert, opts ...gorums.CallOption)

Vote is a quorum call invoked on all nodes in configuration c, with the same argument in, and returns a combined result.

type PartialCert

type PartialCert struct {
	Sig  *QuorumSignature `protobuf:"bytes,1,opt,name=Sig,proto3" json:"Sig,omitempty"`
	Hash []byte           `protobuf:"bytes,2,opt,name=Hash,proto3" json:"Hash,omitempty"`
	// contains filtered or unexported fields
}

func PartialCertToProto

func PartialCertToProto(cert consbench.PartialCert) *PartialCert

PartialCertToProto converts a consensus.PartialCert to a hotstuffpb.PartialCert.

func (*PartialCert) Descriptor deprecated

func (*PartialCert) Descriptor() ([]byte, []int)

Deprecated: Use PartialCert.ProtoReflect.Descriptor instead.

func (*PartialCert) GetHash

func (x *PartialCert) GetHash() []byte

func (*PartialCert) GetSig

func (x *PartialCert) GetSig() *QuorumSignature

func (*PartialCert) ProtoMessage

func (*PartialCert) ProtoMessage()

func (*PartialCert) ProtoReflect

func (x *PartialCert) ProtoReflect() protoreflect.Message

func (*PartialCert) Reset

func (x *PartialCert) Reset()

func (*PartialCert) String

func (x *PartialCert) String() string

type Proposal

type Proposal struct {
	Block *Block `protobuf:"bytes,1,opt,name=Block,proto3" json:"Block,omitempty"`
	AggQC *AggQC `protobuf:"bytes,2,opt,name=AggQC,proto3" json:"AggQC,omitempty"`
	// contains filtered or unexported fields
}

func ProposalToProto

func ProposalToProto(proposal consbench.ProposeMsg) *Proposal

ProposalToProto converts a ProposeMsg to a protobuf message.

func (*Proposal) Descriptor deprecated

func (*Proposal) Descriptor() ([]byte, []int)

Deprecated: Use Proposal.ProtoReflect.Descriptor instead.

func (*Proposal) GetAggQC

func (x *Proposal) GetAggQC() *AggQC

func (*Proposal) GetBlock

func (x *Proposal) GetBlock() *Block

func (*Proposal) ProtoMessage

func (*Proposal) ProtoMessage()

func (*Proposal) ProtoReflect

func (x *Proposal) ProtoReflect() protoreflect.Message

func (*Proposal) Reset

func (x *Proposal) Reset()

func (*Proposal) String

func (x *Proposal) String() string

type QuorumCert

type QuorumCert struct {
	Sig  *QuorumSignature `protobuf:"bytes,1,opt,name=Sig,proto3" json:"Sig,omitempty"`
	View uint64           `protobuf:"varint,2,opt,name=View,proto3" json:"View,omitempty"`
	Hash []byte           `protobuf:"bytes,3,opt,name=Hash,proto3" json:"Hash,omitempty"`
	// contains filtered or unexported fields
}

func QuorumCertToProto

func QuorumCertToProto(qc consbench.QuorumCert) *QuorumCert

QuorumCertToProto converts a consensus.QuorumCert to a hotstuffpb.QuorumCert.

func (*QuorumCert) Descriptor deprecated

func (*QuorumCert) Descriptor() ([]byte, []int)

Deprecated: Use QuorumCert.ProtoReflect.Descriptor instead.

func (*QuorumCert) GetHash

func (x *QuorumCert) GetHash() []byte

func (*QuorumCert) GetSig

func (x *QuorumCert) GetSig() *QuorumSignature

func (*QuorumCert) GetView

func (x *QuorumCert) GetView() uint64

func (*QuorumCert) ProtoMessage

func (*QuorumCert) ProtoMessage()

func (*QuorumCert) ProtoReflect

func (x *QuorumCert) ProtoReflect() protoreflect.Message

func (*QuorumCert) Reset

func (x *QuorumCert) Reset()

func (*QuorumCert) String

func (x *QuorumCert) String() string

type QuorumSignature

type QuorumSignature struct {

	// Types that are assignable to Sig:
	//
	//	*QuorumSignature_ECDSASigs
	//	*QuorumSignature_BLS12Sig
	//	*QuorumSignature_EDDSASigs
	Sig isQuorumSignature_Sig `protobuf_oneof:"Sig"`
	// contains filtered or unexported fields
}

func QuorumSignatureToProto

func QuorumSignatureToProto(sig consbench.QuorumSignature) *QuorumSignature

QuorumSignatureToProto converts a threshold signature to a protocol buffers message.

func (*QuorumSignature) Descriptor deprecated

func (*QuorumSignature) Descriptor() ([]byte, []int)

Deprecated: Use QuorumSignature.ProtoReflect.Descriptor instead.

func (*QuorumSignature) GetBLS12Sig

func (x *QuorumSignature) GetBLS12Sig() *BLS12AggregateSignature

func (*QuorumSignature) GetECDSASigs

func (x *QuorumSignature) GetECDSASigs() *ECDSAMultiSignature

func (*QuorumSignature) GetEDDSASigs

func (x *QuorumSignature) GetEDDSASigs() *EDDSAMultiSignature

func (*QuorumSignature) GetSig

func (m *QuorumSignature) GetSig() isQuorumSignature_Sig

func (*QuorumSignature) ProtoMessage

func (*QuorumSignature) ProtoMessage()

func (*QuorumSignature) ProtoReflect

func (x *QuorumSignature) ProtoReflect() protoreflect.Message

func (*QuorumSignature) Reset

func (x *QuorumSignature) Reset()

func (*QuorumSignature) String

func (x *QuorumSignature) String() string

type QuorumSignature_BLS12Sig

type QuorumSignature_BLS12Sig struct {
	BLS12Sig *BLS12AggregateSignature `protobuf:"bytes,2,opt,name=BLS12Sig,proto3,oneof"`
}

type QuorumSignature_ECDSASigs

type QuorumSignature_ECDSASigs struct {
	ECDSASigs *ECDSAMultiSignature `protobuf:"bytes,1,opt,name=ECDSASigs,proto3,oneof"`
}

type QuorumSignature_EDDSASigs

type QuorumSignature_EDDSASigs struct {
	EDDSASigs *EDDSAMultiSignature `protobuf:"bytes,3,opt,name=EDDSASigs,proto3,oneof"`
}

type QuorumSpec

type QuorumSpec interface {
	gorums.ConfigOption

	// FetchQF is the quorum function for the Fetch
	// quorum call method. The in parameter is the request object
	// supplied to the Fetch method at call time, and may or may not
	// be used by the quorum function. If the in parameter is not needed
	// you should implement your quorum function with '_ *BlockHash'.
	FetchQF(in *BlockHash, replies map[uint32]*Block) (*Block, bool)
}

QuorumSpec is the interface of quorum functions for Hotstuff.

type Signature

type Signature struct {

	// Types that are assignable to Sig:
	//
	//	*Signature_ECDSASig
	//	*Signature_BLS12Sig
	//	*Signature_EDDSASig
	Sig isSignature_Sig `protobuf_oneof:"Sig"`
	// contains filtered or unexported fields
}

func (*Signature) Descriptor deprecated

func (*Signature) Descriptor() ([]byte, []int)

Deprecated: Use Signature.ProtoReflect.Descriptor instead.

func (*Signature) GetBLS12Sig

func (x *Signature) GetBLS12Sig() *BLS12Signature

func (*Signature) GetECDSASig

func (x *Signature) GetECDSASig() *ECDSASignature

func (*Signature) GetEDDSASig

func (x *Signature) GetEDDSASig() *EDDSASignature

func (*Signature) GetSig

func (m *Signature) GetSig() isSignature_Sig

func (*Signature) ProtoMessage

func (*Signature) ProtoMessage()

func (*Signature) ProtoReflect

func (x *Signature) ProtoReflect() protoreflect.Message

func (*Signature) Reset

func (x *Signature) Reset()

func (*Signature) String

func (x *Signature) String() string

type Signature_BLS12Sig

type Signature_BLS12Sig struct {
	BLS12Sig *BLS12Signature `protobuf:"bytes,2,opt,name=BLS12Sig,proto3,oneof"`
}

type Signature_ECDSASig

type Signature_ECDSASig struct {
	ECDSASig *ECDSASignature `protobuf:"bytes,1,opt,name=ECDSASig,proto3,oneof"`
}

type Signature_EDDSASig

type Signature_EDDSASig struct {
	EDDSASig *EDDSASignature `protobuf:"bytes,3,opt,name=EDDSASig,proto3,oneof"`
}

type SyncInfo

type SyncInfo struct {
	QC    *QuorumCert  `protobuf:"bytes,1,opt,name=QC,proto3" json:"QC,omitempty"`
	TC    *TimeoutCert `protobuf:"bytes,2,opt,name=TC,proto3" json:"TC,omitempty"`
	AggQC *AggQC       `protobuf:"bytes,3,opt,name=AggQC,proto3" json:"AggQC,omitempty"`
	// contains filtered or unexported fields
}

func SyncInfoToProto

func SyncInfoToProto(syncInfo consbench.SyncInfo) *SyncInfo

SyncInfoToProto converts a SyncInfo struct from the hotstuff type to the protobuf type.

func (*SyncInfo) Descriptor deprecated

func (*SyncInfo) Descriptor() ([]byte, []int)

Deprecated: Use SyncInfo.ProtoReflect.Descriptor instead.

func (*SyncInfo) GetAggQC

func (x *SyncInfo) GetAggQC() *AggQC

func (*SyncInfo) GetQC

func (x *SyncInfo) GetQC() *QuorumCert

func (*SyncInfo) GetTC

func (x *SyncInfo) GetTC() *TimeoutCert

func (*SyncInfo) ProtoMessage

func (*SyncInfo) ProtoMessage()

func (*SyncInfo) ProtoReflect

func (x *SyncInfo) ProtoReflect() protoreflect.Message

func (*SyncInfo) Reset

func (x *SyncInfo) Reset()

func (*SyncInfo) String

func (x *SyncInfo) String() string

type TimeoutCert

type TimeoutCert struct {
	Sig  *QuorumSignature `protobuf:"bytes,1,opt,name=Sig,proto3" json:"Sig,omitempty"`
	View uint64           `protobuf:"varint,2,opt,name=View,proto3" json:"View,omitempty"`
	// contains filtered or unexported fields
}

func TimeoutCertToProto

func TimeoutCertToProto(timeoutCert consbench.TimeoutCert) *TimeoutCert

TimeoutCertToProto converts a timeout certificate from the hotstuff type to the protobuf type.

func (*TimeoutCert) Descriptor deprecated

func (*TimeoutCert) Descriptor() ([]byte, []int)

Deprecated: Use TimeoutCert.ProtoReflect.Descriptor instead.

func (*TimeoutCert) GetSig

func (x *TimeoutCert) GetSig() *QuorumSignature

func (*TimeoutCert) GetView

func (x *TimeoutCert) GetView() uint64

func (*TimeoutCert) ProtoMessage

func (*TimeoutCert) ProtoMessage()

func (*TimeoutCert) ProtoReflect

func (x *TimeoutCert) ProtoReflect() protoreflect.Message

func (*TimeoutCert) Reset

func (x *TimeoutCert) Reset()

func (*TimeoutCert) String

func (x *TimeoutCert) String() string

type TimeoutMsg

type TimeoutMsg struct {
	View     uint64           `protobuf:"varint,1,opt,name=View,proto3" json:"View,omitempty"`
	SyncInfo *SyncInfo        `protobuf:"bytes,2,opt,name=SyncInfo,proto3" json:"SyncInfo,omitempty"`
	ViewSig  *QuorumSignature `protobuf:"bytes,3,opt,name=ViewSig,proto3" json:"ViewSig,omitempty"`
	MsgSig   *QuorumSignature `protobuf:"bytes,4,opt,name=MsgSig,proto3" json:"MsgSig,omitempty"`
	// contains filtered or unexported fields
}

func TimeoutMsgToProto

func TimeoutMsgToProto(timeoutMsg consbench.TimeoutMsg) *TimeoutMsg

TimeoutMsgToProto converts a TimeoutMsg to the protobuf type.

func (*TimeoutMsg) Descriptor deprecated

func (*TimeoutMsg) Descriptor() ([]byte, []int)

Deprecated: Use TimeoutMsg.ProtoReflect.Descriptor instead.

func (*TimeoutMsg) GetMsgSig

func (x *TimeoutMsg) GetMsgSig() *QuorumSignature

func (*TimeoutMsg) GetSyncInfo

func (x *TimeoutMsg) GetSyncInfo() *SyncInfo

func (*TimeoutMsg) GetView

func (x *TimeoutMsg) GetView() uint64

func (*TimeoutMsg) GetViewSig

func (x *TimeoutMsg) GetViewSig() *QuorumSignature

func (*TimeoutMsg) ProtoMessage

func (*TimeoutMsg) ProtoMessage()

func (*TimeoutMsg) ProtoReflect

func (x *TimeoutMsg) ProtoReflect() protoreflect.Message

func (*TimeoutMsg) Reset

func (x *TimeoutMsg) Reset()

func (*TimeoutMsg) String

func (x *TimeoutMsg) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL