pbft

package
v0.6.1-preview Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2016 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package pbft is a generated protocol buffer package.

It is generated from these files:

messages.proto

It has these top-level messages:

Message
Request
PrePrepare
Prepare
Commit
BlockInfo
Checkpoint
ViewChange
PQset
NewView
FetchRequestBatch
RequestBatch
BatchMessage
Metadata

Index

Constants

View Source
const (
	// UnreasonableTimeout is an ugly thing, we need to create timers, then stop them before they expire, so use a large timeout
	UnreasonableTimeout = 100 * time.Hour
)

Variables

This section is empty.

Functions

func GetPlugin

func GetPlugin(c consensus.Stack) consensus.Consenter

GetPlugin returns the handle to the Consenter singleton

func New

New creates a new Obc* instance that provides the Consenter interface. Internally, it uses an opaque pbft-core instance.

Types

type BatchMessage

type BatchMessage struct {
	// Types that are valid to be assigned to Payload:
	//	*BatchMessage_Request
	//	*BatchMessage_RequestBatch
	//	*BatchMessage_PbftMessage
	//	*BatchMessage_Complaint
	Payload isBatchMessage_Payload `protobuf_oneof:"payload"`
}

func (*BatchMessage) Descriptor

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

func (*BatchMessage) GetComplaint

func (m *BatchMessage) GetComplaint() *Request

func (*BatchMessage) GetPayload

func (m *BatchMessage) GetPayload() isBatchMessage_Payload

func (*BatchMessage) GetPbftMessage

func (m *BatchMessage) GetPbftMessage() []byte

func (*BatchMessage) GetRequest

func (m *BatchMessage) GetRequest() *Request

func (*BatchMessage) GetRequestBatch

func (m *BatchMessage) GetRequestBatch() *RequestBatch

func (*BatchMessage) ProtoMessage

func (*BatchMessage) ProtoMessage()

func (*BatchMessage) Reset

func (m *BatchMessage) Reset()

func (*BatchMessage) String

func (m *BatchMessage) String() string

func (*BatchMessage) XXX_OneofFuncs

func (*BatchMessage) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type BatchMessage_Complaint

type BatchMessage_Complaint struct {
	Complaint *Request `protobuf:"bytes,4,opt,name=complaint,oneof"`
}

type BatchMessage_PbftMessage

type BatchMessage_PbftMessage struct {
	PbftMessage []byte `protobuf:"bytes,3,opt,name=pbft_message,json=pbftMessage,proto3,oneof"`
}

type BatchMessage_Request

type BatchMessage_Request struct {
	Request *Request `protobuf:"bytes,1,opt,name=request,oneof"`
}

type BatchMessage_RequestBatch

type BatchMessage_RequestBatch struct {
	RequestBatch *RequestBatch `protobuf:"bytes,2,opt,name=request_batch,json=requestBatch,oneof"`
}

type BlockInfo

type BlockInfo struct {
	BlockNumber uint64 `protobuf:"varint,1,opt,name=block_number,json=blockNumber" json:"block_number,omitempty"`
	BlockHash   []byte `protobuf:"bytes,2,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"`
}

func (*BlockInfo) Descriptor

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

func (*BlockInfo) ProtoMessage

func (*BlockInfo) ProtoMessage()

func (*BlockInfo) Reset

func (m *BlockInfo) Reset()

func (*BlockInfo) String

func (m *BlockInfo) String() string

type Checkpoint

type Checkpoint struct {
	SequenceNumber uint64 `protobuf:"varint,1,opt,name=sequence_number,json=sequenceNumber" json:"sequence_number,omitempty"`
	ReplicaId      uint64 `protobuf:"varint,2,opt,name=replica_id,json=replicaId" json:"replica_id,omitempty"`
	Id             string `protobuf:"bytes,3,opt,name=id" json:"id,omitempty"`
}

func (*Checkpoint) Descriptor

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

func (*Checkpoint) ProtoMessage

func (*Checkpoint) ProtoMessage()

func (*Checkpoint) Reset

func (m *Checkpoint) Reset()

func (*Checkpoint) String

func (m *Checkpoint) String() string

type Commit

type Commit struct {
	View           uint64 `protobuf:"varint,1,opt,name=view" json:"view,omitempty"`
	SequenceNumber uint64 `protobuf:"varint,2,opt,name=sequence_number,json=sequenceNumber" json:"sequence_number,omitempty"`
	BatchDigest    string `protobuf:"bytes,3,opt,name=batch_digest,json=batchDigest" json:"batch_digest,omitempty"`
	ReplicaId      uint64 `protobuf:"varint,4,opt,name=replica_id,json=replicaId" json:"replica_id,omitempty"`
}

func (*Commit) Descriptor

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

func (*Commit) ProtoMessage

func (*Commit) ProtoMessage()

func (*Commit) Reset

func (m *Commit) Reset()

func (*Commit) String

func (m *Commit) String() string

type FetchRequestBatch

type FetchRequestBatch struct {
	BatchDigest string `protobuf:"bytes,1,opt,name=batch_digest,json=batchDigest" json:"batch_digest,omitempty"`
	ReplicaId   uint64 `protobuf:"varint,2,opt,name=replica_id,json=replicaId" json:"replica_id,omitempty"`
}

func (*FetchRequestBatch) Descriptor

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

func (*FetchRequestBatch) ProtoMessage

func (*FetchRequestBatch) ProtoMessage()

func (*FetchRequestBatch) Reset

func (m *FetchRequestBatch) Reset()

func (*FetchRequestBatch) String

func (m *FetchRequestBatch) String() string

type Message

type Message struct {
	// Types that are valid to be assigned to Payload:
	//	*Message_RequestBatch
	//	*Message_PrePrepare
	//	*Message_Prepare
	//	*Message_Commit
	//	*Message_Checkpoint
	//	*Message_ViewChange
	//	*Message_NewView
	//	*Message_FetchRequestBatch
	//	*Message_ReturnRequestBatch
	Payload isMessage_Payload `protobuf_oneof:"payload"`
}

func (*Message) Descriptor

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

func (*Message) GetCheckpoint

func (m *Message) GetCheckpoint() *Checkpoint

func (*Message) GetCommit

func (m *Message) GetCommit() *Commit

func (*Message) GetFetchRequestBatch

func (m *Message) GetFetchRequestBatch() *FetchRequestBatch

func (*Message) GetNewView

func (m *Message) GetNewView() *NewView

func (*Message) GetPayload

func (m *Message) GetPayload() isMessage_Payload

func (*Message) GetPrePrepare

func (m *Message) GetPrePrepare() *PrePrepare

func (*Message) GetPrepare

func (m *Message) GetPrepare() *Prepare

func (*Message) GetRequestBatch

func (m *Message) GetRequestBatch() *RequestBatch

func (*Message) GetReturnRequestBatch

func (m *Message) GetReturnRequestBatch() *RequestBatch

func (*Message) GetViewChange

func (m *Message) GetViewChange() *ViewChange

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (*Message) String

func (m *Message) String() string

func (*Message) XXX_OneofFuncs

func (*Message) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type Message_Checkpoint

type Message_Checkpoint struct {
	Checkpoint *Checkpoint `protobuf:"bytes,5,opt,name=checkpoint,oneof"`
}

type Message_Commit

type Message_Commit struct {
	Commit *Commit `protobuf:"bytes,4,opt,name=commit,oneof"`
}

type Message_FetchRequestBatch

type Message_FetchRequestBatch struct {
	FetchRequestBatch *FetchRequestBatch `protobuf:"bytes,8,opt,name=fetch_request_batch,json=fetchRequestBatch,oneof"`
}

type Message_NewView

type Message_NewView struct {
	NewView *NewView `protobuf:"bytes,7,opt,name=new_view,json=newView,oneof"`
}

type Message_PrePrepare

type Message_PrePrepare struct {
	PrePrepare *PrePrepare `protobuf:"bytes,2,opt,name=pre_prepare,json=prePrepare,oneof"`
}

type Message_Prepare

type Message_Prepare struct {
	Prepare *Prepare `protobuf:"bytes,3,opt,name=prepare,oneof"`
}

type Message_RequestBatch

type Message_RequestBatch struct {
	RequestBatch *RequestBatch `protobuf:"bytes,1,opt,name=request_batch,json=requestBatch,oneof"`
}

type Message_ReturnRequestBatch

type Message_ReturnRequestBatch struct {
	ReturnRequestBatch *RequestBatch `protobuf:"bytes,9,opt,name=return_request_batch,json=returnRequestBatch,oneof"`
}

type Message_ViewChange

type Message_ViewChange struct {
	ViewChange *ViewChange `protobuf:"bytes,6,opt,name=view_change,json=viewChange,oneof"`
}

type Metadata

type Metadata struct {
	SeqNo uint64 `protobuf:"varint,1,opt,name=seqNo" json:"seqNo,omitempty"`
}

func (*Metadata) Descriptor

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

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) Reset

func (m *Metadata) Reset()

func (*Metadata) String

func (m *Metadata) String() string

type NewView

type NewView struct {
	View      uint64            `protobuf:"varint,1,opt,name=view" json:"view,omitempty"`
	Vset      []*ViewChange     `protobuf:"bytes,2,rep,name=vset" json:"vset,omitempty"`
	Xset      map[uint64]string `` /* 129-byte string literal not displayed */
	ReplicaId uint64            `protobuf:"varint,4,opt,name=replica_id,json=replicaId" json:"replica_id,omitempty"`
}

func (*NewView) Descriptor

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

func (*NewView) GetVset

func (m *NewView) GetVset() []*ViewChange

func (*NewView) GetXset

func (m *NewView) GetXset() map[uint64]string

func (*NewView) ProtoMessage

func (*NewView) ProtoMessage()

func (*NewView) Reset

func (m *NewView) Reset()

func (*NewView) String

func (m *NewView) String() string

type PQset

type PQset struct {
	Set []*ViewChange_PQ `protobuf:"bytes,1,rep,name=set" json:"set,omitempty"`
}

func (*PQset) Descriptor

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

func (*PQset) GetSet

func (m *PQset) GetSet() []*ViewChange_PQ

func (*PQset) ProtoMessage

func (*PQset) ProtoMessage()

func (*PQset) Reset

func (m *PQset) Reset()

func (*PQset) String

func (m *PQset) String() string

type PrePrepare

type PrePrepare struct {
	View           uint64        `protobuf:"varint,1,opt,name=view" json:"view,omitempty"`
	SequenceNumber uint64        `protobuf:"varint,2,opt,name=sequence_number,json=sequenceNumber" json:"sequence_number,omitempty"`
	BatchDigest    string        `protobuf:"bytes,3,opt,name=batch_digest,json=batchDigest" json:"batch_digest,omitempty"`
	RequestBatch   *RequestBatch `protobuf:"bytes,4,opt,name=request_batch,json=requestBatch" json:"request_batch,omitempty"`
	ReplicaId      uint64        `protobuf:"varint,5,opt,name=replica_id,json=replicaId" json:"replica_id,omitempty"`
}

func (*PrePrepare) Descriptor

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

func (*PrePrepare) GetRequestBatch

func (m *PrePrepare) GetRequestBatch() *RequestBatch

func (*PrePrepare) ProtoMessage

func (*PrePrepare) ProtoMessage()

func (*PrePrepare) Reset

func (m *PrePrepare) Reset()

func (*PrePrepare) String

func (m *PrePrepare) String() string

type Prepare

type Prepare struct {
	View           uint64 `protobuf:"varint,1,opt,name=view" json:"view,omitempty"`
	SequenceNumber uint64 `protobuf:"varint,2,opt,name=sequence_number,json=sequenceNumber" json:"sequence_number,omitempty"`
	BatchDigest    string `protobuf:"bytes,3,opt,name=batch_digest,json=batchDigest" json:"batch_digest,omitempty"`
	ReplicaId      uint64 `protobuf:"varint,4,opt,name=replica_id,json=replicaId" json:"replica_id,omitempty"`
}

func (*Prepare) Descriptor

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

func (*Prepare) ProtoMessage

func (*Prepare) ProtoMessage()

func (*Prepare) Reset

func (m *Prepare) Reset()

func (*Prepare) String

func (m *Prepare) String() string

type Request

type Request struct {
	Timestamp *google_protobuf.Timestamp `protobuf:"bytes,1,opt,name=timestamp" json:"timestamp,omitempty"`
	Payload   []byte                     `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
	ReplicaId uint64                     `protobuf:"varint,3,opt,name=replica_id,json=replicaId" json:"replica_id,omitempty"`
	Signature []byte                     `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
}

func (*Request) Descriptor

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

func (*Request) GetTimestamp

func (m *Request) GetTimestamp() *google_protobuf.Timestamp

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

type RequestBatch

type RequestBatch struct {
	Batch []*Request `protobuf:"bytes,1,rep,name=batch" json:"batch,omitempty"`
}

func (*RequestBatch) Descriptor

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

func (*RequestBatch) GetBatch

func (m *RequestBatch) GetBatch() []*Request

func (*RequestBatch) ProtoMessage

func (*RequestBatch) ProtoMessage()

func (*RequestBatch) Reset

func (m *RequestBatch) Reset()

func (*RequestBatch) String

func (m *RequestBatch) String() string

type ViewChange

type ViewChange struct {
	View      uint64           `protobuf:"varint,1,opt,name=view" json:"view,omitempty"`
	H         uint64           `protobuf:"varint,2,opt,name=h" json:"h,omitempty"`
	Cset      []*ViewChange_C  `protobuf:"bytes,3,rep,name=cset" json:"cset,omitempty"`
	Pset      []*ViewChange_PQ `protobuf:"bytes,4,rep,name=pset" json:"pset,omitempty"`
	Qset      []*ViewChange_PQ `protobuf:"bytes,5,rep,name=qset" json:"qset,omitempty"`
	ReplicaId uint64           `protobuf:"varint,6,opt,name=replica_id,json=replicaId" json:"replica_id,omitempty"`
	Signature []byte           `protobuf:"bytes,7,opt,name=signature,proto3" json:"signature,omitempty"`
}

func (*ViewChange) Descriptor

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

func (*ViewChange) GetCset

func (m *ViewChange) GetCset() []*ViewChange_C

func (*ViewChange) GetPset

func (m *ViewChange) GetPset() []*ViewChange_PQ

func (*ViewChange) GetQset

func (m *ViewChange) GetQset() []*ViewChange_PQ

func (*ViewChange) ProtoMessage

func (*ViewChange) ProtoMessage()

func (*ViewChange) Reset

func (m *ViewChange) Reset()

func (*ViewChange) String

func (m *ViewChange) String() string

type ViewChange_C

type ViewChange_C struct {
	SequenceNumber uint64 `protobuf:"varint,1,opt,name=sequence_number,json=sequenceNumber" json:"sequence_number,omitempty"`
	Id             string `protobuf:"bytes,3,opt,name=id" json:"id,omitempty"`
}

This message should go away and become a checkpoint once replica_id is removed

func (*ViewChange_C) Descriptor

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

func (*ViewChange_C) ProtoMessage

func (*ViewChange_C) ProtoMessage()

func (*ViewChange_C) Reset

func (m *ViewChange_C) Reset()

func (*ViewChange_C) String

func (m *ViewChange_C) String() string

type ViewChange_PQ

type ViewChange_PQ struct {
	SequenceNumber uint64 `protobuf:"varint,1,opt,name=sequence_number,json=sequenceNumber" json:"sequence_number,omitempty"`
	BatchDigest    string `protobuf:"bytes,2,opt,name=batch_digest,json=batchDigest" json:"batch_digest,omitempty"`
	View           uint64 `protobuf:"varint,3,opt,name=view" json:"view,omitempty"`
}

func (*ViewChange_PQ) Descriptor

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

func (*ViewChange_PQ) ProtoMessage

func (*ViewChange_PQ) ProtoMessage()

func (*ViewChange_PQ) Reset

func (m *ViewChange_PQ) Reset()

func (*ViewChange_PQ) String

func (m *ViewChange_PQ) String() string

Jump to

Keyboard shortcuts

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