Documentation
¶
Index ¶
- Variables
- type BlockFetchMessage
- func (*BlockFetchMessage) Descriptor() ([]byte, []int)
- func (m *BlockFetchMessage) GetAuthorIdx() uint64
- func (m *BlockFetchMessage) GetBlockId() []byte
- func (m *BlockFetchMessage) GetCommitBlock() []byte
- func (m *BlockFetchMessage) GetHeight() uint64
- func (m *BlockFetchMessage) GetLockedBlock() []byte
- func (m *BlockFetchMessage) GetNumBlocks() uint64
- func (m *BlockFetchMessage) GetRequestId() uint64
- func (m *BlockFetchMessage) Marshal() (dAtA []byte, err error)
- func (m *BlockFetchMessage) MarshalTo(dAtA []byte) (int, error)
- func (m *BlockFetchMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BlockFetchMessage) ProtoMessage()
- func (m *BlockFetchMessage) Reset()
- func (m *BlockFetchMessage) Size() (n int)
- func (m *BlockFetchMessage) String() string
- func (m *BlockFetchMessage) Unmarshal(dAtA []byte) error
- func (m *BlockFetchMessage) XXX_DiscardUnknown()
- func (m *BlockFetchMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BlockFetchMessage) XXX_Merge(src proto.Message)
- func (m *BlockFetchMessage) XXX_Size() int
- func (m *BlockFetchMessage) XXX_Unmarshal(b []byte) error
- type BlockFetchResponseMessage
- func (*BlockFetchResponseMessage) Descriptor() ([]byte, []int)
- func (m *BlockFetchResponseMessage) GetAuthorIdx() uint64
- func (m *BlockFetchResponseMessage) GetBlocks() []*BlockPair
- func (m *BlockFetchResponseMessage) GetResponseId() uint64
- func (m *BlockFetchResponseMessage) GetStatus() BlockFetchStatus
- func (m *BlockFetchResponseMessage) Marshal() (dAtA []byte, err error)
- func (m *BlockFetchResponseMessage) MarshalTo(dAtA []byte) (int, error)
- func (m *BlockFetchResponseMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BlockFetchResponseMessage) ProtoMessage()
- func (m *BlockFetchResponseMessage) Reset()
- func (m *BlockFetchResponseMessage) Size() (n int)
- func (m *BlockFetchResponseMessage) String() string
- func (m *BlockFetchResponseMessage) Unmarshal(dAtA []byte) error
- func (m *BlockFetchResponseMessage) XXX_DiscardUnknown()
- func (m *BlockFetchResponseMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BlockFetchResponseMessage) XXX_Merge(src proto.Message)
- func (m *BlockFetchResponseMessage) XXX_Size() int
- func (m *BlockFetchResponseMessage) XXX_Unmarshal(b []byte) error
- type BlockFetchStatus
- type BlockPair
- func (*BlockPair) Descriptor() ([]byte, []int)
- func (m *BlockPair) GetBlock() *common.Block
- func (m *BlockPair) GetQc() *QuorumCert
- func (m *BlockPair) Marshal() (dAtA []byte, err error)
- func (m *BlockPair) MarshalTo(dAtA []byte) (int, error)
- func (m *BlockPair) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BlockPair) ProtoMessage()
- func (m *BlockPair) Reset()
- func (m *BlockPair) Size() (n int)
- func (m *BlockPair) String() string
- func (m *BlockPair) Unmarshal(dAtA []byte) error
- func (m *BlockPair) XXX_DiscardUnknown()
- func (m *BlockPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BlockPair) XXX_Merge(src proto.Message)
- func (m *BlockPair) XXX_Size() int
- func (m *BlockPair) XXX_Unmarshal(b []byte) error
- type BuildProposal
- func (*BuildProposal) Descriptor() ([]byte, []int)
- func (m *BuildProposal) GetHeight() uint64
- func (m *BuildProposal) GetIsProposer() bool
- func (m *BuildProposal) GetPreHash() []byte
- func (m *BuildProposal) Marshal() (dAtA []byte, err error)
- func (m *BuildProposal) MarshalTo(dAtA []byte) (int, error)
- func (m *BuildProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BuildProposal) ProtoMessage()
- func (m *BuildProposal) Reset()
- func (m *BuildProposal) Size() (n int)
- func (m *BuildProposal) String() string
- func (m *BuildProposal) Unmarshal(dAtA []byte) error
- func (m *BuildProposal) XXX_DiscardUnknown()
- func (m *BuildProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BuildProposal) XXX_Merge(src proto.Message)
- func (m *BuildProposal) XXX_Size() int
- func (m *BuildProposal) XXX_Unmarshal(b []byte) error
- type ConsStateType
- type ConsensusInfo
- func (*ConsensusInfo) Descriptor() ([]byte, []int)
- func (m *ConsensusInfo) GetQc() *QuorumCert
- func (m *ConsensusInfo) Marshal() (dAtA []byte, err error)
- func (m *ConsensusInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *ConsensusInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ConsensusInfo) ProtoMessage()
- func (m *ConsensusInfo) Reset()
- func (m *ConsensusInfo) Size() (n int)
- func (m *ConsensusInfo) String() string
- func (m *ConsensusInfo) Unmarshal(dAtA []byte) error
- func (m *ConsensusInfo) XXX_DiscardUnknown()
- func (m *ConsensusInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ConsensusInfo) XXX_Merge(src proto.Message)
- func (m *ConsensusInfo) XXX_Size() int
- func (m *ConsensusInfo) XXX_Unmarshal(b []byte) error
- type ConsensusMessage
- func (*ConsensusMessage) Descriptor() ([]byte, []int)
- func (m *ConsensusMessage) GetPayload() *ConsensusPayload
- func (m *ConsensusMessage) GetSignEntry() *common.EndorsementEntry
- func (m *ConsensusMessage) Marshal() (dAtA []byte, err error)
- func (m *ConsensusMessage) MarshalTo(dAtA []byte) (int, error)
- func (m *ConsensusMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ConsensusMessage) ProtoMessage()
- func (m *ConsensusMessage) Reset()
- func (m *ConsensusMessage) Size() (n int)
- func (m *ConsensusMessage) String() string
- func (m *ConsensusMessage) Unmarshal(dAtA []byte) error
- func (m *ConsensusMessage) XXX_DiscardUnknown()
- func (m *ConsensusMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ConsensusMessage) XXX_Merge(src proto.Message)
- func (m *ConsensusMessage) XXX_Size() int
- func (m *ConsensusMessage) XXX_Unmarshal(b []byte) error
- type ConsensusPayload
- func (*ConsensusPayload) Descriptor() ([]byte, []int)
- func (m *ConsensusPayload) GetBlockFetchMessage() *BlockFetchMessage
- func (m *ConsensusPayload) GetData() isConsensusPayload_Data
- func (m *ConsensusPayload) GetProposalMessage() *ProposalMessage
- func (m *ConsensusPayload) GetType() MessageType
- func (m *ConsensusPayload) GetVoteMessage() *VoteMessage
- func (m *ConsensusPayload) Marshal() (dAtA []byte, err error)
- func (m *ConsensusPayload) MarshalTo(dAtA []byte) (int, error)
- func (m *ConsensusPayload) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ConsensusPayload) ProtoMessage()
- func (m *ConsensusPayload) Reset()
- func (m *ConsensusPayload) Size() (n int)
- func (m *ConsensusPayload) String() string
- func (m *ConsensusPayload) Unmarshal(dAtA []byte) error
- func (m *ConsensusPayload) XXX_DiscardUnknown()
- func (m *ConsensusPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ConsensusPayload) XXX_Merge(src proto.Message)
- func (*ConsensusPayload) XXX_OneofWrappers() []interface{}
- func (m *ConsensusPayload) XXX_Size() int
- func (m *ConsensusPayload) XXX_Unmarshal(b []byte) error
- type ConsensusPayload_BlockFetchMessage
- type ConsensusPayload_ProposalMessage
- type ConsensusPayload_VoteMessage
- type MessageType
- type ProposalData
- func (*ProposalData) Descriptor() ([]byte, []int)
- func (m *ProposalData) GetBlock() *common.Block
- func (m *ProposalData) GetEpochId() uint64
- func (m *ProposalData) GetHeight() uint64
- func (m *ProposalData) GetJustifyQc() *QuorumCert
- func (m *ProposalData) GetLevel() uint64
- func (m *ProposalData) GetProposer() []byte
- func (m *ProposalData) GetProposerIdx() uint64
- func (m *ProposalData) Marshal() (dAtA []byte, err error)
- func (m *ProposalData) MarshalTo(dAtA []byte) (int, error)
- func (m *ProposalData) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ProposalData) ProtoMessage()
- func (m *ProposalData) Reset()
- func (m *ProposalData) Size() (n int)
- func (m *ProposalData) String() string
- func (m *ProposalData) Unmarshal(dAtA []byte) error
- func (m *ProposalData) XXX_DiscardUnknown()
- func (m *ProposalData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ProposalData) XXX_Merge(src proto.Message)
- func (m *ProposalData) XXX_Size() int
- func (m *ProposalData) XXX_Unmarshal(b []byte) error
- type ProposalMessage
- func (*ProposalMessage) Descriptor() ([]byte, []int)
- func (m *ProposalMessage) GetProposalData() *ProposalData
- func (m *ProposalMessage) GetSyncInfo() *SyncInfo
- func (m *ProposalMessage) Marshal() (dAtA []byte, err error)
- func (m *ProposalMessage) MarshalTo(dAtA []byte) (int, error)
- func (m *ProposalMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ProposalMessage) ProtoMessage()
- func (m *ProposalMessage) Reset()
- func (m *ProposalMessage) Size() (n int)
- func (m *ProposalMessage) String() string
- func (m *ProposalMessage) Unmarshal(dAtA []byte) error
- func (m *ProposalMessage) XXX_DiscardUnknown()
- func (m *ProposalMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ProposalMessage) XXX_Merge(src proto.Message)
- func (m *ProposalMessage) XXX_Size() int
- func (m *ProposalMessage) XXX_Unmarshal(b []byte) error
- type QuorumCert
- func (*QuorumCert) Descriptor() ([]byte, []int)
- func (m *QuorumCert) GetBlockId() []byte
- func (m *QuorumCert) GetEpochId() uint64
- func (m *QuorumCert) GetHeight() uint64
- func (m *QuorumCert) GetLevel() uint64
- func (m *QuorumCert) GetNewView() bool
- func (m *QuorumCert) GetVotes() []*VoteData
- func (m *QuorumCert) Marshal() (dAtA []byte, err error)
- func (m *QuorumCert) MarshalTo(dAtA []byte) (int, error)
- func (m *QuorumCert) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QuorumCert) ProtoMessage()
- func (m *QuorumCert) Reset()
- func (m *QuorumCert) Size() (n int)
- func (m *QuorumCert) String() string
- func (m *QuorumCert) Unmarshal(dAtA []byte) error
- func (m *QuorumCert) XXX_DiscardUnknown()
- func (m *QuorumCert) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QuorumCert) XXX_Merge(src proto.Message)
- func (m *QuorumCert) XXX_Size() int
- func (m *QuorumCert) XXX_Unmarshal(b []byte) error
- type SyncInfo
- func (*SyncInfo) Descriptor() ([]byte, []int)
- func (m *SyncInfo) GetHighestQc() *QuorumCert
- func (m *SyncInfo) GetHighestTc() *QuorumCert
- func (m *SyncInfo) GetHighestTcLevel() uint64
- func (m *SyncInfo) Marshal() (dAtA []byte, err error)
- func (m *SyncInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *SyncInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SyncInfo) ProtoMessage()
- func (m *SyncInfo) Reset()
- func (m *SyncInfo) Size() (n int)
- func (m *SyncInfo) String() string
- func (m *SyncInfo) Unmarshal(dAtA []byte) error
- func (m *SyncInfo) XXX_DiscardUnknown()
- func (m *SyncInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SyncInfo) XXX_Merge(src proto.Message)
- func (m *SyncInfo) XXX_Size() int
- func (m *SyncInfo) XXX_Unmarshal(b []byte) error
- type VoteData
- func (*VoteData) Descriptor() ([]byte, []int)
- func (m *VoteData) GetAuthor() []byte
- func (m *VoteData) GetAuthorIdx() uint64
- func (m *VoteData) GetBlockId() []byte
- func (m *VoteData) GetEpochId() uint64
- func (m *VoteData) GetHeight() uint64
- func (m *VoteData) GetLevel() uint64
- func (m *VoteData) GetNewView() bool
- func (m *VoteData) GetSignature() *common.EndorsementEntry
- func (m *VoteData) Marshal() (dAtA []byte, err error)
- func (m *VoteData) MarshalTo(dAtA []byte) (int, error)
- func (m *VoteData) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*VoteData) ProtoMessage()
- func (m *VoteData) Reset()
- func (m *VoteData) Size() (n int)
- func (m *VoteData) String() string
- func (m *VoteData) Unmarshal(dAtA []byte) error
- func (m *VoteData) XXX_DiscardUnknown()
- func (m *VoteData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *VoteData) XXX_Merge(src proto.Message)
- func (m *VoteData) XXX_Size() int
- func (m *VoteData) XXX_Unmarshal(b []byte) error
- type VoteMessage
- func (*VoteMessage) Descriptor() ([]byte, []int)
- func (m *VoteMessage) GetSyncInfo() *SyncInfo
- func (m *VoteMessage) GetVoteData() *VoteData
- func (m *VoteMessage) Marshal() (dAtA []byte, err error)
- func (m *VoteMessage) MarshalTo(dAtA []byte) (int, error)
- func (m *VoteMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*VoteMessage) ProtoMessage()
- func (m *VoteMessage) Reset()
- func (m *VoteMessage) Size() (n int)
- func (m *VoteMessage) String() string
- func (m *VoteMessage) Unmarshal(dAtA []byte) error
- func (m *VoteMessage) XXX_DiscardUnknown()
- func (m *VoteMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *VoteMessage) XXX_Merge(src proto.Message)
- func (m *VoteMessage) XXX_Size() int
- func (m *VoteMessage) XXX_Unmarshal(b []byte) error
- type WalEntry
- func (*WalEntry) Descriptor() ([]byte, []int)
- func (m *WalEntry) GetLastSnapshotIndex() uint64
- func (m *WalEntry) GetMessage() *ConsensusMessage
- func (m *WalEntry) GetMessageType() MessageType
- func (m *WalEntry) Marshal() (dAtA []byte, err error)
- func (m *WalEntry) MarshalTo(dAtA []byte) (int, error)
- func (m *WalEntry) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*WalEntry) ProtoMessage()
- func (m *WalEntry) Reset()
- func (m *WalEntry) Size() (n int)
- func (m *WalEntry) String() string
- func (m *WalEntry) Unmarshal(dAtA []byte) error
- func (m *WalEntry) XXX_DiscardUnknown()
- func (m *WalEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WalEntry) XXX_Merge(src proto.Message)
- func (m *WalEntry) XXX_Size() int
- func (m *WalEntry) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthMaxbft = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMaxbft = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupMaxbft = fmt.Errorf("proto: unexpected end of group") )
View Source
var BlockFetchStatus_name = map[int32]string{
0: "SUCCEEDED",
1: "NOT_ENOUGH_BLOCKS",
}
View Source
var BlockFetchStatus_value = map[string]int32{
"SUCCEEDED": 0,
"NOT_ENOUGH_BLOCKS": 1,
}
View Source
var ConsStateType_name = map[int32]string{
0: "NEW_HEIGHT",
1: "NEW_LEVEL",
2: "PROPOSE",
3: "VOTE",
4: "PACEMAKER",
}
View Source
var ConsStateType_value = map[string]int32{
"NEW_HEIGHT": 0,
"NEW_LEVEL": 1,
"PROPOSE": 2,
"VOTE": 3,
"PACEMAKER": 4,
}
View Source
var MessageType_name = map[int32]string{
0: "PROPOSAL_MESSAGE",
1: "VOTE_MESSAGE",
2: "BLOCK_FETCH_MESSAGE",
3: "BLOCK_FETCH_RESP_MESSAGE",
}
View Source
var MessageType_value = map[string]int32{
"PROPOSAL_MESSAGE": 0,
"VOTE_MESSAGE": 1,
"BLOCK_FETCH_MESSAGE": 2,
"BLOCK_FETCH_RESP_MESSAGE": 3,
}
Functions ¶
This section is empty.
Types ¶
type BlockFetchMessage ¶
type BlockFetchMessage struct { // 请求节点中最新已知块的块 id BlockId []byte `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` // 请求节点中最新已知区块的区块高度 Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` // 获取块编号 NumBlocks uint64 `protobuf:"varint,3,opt,name=num_blocks,json=numBlocks,proto3" json:"num_blocks,omitempty"` // 请求节点的索引 AuthorIdx uint64 `protobuf:"varint,4,opt,name=author_idx,json=authorIdx,proto3" json:"author_idx,omitempty"` // 请求的唯一 ID RequestId uint64 `protobuf:"varint,5,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // 请求节点中提交块的 id CommitBlock []byte `protobuf:"bytes,6,opt,name=commit_block,json=commitBlock,proto3" json:"commit_block,omitempty"` // 请求节点中锁定块的 id LockedBlock []byte `protobuf:"bytes,7,opt,name=locked_block,json=lockedBlock,proto3" json:"locked_block,omitempty"` }
func (*BlockFetchMessage) Descriptor ¶
func (*BlockFetchMessage) Descriptor() ([]byte, []int)
func (*BlockFetchMessage) GetAuthorIdx ¶
func (m *BlockFetchMessage) GetAuthorIdx() uint64
func (*BlockFetchMessage) GetBlockId ¶
func (m *BlockFetchMessage) GetBlockId() []byte
func (*BlockFetchMessage) GetCommitBlock ¶
func (m *BlockFetchMessage) GetCommitBlock() []byte
func (*BlockFetchMessage) GetHeight ¶
func (m *BlockFetchMessage) GetHeight() uint64
func (*BlockFetchMessage) GetLockedBlock ¶
func (m *BlockFetchMessage) GetLockedBlock() []byte
func (*BlockFetchMessage) GetNumBlocks ¶
func (m *BlockFetchMessage) GetNumBlocks() uint64
func (*BlockFetchMessage) GetRequestId ¶
func (m *BlockFetchMessage) GetRequestId() uint64
func (*BlockFetchMessage) Marshal ¶
func (m *BlockFetchMessage) Marshal() (dAtA []byte, err error)
func (*BlockFetchMessage) MarshalTo ¶
func (m *BlockFetchMessage) MarshalTo(dAtA []byte) (int, error)
func (*BlockFetchMessage) MarshalToSizedBuffer ¶
func (m *BlockFetchMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*BlockFetchMessage) ProtoMessage ¶
func (*BlockFetchMessage) ProtoMessage()
func (*BlockFetchMessage) Reset ¶
func (m *BlockFetchMessage) Reset()
func (*BlockFetchMessage) Size ¶
func (m *BlockFetchMessage) Size() (n int)
func (*BlockFetchMessage) String ¶
func (m *BlockFetchMessage) String() string
func (*BlockFetchMessage) Unmarshal ¶
func (m *BlockFetchMessage) Unmarshal(dAtA []byte) error
func (*BlockFetchMessage) XXX_DiscardUnknown ¶
func (m *BlockFetchMessage) XXX_DiscardUnknown()
func (*BlockFetchMessage) XXX_Marshal ¶
func (m *BlockFetchMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BlockFetchMessage) XXX_Merge ¶
func (m *BlockFetchMessage) XXX_Merge(src proto.Message)
func (*BlockFetchMessage) XXX_Size ¶
func (m *BlockFetchMessage) XXX_Size() int
func (*BlockFetchMessage) XXX_Unmarshal ¶
func (m *BlockFetchMessage) XXX_Unmarshal(b []byte) error
type BlockFetchResponseMessage ¶
type BlockFetchResponseMessage struct { // 响应状态 Status BlockFetchStatus `protobuf:"varint,1,opt,name=status,proto3,enum=maxbft.BlockFetchStatus" json:"status,omitempty"` // 阻止响应 Blocks []*BlockPair `protobuf:"bytes,2,rep,name=blocks,proto3" json:"blocks,omitempty"` // 响应节点的索引 AuthorIdx uint64 `protobuf:"varint,3,opt,name=author_idx,json=authorIdx,proto3" json:"author_idx,omitempty"` // 响应的唯一 ID,即请求 ID ResponseId uint64 `protobuf:"varint,4,opt,name=response_id,json=responseId,proto3" json:"response_id,omitempty"` }
func (*BlockFetchResponseMessage) Descriptor ¶
func (*BlockFetchResponseMessage) Descriptor() ([]byte, []int)
func (*BlockFetchResponseMessage) GetAuthorIdx ¶
func (m *BlockFetchResponseMessage) GetAuthorIdx() uint64
func (*BlockFetchResponseMessage) GetBlocks ¶
func (m *BlockFetchResponseMessage) GetBlocks() []*BlockPair
func (*BlockFetchResponseMessage) GetResponseId ¶
func (m *BlockFetchResponseMessage) GetResponseId() uint64
func (*BlockFetchResponseMessage) GetStatus ¶
func (m *BlockFetchResponseMessage) GetStatus() BlockFetchStatus
func (*BlockFetchResponseMessage) Marshal ¶
func (m *BlockFetchResponseMessage) Marshal() (dAtA []byte, err error)
func (*BlockFetchResponseMessage) MarshalTo ¶
func (m *BlockFetchResponseMessage) MarshalTo(dAtA []byte) (int, error)
func (*BlockFetchResponseMessage) MarshalToSizedBuffer ¶
func (m *BlockFetchResponseMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*BlockFetchResponseMessage) ProtoMessage ¶
func (*BlockFetchResponseMessage) ProtoMessage()
func (*BlockFetchResponseMessage) Reset ¶
func (m *BlockFetchResponseMessage) Reset()
func (*BlockFetchResponseMessage) Size ¶
func (m *BlockFetchResponseMessage) Size() (n int)
func (*BlockFetchResponseMessage) String ¶
func (m *BlockFetchResponseMessage) String() string
func (*BlockFetchResponseMessage) Unmarshal ¶
func (m *BlockFetchResponseMessage) Unmarshal(dAtA []byte) error
func (*BlockFetchResponseMessage) XXX_DiscardUnknown ¶
func (m *BlockFetchResponseMessage) XXX_DiscardUnknown()
func (*BlockFetchResponseMessage) XXX_Marshal ¶
func (m *BlockFetchResponseMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BlockFetchResponseMessage) XXX_Merge ¶
func (m *BlockFetchResponseMessage) XXX_Merge(src proto.Message)
func (*BlockFetchResponseMessage) XXX_Size ¶
func (m *BlockFetchResponseMessage) XXX_Size() int
func (*BlockFetchResponseMessage) XXX_Unmarshal ¶
func (m *BlockFetchResponseMessage) XXX_Unmarshal(b []byte) error
type BlockFetchStatus ¶
type BlockFetchStatus int32
响应状态
const ( BlockFetchStatus_SUCCEEDED BlockFetchStatus = 0 BlockFetchStatus_NOT_ENOUGH_BLOCKS BlockFetchStatus = 1 )
func (BlockFetchStatus) EnumDescriptor ¶
func (BlockFetchStatus) EnumDescriptor() ([]byte, []int)
func (BlockFetchStatus) String ¶
func (x BlockFetchStatus) String() string
type BlockPair ¶
type BlockPair struct { Block *common.Block `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` Qc *QuorumCert `protobuf:"bytes,2,opt,name=qc,proto3" json:"qc,omitempty"` }
func (*BlockPair) Descriptor ¶
func (*BlockPair) GetQc ¶
func (m *BlockPair) GetQc() *QuorumCert
func (*BlockPair) MarshalToSizedBuffer ¶
func (*BlockPair) ProtoMessage ¶
func (*BlockPair) ProtoMessage()
func (*BlockPair) XXX_DiscardUnknown ¶
func (m *BlockPair) XXX_DiscardUnknown()
func (*BlockPair) XXX_Marshal ¶
func (*BlockPair) XXX_Unmarshal ¶
type BuildProposal ¶
type BuildProposal struct { Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` PreHash []byte `protobuf:"bytes,2,opt,name=pre_hash,json=preHash,proto3" json:"pre_hash,omitempty"` IsProposer bool `protobuf:"varint,3,opt,name=is_proposer,json=isProposer,proto3" json:"is_proposer,omitempty"` }
func (*BuildProposal) Descriptor ¶
func (*BuildProposal) Descriptor() ([]byte, []int)
func (*BuildProposal) GetHeight ¶
func (m *BuildProposal) GetHeight() uint64
func (*BuildProposal) GetIsProposer ¶
func (m *BuildProposal) GetIsProposer() bool
func (*BuildProposal) GetPreHash ¶
func (m *BuildProposal) GetPreHash() []byte
func (*BuildProposal) Marshal ¶
func (m *BuildProposal) Marshal() (dAtA []byte, err 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 ( // 新高度 ConsStateType_NEW_HEIGHT ConsStateType = 0 // 新级别 ConsStateType_NEW_LEVEL ConsStateType = 1 // 提出 ConsStateType_PROPOSE ConsStateType = 2 // 投票 ConsStateType_VOTE ConsStateType = 3 // 共识的起搏器 ConsStateType_PACEMAKER ConsStateType = 4 )
func (ConsStateType) EnumDescriptor ¶
func (ConsStateType) EnumDescriptor() ([]byte, []int)
func (ConsStateType) String ¶
func (x ConsStateType) String() string
type ConsensusInfo ¶
type ConsensusInfo struct { // 块的 qc 信息 Qc *QuorumCert `protobuf:"bytes,1,opt,name=qc,proto3" json:"qc,omitempty"` }
func (*ConsensusInfo) Descriptor ¶
func (*ConsensusInfo) Descriptor() ([]byte, []int)
func (*ConsensusInfo) GetQc ¶
func (m *ConsensusInfo) GetQc() *QuorumCert
func (*ConsensusInfo) Marshal ¶
func (m *ConsensusInfo) Marshal() (dAtA []byte, err error)
func (*ConsensusInfo) MarshalToSizedBuffer ¶
func (m *ConsensusInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ConsensusInfo) ProtoMessage ¶
func (*ConsensusInfo) ProtoMessage()
func (*ConsensusInfo) Reset ¶
func (m *ConsensusInfo) Reset()
func (*ConsensusInfo) Size ¶
func (m *ConsensusInfo) Size() (n int)
func (*ConsensusInfo) String ¶
func (m *ConsensusInfo) String() string
func (*ConsensusInfo) Unmarshal ¶
func (m *ConsensusInfo) Unmarshal(dAtA []byte) error
func (*ConsensusInfo) XXX_DiscardUnknown ¶
func (m *ConsensusInfo) XXX_DiscardUnknown()
func (*ConsensusInfo) XXX_Marshal ¶
func (m *ConsensusInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ConsensusInfo) XXX_Merge ¶
func (m *ConsensusInfo) XXX_Merge(src proto.Message)
func (*ConsensusInfo) XXX_Size ¶
func (m *ConsensusInfo) XXX_Size() int
func (*ConsensusInfo) XXX_Unmarshal ¶
func (m *ConsensusInfo) XXX_Unmarshal(b []byte) error
type ConsensusMessage ¶
type ConsensusMessage struct { Payload *ConsensusPayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` SignEntry *common.EndorsementEntry `protobuf:"bytes,2,opt,name=sign_entry,json=signEntry,proto3" json:"sign_entry,omitempty"` }
func (*ConsensusMessage) Descriptor ¶
func (*ConsensusMessage) Descriptor() ([]byte, []int)
func (*ConsensusMessage) GetPayload ¶
func (m *ConsensusMessage) GetPayload() *ConsensusPayload
func (*ConsensusMessage) GetSignEntry ¶
func (m *ConsensusMessage) GetSignEntry() *common.EndorsementEntry
func (*ConsensusMessage) Marshal ¶
func (m *ConsensusMessage) Marshal() (dAtA []byte, err error)
func (*ConsensusMessage) MarshalToSizedBuffer ¶
func (m *ConsensusMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ConsensusMessage) ProtoMessage ¶
func (*ConsensusMessage) ProtoMessage()
func (*ConsensusMessage) Reset ¶
func (m *ConsensusMessage) Reset()
func (*ConsensusMessage) Size ¶
func (m *ConsensusMessage) Size() (n int)
func (*ConsensusMessage) String ¶
func (m *ConsensusMessage) String() string
func (*ConsensusMessage) Unmarshal ¶
func (m *ConsensusMessage) Unmarshal(dAtA []byte) error
func (*ConsensusMessage) XXX_DiscardUnknown ¶
func (m *ConsensusMessage) XXX_DiscardUnknown()
func (*ConsensusMessage) XXX_Marshal ¶
func (m *ConsensusMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ConsensusMessage) XXX_Merge ¶
func (m *ConsensusMessage) XXX_Merge(src proto.Message)
func (*ConsensusMessage) XXX_Size ¶
func (m *ConsensusMessage) XXX_Size() int
func (*ConsensusMessage) XXX_Unmarshal ¶
func (m *ConsensusMessage) XXX_Unmarshal(b []byte) error
type ConsensusPayload ¶
type ConsensusPayload struct { Type MessageType `protobuf:"varint,1,opt,name=type,proto3,enum=maxbft.MessageType" json:"type,omitempty"` // Types that are valid to be assigned to Data: // *ConsensusPayload_ProposalMessage // *ConsensusPayload_VoteMessage // *ConsensusPayload_BlockFetchMessage Data isConsensusPayload_Data `protobuf_oneof:"data"` }
func (*ConsensusPayload) Descriptor ¶
func (*ConsensusPayload) Descriptor() ([]byte, []int)
func (*ConsensusPayload) GetBlockFetchMessage ¶
func (m *ConsensusPayload) GetBlockFetchMessage() *BlockFetchMessage
func (*ConsensusPayload) GetData ¶
func (m *ConsensusPayload) GetData() isConsensusPayload_Data
func (*ConsensusPayload) GetProposalMessage ¶
func (m *ConsensusPayload) GetProposalMessage() *ProposalMessage
func (*ConsensusPayload) GetType ¶
func (m *ConsensusPayload) GetType() MessageType
func (*ConsensusPayload) GetVoteMessage ¶
func (m *ConsensusPayload) GetVoteMessage() *VoteMessage
func (*ConsensusPayload) Marshal ¶
func (m *ConsensusPayload) Marshal() (dAtA []byte, err error)
func (*ConsensusPayload) MarshalToSizedBuffer ¶
func (m *ConsensusPayload) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ConsensusPayload) ProtoMessage ¶
func (*ConsensusPayload) ProtoMessage()
func (*ConsensusPayload) Reset ¶
func (m *ConsensusPayload) Reset()
func (*ConsensusPayload) Size ¶
func (m *ConsensusPayload) Size() (n int)
func (*ConsensusPayload) String ¶
func (m *ConsensusPayload) String() string
func (*ConsensusPayload) Unmarshal ¶
func (m *ConsensusPayload) Unmarshal(dAtA []byte) error
func (*ConsensusPayload) XXX_DiscardUnknown ¶
func (m *ConsensusPayload) XXX_DiscardUnknown()
func (*ConsensusPayload) XXX_Marshal ¶
func (m *ConsensusPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ConsensusPayload) XXX_Merge ¶
func (m *ConsensusPayload) XXX_Merge(src proto.Message)
func (*ConsensusPayload) XXX_OneofWrappers ¶
func (*ConsensusPayload) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*ConsensusPayload) XXX_Size ¶
func (m *ConsensusPayload) XXX_Size() int
func (*ConsensusPayload) XXX_Unmarshal ¶
func (m *ConsensusPayload) XXX_Unmarshal(b []byte) error
type ConsensusPayload_BlockFetchMessage ¶
type ConsensusPayload_BlockFetchMessage struct {
BlockFetchMessage *BlockFetchMessage `protobuf:"bytes,4,opt,name=block_fetch_message,json=blockFetchMessage,proto3,oneof" json:"block_fetch_message,omitempty"`
}
func (*ConsensusPayload_BlockFetchMessage) MarshalTo ¶
func (m *ConsensusPayload_BlockFetchMessage) MarshalTo(dAtA []byte) (int, error)
func (*ConsensusPayload_BlockFetchMessage) MarshalToSizedBuffer ¶
func (m *ConsensusPayload_BlockFetchMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ConsensusPayload_BlockFetchMessage) Size ¶
func (m *ConsensusPayload_BlockFetchMessage) Size() (n int)
type ConsensusPayload_ProposalMessage ¶
type ConsensusPayload_ProposalMessage struct {
ProposalMessage *ProposalMessage `protobuf:"bytes,2,opt,name=proposal_message,json=proposalMessage,proto3,oneof" json:"proposal_message,omitempty"`
}
func (*ConsensusPayload_ProposalMessage) MarshalTo ¶
func (m *ConsensusPayload_ProposalMessage) MarshalTo(dAtA []byte) (int, error)
func (*ConsensusPayload_ProposalMessage) MarshalToSizedBuffer ¶
func (m *ConsensusPayload_ProposalMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ConsensusPayload_ProposalMessage) Size ¶
func (m *ConsensusPayload_ProposalMessage) Size() (n int)
type ConsensusPayload_VoteMessage ¶
type ConsensusPayload_VoteMessage struct {
VoteMessage *VoteMessage `protobuf:"bytes,3,opt,name=vote_message,json=voteMessage,proto3,oneof" json:"vote_message,omitempty"`
}
func (*ConsensusPayload_VoteMessage) MarshalTo ¶
func (m *ConsensusPayload_VoteMessage) MarshalTo(dAtA []byte) (int, error)
func (*ConsensusPayload_VoteMessage) MarshalToSizedBuffer ¶
func (m *ConsensusPayload_VoteMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ConsensusPayload_VoteMessage) Size ¶
func (m *ConsensusPayload_VoteMessage) Size() (n int)
type MessageType ¶
type MessageType int32
const ( MessageType_PROPOSAL_MESSAGE MessageType = 0 MessageType_VOTE_MESSAGE MessageType = 1 MessageType_BLOCK_FETCH_MESSAGE MessageType = 2 MessageType_BLOCK_FETCH_RESP_MESSAGE MessageType = 3 )
func (MessageType) EnumDescriptor ¶
func (MessageType) EnumDescriptor() ([]byte, []int)
func (MessageType) String ¶
func (x MessageType) String() string
type ProposalData ¶
type ProposalData struct { // 提案的区块信息 Block *common.Block `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` // 提案的高度 Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` // 提案的共识级别 Level uint64 `protobuf:"varint,3,opt,name=level,proto3" json:"level,omitempty"` // 提案人 Proposer []byte `protobuf:"bytes,4,opt,name=proposer,proto3" json:"proposer,omitempty"` // 共识节点中提议者的索引 ProposerIdx uint64 `protobuf:"varint,5,opt,name=proposer_idx,json=proposerIdx,proto3" json:"proposer_idx,omitempty"` // 时代的id EpochId uint64 `protobuf:"varint,6,opt,name=epoch_id,json=epochId,proto3" json:"epoch_id,omitempty"` // 提案中父区块的 qc 信息 JustifyQc *QuorumCert `protobuf:"bytes,7,opt,name=justify_qc,json=justifyQc,proto3" json:"justify_qc,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) GetHeight ¶
func (m *ProposalData) GetHeight() uint64
func (*ProposalData) GetJustifyQc ¶
func (m *ProposalData) GetJustifyQc() *QuorumCert
func (*ProposalData) GetLevel ¶
func (m *ProposalData) GetLevel() uint64
func (*ProposalData) GetProposer ¶
func (m *ProposalData) GetProposer() []byte
func (*ProposalData) GetProposerIdx ¶
func (m *ProposalData) GetProposerIdx() uint64
func (*ProposalData) Marshal ¶
func (m *ProposalData) Marshal() (dAtA []byte, err 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 ProposalMessage ¶
type ProposalMessage struct { // 提案数据 ProposalData *ProposalData `protobuf:"bytes,1,opt,name=proposal_data,json=proposalData,proto3" json:"proposal_data,omitempty"` // 提议节点的 qc 信息 SyncInfo *SyncInfo `protobuf:"bytes,2,opt,name=sync_info,json=syncInfo,proto3" json:"sync_info,omitempty"` }
func (*ProposalMessage) Descriptor ¶
func (*ProposalMessage) Descriptor() ([]byte, []int)
func (*ProposalMessage) GetProposalData ¶
func (m *ProposalMessage) GetProposalData() *ProposalData
func (*ProposalMessage) GetSyncInfo ¶
func (m *ProposalMessage) GetSyncInfo() *SyncInfo
func (*ProposalMessage) Marshal ¶
func (m *ProposalMessage) Marshal() (dAtA []byte, err error)
func (*ProposalMessage) MarshalToSizedBuffer ¶
func (m *ProposalMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ProposalMessage) ProtoMessage ¶
func (*ProposalMessage) ProtoMessage()
func (*ProposalMessage) Reset ¶
func (m *ProposalMessage) Reset()
func (*ProposalMessage) Size ¶
func (m *ProposalMessage) Size() (n int)
func (*ProposalMessage) String ¶
func (m *ProposalMessage) String() string
func (*ProposalMessage) Unmarshal ¶
func (m *ProposalMessage) Unmarshal(dAtA []byte) error
func (*ProposalMessage) XXX_DiscardUnknown ¶
func (m *ProposalMessage) XXX_DiscardUnknown()
func (*ProposalMessage) XXX_Marshal ¶
func (m *ProposalMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ProposalMessage) XXX_Merge ¶
func (m *ProposalMessage) XXX_Merge(src proto.Message)
func (*ProposalMessage) XXX_Size ¶
func (m *ProposalMessage) XXX_Size() int
func (*ProposalMessage) XXX_Unmarshal ¶
func (m *ProposalMessage) XXX_Unmarshal(b []byte) error
type QuorumCert ¶
type QuorumCert struct { // qc 块的块 id BlockId []byte `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` // qc 块的块高度 Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` // 质量控制块的共识级别 Level uint64 `protobuf:"varint,3,opt,name=level,proto3" json:"level,omitempty"` // 是否对质控块投票超时 NewView bool `protobuf:"varint,4,opt,name=new_view,json=newView,proto3" json:"new_view,omitempty"` // 时代的id EpochId uint64 `protobuf:"varint,5,opt,name=epoch_id,json=epochId,proto3" json:"epoch_id,omitempty"` Votes []*VoteData `protobuf:"bytes,6,rep,name=votes,proto3" json:"votes,omitempty"` }
func (*QuorumCert) Descriptor ¶
func (*QuorumCert) Descriptor() ([]byte, []int)
func (*QuorumCert) GetBlockId ¶
func (m *QuorumCert) GetBlockId() []byte
func (*QuorumCert) GetEpochId ¶
func (m *QuorumCert) GetEpochId() uint64
func (*QuorumCert) GetHeight ¶
func (m *QuorumCert) GetHeight() uint64
func (*QuorumCert) GetLevel ¶
func (m *QuorumCert) GetLevel() uint64
func (*QuorumCert) GetNewView ¶
func (m *QuorumCert) GetNewView() bool
func (*QuorumCert) GetVotes ¶
func (m *QuorumCert) GetVotes() []*VoteData
func (*QuorumCert) Marshal ¶
func (m *QuorumCert) Marshal() (dAtA []byte, err 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 SyncInfo ¶
type SyncInfo struct { // 投票节点的最高 qc HighestQc *QuorumCert `protobuf:"bytes,1,opt,name=highest_qc,json=highestQc,proto3" json:"highest_qc,omitempty"` // 投票节点的最高 tc HighestTc *QuorumCert `protobuf:"bytes,2,opt,name=highest_tc,json=highestTc,proto3" json:"highest_tc,omitempty"` // 最新的超时共识级别 HighestTcLevel uint64 `protobuf:"varint,3,opt,name=highest_tc_level,json=highestTcLevel,proto3" json:"highest_tc_level,omitempty"` }
func (*SyncInfo) Descriptor ¶
func (*SyncInfo) GetHighestQc ¶
func (m *SyncInfo) GetHighestQc() *QuorumCert
func (*SyncInfo) GetHighestTc ¶
func (m *SyncInfo) GetHighestTc() *QuorumCert
func (*SyncInfo) GetHighestTcLevel ¶
func (*SyncInfo) MarshalToSizedBuffer ¶
func (*SyncInfo) ProtoMessage ¶
func (*SyncInfo) ProtoMessage()
func (*SyncInfo) XXX_DiscardUnknown ¶
func (m *SyncInfo) XXX_DiscardUnknown()
func (*SyncInfo) XXX_Marshal ¶
func (*SyncInfo) XXX_Unmarshal ¶
type VoteData ¶
type VoteData struct { // 投票区块的区块 id BlockId []byte `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` // 投票区块的区块高度 Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` // 投票块的共识级别 Level uint64 `protobuf:"varint,3,opt,name=level,proto3" json:"level,omitempty"` // voteInfo 的选民 Author []byte `protobuf:"bytes,4,opt,name=author,proto3" json:"author,omitempty"` // 共识节点中投票者的索引 AuthorIdx uint64 `protobuf:"varint,5,opt,name=author_idx,json=authorIdx,proto3" json:"author_idx,omitempty"` // 是否对区块超时进行投票 NewView bool `protobuf:"varint,6,opt,name=new_view,json=newView,proto3" json:"new_view,omitempty"` // 时代的id EpochId uint64 `protobuf:"varint,7,opt,name=epoch_id,json=epochId,proto3" json:"epoch_id,omitempty"` // 投票签名 Signature *common.EndorsementEntry `protobuf:"bytes,8,opt,name=signature,proto3" json:"signature,omitempty"` }
func (*VoteData) Descriptor ¶
func (*VoteData) GetAuthorIdx ¶
func (*VoteData) GetBlockId ¶
func (*VoteData) GetEpochId ¶
func (*VoteData) GetNewView ¶
func (*VoteData) GetSignature ¶
func (m *VoteData) GetSignature() *common.EndorsementEntry
func (*VoteData) MarshalToSizedBuffer ¶
func (*VoteData) ProtoMessage ¶
func (*VoteData) ProtoMessage()
func (*VoteData) XXX_DiscardUnknown ¶
func (m *VoteData) XXX_DiscardUnknown()
func (*VoteData) XXX_Marshal ¶
func (*VoteData) XXX_Unmarshal ¶
type VoteMessage ¶
type VoteMessage struct { // 投票数据 VoteData *VoteData `protobuf:"bytes,1,opt,name=vote_data,json=voteData,proto3" json:"vote_data,omitempty"` // 投票中的 qc 信息 SyncInfo *SyncInfo `protobuf:"bytes,2,opt,name=sync_info,json=syncInfo,proto3" json:"sync_info,omitempty"` }
func (*VoteMessage) Descriptor ¶
func (*VoteMessage) Descriptor() ([]byte, []int)
func (*VoteMessage) GetSyncInfo ¶
func (m *VoteMessage) GetSyncInfo() *SyncInfo
func (*VoteMessage) GetVoteData ¶
func (m *VoteMessage) GetVoteData() *VoteData
func (*VoteMessage) Marshal ¶
func (m *VoteMessage) Marshal() (dAtA []byte, err error)
func (*VoteMessage) MarshalToSizedBuffer ¶
func (m *VoteMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*VoteMessage) ProtoMessage ¶
func (*VoteMessage) ProtoMessage()
func (*VoteMessage) Reset ¶
func (m *VoteMessage) Reset()
func (*VoteMessage) Size ¶
func (m *VoteMessage) Size() (n int)
func (*VoteMessage) String ¶
func (m *VoteMessage) String() string
func (*VoteMessage) Unmarshal ¶
func (m *VoteMessage) Unmarshal(dAtA []byte) error
func (*VoteMessage) XXX_DiscardUnknown ¶
func (m *VoteMessage) XXX_DiscardUnknown()
func (*VoteMessage) XXX_Marshal ¶
func (m *VoteMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*VoteMessage) XXX_Merge ¶
func (m *VoteMessage) XXX_Merge(src proto.Message)
func (*VoteMessage) XXX_Size ¶
func (m *VoteMessage) XXX_Size() int
func (*VoteMessage) XXX_Unmarshal ¶
func (m *VoteMessage) XXX_Unmarshal(b []byte) error
type WalEntry ¶
type WalEntry struct { Message *ConsensusMessage `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` MessageType MessageType `protobuf:"varint,2,opt,name=message_type,json=messageType,proto3,enum=maxbft.MessageType" json:"message_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) GetLastSnapshotIndex ¶
func (*WalEntry) GetMessage ¶
func (m *WalEntry) GetMessage() *ConsensusMessage
func (*WalEntry) GetMessageType ¶
func (m *WalEntry) GetMessageType() MessageType
func (*WalEntry) MarshalToSizedBuffer ¶
func (*WalEntry) ProtoMessage ¶
func (*WalEntry) ProtoMessage()
func (*WalEntry) XXX_DiscardUnknown ¶
func (m *WalEntry) XXX_DiscardUnknown()
func (*WalEntry) XXX_Marshal ¶
func (*WalEntry) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.