chainhotstuffpb

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthChainhostuff        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowChainhostuff          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupChainhostuff = fmt.Errorf("proto: unexpected end of group")
)

Functions

func WrapMessageInner

func WrapMessageInner(msg proto.Message) isChainHotstuffMessage_Type

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

Types

type BlockHash

type BlockHash [sha512.Size]byte

func (BlockHash) Slice

func (bh BlockHash) Slice() []byte

type BlockHashSlice

type BlockHashSlice []byte

func (*BlockHashSlice) Array

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

type BlockState

type BlockState struct {
	Parent   BlockHashSlice                                         `protobuf:"bytes,1,opt,name=parent,proto3,casttype=BlockHashSlice" json:"parent,omitempty"`
	Command  *commandpb.Command                                     `protobuf:"bytes,2,opt,name=command,proto3" json:"command,omitempty"`
	Height   View                                                   `protobuf:"varint,3,opt,name=height,proto3,casttype=View" json:"height,omitempty"`
	QC       *QuorumCert                                            `protobuf:"bytes,4,opt,name=q_c,json=qC,proto3" json:"q_c,omitempty"`
	Proposer github_com_ibalajiarun_go_consensus_peer_peerpb.PeerID `` /* 134-byte string literal not displayed */
}

func (*BlockState) Descriptor

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

func (*BlockState) GetCommand

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

func (*BlockState) GetHeight

func (m *BlockState) GetHeight() View

func (*BlockState) GetParent

func (m *BlockState) GetParent() BlockHashSlice

func (*BlockState) GetQC

func (m *BlockState) GetQC() *QuorumCert

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 (m *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 ChainHotstuffMessage

type ChainHotstuffMessage struct {
	// Types that are valid to be assigned to Type:
	//	*ChainHotstuffMessage_Propose
	//	*ChainHotstuffMessage_Vote
	//	*ChainHotstuffMessage_NewView
	Type isChainHotstuffMessage_Type `protobuf_oneof:"type"`
}

func WrapHostuffMessage

func WrapHostuffMessage(msg proto.Message) *ChainHotstuffMessage

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

func (*ChainHotstuffMessage) Descriptor

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

func (*ChainHotstuffMessage) GetNewView

func (m *ChainHotstuffMessage) GetNewView() *NewViewMessage

func (*ChainHotstuffMessage) GetPropose

func (m *ChainHotstuffMessage) GetPropose() *ProposeMessage

func (*ChainHotstuffMessage) GetType

func (m *ChainHotstuffMessage) GetType() isChainHotstuffMessage_Type

func (*ChainHotstuffMessage) GetVote

func (m *ChainHotstuffMessage) GetVote() *VoteMessage

func (*ChainHotstuffMessage) Marshal

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

func (*ChainHotstuffMessage) MarshalTo

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

func (*ChainHotstuffMessage) MarshalToSizedBuffer

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

func (*ChainHotstuffMessage) ProtoMessage

func (*ChainHotstuffMessage) ProtoMessage()

func (*ChainHotstuffMessage) Reset

func (m *ChainHotstuffMessage) Reset()

func (*ChainHotstuffMessage) Size

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

func (*ChainHotstuffMessage) String

func (m *ChainHotstuffMessage) String() string

func (*ChainHotstuffMessage) Unmarshal

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

func (*ChainHotstuffMessage) XXX_DiscardUnknown

func (m *ChainHotstuffMessage) XXX_DiscardUnknown()

func (*ChainHotstuffMessage) XXX_Marshal

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

func (*ChainHotstuffMessage) XXX_Merge

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

func (*ChainHotstuffMessage) XXX_OneofWrappers

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

XXX_OneofWrappers is for the internal use of the proto package.

func (*ChainHotstuffMessage) XXX_Size

func (m *ChainHotstuffMessage) XXX_Size() int

func (*ChainHotstuffMessage) XXX_Unmarshal

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

type ChainHotstuffMessage_NewView

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

func (*ChainHotstuffMessage_NewView) MarshalTo

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

func (*ChainHotstuffMessage_NewView) MarshalToSizedBuffer

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

func (*ChainHotstuffMessage_NewView) Size

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

type ChainHotstuffMessage_Propose

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

func (*ChainHotstuffMessage_Propose) MarshalTo

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

func (*ChainHotstuffMessage_Propose) MarshalToSizedBuffer

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

func (*ChainHotstuffMessage_Propose) Size

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

type ChainHotstuffMessage_Vote

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

func (*ChainHotstuffMessage_Vote) MarshalTo

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

func (*ChainHotstuffMessage_Vote) MarshalToSizedBuffer

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

func (*ChainHotstuffMessage_Vote) Size

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

type NewViewMessage

type NewViewMessage struct {
	Height  View        `protobuf:"varint,1,opt,name=height,proto3,casttype=View" json:"height,omitempty"`
	QC      *QuorumCert `protobuf:"bytes,2,opt,name=q_c,json=qC,proto3" json:"q_c,omitempty"`
	Hash512 []byte      `protobuf:"bytes,3,opt,name=hash512,proto3" json:"hash512,omitempty"`
}

func (*NewViewMessage) Descriptor

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

func (*NewViewMessage) GetHash512

func (m *NewViewMessage) GetHash512() []byte

func (*NewViewMessage) GetHeight

func (m *NewViewMessage) GetHeight() View

func (*NewViewMessage) GetQC

func (m *NewViewMessage) GetQC() *QuorumCert

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 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 (m *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"`
}

func (*QuorumCert) Descriptor

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

func (*QuorumCert) GetBlockHash

func (m *QuorumCert) GetBlockHash() BlockHashSlice

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 (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 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 */
}

func (*Signature) Descriptor

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

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