sbftslowpb

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthSbft        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowSbft          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupSbft = fmt.Errorf("proto: unexpected end of group")
)
View Source
var InstanceState_Status_name = map[int32]string{
	0: "None",
	1: "Preprepared",
	2: "SignShared",
	3: "Prepared",
	4: "CommitSigShared",
	5: "Committed",
	6: "StateShared",
	7: "Executed",
}
View Source
var InstanceState_Status_value = map[string]int32{
	"None":            0,
	"Preprepared":     1,
	"SignShared":      2,
	"Prepared":        3,
	"CommitSigShared": 4,
	"Committed":       5,
	"StateShared":     6,
	"Executed":        7,
}
View Source
var NormalMessage_Type_name = map[int32]string{
	0: "None",
	1: "Preprepare",
	2: "SignShare",
	3: "Prepare",
	4: "CommitSig",
	5: "CommitSlow",
	6: "StateShare",
	7: "ExecProof",
}
View Source
var NormalMessage_Type_value = map[string]int32{
	"None":       0,
	"Preprepare": 1,
	"SignShare":  2,
	"Prepare":    3,
	"CommitSig":  4,
	"CommitSlow": 5,
	"StateShare": 6,
	"ExecProof":  7,
}

Functions

func WrapMessageInner

func WrapMessageInner(msg proto.Message) isSBFTMessage_Type

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

Types

type Index

type Index uint64

func (*Index) GetAndIncrement

func (idx *Index) GetAndIncrement() Index

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=sbftslowpb.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) 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) IsCommitted

func (m *InstanceState) IsCommitted() 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_SignShared      InstanceState_Status = 2
	InstanceState_Prepared        InstanceState_Status = 3
	InstanceState_CommitSigShared InstanceState_Status = 4
	InstanceState_Committed       InstanceState_Status = 5
	InstanceState_StateShared     InstanceState_Status = 6
	InstanceState_Executed        InstanceState_Status = 7
)

func (InstanceState_Status) EnumDescriptor

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

func (InstanceState_Status) String

func (x InstanceState_Status) String() string

type NormalMessage

type NormalMessage 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        NormalMessage_Type `protobuf:"varint,3,opt,name=type,proto3,enum=sbftslowpb.NormalMessage_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 (*NormalMessage) Descriptor

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

func (*NormalMessage) Equals

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

func (*NormalMessage) GetCommand

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

func (*NormalMessage) GetCommandHash

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

func (*NormalMessage) GetIndex

func (m *NormalMessage) GetIndex() Index

func (*NormalMessage) GetType

func (m *NormalMessage) GetType() NormalMessage_Type

func (*NormalMessage) GetView

func (m *NormalMessage) GetView() View

func (*NormalMessage) Marshal

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

func (*NormalMessage) MarshalTo

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

func (*NormalMessage) MarshalToSizedBuffer

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

func (*NormalMessage) ProtoMessage

func (*NormalMessage) ProtoMessage()

func (*NormalMessage) Reset

func (m *NormalMessage) Reset()

func (*NormalMessage) Size

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

func (*NormalMessage) String

func (m *NormalMessage) String() string

func (*NormalMessage) Unmarshal

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

func (*NormalMessage) XXX_DiscardUnknown

func (m *NormalMessage) XXX_DiscardUnknown()

func (*NormalMessage) XXX_Marshal

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

func (*NormalMessage) XXX_Merge

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

func (*NormalMessage) XXX_Size

func (m *NormalMessage) XXX_Size() int

func (*NormalMessage) XXX_Unmarshal

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

type NormalMessage_Type

type NormalMessage_Type int32
const (
	NormalMessage_None       NormalMessage_Type = 0
	NormalMessage_Preprepare NormalMessage_Type = 1
	NormalMessage_SignShare  NormalMessage_Type = 2
	NormalMessage_Prepare    NormalMessage_Type = 3
	NormalMessage_CommitSig  NormalMessage_Type = 4
	NormalMessage_CommitSlow NormalMessage_Type = 5
	NormalMessage_StateShare NormalMessage_Type = 6
	NormalMessage_ExecProof  NormalMessage_Type = 7
)

func (NormalMessage_Type) EnumDescriptor

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

func (NormalMessage_Type) String

func (x NormalMessage_Type) String() string

type ResultMessage

type ResultMessage struct {
	Result []byte `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	Id     uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
}

func (*ResultMessage) Descriptor

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

func (*ResultMessage) Equals

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

func (*ResultMessage) GetId

func (m *ResultMessage) GetId() uint64

func (*ResultMessage) GetResult

func (m *ResultMessage) GetResult() []byte

func (*ResultMessage) Marshal

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

func (*ResultMessage) MarshalTo

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

func (*ResultMessage) MarshalToSizedBuffer

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

func (*ResultMessage) ProtoMessage

func (*ResultMessage) ProtoMessage()

func (*ResultMessage) Reset

func (m *ResultMessage) Reset()

func (*ResultMessage) Size

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

func (*ResultMessage) String

func (m *ResultMessage) String() string

func (*ResultMessage) Unmarshal

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

func (*ResultMessage) XXX_DiscardUnknown

func (m *ResultMessage) XXX_DiscardUnknown()

func (*ResultMessage) XXX_Marshal

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

func (*ResultMessage) XXX_Merge

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

func (*ResultMessage) XXX_Size

func (m *ResultMessage) XXX_Size() int

func (*ResultMessage) XXX_Unmarshal

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

type SBFTMessage

type SBFTMessage struct {
	// Types that are valid to be assigned to Type:
	//	*SBFTMessage_Normal
	//	*SBFTMessage_Result
	Type isSBFTMessage_Type `protobuf_oneof:"type"`
}

func WrapSBFTSlowMessage

func WrapSBFTSlowMessage(msg proto.Message) *SBFTMessage

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

func (*SBFTMessage) Descriptor

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

func (*SBFTMessage) GetNormal

func (m *SBFTMessage) GetNormal() *NormalMessage

func (*SBFTMessage) GetResult

func (m *SBFTMessage) GetResult() *ResultMessage

func (*SBFTMessage) GetType

func (m *SBFTMessage) GetType() isSBFTMessage_Type

func (*SBFTMessage) Marshal

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

func (*SBFTMessage) MarshalTo

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

func (*SBFTMessage) MarshalToSizedBuffer

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

func (*SBFTMessage) ProtoMessage

func (*SBFTMessage) ProtoMessage()

func (*SBFTMessage) Reset

func (m *SBFTMessage) Reset()

func (*SBFTMessage) Size

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

func (*SBFTMessage) String

func (m *SBFTMessage) String() string

func (*SBFTMessage) Unmarshal

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

func (*SBFTMessage) XXX_DiscardUnknown

func (m *SBFTMessage) XXX_DiscardUnknown()

func (*SBFTMessage) XXX_Marshal

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

func (*SBFTMessage) XXX_Merge

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

func (*SBFTMessage) XXX_OneofWrappers

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

XXX_OneofWrappers is for the internal use of the proto package.

func (*SBFTMessage) XXX_Size

func (m *SBFTMessage) XXX_Size() int

func (*SBFTMessage) XXX_Unmarshal

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

type SBFTMessage_Normal

type SBFTMessage_Normal struct {
	Normal *NormalMessage `protobuf:"bytes,1,opt,name=normal,proto3,oneof" json:"normal,omitempty"`
}

func (*SBFTMessage_Normal) MarshalTo

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

func (*SBFTMessage_Normal) MarshalToSizedBuffer

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

func (*SBFTMessage_Normal) Size

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

type SBFTMessage_Result

type SBFTMessage_Result struct {
	Result *ResultMessage `protobuf:"bytes,2,opt,name=result,proto3,oneof" json:"result,omitempty"`
}

func (*SBFTMessage_Result) MarshalTo

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

func (*SBFTMessage_Result) MarshalToSizedBuffer

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

func (*SBFTMessage_Result) Size

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

type View

type View uint64

Jump to

Keyboard shortcuts

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