pbftpb

package
v0.0.0-...-3a733ff Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthPbft        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPbft          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPbft = fmt.Errorf("proto: unexpected end of group")
)
View Source
var AgreementMessage_Type_name = map[int32]string{
	0: "PrePrepare",
	1: "Prepare",
	2: "Commit",
}
View Source
var AgreementMessage_Type_value = map[string]int32{
	"PrePrepare": 0,
	"Prepare":    1,
	"Commit":     2,
}
View Source
var InstanceState_Status_name = map[int32]string{
	0: "None",
	1: "PrePrepared",
	2: "Prepared",
	3: "Committed",
	4: "Executed",
}
View Source
var InstanceState_Status_value = map[string]int32{
	"None":        0,
	"PrePrepared": 1,
	"Prepared":    2,
	"Committed":   3,
	"Executed":    4,
}

Functions

func WrapMessageInner

func WrapMessageInner(msg proto.Message) isPBFTMessage_Type

WrapMessageInner wraps a union type of Message in a new isMessage_Type.

Types

type AgreementMessage

type AgreementMessage struct {
	View        View                  `protobuf:"varint,1,opt,name=view,proto3,casttype=View" json:"view,omitempty"`
	Index       Index                 `protobuf:"varint,2,opt,name=index,proto3,casttype=Index" json:"index,omitempty"`
	Type        AgreementMessage_Type `protobuf:"varint,3,opt,name=type,proto3,enum=pbftpb.AgreementMessage_Type" json:"type,omitempty"`
	Command     *commandpb.Command    `protobuf:"bytes,4,opt,name=command,proto3" json:"command,omitempty"`
	CommandHash []byte                `protobuf:"bytes,5,opt,name=command_hash,json=commandHash,proto3" json:"command_hash,omitempty"`
}

func (*AgreementMessage) Descriptor

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

func (*AgreementMessage) Equals

func (m *AgreementMessage) Equals(other *AgreementMessage) bool

func (*AgreementMessage) GetCommand

func (m *AgreementMessage) GetCommand() *commandpb.Command

func (*AgreementMessage) GetCommandHash

func (m *AgreementMessage) GetCommandHash() []byte

func (*AgreementMessage) GetIndex

func (m *AgreementMessage) GetIndex() Index

func (*AgreementMessage) GetType

func (*AgreementMessage) GetView

func (m *AgreementMessage) GetView() View

func (*AgreementMessage) Marshal

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

func (*AgreementMessage) MarshalTo

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

func (*AgreementMessage) MarshalToSizedBuffer

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

func (*AgreementMessage) ProtoMessage

func (*AgreementMessage) ProtoMessage()

func (*AgreementMessage) Reset

func (m *AgreementMessage) Reset()

func (*AgreementMessage) Size

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

func (*AgreementMessage) String

func (m *AgreementMessage) String() string

func (*AgreementMessage) Unmarshal

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

func (*AgreementMessage) XXX_DiscardUnknown

func (m *AgreementMessage) XXX_DiscardUnknown()

func (*AgreementMessage) XXX_Marshal

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

func (*AgreementMessage) XXX_Merge

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

func (*AgreementMessage) XXX_Size

func (m *AgreementMessage) XXX_Size() int

func (*AgreementMessage) XXX_Unmarshal

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

type AgreementMessage_Type

type AgreementMessage_Type int32
const (
	AgreementMessage_PrePrepare AgreementMessage_Type = 0
	AgreementMessage_Prepare    AgreementMessage_Type = 1
	AgreementMessage_Commit     AgreementMessage_Type = 2
)

func (AgreementMessage_Type) EnumDescriptor

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

func (AgreementMessage_Type) String

func (x AgreementMessage_Type) String() string

type Index

type Index uint64

Index is the number of an instance slot in a replica's command array.

type InstanceState

type InstanceState struct {
	View        View                 `protobuf:"varint,1,opt,name=view,proto3,casttype=View" json:"view,omitempty"`
	Index       Index                `protobuf:"varint,2,opt,name=index,proto3,casttype=Index" json:"index,omitempty"`
	Status      InstanceState_Status `protobuf:"varint,3,opt,name=status,proto3,enum=pbftpb.InstanceState_Status" json:"status,omitempty"`
	Command     *commandpb.Command   `protobuf:"bytes,4,opt,name=command,proto3" json:"command,omitempty"`
	CommandHash []byte               `protobuf:"bytes,5,opt,name=command_hash,json=commandHash,proto3" json:"command_hash,omitempty"`
}

func (*InstanceState) Descriptor

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

func (InstanceState) Equals

func (m InstanceState) Equals(other InstanceState) bool

func (*InstanceState) GetCommand

func (m *InstanceState) GetCommand() *commandpb.Command

func (*InstanceState) GetCommandHash

func (m *InstanceState) GetCommandHash() []byte

func (*InstanceState) GetIndex

func (m *InstanceState) GetIndex() Index

func (*InstanceState) GetStatus

func (m *InstanceState) GetStatus() InstanceState_Status

func (*InstanceState) GetView

func (m *InstanceState) GetView() View

func (*InstanceState) IsAtleastPrePrepared

func (m *InstanceState) IsAtleastPrePrepared() bool

func (*InstanceState) IsAtleastPrepared

func (m *InstanceState) IsAtleastPrepared() bool

func (*InstanceState) IsCommitted

func (m *InstanceState) IsCommitted() bool

func (*InstanceState) IsPrePrepared

func (m *InstanceState) IsPrePrepared() bool

func (*InstanceState) IsPrepared

func (m *InstanceState) IsPrepared() bool

func (*InstanceState) Marshal

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

func (*InstanceState) MarshalTo

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

func (*InstanceState) MarshalToSizedBuffer

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

func (*InstanceState) ProtoMessage

func (*InstanceState) ProtoMessage()

func (*InstanceState) Reset

func (m *InstanceState) Reset()

func (*InstanceState) Size

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

func (*InstanceState) String

func (m *InstanceState) String() string

func (*InstanceState) Unmarshal

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

func (*InstanceState) XXX_DiscardUnknown

func (m *InstanceState) XXX_DiscardUnknown()

func (*InstanceState) XXX_Marshal

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

func (*InstanceState) XXX_Merge

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

func (*InstanceState) XXX_Size

func (m *InstanceState) XXX_Size() int

func (*InstanceState) XXX_Unmarshal

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

type InstanceState_Status

type InstanceState_Status int32
const (
	InstanceState_None        InstanceState_Status = 0
	InstanceState_PrePrepared InstanceState_Status = 1
	InstanceState_Prepared    InstanceState_Status = 2
	InstanceState_Committed   InstanceState_Status = 3
	InstanceState_Executed    InstanceState_Status = 4
)

func (InstanceState_Status) EnumDescriptor

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

func (InstanceState_Status) String

func (x InstanceState_Status) String() string

type NewViewMessage

type NewViewMessage struct {
	NewView   View                    `protobuf:"varint,1,opt,name=new_view,json=newView,proto3,casttype=View" json:"new_view,omitempty"`
	NvProof   []NewViewProof          `protobuf:"bytes,2,rep,name=nv_proof,json=nvProof,proto3" json:"nv_proof"`
	Instances map[Index]InstanceState `` /* 164-byte string literal not displayed */
}

func (*NewViewMessage) Descriptor

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

func (*NewViewMessage) GetInstances

func (m *NewViewMessage) GetInstances() map[Index]InstanceState

func (*NewViewMessage) GetNewView

func (m *NewViewMessage) GetNewView() View

func (*NewViewMessage) GetNvProof

func (m *NewViewMessage) GetNvProof() []NewViewProof

func (*NewViewMessage) Marshal

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

func (*NewViewMessage) MarshalTo

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

func (*NewViewMessage) MarshalToSizedBuffer

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

func (*NewViewMessage) ProtoMessage

func (*NewViewMessage) ProtoMessage()

func (*NewViewMessage) Reset

func (m *NewViewMessage) Reset()

func (*NewViewMessage) Size

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

func (*NewViewMessage) String

func (m *NewViewMessage) String() string

func (*NewViewMessage) Unmarshal

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

func (*NewViewMessage) XXX_DiscardUnknown

func (m *NewViewMessage) XXX_DiscardUnknown()

func (*NewViewMessage) XXX_Marshal

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

func (*NewViewMessage) XXX_Merge

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

func (*NewViewMessage) XXX_Size

func (m *NewViewMessage) XXX_Size() int

func (*NewViewMessage) XXX_Unmarshal

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

type NewViewProof

type NewViewProof struct {
	AckFor github_com_ibalajiarun_go_consensus_peer_peerpb.PeerID `` /* 144-byte string literal not displayed */
	Digest []byte                                                 `protobuf:"bytes,3,opt,name=digest,proto3" json:"digest,omitempty"`
}

func (*NewViewProof) Descriptor

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

func (*NewViewProof) GetDigest

func (m *NewViewProof) GetDigest() []byte

func (*NewViewProof) Marshal

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

func (*NewViewProof) MarshalTo

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

func (*NewViewProof) MarshalToSizedBuffer

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

func (*NewViewProof) ProtoMessage

func (*NewViewProof) ProtoMessage()

func (*NewViewProof) Reset

func (m *NewViewProof) Reset()

func (*NewViewProof) Size

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

func (*NewViewProof) String

func (m *NewViewProof) String() string

func (*NewViewProof) Unmarshal

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

func (*NewViewProof) XXX_DiscardUnknown

func (m *NewViewProof) XXX_DiscardUnknown()

func (*NewViewProof) XXX_Marshal

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

func (*NewViewProof) XXX_Merge

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

func (*NewViewProof) XXX_Size

func (m *NewViewProof) XXX_Size() int

func (*NewViewProof) XXX_Unmarshal

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

type PBFTMessage

type PBFTMessage struct {
	// Types that are valid to be assigned to Type:
	//	*PBFTMessage_Agreement
	//	*PBFTMessage_ViewChange
	//	*PBFTMessage_ViewChangeAck
	//	*PBFTMessage_NewView
	Type isPBFTMessage_Type `protobuf_oneof:"type"`
}

func WrapPBFTMessage

func WrapPBFTMessage(msg proto.Message) *PBFTMessage

WrapPBFTMessage wraps a union type of Message in a new PBFTMessage without a destination.

func (*PBFTMessage) Descriptor

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

func (*PBFTMessage) GetAgreement

func (m *PBFTMessage) GetAgreement() *AgreementMessage

func (*PBFTMessage) GetNewView

func (m *PBFTMessage) GetNewView() *NewViewMessage

func (*PBFTMessage) GetType

func (m *PBFTMessage) GetType() isPBFTMessage_Type

func (*PBFTMessage) GetViewChange

func (m *PBFTMessage) GetViewChange() *ViewChangeMessage

func (*PBFTMessage) GetViewChangeAck

func (m *PBFTMessage) GetViewChangeAck() *ViewChangeAckMessage

func (*PBFTMessage) Marshal

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

func (*PBFTMessage) MarshalTo

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

func (*PBFTMessage) MarshalToSizedBuffer

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

func (*PBFTMessage) ProtoMessage

func (*PBFTMessage) ProtoMessage()

func (*PBFTMessage) Reset

func (m *PBFTMessage) Reset()

func (*PBFTMessage) Size

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

func (*PBFTMessage) String

func (m *PBFTMessage) String() string

func (*PBFTMessage) Unmarshal

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

func (*PBFTMessage) XXX_DiscardUnknown

func (m *PBFTMessage) XXX_DiscardUnknown()

func (*PBFTMessage) XXX_Marshal

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

func (*PBFTMessage) XXX_Merge

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

func (*PBFTMessage) XXX_OneofWrappers

func (*PBFTMessage) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*PBFTMessage) XXX_Size

func (m *PBFTMessage) XXX_Size() int

func (*PBFTMessage) XXX_Unmarshal

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

type PBFTMessage_Agreement

type PBFTMessage_Agreement struct {
	Agreement *AgreementMessage `protobuf:"bytes,1,opt,name=agreement,proto3,oneof" json:"agreement,omitempty"`
}

func (*PBFTMessage_Agreement) MarshalTo

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

func (*PBFTMessage_Agreement) MarshalToSizedBuffer

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

func (*PBFTMessage_Agreement) Size

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

type PBFTMessage_NewView

type PBFTMessage_NewView struct {
	NewView *NewViewMessage `protobuf:"bytes,4,opt,name=new_view,json=newView,proto3,oneof" json:"new_view,omitempty"`
}

func (*PBFTMessage_NewView) MarshalTo

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

func (*PBFTMessage_NewView) MarshalToSizedBuffer

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

func (*PBFTMessage_NewView) Size

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

type PBFTMessage_ViewChange

type PBFTMessage_ViewChange struct {
	ViewChange *ViewChangeMessage `protobuf:"bytes,2,opt,name=view_change,json=viewChange,proto3,oneof" json:"view_change,omitempty"`
}

func (*PBFTMessage_ViewChange) MarshalTo

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

func (*PBFTMessage_ViewChange) MarshalToSizedBuffer

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

func (*PBFTMessage_ViewChange) Size

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

type PBFTMessage_ViewChangeAck

type PBFTMessage_ViewChangeAck struct {
	ViewChangeAck *ViewChangeAckMessage `protobuf:"bytes,3,opt,name=view_change_ack,json=viewChangeAck,proto3,oneof" json:"view_change_ack,omitempty"`
}

func (*PBFTMessage_ViewChangeAck) MarshalTo

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

func (*PBFTMessage_ViewChangeAck) MarshalToSizedBuffer

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

func (*PBFTMessage_ViewChangeAck) Size

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

type View

type View uint64

View is a view

type ViewChangeAckMessage

type ViewChangeAckMessage struct {
	NewView View                                                   `protobuf:"varint,1,opt,name=new_view,json=newView,proto3,casttype=View" json:"new_view,omitempty"`
	AckFor  github_com_ibalajiarun_go_consensus_peer_peerpb.PeerID `` /* 144-byte string literal not displayed */
	Digest  []byte                                                 `protobuf:"bytes,3,opt,name=digest,proto3" json:"digest,omitempty"`
}

func (*ViewChangeAckMessage) Descriptor

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

func (*ViewChangeAckMessage) GetAckFor

func (*ViewChangeAckMessage) GetDigest

func (m *ViewChangeAckMessage) GetDigest() []byte

func (*ViewChangeAckMessage) GetNewView

func (m *ViewChangeAckMessage) GetNewView() View

func (*ViewChangeAckMessage) Marshal

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

func (*ViewChangeAckMessage) MarshalTo

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

func (*ViewChangeAckMessage) MarshalToSizedBuffer

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

func (*ViewChangeAckMessage) ProtoMessage

func (*ViewChangeAckMessage) ProtoMessage()

func (*ViewChangeAckMessage) Reset

func (m *ViewChangeAckMessage) Reset()

func (*ViewChangeAckMessage) Size

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

func (*ViewChangeAckMessage) String

func (m *ViewChangeAckMessage) String() string

func (*ViewChangeAckMessage) Unmarshal

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

func (*ViewChangeAckMessage) XXX_DiscardUnknown

func (m *ViewChangeAckMessage) XXX_DiscardUnknown()

func (*ViewChangeAckMessage) XXX_Marshal

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

func (*ViewChangeAckMessage) XXX_Merge

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

func (*ViewChangeAckMessage) XXX_Size

func (m *ViewChangeAckMessage) XXX_Size() int

func (*ViewChangeAckMessage) XXX_Unmarshal

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

type ViewChangeMessage

type ViewChangeMessage struct {
	NewView   View            `protobuf:"varint,1,opt,name=new_view,json=newView,proto3,casttype=View" json:"new_view,omitempty"`
	LowIndex  Index           `protobuf:"varint,2,opt,name=low_index,json=lowIndex,proto3,casttype=Index" json:"low_index,omitempty"`
	HighIndex Index           `protobuf:"varint,3,opt,name=high_index,json=highIndex,proto3,casttype=Index" json:"high_index,omitempty"`
	PSet      []InstanceState `protobuf:"bytes,4,rep,name=p_set,json=pSet,proto3" json:"p_set"`
	QSet      []InstanceState `protobuf:"bytes,5,rep,name=q_set,json=qSet,proto3" json:"q_set"`
}

func (*ViewChangeMessage) Descriptor

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

func (*ViewChangeMessage) GetHighIndex

func (m *ViewChangeMessage) GetHighIndex() Index

func (*ViewChangeMessage) GetLowIndex

func (m *ViewChangeMessage) GetLowIndex() Index

func (*ViewChangeMessage) GetNewView

func (m *ViewChangeMessage) GetNewView() View

func (*ViewChangeMessage) GetPSet

func (m *ViewChangeMessage) GetPSet() []InstanceState

func (*ViewChangeMessage) GetQSet

func (m *ViewChangeMessage) GetQSet() []InstanceState

func (*ViewChangeMessage) Marshal

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

func (*ViewChangeMessage) MarshalTo

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

func (*ViewChangeMessage) MarshalToSizedBuffer

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

func (*ViewChangeMessage) ProtoMessage

func (*ViewChangeMessage) ProtoMessage()

func (*ViewChangeMessage) Reset

func (m *ViewChangeMessage) Reset()

func (*ViewChangeMessage) Size

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

func (*ViewChangeMessage) String

func (m *ViewChangeMessage) String() string

func (*ViewChangeMessage) Unmarshal

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

func (*ViewChangeMessage) XXX_DiscardUnknown

func (m *ViewChangeMessage) XXX_DiscardUnknown()

func (*ViewChangeMessage) XXX_Marshal

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

func (*ViewChangeMessage) XXX_Merge

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

func (*ViewChangeMessage) XXX_Size

func (m *ViewChangeMessage) XXX_Size() int

func (*ViewChangeMessage) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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