maxbft

package
v0.0.0-...-4619e39 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

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 (*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) Descriptor() ([]byte, []int)

func (*BlockPair) GetBlock

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

func (*BlockPair) GetQc

func (m *BlockPair) GetQc() *QuorumCert

func (*BlockPair) Marshal

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

func (*BlockPair) MarshalTo

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

func (*BlockPair) MarshalToSizedBuffer

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

func (*BlockPair) ProtoMessage

func (*BlockPair) ProtoMessage()

func (*BlockPair) Reset

func (m *BlockPair) Reset()

func (*BlockPair) Size

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

func (*BlockPair) String

func (m *BlockPair) String() string

func (*BlockPair) Unmarshal

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

func (*BlockPair) XXX_DiscardUnknown

func (m *BlockPair) XXX_DiscardUnknown()

func (*BlockPair) XXX_Marshal

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

func (*BlockPair) XXX_Merge

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

func (*BlockPair) XXX_Size

func (m *BlockPair) XXX_Size() int

func (*BlockPair) XXX_Unmarshal

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

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) 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 (
	// 新高度
	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) MarshalTo

func (m *ConsensusInfo) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *ConsensusMessage) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *ConsensusPayload) MarshalTo(dAtA []byte) (int, 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

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) 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 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) MarshalTo

func (m *ProposalMessage) MarshalTo(dAtA []byte) (int, 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) 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 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) Descriptor() ([]byte, []int)

func (*SyncInfo) GetHighestQc

func (m *SyncInfo) GetHighestQc() *QuorumCert

func (*SyncInfo) GetHighestTc

func (m *SyncInfo) GetHighestTc() *QuorumCert

func (*SyncInfo) GetHighestTcLevel

func (m *SyncInfo) GetHighestTcLevel() uint64

func (*SyncInfo) Marshal

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

func (*SyncInfo) MarshalTo

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

func (*SyncInfo) MarshalToSizedBuffer

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

func (*SyncInfo) ProtoMessage

func (*SyncInfo) ProtoMessage()

func (*SyncInfo) Reset

func (m *SyncInfo) Reset()

func (*SyncInfo) Size

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

func (*SyncInfo) String

func (m *SyncInfo) String() string

func (*SyncInfo) Unmarshal

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

func (*SyncInfo) XXX_DiscardUnknown

func (m *SyncInfo) XXX_DiscardUnknown()

func (*SyncInfo) XXX_Marshal

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

func (*SyncInfo) XXX_Merge

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

func (*SyncInfo) XXX_Size

func (m *SyncInfo) XXX_Size() int

func (*SyncInfo) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*VoteData) GetAuthor

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

func (*VoteData) GetAuthorIdx

func (m *VoteData) GetAuthorIdx() uint64

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) GetLevel

func (m *VoteData) GetLevel() uint64

func (*VoteData) GetNewView

func (m *VoteData) GetNewView() bool

func (*VoteData) GetSignature

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

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 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) MarshalTo

func (m *VoteMessage) MarshalTo(dAtA []byte) (int, 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) Descriptor() ([]byte, []int)

func (*WalEntry) GetLastSnapshotIndex

func (m *WalEntry) GetLastSnapshotIndex() uint64

func (*WalEntry) GetMessage

func (m *WalEntry) GetMessage() *ConsensusMessage

func (*WalEntry) GetMessageType

func (m *WalEntry) GetMessageType() 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