hotstuff

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthHotstuff        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowHotstuff          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupHotstuff = fmt.Errorf("proto: unexpected end of group")
)
View Source
var ConsStateType_name = map[int32]string{
	0: "VOTE_COLLECT",
	1: "PACEMAKER",
}
View Source
var ConsStateType_value = map[string]int32{
	"VOTE_COLLECT": 0,
	"PACEMAKER":    1,
}
View Source
var MessageType_name = map[int32]string{
	0: "PROPOSAL_MESSAGE",
	1: "VOTE_MESSAGE",
	2: "PROPOSAL_FETCH_MESSAGE",
	3: "PROPOSAL_RESP_MESSAGE",
	4: "NEW_VIEW_MESSAGE",
}
View Source
var MessageType_value = map[string]int32{
	"PROPOSAL_MESSAGE":       0,
	"VOTE_MESSAGE":           1,
	"PROPOSAL_FETCH_MESSAGE": 2,
	"PROPOSAL_RESP_MESSAGE":  3,
	"NEW_VIEW_MESSAGE":       4,
}

Functions

This section is empty.

Types

type BuildProposal

type BuildProposal struct {
	Height  uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
	View    uint64 `protobuf:"varint,2,opt,name=view,proto3" json:"view,omitempty"`
	PreHash []byte `protobuf:"bytes,3,opt,name=pre_hash,json=preHash,proto3" json:"pre_hash,omitempty"`
}

func (*BuildProposal) Descriptor

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

func (*BuildProposal) GetHeight

func (m *BuildProposal) GetHeight() uint64

func (*BuildProposal) GetPreHash

func (m *BuildProposal) GetPreHash() []byte

func (*BuildProposal) GetView

func (m *BuildProposal) GetView() uint64

func (*BuildProposal) Marshal

func (m *BuildProposal) Marshal() (dAtA []byte, err error)

func (*BuildProposal) MarshalTo

func (m *BuildProposal) MarshalTo(dAtA []byte) (int, error)

func (*BuildProposal) MarshalToSizedBuffer

func (m *BuildProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*BuildProposal) ProtoMessage

func (*BuildProposal) ProtoMessage()

func (*BuildProposal) Reset

func (m *BuildProposal) Reset()

func (*BuildProposal) Size

func (m *BuildProposal) Size() (n int)

func (*BuildProposal) String

func (m *BuildProposal) String() string

func (*BuildProposal) Unmarshal

func (m *BuildProposal) Unmarshal(dAtA []byte) error

func (*BuildProposal) XXX_DiscardUnknown

func (m *BuildProposal) XXX_DiscardUnknown()

func (*BuildProposal) XXX_Marshal

func (m *BuildProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BuildProposal) XXX_Merge

func (m *BuildProposal) XXX_Merge(src proto.Message)

func (*BuildProposal) XXX_Size

func (m *BuildProposal) XXX_Size() int

func (*BuildProposal) XXX_Unmarshal

func (m *BuildProposal) XXX_Unmarshal(b []byte) error

type ConsStateType

type ConsStateType int32
const (
	// The collection phase of the votes
	ConsStateType_VOTE_COLLECT ConsStateType = 0
	// pacemaker of the consensus
	ConsStateType_PACEMAKER ConsStateType = 1
)

func (ConsStateType) EnumDescriptor

func (ConsStateType) EnumDescriptor() ([]byte, []int)

func (ConsStateType) String

func (x ConsStateType) String() string

type ConsensusMsg

type ConsensusMsg struct {
	Type    MessageType `protobuf:"varint,1,opt,name=type,proto3,enum=hotstuff.MessageType" json:"type,omitempty"`
	Payload []byte      `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
}

func (*ConsensusMsg) Descriptor

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

func (*ConsensusMsg) GetPayload

func (m *ConsensusMsg) GetPayload() []byte

func (*ConsensusMsg) GetType

func (m *ConsensusMsg) GetType() MessageType

func (*ConsensusMsg) Marshal

func (m *ConsensusMsg) Marshal() (dAtA []byte, err error)

func (*ConsensusMsg) MarshalTo

func (m *ConsensusMsg) MarshalTo(dAtA []byte) (int, error)

func (*ConsensusMsg) MarshalToSizedBuffer

func (m *ConsensusMsg) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ConsensusMsg) ProtoMessage

func (*ConsensusMsg) ProtoMessage()

func (*ConsensusMsg) Reset

func (m *ConsensusMsg) Reset()

func (*ConsensusMsg) Size

func (m *ConsensusMsg) Size() (n int)

func (*ConsensusMsg) String

func (m *ConsensusMsg) String() string

func (*ConsensusMsg) Unmarshal

func (m *ConsensusMsg) Unmarshal(dAtA []byte) error

func (*ConsensusMsg) XXX_DiscardUnknown

func (m *ConsensusMsg) XXX_DiscardUnknown()

func (*ConsensusMsg) XXX_Marshal

func (m *ConsensusMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConsensusMsg) XXX_Merge

func (m *ConsensusMsg) XXX_Merge(src proto.Message)

func (*ConsensusMsg) XXX_Size

func (m *ConsensusMsg) XXX_Size() int

func (*ConsensusMsg) XXX_Unmarshal

func (m *ConsensusMsg) XXX_Unmarshal(b []byte) error

type GovernanceContract

type GovernanceContract struct {
	// current epoch id
	EpochId uint64 `protobuf:"varint,1,opt,name=epoch_id,json=epochId,proto3" json:"epoch_id,omitempty"`
	// the last view or block height in the epoch
	EndView uint64 `protobuf:"varint,2,opt,name=end_view,json=endView,proto3" json:"end_view,omitempty"`
	// list of consensus nodeIds
	Validators []string `protobuf:"bytes,3,rep,name=validators,proto3" json:"validators,omitempty"`
	// chain config version witch the epoch was based on
	ConfigSequence uint64 `protobuf:"varint,4,opt,name=config_sequence,json=configSequence,proto3" json:"config_sequence,omitempty"`
	// chain config
	ChainConfig *config.ChainConfig `protobuf:"bytes,5,opt,name=chain_config,json=chainConfig,proto3" json:"chain_config,omitempty"`
	// cert frozen list
	CertFrozenList []byte `protobuf:"bytes,6,opt,name=cert_frozen_list,json=certFrozenList,proto3" json:"cert_frozen_list,omitempty"`
	// CRL
	CRL []byte `protobuf:"bytes,7,opt,name=CRL,proto3" json:"CRL,omitempty"`
}

func (*GovernanceContract) Descriptor

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

func (*GovernanceContract) GetCRL

func (m *GovernanceContract) GetCRL() []byte

func (*GovernanceContract) GetCertFrozenList

func (m *GovernanceContract) GetCertFrozenList() []byte

func (*GovernanceContract) GetChainConfig

func (m *GovernanceContract) GetChainConfig() *config.ChainConfig

func (*GovernanceContract) GetConfigSequence

func (m *GovernanceContract) GetConfigSequence() uint64

func (*GovernanceContract) GetEndView

func (m *GovernanceContract) GetEndView() uint64

func (*GovernanceContract) GetEpochId

func (m *GovernanceContract) GetEpochId() uint64

func (*GovernanceContract) GetValidators

func (m *GovernanceContract) GetValidators() []string

func (*GovernanceContract) Marshal

func (m *GovernanceContract) Marshal() (dAtA []byte, err error)

func (*GovernanceContract) MarshalTo

func (m *GovernanceContract) MarshalTo(dAtA []byte) (int, error)

func (*GovernanceContract) MarshalToSizedBuffer

func (m *GovernanceContract) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GovernanceContract) ProtoMessage

func (*GovernanceContract) ProtoMessage()

func (*GovernanceContract) Reset

func (m *GovernanceContract) Reset()

func (*GovernanceContract) Size

func (m *GovernanceContract) Size() (n int)

func (*GovernanceContract) String

func (m *GovernanceContract) String() string

func (*GovernanceContract) Unmarshal

func (m *GovernanceContract) Unmarshal(dAtA []byte) error

func (*GovernanceContract) XXX_DiscardUnknown

func (m *GovernanceContract) XXX_DiscardUnknown()

func (*GovernanceContract) XXX_Marshal

func (m *GovernanceContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GovernanceContract) XXX_Merge

func (m *GovernanceContract) XXX_Merge(src proto.Message)

func (*GovernanceContract) XXX_Size

func (m *GovernanceContract) XXX_Size() int

func (*GovernanceContract) XXX_Unmarshal

func (m *GovernanceContract) XXX_Unmarshal(b []byte) error

type MessageType

type MessageType int32
const (
	MessageType_PROPOSAL_MESSAGE       MessageType = 0
	MessageType_VOTE_MESSAGE           MessageType = 1
	MessageType_PROPOSAL_FETCH_MESSAGE MessageType = 2
	MessageType_PROPOSAL_RESP_MESSAGE  MessageType = 3
	MessageType_NEW_VIEW_MESSAGE       MessageType = 4
)

func (MessageType) EnumDescriptor

func (MessageType) EnumDescriptor() ([]byte, []int)

func (MessageType) String

func (x MessageType) String() string

type NodeStatus

type NodeStatus struct {
	Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
	View   uint64 `protobuf:"varint,2,opt,name=view,proto3" json:"view,omitempty"`
	Epoch  uint64 `protobuf:"varint,3,opt,name=epoch,proto3" json:"epoch,omitempty"`
	NodeId string `protobuf:"bytes,4,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
}

func (*NodeStatus) Descriptor

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

func (*NodeStatus) GetEpoch

func (m *NodeStatus) GetEpoch() uint64

func (*NodeStatus) GetHeight

func (m *NodeStatus) GetHeight() uint64

func (*NodeStatus) GetNodeId

func (m *NodeStatus) GetNodeId() string

func (*NodeStatus) GetView

func (m *NodeStatus) GetView() uint64

func (*NodeStatus) Marshal

func (m *NodeStatus) Marshal() (dAtA []byte, err error)

func (*NodeStatus) MarshalTo

func (m *NodeStatus) MarshalTo(dAtA []byte) (int, error)

func (*NodeStatus) MarshalToSizedBuffer

func (m *NodeStatus) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*NodeStatus) ProtoMessage

func (*NodeStatus) ProtoMessage()

func (*NodeStatus) Reset

func (m *NodeStatus) Reset()

func (*NodeStatus) Size

func (m *NodeStatus) Size() (n int)

func (*NodeStatus) String

func (m *NodeStatus) String() string

func (*NodeStatus) Unmarshal

func (m *NodeStatus) Unmarshal(dAtA []byte) error

func (*NodeStatus) XXX_DiscardUnknown

func (m *NodeStatus) XXX_DiscardUnknown()

func (*NodeStatus) XXX_Marshal

func (m *NodeStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NodeStatus) XXX_Merge

func (m *NodeStatus) XXX_Merge(src proto.Message)

func (*NodeStatus) XXX_Size

func (m *NodeStatus) XXX_Size() int

func (*NodeStatus) XXX_Unmarshal

func (m *NodeStatus) XXX_Unmarshal(b []byte) error

type ProposalData

type ProposalData struct {
	// block info of the proposal
	Block *common.Block `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"`
	// consensus view of the proposal
	View     uint64 `protobuf:"varint,2,opt,name=view,proto3" json:"view,omitempty"`
	Proposer string `protobuf:"bytes,3,opt,name=proposer,proto3" json:"proposer,omitempty"`
	// the qc info of the parent's block in the proposal
	JustifyQc *QuorumCert       `protobuf:"bytes,4,opt,name=justify_qc,json=justifyQc,proto3" json:"justify_qc,omitempty"`
	EpochId   uint64            `protobuf:"varint,5,opt,name=epoch_id,json=epochId,proto3" json:"epoch_id,omitempty"`
	TxRwSet   []*common.TxRWSet `protobuf:"bytes,6,rep,name=tx_rw_set,json=txRwSet,proto3" json:"tx_rw_set,omitempty"`
}

func (*ProposalData) Descriptor

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

func (*ProposalData) GetBlock

func (m *ProposalData) GetBlock() *common.Block

func (*ProposalData) GetEpochId

func (m *ProposalData) GetEpochId() uint64

func (*ProposalData) GetJustifyQc

func (m *ProposalData) GetJustifyQc() *QuorumCert

func (*ProposalData) GetProposer

func (m *ProposalData) GetProposer() string

func (*ProposalData) GetTxRwSet

func (m *ProposalData) GetTxRwSet() []*common.TxRWSet

func (*ProposalData) GetView

func (m *ProposalData) GetView() uint64

func (*ProposalData) Marshal

func (m *ProposalData) Marshal() (dAtA []byte, err error)

func (*ProposalData) MarshalTo

func (m *ProposalData) MarshalTo(dAtA []byte) (int, error)

func (*ProposalData) MarshalToSizedBuffer

func (m *ProposalData) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ProposalData) ProtoMessage

func (*ProposalData) ProtoMessage()

func (*ProposalData) Reset

func (m *ProposalData) Reset()

func (*ProposalData) Size

func (m *ProposalData) Size() (n int)

func (*ProposalData) String

func (m *ProposalData) String() string

func (*ProposalData) Unmarshal

func (m *ProposalData) Unmarshal(dAtA []byte) error

func (*ProposalData) XXX_DiscardUnknown

func (m *ProposalData) XXX_DiscardUnknown()

func (*ProposalData) XXX_Marshal

func (m *ProposalData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProposalData) XXX_Merge

func (m *ProposalData) XXX_Merge(src proto.Message)

func (*ProposalData) XXX_Size

func (m *ProposalData) XXX_Size() int

func (*ProposalData) XXX_Unmarshal

func (m *ProposalData) XXX_Unmarshal(b []byte) error

type ProposalFetchMsg

type ProposalFetchMsg struct {
	// block id of the request proposal
	BlockId []byte `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"`
	// block height of the request block
	Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
	// consensus view of the request block
	View uint64 `protobuf:"varint,3,opt,name=view,proto3" json:"view,omitempty"`
	// identify of the requester
	Requester []byte `protobuf:"bytes,4,opt,name=requester,proto3" json:"requester,omitempty"`
}

func (*ProposalFetchMsg) Descriptor

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

func (*ProposalFetchMsg) GetBlockId

func (m *ProposalFetchMsg) GetBlockId() []byte

func (*ProposalFetchMsg) GetHeight

func (m *ProposalFetchMsg) GetHeight() uint64

func (*ProposalFetchMsg) GetRequester

func (m *ProposalFetchMsg) GetRequester() []byte

func (*ProposalFetchMsg) GetView

func (m *ProposalFetchMsg) GetView() uint64

func (*ProposalFetchMsg) Marshal

func (m *ProposalFetchMsg) Marshal() (dAtA []byte, err error)

func (*ProposalFetchMsg) MarshalTo

func (m *ProposalFetchMsg) MarshalTo(dAtA []byte) (int, error)

func (*ProposalFetchMsg) MarshalToSizedBuffer

func (m *ProposalFetchMsg) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ProposalFetchMsg) ProtoMessage

func (*ProposalFetchMsg) ProtoMessage()

func (*ProposalFetchMsg) Reset

func (m *ProposalFetchMsg) Reset()

func (*ProposalFetchMsg) Size

func (m *ProposalFetchMsg) Size() (n int)

func (*ProposalFetchMsg) String

func (m *ProposalFetchMsg) String() string

func (*ProposalFetchMsg) Unmarshal

func (m *ProposalFetchMsg) Unmarshal(dAtA []byte) error

func (*ProposalFetchMsg) XXX_DiscardUnknown

func (m *ProposalFetchMsg) XXX_DiscardUnknown()

func (*ProposalFetchMsg) XXX_Marshal

func (m *ProposalFetchMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProposalFetchMsg) XXX_Merge

func (m *ProposalFetchMsg) XXX_Merge(src proto.Message)

func (*ProposalFetchMsg) XXX_Size

func (m *ProposalFetchMsg) XXX_Size() int

func (*ProposalFetchMsg) XXX_Unmarshal

func (m *ProposalFetchMsg) XXX_Unmarshal(b []byte) error

type ProposalRespMsg

type ProposalRespMsg struct {
	// proposal in response
	Proposal *ProposalData `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"`
	// identify of the responser
	Responser []byte `protobuf:"bytes,2,opt,name=responser,proto3" json:"responser,omitempty"`
	// qc of the proposal
	Qc *QuorumCert `protobuf:"bytes,3,opt,name=qc,proto3" json:"qc,omitempty"`
}

func (*ProposalRespMsg) Descriptor

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

func (*ProposalRespMsg) GetProposal

func (m *ProposalRespMsg) GetProposal() *ProposalData

func (*ProposalRespMsg) GetQc

func (m *ProposalRespMsg) GetQc() *QuorumCert

func (*ProposalRespMsg) GetResponser

func (m *ProposalRespMsg) GetResponser() []byte

func (*ProposalRespMsg) Marshal

func (m *ProposalRespMsg) Marshal() (dAtA []byte, err error)

func (*ProposalRespMsg) MarshalTo

func (m *ProposalRespMsg) MarshalTo(dAtA []byte) (int, error)

func (*ProposalRespMsg) MarshalToSizedBuffer

func (m *ProposalRespMsg) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ProposalRespMsg) ProtoMessage

func (*ProposalRespMsg) ProtoMessage()

func (*ProposalRespMsg) Reset

func (m *ProposalRespMsg) Reset()

func (*ProposalRespMsg) Size

func (m *ProposalRespMsg) Size() (n int)

func (*ProposalRespMsg) String

func (m *ProposalRespMsg) String() string

func (*ProposalRespMsg) Unmarshal

func (m *ProposalRespMsg) Unmarshal(dAtA []byte) error

func (*ProposalRespMsg) XXX_DiscardUnknown

func (m *ProposalRespMsg) XXX_DiscardUnknown()

func (*ProposalRespMsg) XXX_Marshal

func (m *ProposalRespMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProposalRespMsg) XXX_Merge

func (m *ProposalRespMsg) XXX_Merge(src proto.Message)

func (*ProposalRespMsg) XXX_Size

func (m *ProposalRespMsg) XXX_Size() int

func (*ProposalRespMsg) XXX_Unmarshal

func (m *ProposalRespMsg) XXX_Unmarshal(b []byte) error

type ProposeBlock

type ProposeBlock struct {
	IsPropose bool `protobuf:"varint,1,opt,name=is_propose,json=isPropose,proto3" json:"is_propose,omitempty"`
}

func (*ProposeBlock) Descriptor

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

func (*ProposeBlock) GetIsPropose

func (m *ProposeBlock) GetIsPropose() bool

func (*ProposeBlock) Marshal

func (m *ProposeBlock) Marshal() (dAtA []byte, err error)

func (*ProposeBlock) MarshalTo

func (m *ProposeBlock) MarshalTo(dAtA []byte) (int, error)

func (*ProposeBlock) MarshalToSizedBuffer

func (m *ProposeBlock) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ProposeBlock) ProtoMessage

func (*ProposeBlock) ProtoMessage()

func (*ProposeBlock) Reset

func (m *ProposeBlock) Reset()

func (*ProposeBlock) Size

func (m *ProposeBlock) Size() (n int)

func (*ProposeBlock) String

func (m *ProposeBlock) String() string

func (*ProposeBlock) Unmarshal

func (m *ProposeBlock) Unmarshal(dAtA []byte) error

func (*ProposeBlock) XXX_DiscardUnknown

func (m *ProposeBlock) XXX_DiscardUnknown()

func (*ProposeBlock) XXX_Marshal

func (m *ProposeBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProposeBlock) XXX_Merge

func (m *ProposeBlock) XXX_Merge(src proto.Message)

func (*ProposeBlock) XXX_Size

func (m *ProposeBlock) XXX_Size() int

func (*ProposeBlock) XXX_Unmarshal

func (m *ProposeBlock) XXX_Unmarshal(b []byte) error

type QuorumCert

type QuorumCert struct {
	// votes in qc
	Votes []*VoteData `protobuf:"bytes,1,rep,name=votes,proto3" json:"votes,omitempty"`
}

func (*QuorumCert) Descriptor

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

func (*QuorumCert) GetVotes

func (m *QuorumCert) GetVotes() []*VoteData

func (*QuorumCert) Marshal

func (m *QuorumCert) Marshal() (dAtA []byte, err error)

func (*QuorumCert) MarshalTo

func (m *QuorumCert) MarshalTo(dAtA []byte) (int, error)

func (*QuorumCert) MarshalToSizedBuffer

func (m *QuorumCert) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QuorumCert) ProtoMessage

func (*QuorumCert) ProtoMessage()

func (*QuorumCert) Reset

func (m *QuorumCert) Reset()

func (*QuorumCert) Size

func (m *QuorumCert) Size() (n int)

func (*QuorumCert) String

func (m *QuorumCert) String() string

func (*QuorumCert) Unmarshal

func (m *QuorumCert) Unmarshal(dAtA []byte) error

func (*QuorumCert) XXX_DiscardUnknown

func (m *QuorumCert) XXX_DiscardUnknown()

func (*QuorumCert) XXX_Marshal

func (m *QuorumCert) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QuorumCert) XXX_Merge

func (m *QuorumCert) XXX_Merge(src proto.Message)

func (*QuorumCert) XXX_Size

func (m *QuorumCert) XXX_Size() int

func (*QuorumCert) XXX_Unmarshal

func (m *QuorumCert) XXX_Unmarshal(b []byte) error

type ViewData

type ViewData struct {
	View    uint64 `protobuf:"varint,1,opt,name=view,proto3" json:"view,omitempty"`
	EpochId uint64 `protobuf:"varint,2,opt,name=epoch_id,json=epochId,proto3" json:"epoch_id,omitempty"`
}

func (*ViewData) Descriptor

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

func (*ViewData) GetEpochId

func (m *ViewData) GetEpochId() uint64

func (*ViewData) GetView

func (m *ViewData) GetView() uint64

func (*ViewData) Marshal

func (m *ViewData) Marshal() (dAtA []byte, err error)

func (*ViewData) MarshalTo

func (m *ViewData) MarshalTo(dAtA []byte) (int, error)

func (*ViewData) MarshalToSizedBuffer

func (m *ViewData) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ViewData) ProtoMessage

func (*ViewData) ProtoMessage()

func (*ViewData) Reset

func (m *ViewData) Reset()

func (*ViewData) Size

func (m *ViewData) Size() (n int)

func (*ViewData) String

func (m *ViewData) String() string

func (*ViewData) Unmarshal

func (m *ViewData) Unmarshal(dAtA []byte) error

func (*ViewData) XXX_DiscardUnknown

func (m *ViewData) XXX_DiscardUnknown()

func (*ViewData) XXX_Marshal

func (m *ViewData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ViewData) XXX_Merge

func (m *ViewData) XXX_Merge(src proto.Message)

func (*ViewData) XXX_Size

func (m *ViewData) XXX_Size() int

func (*ViewData) XXX_Unmarshal

func (m *ViewData) XXX_Unmarshal(b []byte) error

type VoteData

type VoteData struct {
	// block id of the vote block
	BlockId []byte `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"`
	// block height of the vote block
	Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
	// consensus view of the vote block
	View uint64 `protobuf:"varint,3,opt,name=view,proto3" json:"view,omitempty"`
	// voter of the voteInfo
	Author []byte `protobuf:"bytes,4,opt,name=author,proto3" json:"author,omitempty"`
	// the id of the epoch
	EpochId uint64 `protobuf:"varint,5,opt,name=epoch_id,json=epochId,proto3" json:"epoch_id,omitempty"`
	// signature of the vote
	Signature *common.EndorsementEntry `protobuf:"bytes,6,opt,name=signature,proto3" json:"signature,omitempty"`
}

func (*VoteData) Descriptor

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

func (*VoteData) GetAuthor

func (m *VoteData) GetAuthor() []byte

func (*VoteData) GetBlockId

func (m *VoteData) GetBlockId() []byte

func (*VoteData) GetEpochId

func (m *VoteData) GetEpochId() uint64

func (*VoteData) GetHeight

func (m *VoteData) GetHeight() uint64

func (*VoteData) GetSignature

func (m *VoteData) GetSignature() *common.EndorsementEntry

func (*VoteData) GetView

func (m *VoteData) GetView() uint64

func (*VoteData) Marshal

func (m *VoteData) Marshal() (dAtA []byte, err error)

func (*VoteData) MarshalTo

func (m *VoteData) MarshalTo(dAtA []byte) (int, error)

func (*VoteData) MarshalToSizedBuffer

func (m *VoteData) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*VoteData) ProtoMessage

func (*VoteData) ProtoMessage()

func (*VoteData) Reset

func (m *VoteData) Reset()

func (*VoteData) Size

func (m *VoteData) Size() (n int)

func (*VoteData) String

func (m *VoteData) String() string

func (*VoteData) Unmarshal

func (m *VoteData) Unmarshal(dAtA []byte) error

func (*VoteData) XXX_DiscardUnknown

func (m *VoteData) XXX_DiscardUnknown()

func (*VoteData) XXX_Marshal

func (m *VoteData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VoteData) XXX_Merge

func (m *VoteData) XXX_Merge(src proto.Message)

func (*VoteData) XXX_Size

func (m *VoteData) XXX_Size() int

func (*VoteData) XXX_Unmarshal

func (m *VoteData) XXX_Unmarshal(b []byte) error

type WalEntry

type WalEntry struct {
	Msg               []byte      `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	MsgType           MessageType `protobuf:"varint,2,opt,name=msg_type,json=msgType,proto3,enum=hotstuff.MessageType" json:"msg_type,omitempty"`
	LastSnapshotIndex uint64      `protobuf:"varint,3,opt,name=last_snapshot_index,json=lastSnapshotIndex,proto3" json:"last_snapshot_index,omitempty"`
}

func (*WalEntry) Descriptor

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

func (*WalEntry) GetLastSnapshotIndex

func (m *WalEntry) GetLastSnapshotIndex() uint64

func (*WalEntry) GetMsg

func (m *WalEntry) GetMsg() []byte

func (*WalEntry) GetMsgType

func (m *WalEntry) GetMsgType() MessageType

func (*WalEntry) Marshal

func (m *WalEntry) Marshal() (dAtA []byte, err error)

func (*WalEntry) MarshalTo

func (m *WalEntry) MarshalTo(dAtA []byte) (int, error)

func (*WalEntry) MarshalToSizedBuffer

func (m *WalEntry) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*WalEntry) ProtoMessage

func (*WalEntry) ProtoMessage()

func (*WalEntry) Reset

func (m *WalEntry) Reset()

func (*WalEntry) Size

func (m *WalEntry) Size() (n int)

func (*WalEntry) String

func (m *WalEntry) String() string

func (*WalEntry) Unmarshal

func (m *WalEntry) Unmarshal(dAtA []byte) error

func (*WalEntry) XXX_DiscardUnknown

func (m *WalEntry) XXX_DiscardUnknown()

func (*WalEntry) XXX_Marshal

func (m *WalEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*WalEntry) XXX_Merge

func (m *WalEntry) XXX_Merge(src proto.Message)

func (*WalEntry) XXX_Size

func (m *WalEntry) XXX_Size() int

func (*WalEntry) XXX_Unmarshal

func (m *WalEntry) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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