Documentation ¶
Index ¶
- Variables
- type Certification
- func (*Certification) Descriptor() ([]byte, []int)
- func (m *Certification) GetSignatures() [][]byte
- func (m *Certification) Marshal() (dAtA []byte, err error)
- func (m *Certification) MarshalTo(dAtA []byte) (int, error)
- func (*Certification) ProtoMessage()
- func (m *Certification) Reset()
- func (m *Certification) Size() (n int)
- func (m *Certification) String() string
- func (m *Certification) Unmarshal(dAtA []byte) error
- func (m *Certification) XXX_DiscardUnknown()
- func (m *Certification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Certification) XXX_Merge(src proto.Message)
- func (m *Certification) XXX_Size() int
- func (m *Certification) XXX_Unmarshal(b []byte) error
- type Command
- func (*Command) Descriptor() ([]byte, []int)
- func (m *Command) Format() string
- func (m *Command) GetAuthor() uint64
- func (m *Command) GetContent() []*Transaction
- func (m *Command) GetDigest() string
- func (m *Command) GetFrontRunner() *CommandProtoIndex
- func (m *Command) GetGTime() int64
- func (m *Command) GetHashList() []string
- func (m *Command) GetSequence() uint64
- func (m *Command) Less(item btree.Item) bool
- func (m *Command) Marshal() (dAtA []byte, err error)
- func (m *Command) MarshalTo(dAtA []byte) (int, error)
- func (*Command) ProtoMessage()
- func (m *Command) Reset()
- func (m *Command) Size() (n int)
- func (m *Command) String() string
- func (m *Command) Unmarshal(dAtA []byte) error
- func (m *Command) XXX_DiscardUnknown()
- func (m *Command) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Command) XXX_Merge(src proto.Message)
- func (m *Command) XXX_Size() int
- func (m *Command) XXX_Unmarshal(b []byte) error
- type CommandProtoIndex
- func (*CommandProtoIndex) Descriptor() ([]byte, []int)
- func (m *CommandProtoIndex) GetAuthor() uint64
- func (m *CommandProtoIndex) GetSequence() uint64
- func (m *CommandProtoIndex) Marshal() (dAtA []byte, err error)
- func (m *CommandProtoIndex) MarshalTo(dAtA []byte) (int, error)
- func (*CommandProtoIndex) ProtoMessage()
- func (m *CommandProtoIndex) Reset()
- func (m *CommandProtoIndex) Size() (n int)
- func (m *CommandProtoIndex) String() string
- func (m *CommandProtoIndex) Unmarshal(dAtA []byte) error
- func (m *CommandProtoIndex) XXX_DiscardUnknown()
- func (m *CommandProtoIndex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CommandProtoIndex) XXX_Merge(src proto.Message)
- func (m *CommandProtoIndex) XXX_Size() int
- func (m *CommandProtoIndex) XXX_Unmarshal(b []byte) error
- type ConsensusMessage
- func (*ConsensusMessage) Descriptor() ([]byte, []int)
- func (m *ConsensusMessage) GetFrom() uint64
- func (m *ConsensusMessage) GetPayload() []byte
- func (m *ConsensusMessage) GetTo() uint64
- func (m *ConsensusMessage) GetType() MessageType
- func (m *ConsensusMessage) Marshal() (dAtA []byte, err error)
- func (m *ConsensusMessage) MarshalTo(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 MessageType
- type PartialOrder
- func (m *PartialOrder) Author() uint64
- func (m *PartialOrder) CommandList() []string
- func (*PartialOrder) Descriptor() ([]byte, []int)
- func (m *PartialOrder) Format() string
- func (m *PartialOrder) GetOrderedTime() int64
- func (m *PartialOrder) GetPreOrder() *PreOrder
- func (m *PartialOrder) GetQC() *QuorumCert
- func (m *PartialOrder) Marshal() (dAtA []byte, err error)
- func (m *PartialOrder) MarshalTo(dAtA []byte) (int, error)
- func (m *PartialOrder) ParentDigest() string
- func (m *PartialOrder) PreOrderDigest() string
- func (*PartialOrder) ProtoMessage()
- func (m *PartialOrder) Reset()
- func (m *PartialOrder) Sequence() uint64
- func (m *PartialOrder) SetOrderedTime()
- func (m *PartialOrder) Size() (n int)
- func (m *PartialOrder) String() string
- func (m *PartialOrder) TimestampList() []int64
- func (m *PartialOrder) Unmarshal(dAtA []byte) error
- func (m *PartialOrder) XXX_DiscardUnknown()
- func (m *PartialOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PartialOrder) XXX_Merge(src proto.Message)
- func (m *PartialOrder) XXX_Size() int
- func (m *PartialOrder) XXX_Unmarshal(b []byte) error
- type PartialOrderBatch
- func (*PartialOrderBatch) Descriptor() ([]byte, []int)
- func (m *PartialOrderBatch) Format() string
- func (m *PartialOrderBatch) GetAuthor() uint64
- func (m *PartialOrderBatch) GetHighOrders() []*PartialOrder
- func (m *PartialOrderBatch) GetSeqList() []uint64
- func (m *PartialOrderBatch) Marshal() (dAtA []byte, err error)
- func (m *PartialOrderBatch) MarshalTo(dAtA []byte) (int, error)
- func (*PartialOrderBatch) ProtoMessage()
- func (m *PartialOrderBatch) Reset()
- func (m *PartialOrderBatch) Size() (n int)
- func (m *PartialOrderBatch) String() string
- func (m *PartialOrderBatch) Unmarshal(dAtA []byte) error
- func (m *PartialOrderBatch) XXX_DiscardUnknown()
- func (m *PartialOrderBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PartialOrderBatch) XXX_Merge(src proto.Message)
- func (m *PartialOrderBatch) XXX_Size() int
- func (m *PartialOrderBatch) XXX_Unmarshal(b []byte) error
- type PreOrder
- func (*PreOrder) Descriptor() ([]byte, []int)
- func (m *PreOrder) Format() string
- func (m *PreOrder) GetAuthor() uint64
- func (m *PreOrder) GetCommandList() []string
- func (m *PreOrder) GetDigest() string
- func (m *PreOrder) GetParentDigest() string
- func (m *PreOrder) GetSequence() uint64
- func (m *PreOrder) GetTimestampList() []int64
- func (m *PreOrder) Marshal() (dAtA []byte, err error)
- func (m *PreOrder) MarshalTo(dAtA []byte) (int, error)
- func (*PreOrder) ProtoMessage()
- func (m *PreOrder) Reset()
- func (m *PreOrder) Size() (n int)
- func (m *PreOrder) String() string
- func (m *PreOrder) Unmarshal(dAtA []byte) error
- func (m *PreOrder) XXX_DiscardUnknown()
- func (m *PreOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PreOrder) XXX_Merge(src proto.Message)
- func (m *PreOrder) XXX_Size() int
- func (m *PreOrder) XXX_Unmarshal(b []byte) error
- type QuorumCert
- func (*QuorumCert) Descriptor() ([]byte, []int)
- func (m *QuorumCert) GetCerts() map[uint64]*Certification
- func (m *QuorumCert) Marshal() (dAtA []byte, err error)
- func (m *QuorumCert) MarshalTo(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 Transaction
- func (*Transaction) Descriptor() ([]byte, []int)
- func (m *Transaction) GetHash() string
- func (m *Transaction) GetPayload() []byte
- func (m *Transaction) GetTimestamp() int64
- func (m *Transaction) Marshal() (dAtA []byte, err error)
- func (m *Transaction) MarshalTo(dAtA []byte) (int, error)
- func (*Transaction) ProtoMessage()
- func (m *Transaction) Reset()
- func (m *Transaction) Size() (n int)
- func (m *Transaction) String() string
- func (m *Transaction) Unmarshal(dAtA []byte) error
- func (m *Transaction) XXX_DiscardUnknown()
- func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Transaction) XXX_Merge(src proto.Message)
- func (m *Transaction) XXX_Size() int
- func (m *Transaction) XXX_Unmarshal(b []byte) error
- type Vote
- func (*Vote) Descriptor() ([]byte, []int)
- func (m *Vote) Format() string
- func (m *Vote) GetAuthor() uint64
- func (m *Vote) GetCertification() *Certification
- func (m *Vote) GetDigest() string
- func (m *Vote) Marshal() (dAtA []byte, err error)
- func (m *Vote) MarshalTo(dAtA []byte) (int, error)
- func (*Vote) ProtoMessage()
- func (m *Vote) Reset()
- func (m *Vote) Size() (n int)
- func (m *Vote) String() string
- func (m *Vote) Unmarshal(dAtA []byte) error
- func (m *Vote) XXX_DiscardUnknown()
- func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Vote) XXX_Merge(src proto.Message)
- func (m *Vote) XXX_Size() int
- func (m *Vote) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthMessages = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMessages = fmt.Errorf("proto: integer overflow") )
var MessageType_name = map[int32]string{
0: "PRE_ORDER",
1: "VOTE",
2: "QUORUM_CERT",
}
var MessageType_value = map[string]int32{
"PRE_ORDER": 0,
"VOTE": 1,
"QUORUM_CERT": 2,
}
Functions ¶
This section is empty.
Types ¶
type Certification ¶
type Certification struct { // Signatures are the proof information which is generated by current node, signatures = SIGN(digest). Signatures [][]byte `protobuf:"bytes,1,rep,name=Signatures,proto3" json:"Signatures,omitempty"` }
Certification is used to verify the pre-ordering message on one node.
func (*Certification) Descriptor ¶
func (*Certification) Descriptor() ([]byte, []int)
func (*Certification) GetSignatures ¶
func (m *Certification) GetSignatures() [][]byte
func (*Certification) Marshal ¶
func (m *Certification) Marshal() (dAtA []byte, err error)
func (*Certification) ProtoMessage ¶
func (*Certification) ProtoMessage()
func (*Certification) Reset ¶
func (m *Certification) Reset()
func (*Certification) Size ¶
func (m *Certification) Size() (n int)
func (*Certification) String ¶
func (m *Certification) String() string
func (*Certification) Unmarshal ¶
func (m *Certification) Unmarshal(dAtA []byte) error
func (*Certification) XXX_DiscardUnknown ¶
func (m *Certification) XXX_DiscardUnknown()
func (*Certification) XXX_Marshal ¶
func (m *Certification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Certification) XXX_Merge ¶
func (m *Certification) XXX_Merge(src proto.Message)
func (*Certification) XXX_Size ¶
func (m *Certification) XXX_Size() int
func (*Certification) XXX_Unmarshal ¶
func (m *Certification) XXX_Unmarshal(b []byte) error
type Command ¶
type Command struct { // Author is the identifier for the client. Author uint64 `protobuf:"varint,1,opt,name=Author,proto3" json:"Author,omitempty"` // Sequence indicates the sequence for current client. Sequence uint64 `protobuf:"varint,2,opt,name=Sequence,proto3" json:"Sequence,omitempty"` // Digest indicates the identifier for current command. Digest string `protobuf:"bytes,3,opt,name=Digest,proto3" json:"Digest,omitempty"` // Content indicates the instructions in current command. Content []*Transaction `protobuf:"bytes,4,rep,name=Content,proto3" json:"Content,omitempty"` // HashList is the list of instructions in current command. HashList []string `protobuf:"bytes,5,rep,name=HashList,proto3" json:"HashList,omitempty"` // GTime is the timestamp when command is generated. GTime int64 `protobuf:"varint,6,opt,name=GTime,proto3" json:"GTime,omitempty"` // FrontRunner is used to detect interval relationship front attack, metrics info. FrontRunner *CommandProtoIndex `protobuf:"bytes,7,opt,name=FrontRunner,proto3" json:"FrontRunner,omitempty"` }
Command is the meta data for consensus processor.
func (*Command) Descriptor ¶
func (*Command) GetContent ¶
func (m *Command) GetContent() []*Transaction
func (*Command) GetFrontRunner ¶
func (m *Command) GetFrontRunner() *CommandProtoIndex
func (*Command) GetHashList ¶
func (*Command) GetSequence ¶
func (*Command) ProtoMessage ¶
func (*Command) ProtoMessage()
func (*Command) XXX_DiscardUnknown ¶
func (m *Command) XXX_DiscardUnknown()
func (*Command) XXX_Marshal ¶
func (*Command) XXX_Unmarshal ¶
type CommandProtoIndex ¶
type CommandProtoIndex struct { // Author indicates the generator current command. Author uint64 `protobuf:"varint,1,opt,name=Author,proto3" json:"Author,omitempty"` // Sequence indicates the sequence number for current command. Sequence uint64 `protobuf:"varint,2,opt,name=Sequence,proto3" json:"Sequence,omitempty"` }
CommandProtoIndex indicates the essential index info for command request.
func (*CommandProtoIndex) Descriptor ¶
func (*CommandProtoIndex) Descriptor() ([]byte, []int)
func (*CommandProtoIndex) GetAuthor ¶
func (m *CommandProtoIndex) GetAuthor() uint64
func (*CommandProtoIndex) GetSequence ¶
func (m *CommandProtoIndex) GetSequence() uint64
func (*CommandProtoIndex) Marshal ¶
func (m *CommandProtoIndex) Marshal() (dAtA []byte, err error)
func (*CommandProtoIndex) MarshalTo ¶
func (m *CommandProtoIndex) MarshalTo(dAtA []byte) (int, error)
func (*CommandProtoIndex) ProtoMessage ¶
func (*CommandProtoIndex) ProtoMessage()
func (*CommandProtoIndex) Reset ¶
func (m *CommandProtoIndex) Reset()
func (*CommandProtoIndex) Size ¶
func (m *CommandProtoIndex) Size() (n int)
func (*CommandProtoIndex) String ¶
func (m *CommandProtoIndex) String() string
func (*CommandProtoIndex) Unmarshal ¶
func (m *CommandProtoIndex) Unmarshal(dAtA []byte) error
func (*CommandProtoIndex) XXX_DiscardUnknown ¶
func (m *CommandProtoIndex) XXX_DiscardUnknown()
func (*CommandProtoIndex) XXX_Marshal ¶
func (m *CommandProtoIndex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CommandProtoIndex) XXX_Merge ¶
func (m *CommandProtoIndex) XXX_Merge(src proto.Message)
func (*CommandProtoIndex) XXX_Size ¶
func (m *CommandProtoIndex) XXX_Size() int
func (*CommandProtoIndex) XXX_Unmarshal ¶
func (m *CommandProtoIndex) XXX_Unmarshal(b []byte) error
type ConsensusMessage ¶
type ConsensusMessage struct { // MessageType indicates the message type which could be used in unmarshal process. Type MessageType `protobuf:"varint,1,opt,name=Type,proto3,enum=protos.MessageType" json:"Type,omitempty"` // From is the sender of current message. From uint64 `protobuf:"varint,2,opt,name=From,proto3" json:"From,omitempty"` // To is the receiver of current message, 0 means broadcast. To uint64 `protobuf:"varint,3,opt,name=To,proto3" json:"To,omitempty"` // Payload is the message content. Payload []byte `protobuf:"bytes,4,opt,name=Payload,proto3" json:"Payload,omitempty"` }
ConsensusMessage is the raw consensus messages in real network.
func NewConsensusMessage ¶
func NewConsensusMessage(typ MessageType, from, to uint64, payload []byte) *ConsensusMessage
func PackPartialOrder ¶
func PackPartialOrder(qc *PartialOrder) (*ConsensusMessage, error)
func PackPreOrder ¶
func PackPreOrder(pre *PreOrder) (*ConsensusMessage, error)
func (*ConsensusMessage) Descriptor ¶
func (*ConsensusMessage) Descriptor() ([]byte, []int)
func (*ConsensusMessage) GetFrom ¶
func (m *ConsensusMessage) GetFrom() uint64
func (*ConsensusMessage) GetPayload ¶
func (m *ConsensusMessage) GetPayload() []byte
func (*ConsensusMessage) GetTo ¶
func (m *ConsensusMessage) GetTo() uint64
func (*ConsensusMessage) GetType ¶
func (m *ConsensusMessage) GetType() MessageType
func (*ConsensusMessage) Marshal ¶
func (m *ConsensusMessage) Marshal() (dAtA []byte, err 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 MessageType ¶
type MessageType int32
MessageType indicates the type of messages.
const ( MessageType_PRE_ORDER MessageType = 0 MessageType_VOTE MessageType = 1 MessageType_QUORUM_CERT MessageType = 2 )
func (MessageType) EnumDescriptor ¶
func (MessageType) EnumDescriptor() ([]byte, []int)
func (MessageType) String ¶
func (x MessageType) String() string
type PartialOrder ¶
type PartialOrder struct { // PreOrder is the message we would like to send a quorum certification. PreOrder *PreOrder `protobuf:"bytes,1,opt,name=PreOrder,proto3" json:"PreOrder,omitempty"` // QC is a proof for current partial order. QC *QuorumCert `protobuf:"bytes,2,opt,name=QC,proto3" json:"QC,omitempty"` // OrderedTime records the timestamp when current partial order is generated. OrderedTime int64 `protobuf:"varint,3,opt,name=OrderedTime,proto3" json:"OrderedTime,omitempty"` }
PartialOrder is a verified log order generated by every node in phalanx cluster which is used to notify others its partial log order. it could be generated when current node has received efficient votes from other participates.
func NewNopPartialOrder ¶
func NewNopPartialOrder() *PartialOrder
func NewPartialOrder ¶
func NewPartialOrder(pre *PreOrder) *PartialOrder
func (*PartialOrder) Author ¶
func (m *PartialOrder) Author() uint64
func (*PartialOrder) CommandList ¶
func (m *PartialOrder) CommandList() []string
func (*PartialOrder) Descriptor ¶
func (*PartialOrder) Descriptor() ([]byte, []int)
func (*PartialOrder) Format ¶
func (m *PartialOrder) Format() string
func (*PartialOrder) GetOrderedTime ¶
func (m *PartialOrder) GetOrderedTime() int64
func (*PartialOrder) GetPreOrder ¶
func (m *PartialOrder) GetPreOrder() *PreOrder
func (*PartialOrder) GetQC ¶
func (m *PartialOrder) GetQC() *QuorumCert
func (*PartialOrder) Marshal ¶
func (m *PartialOrder) Marshal() (dAtA []byte, err error)
func (*PartialOrder) ParentDigest ¶
func (m *PartialOrder) ParentDigest() string
func (*PartialOrder) PreOrderDigest ¶
func (m *PartialOrder) PreOrderDigest() string
func (*PartialOrder) ProtoMessage ¶
func (*PartialOrder) ProtoMessage()
func (*PartialOrder) Reset ¶
func (m *PartialOrder) Reset()
func (*PartialOrder) Sequence ¶
func (m *PartialOrder) Sequence() uint64
func (*PartialOrder) SetOrderedTime ¶
func (m *PartialOrder) SetOrderedTime()
func (*PartialOrder) Size ¶
func (m *PartialOrder) Size() (n int)
func (*PartialOrder) String ¶
func (m *PartialOrder) String() string
func (*PartialOrder) TimestampList ¶
func (m *PartialOrder) TimestampList() []int64
func (*PartialOrder) Unmarshal ¶
func (m *PartialOrder) Unmarshal(dAtA []byte) error
func (*PartialOrder) XXX_DiscardUnknown ¶
func (m *PartialOrder) XXX_DiscardUnknown()
func (*PartialOrder) XXX_Marshal ¶
func (m *PartialOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PartialOrder) XXX_Merge ¶
func (m *PartialOrder) XXX_Merge(src proto.Message)
func (*PartialOrder) XXX_Size ¶
func (m *PartialOrder) XXX_Size() int
func (*PartialOrder) XXX_Unmarshal ¶
func (m *PartialOrder) XXX_Unmarshal(b []byte) error
type PartialOrderBatch ¶
type PartialOrderBatch struct { // Author is the generator for current batch. Author uint64 `protobuf:"varint,1,opt,name=Author,proto3" json:"Author,omitempty"` // HighOrders are the high-order which the generator has observed for each participants, HighOrders []*PartialOrder `protobuf:"bytes,2,rep,name=HighOrders,proto3" json:"HighOrders,omitempty"` // SeqList indicates the sequence number for the high-order we have selected. SeqList []uint64 `protobuf:"varint,3,rep,packed,name=SeqList,proto3" json:"SeqList,omitempty"` }
PartialOrderBatch is used to collect the partial orders for bft consensus.
func NewPartialOrderBatch ¶
func NewPartialOrderBatch(author uint64, count int) *PartialOrderBatch
func (*PartialOrderBatch) Descriptor ¶
func (*PartialOrderBatch) Descriptor() ([]byte, []int)
func (*PartialOrderBatch) Format ¶
func (m *PartialOrderBatch) Format() string
func (*PartialOrderBatch) GetAuthor ¶
func (m *PartialOrderBatch) GetAuthor() uint64
func (*PartialOrderBatch) GetHighOrders ¶
func (m *PartialOrderBatch) GetHighOrders() []*PartialOrder
func (*PartialOrderBatch) GetSeqList ¶
func (m *PartialOrderBatch) GetSeqList() []uint64
func (*PartialOrderBatch) Marshal ¶
func (m *PartialOrderBatch) Marshal() (dAtA []byte, err error)
func (*PartialOrderBatch) MarshalTo ¶
func (m *PartialOrderBatch) MarshalTo(dAtA []byte) (int, error)
func (*PartialOrderBatch) ProtoMessage ¶
func (*PartialOrderBatch) ProtoMessage()
func (*PartialOrderBatch) Reset ¶
func (m *PartialOrderBatch) Reset()
func (*PartialOrderBatch) Size ¶
func (m *PartialOrderBatch) Size() (n int)
func (*PartialOrderBatch) String ¶
func (m *PartialOrderBatch) String() string
func (*PartialOrderBatch) Unmarshal ¶
func (m *PartialOrderBatch) Unmarshal(dAtA []byte) error
func (*PartialOrderBatch) XXX_DiscardUnknown ¶
func (m *PartialOrderBatch) XXX_DiscardUnknown()
func (*PartialOrderBatch) XXX_Marshal ¶
func (m *PartialOrderBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PartialOrderBatch) XXX_Merge ¶
func (m *PartialOrderBatch) XXX_Merge(src proto.Message)
func (*PartialOrderBatch) XXX_Size ¶
func (m *PartialOrderBatch) XXX_Size() int
func (*PartialOrderBatch) XXX_Unmarshal ¶
func (m *PartialOrderBatch) XXX_Unmarshal(b []byte) error
type PreOrder ¶
type PreOrder struct { // Digest is the identifier of current pre-ordering protocol message, digest = Hash(author, sequence, batch-digest). Digest string `protobuf:"bytes,1,opt,name=Digest,proto3" json:"Digest,omitempty"` // Author indicates the identifier of current node. Author uint64 `protobuf:"varint,2,opt,name=Author,proto3" json:"Author,omitempty"` // Sequence indicates the order of current log. Sequence uint64 `protobuf:"varint,3,opt,name=Sequence,proto3" json:"Sequence,omitempty"` // OrderedCommands is a slice indicates the receive-order of commands on current node. CommandList []string `protobuf:"bytes,4,rep,name=CommandList,proto3" json:"CommandList,omitempty"` // Timestamp indicates the time when current node generated such a log. TimestampList []int64 `protobuf:"varint,5,rep,packed,name=TimestampList,proto3" json:"TimestampList,omitempty"` // ParentDigest indicates the parent pre-order digest. ParentDigest string `protobuf:"bytes,6,opt,name=ParentDigest,proto3" json:"ParentDigest,omitempty"` }
PreOrder is used to notify others the log order of current node.
func NewNopPreOrder ¶
func NewNopPreOrder() *PreOrder
func NewPreOrder ¶
func (*PreOrder) Descriptor ¶
func (*PreOrder) GetCommandList ¶
func (*PreOrder) GetParentDigest ¶
func (*PreOrder) GetSequence ¶
func (*PreOrder) GetTimestampList ¶
func (*PreOrder) ProtoMessage ¶
func (*PreOrder) ProtoMessage()
func (*PreOrder) XXX_DiscardUnknown ¶
func (m *PreOrder) XXX_DiscardUnknown()
func (*PreOrder) XXX_Marshal ¶
func (*PreOrder) XXX_Unmarshal ¶
type QuorumCert ¶
type QuorumCert struct { // Certs are the signatures generated by others. Certs map[uint64]*Certification `` /* 152-byte string literal not displayed */ }
QuorumCert contains the signatures generated by participates which could verify the validation of current message.
func NewQuorumCert ¶
func NewQuorumCert() *QuorumCert
func (*QuorumCert) Descriptor ¶
func (*QuorumCert) Descriptor() ([]byte, []int)
func (*QuorumCert) GetCerts ¶
func (m *QuorumCert) GetCerts() map[uint64]*Certification
func (*QuorumCert) Marshal ¶
func (m *QuorumCert) Marshal() (dAtA []byte, err 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 Transaction ¶
type Transaction struct { // Hash is the identifier. Hash string `protobuf:"bytes,1,opt,name=Hash,proto3" json:"Hash,omitempty"` // Payload is the instruction content. Payload []byte `protobuf:"bytes,2,opt,name=Payload,proto3" json:"Payload,omitempty"` // Timestamp is the time stamp for current transaction. Timestamp int64 `protobuf:"varint,3,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` }
Transaction is a structure for one instruction.
func (*Transaction) Descriptor ¶
func (*Transaction) Descriptor() ([]byte, []int)
func (*Transaction) GetHash ¶
func (m *Transaction) GetHash() string
func (*Transaction) GetPayload ¶
func (m *Transaction) GetPayload() []byte
func (*Transaction) GetTimestamp ¶
func (m *Transaction) GetTimestamp() int64
func (*Transaction) Marshal ¶
func (m *Transaction) Marshal() (dAtA []byte, err error)
func (*Transaction) ProtoMessage ¶
func (*Transaction) ProtoMessage()
func (*Transaction) Reset ¶
func (m *Transaction) Reset()
func (*Transaction) Size ¶
func (m *Transaction) Size() (n int)
func (*Transaction) String ¶
func (m *Transaction) String() string
func (*Transaction) Unmarshal ¶
func (m *Transaction) Unmarshal(dAtA []byte) error
func (*Transaction) XXX_DiscardUnknown ¶
func (m *Transaction) XXX_DiscardUnknown()
func (*Transaction) XXX_Marshal ¶
func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Transaction) XXX_Merge ¶
func (m *Transaction) XXX_Merge(src proto.Message)
func (*Transaction) XXX_Size ¶
func (m *Transaction) XXX_Size() int
func (*Transaction) XXX_Unmarshal ¶
func (m *Transaction) XXX_Unmarshal(b []byte) error
type Vote ¶
type Vote struct { // Author indicates the identifier of current node who has generated vote message. Author uint64 `protobuf:"varint,1,opt,name=Author,proto3" json:"Author,omitempty"` // Digest indicates the identifier of pre-ordering message which we have voted for. Digest string `protobuf:"bytes,2,opt,name=Digest,proto3" json:"Digest,omitempty"` // Certification is the proof information which is generated by current node, signature = SIGN(digest). Certification *Certification `protobuf:"bytes,3,opt,name=Certification,proto3" json:"Certification,omitempty"` }
Vote is generated by the replica who has received pre-ordering message to determine the pre-ordering message valid or not.
func (*Vote) Descriptor ¶
func (*Vote) GetCertification ¶
func (m *Vote) GetCertification() *Certification
func (*Vote) ProtoMessage ¶
func (*Vote) ProtoMessage()
func (*Vote) XXX_DiscardUnknown ¶
func (m *Vote) XXX_DiscardUnknown()