chainduobftpb

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthChainduobft        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowChainduobft          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupChainduobft = fmt.Errorf("proto: unexpected end of group")
)

Functions

func WrapMessageInner

func WrapMessageInner(msg proto.Message) isChainDuoBFTMessage_Type

Types

type BlockHash

type BlockHash [sha512.Size]byte

func (BlockHash) Slice

func (bh BlockHash) Slice() []byte

func (BlockHash) String

func (bh BlockHash) String() string

type BlockHashSlice

type BlockHashSlice []byte

func (BlockHashSlice) Array

func (bhs BlockHashSlice) Array() [sha512.Size]byte

type BlockState

type BlockState struct {
	View      View            `protobuf:"varint,1,opt,name=view,proto3,casttype=View" json:"view,omitempty"`
	FastState *FastChainState `protobuf:"bytes,2,opt,name=fast_state,json=fastState,proto3" json:"fast_state,omitempty"`
	SlowState *SlowChainState `protobuf:"bytes,3,opt,name=slow_state,json=slowState,proto3" json:"slow_state,omitempty"`
}

func (*BlockState) Descriptor

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

func (*BlockState) GetFastState

func (m *BlockState) GetFastState() *FastChainState

func (*BlockState) GetSlowState

func (m *BlockState) GetSlowState() *SlowChainState

func (*BlockState) GetView

func (m *BlockState) GetView() View

func (*BlockState) Marshal

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

func (*BlockState) MarshalTo

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

func (*BlockState) MarshalToSizedBuffer

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

func (*BlockState) ProtoMessage

func (*BlockState) ProtoMessage()

func (*BlockState) Reset

func (m *BlockState) Reset()

func (*BlockState) Size

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

func (*BlockState) String

func (bs *BlockState) String() string

func (*BlockState) Unmarshal

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

func (*BlockState) XXX_DiscardUnknown

func (m *BlockState) XXX_DiscardUnknown()

func (*BlockState) XXX_Marshal

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

func (*BlockState) XXX_Merge

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

func (*BlockState) XXX_Size

func (m *BlockState) XXX_Size() int

func (*BlockState) XXX_Unmarshal

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

type ChainDuoBFTMessage

type ChainDuoBFTMessage struct {
	// Types that are valid to be assigned to Type:
	//	*ChainDuoBFTMessage_Propose
	//	*ChainDuoBFTMessage_Vote
	Type isChainDuoBFTMessage_Type `protobuf_oneof:"type"`
}

func WrapChainDuoBFTMessage

func WrapChainDuoBFTMessage(msg proto.Message) *ChainDuoBFTMessage

func (*ChainDuoBFTMessage) Descriptor

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

func (*ChainDuoBFTMessage) GetPropose

func (m *ChainDuoBFTMessage) GetPropose() *ProposeMessage

func (*ChainDuoBFTMessage) GetType

func (m *ChainDuoBFTMessage) GetType() isChainDuoBFTMessage_Type

func (*ChainDuoBFTMessage) GetVote

func (m *ChainDuoBFTMessage) GetVote() *VoteMessage

func (*ChainDuoBFTMessage) Marshal

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

func (*ChainDuoBFTMessage) MarshalTo

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

func (*ChainDuoBFTMessage) MarshalToSizedBuffer

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

func (*ChainDuoBFTMessage) ProtoMessage

func (*ChainDuoBFTMessage) ProtoMessage()

func (*ChainDuoBFTMessage) Reset

func (m *ChainDuoBFTMessage) Reset()

func (*ChainDuoBFTMessage) Size

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

func (*ChainDuoBFTMessage) String

func (this *ChainDuoBFTMessage) String() string

func (*ChainDuoBFTMessage) Unmarshal

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

func (*ChainDuoBFTMessage) XXX_DiscardUnknown

func (m *ChainDuoBFTMessage) XXX_DiscardUnknown()

func (*ChainDuoBFTMessage) XXX_Marshal

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

func (*ChainDuoBFTMessage) XXX_Merge

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

func (*ChainDuoBFTMessage) XXX_OneofWrappers

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

XXX_OneofWrappers is for the internal use of the proto package.

func (*ChainDuoBFTMessage) XXX_Size

func (m *ChainDuoBFTMessage) XXX_Size() int

func (*ChainDuoBFTMessage) XXX_Unmarshal

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

type ChainDuoBFTMessage_Propose

type ChainDuoBFTMessage_Propose struct {
	Propose *ProposeMessage `protobuf:"bytes,1,opt,name=propose,proto3,oneof" json:"propose,omitempty"`
}

func (*ChainDuoBFTMessage_Propose) MarshalTo

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

func (*ChainDuoBFTMessage_Propose) MarshalToSizedBuffer

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

func (*ChainDuoBFTMessage_Propose) Size

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

func (*ChainDuoBFTMessage_Propose) String

func (this *ChainDuoBFTMessage_Propose) String() string

type ChainDuoBFTMessage_Vote

type ChainDuoBFTMessage_Vote struct {
	Vote *VoteMessage `protobuf:"bytes,2,opt,name=vote,proto3,oneof" json:"vote,omitempty"`
}

func (*ChainDuoBFTMessage_Vote) MarshalTo

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

func (*ChainDuoBFTMessage_Vote) MarshalToSizedBuffer

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

func (*ChainDuoBFTMessage_Vote) Size

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

func (*ChainDuoBFTMessage_Vote) String

func (this *ChainDuoBFTMessage_Vote) String() string

type FastChainState

type FastChainState struct {
	Command *commandpb.Command `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"`
	Height  Height             `protobuf:"varint,2,opt,name=height,proto3,casttype=Height" json:"height,omitempty"`
	Parent  BlockHashSlice     `protobuf:"bytes,3,opt,name=parent,proto3,casttype=BlockHashSlice" json:"parent,omitempty"`
	QC      *QuorumCert        `protobuf:"bytes,4,opt,name=q_c,json=qC,proto3" json:"q_c,omitempty"`
}

func (*FastChainState) Descriptor

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

func (*FastChainState) GetCommand

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

func (*FastChainState) GetHeight

func (m *FastChainState) GetHeight() Height

func (*FastChainState) GetParent

func (m *FastChainState) GetParent() BlockHashSlice

func (*FastChainState) GetQC

func (m *FastChainState) GetQC() *QuorumCert

func (*FastChainState) Marshal

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

func (*FastChainState) MarshalTo

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

func (*FastChainState) MarshalToSizedBuffer

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

func (*FastChainState) ProtoMessage

func (*FastChainState) ProtoMessage()

func (*FastChainState) Reset

func (m *FastChainState) Reset()

func (*FastChainState) Size

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

func (*FastChainState) String

func (fs *FastChainState) String() string

func (*FastChainState) Unmarshal

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

func (*FastChainState) XXX_DiscardUnknown

func (m *FastChainState) XXX_DiscardUnknown()

func (*FastChainState) XXX_Marshal

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

func (*FastChainState) XXX_Merge

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

func (*FastChainState) XXX_Size

func (m *FastChainState) XXX_Size() int

func (*FastChainState) XXX_Unmarshal

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

type Height

type Height uint64

type ProposeMessage

type ProposeMessage struct {
	BlockState `protobuf:"bytes,1,opt,name=block,proto3,embedded=block" json:"block"`
}

func (*ProposeMessage) Descriptor

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

func (*ProposeMessage) Marshal

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

func (*ProposeMessage) MarshalTo

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

func (*ProposeMessage) MarshalToSizedBuffer

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

func (*ProposeMessage) ProtoMessage

func (*ProposeMessage) ProtoMessage()

func (*ProposeMessage) Reset

func (m *ProposeMessage) Reset()

func (*ProposeMessage) Size

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

func (*ProposeMessage) String

func (this *ProposeMessage) String() string

func (*ProposeMessage) Unmarshal

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

func (*ProposeMessage) XXX_DiscardUnknown

func (m *ProposeMessage) XXX_DiscardUnknown()

func (*ProposeMessage) XXX_Marshal

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

func (*ProposeMessage) XXX_Merge

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

func (*ProposeMessage) XXX_Size

func (m *ProposeMessage) XXX_Size() int

func (*ProposeMessage) XXX_Unmarshal

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

type QuorumCert

type QuorumCert struct {
	Sigs      map[github_com_ibalajiarun_go_consensus_peer_peerpb.PeerID]*Signature `` /* 213-byte string literal not displayed */
	BlockHash BlockHashSlice                                                        `protobuf:"bytes,2,opt,name=block_hash,json=blockHash,proto3,casttype=BlockHashSlice" json:"block_hash,omitempty"`
	Height    Height                                                                `protobuf:"varint,3,opt,name=height,proto3,casttype=Height" json:"height,omitempty"`
}

func (*QuorumCert) Descriptor

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

func (*QuorumCert) GetBlockHash

func (m *QuorumCert) GetBlockHash() BlockHashSlice

func (*QuorumCert) GetHeight

func (m *QuorumCert) GetHeight() Height

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 (qc *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 Signature

type Signature struct {
	Sig     []byte                                                 `protobuf:"bytes,1,opt,name=sig,proto3" json:"sig,omitempty"`
	Signer  github_com_ibalajiarun_go_consensus_peer_peerpb.PeerID `` /* 130-byte string literal not displayed */
	Counter uint64                                                 `protobuf:"varint,3,opt,name=counter,proto3" json:"counter,omitempty"`
}

func (*Signature) Descriptor

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

func (*Signature) GetCounter

func (m *Signature) GetCounter() uint64

func (*Signature) GetSig

func (m *Signature) GetSig() []byte

func (*Signature) Marshal

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

func (*Signature) MarshalTo

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

func (*Signature) MarshalToSizedBuffer

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

func (*Signature) ProtoMessage

func (*Signature) ProtoMessage()

func (*Signature) Reset

func (m *Signature) Reset()

func (*Signature) Size

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

func (*Signature) String

func (sig *Signature) String() string

func (*Signature) Unmarshal

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

func (*Signature) XXX_DiscardUnknown

func (m *Signature) XXX_DiscardUnknown()

func (*Signature) XXX_Marshal

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

func (*Signature) XXX_Merge

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

func (*Signature) XXX_Size

func (m *Signature) XXX_Size() int

func (*Signature) XXX_Unmarshal

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

type SlowChainState

type SlowChainState struct {
	ProposeBlockHash   BlockHashSlice `` /* 135-byte string literal not displayed */
	ProposeBlockHeight Height         `` /* 134-byte string literal not displayed */
	Height             Height         `protobuf:"varint,2,opt,name=height,proto3,casttype=Height" json:"height,omitempty"`
	Parent             BlockHashSlice `protobuf:"bytes,3,opt,name=parent,proto3,casttype=BlockHashSlice" json:"parent,omitempty"`
	QC                 *QuorumCert    `protobuf:"bytes,4,opt,name=q_c,json=qC,proto3" json:"q_c,omitempty"`
	SelfPropose        bool           `protobuf:"varint,5,opt,name=self_propose,json=selfPropose,proto3" json:"self_propose,omitempty"`
}

func (*SlowChainState) Descriptor

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

func (*SlowChainState) GetHeight

func (m *SlowChainState) GetHeight() Height

func (*SlowChainState) GetParent

func (m *SlowChainState) GetParent() BlockHashSlice

func (*SlowChainState) GetProposeBlockHash

func (m *SlowChainState) GetProposeBlockHash() BlockHashSlice

func (*SlowChainState) GetProposeBlockHeight

func (m *SlowChainState) GetProposeBlockHeight() Height

func (*SlowChainState) GetQC

func (m *SlowChainState) GetQC() *QuorumCert

func (*SlowChainState) GetSelfPropose

func (m *SlowChainState) GetSelfPropose() bool

func (*SlowChainState) Marshal

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

func (*SlowChainState) MarshalTo

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

func (*SlowChainState) MarshalToSizedBuffer

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

func (*SlowChainState) ProtoMessage

func (*SlowChainState) ProtoMessage()

func (*SlowChainState) Reset

func (m *SlowChainState) Reset()

func (*SlowChainState) Size

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

func (*SlowChainState) String

func (ss *SlowChainState) String() string

func (*SlowChainState) Unmarshal

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

func (*SlowChainState) XXX_DiscardUnknown

func (m *SlowChainState) XXX_DiscardUnknown()

func (*SlowChainState) XXX_Marshal

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

func (*SlowChainState) XXX_Merge

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

func (*SlowChainState) XXX_Size

func (m *SlowChainState) XXX_Size() int

func (*SlowChainState) XXX_Unmarshal

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

type View

type View uint64

type VoteMessage

type VoteMessage struct {
	BlockHash BlockHashSlice `protobuf:"bytes,1,opt,name=block_hash,json=blockHash,proto3,casttype=BlockHashSlice" json:"block_hash,omitempty"`
	Signature *Signature     `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
}

func (*VoteMessage) Descriptor

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

func (*VoteMessage) GetBlockHash

func (m *VoteMessage) GetBlockHash() BlockHashSlice

func (*VoteMessage) GetSignature

func (m *VoteMessage) GetSignature() *Signature

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 (this *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

Jump to

Keyboard shortcuts

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