Documentation ¶
Index ¶
- Variables
- func RegisterIbftOperatorServer(s grpc.ServiceRegistrar, srv IbftOperatorServer)
- func RegisterIbftServer(s grpc.ServiceRegistrar, srv IbftServer)
- type Candidate
- func (c *Candidate) Copy() *Candidate
- func (*Candidate) Descriptor() ([]byte, []int)deprecated
- func (x *Candidate) GetAddress() string
- func (x *Candidate) GetAuth() bool
- func (*Candidate) ProtoMessage()
- func (x *Candidate) ProtoReflect() protoreflect.Message
- func (x *Candidate) Reset()
- func (x *Candidate) String() string
- type CandidatesResp
- type HandshakeResp
- type IbftClient
- type IbftOperatorClient
- type IbftOperatorServer
- type IbftServer
- type IbftStatusResp
- type MessageReq
- func (m *MessageReq) Copy() *MessageReq
- func (*MessageReq) Descriptor() ([]byte, []int)deprecated
- func (m *MessageReq) FromAddr() types.Address
- func (x *MessageReq) GetDigest() string
- func (x *MessageReq) GetFrom() string
- func (x *MessageReq) GetProposal() *any.Any
- func (x *MessageReq) GetSeal() string
- func (x *MessageReq) GetSignature() string
- func (x *MessageReq) GetType() MessageReq_Type
- func (x *MessageReq) GetView() *View
- func (m *MessageReq) PayloadNoSig() ([]byte, error)
- func (*MessageReq) ProtoMessage()
- func (x *MessageReq) ProtoReflect() protoreflect.Message
- func (x *MessageReq) Reset()
- func (x *MessageReq) String() string
- type MessageReq_Type
- func (MessageReq_Type) Descriptor() protoreflect.EnumDescriptor
- func (x MessageReq_Type) Enum() *MessageReq_Type
- func (MessageReq_Type) EnumDescriptor() ([]byte, []int)deprecated
- func (x MessageReq_Type) Number() protoreflect.EnumNumber
- func (x MessageReq_Type) String() string
- func (MessageReq_Type) Type() protoreflect.EnumType
- type ProposeReq
- type Snapshot
- func (*Snapshot) Descriptor() ([]byte, []int)deprecated
- func (x *Snapshot) GetHash() string
- func (x *Snapshot) GetNumber() uint64
- func (x *Snapshot) GetValidators() []*Snapshot_Validator
- func (x *Snapshot) GetVotes() []*Snapshot_Vote
- func (*Snapshot) ProtoMessage()
- func (x *Snapshot) ProtoReflect() protoreflect.Message
- func (x *Snapshot) Reset()
- func (x *Snapshot) String() string
- type SnapshotReq
- type Snapshot_Validator
- func (*Snapshot_Validator) Descriptor() ([]byte, []int)deprecated
- func (x *Snapshot_Validator) GetAddress() string
- func (*Snapshot_Validator) ProtoMessage()
- func (x *Snapshot_Validator) ProtoReflect() protoreflect.Message
- func (x *Snapshot_Validator) Reset()
- func (x *Snapshot_Validator) String() string
- type Snapshot_Vote
- func (*Snapshot_Vote) Descriptor() ([]byte, []int)deprecated
- func (x *Snapshot_Vote) GetAuth() bool
- func (x *Snapshot_Vote) GetProposed() string
- func (x *Snapshot_Vote) GetValidator() string
- func (*Snapshot_Vote) ProtoMessage()
- func (x *Snapshot_Vote) ProtoReflect() protoreflect.Message
- func (x *Snapshot_Vote) Reset()
- func (x *Snapshot_Vote) String() string
- type UnimplementedIbftOperatorServer
- func (UnimplementedIbftOperatorServer) Candidates(context.Context, *empty.Empty) (*CandidatesResp, error)
- func (UnimplementedIbftOperatorServer) GetSnapshot(context.Context, *SnapshotReq) (*Snapshot, error)
- func (UnimplementedIbftOperatorServer) Propose(context.Context, *Candidate) (*empty.Empty, error)
- func (UnimplementedIbftOperatorServer) Status(context.Context, *empty.Empty) (*IbftStatusResp, error)
- type UnimplementedIbftServer
- type UnsafeIbftOperatorServer
- type UnsafeIbftServer
- type View
Constants ¶
This section is empty.
Variables ¶
var ( MessageReq_Type_name = map[int32]string{ 0: "Preprepare", 1: "Prepare", 2: "Commit", 3: "RoundChange", } MessageReq_Type_value = map[string]int32{ "Preprepare": 0, "Prepare": 1, "Commit": 2, "RoundChange": 3, } )
Enum value maps for MessageReq_Type.
var File_consensus_ibft_proto_ibft_proto protoreflect.FileDescriptor
var File_consensus_ibft_proto_operator_proto protoreflect.FileDescriptor
var IbftOperator_ServiceDesc = grpc.ServiceDesc{ ServiceName: "v1.IbftOperator", HandlerType: (*IbftOperatorServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetSnapshot", Handler: _IbftOperator_GetSnapshot_Handler, }, { MethodName: "Propose", Handler: _IbftOperator_Propose_Handler, }, { MethodName: "Candidates", Handler: _IbftOperator_Candidates_Handler, }, { MethodName: "Status", Handler: _IbftOperator_Status_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "consensus/ibft/proto/operator.proto", }
IbftOperator_ServiceDesc is the grpc.ServiceDesc for IbftOperator service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Ibft_ServiceDesc = grpc.ServiceDesc{ ServiceName: "v1.Ibft", HandlerType: (*IbftServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Handshake", Handler: _Ibft_Handshake_Handler, }, { MethodName: "Message", Handler: _Ibft_Message_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "consensus/ibft/proto/ibft.proto", }
Ibft_ServiceDesc is the grpc.ServiceDesc for Ibft service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterIbftOperatorServer ¶
func RegisterIbftOperatorServer(s grpc.ServiceRegistrar, srv IbftOperatorServer)
func RegisterIbftServer ¶
func RegisterIbftServer(s grpc.ServiceRegistrar, srv IbftServer)
Types ¶
type Candidate ¶
type Candidate struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Auth bool `protobuf:"varint,2,opt,name=auth,proto3" json:"auth,omitempty"` // contains filtered or unexported fields }
func (*Candidate) Descriptor
deprecated
func (*Candidate) GetAddress ¶
func (*Candidate) ProtoMessage ¶
func (*Candidate) ProtoMessage()
func (*Candidate) ProtoReflect ¶
func (x *Candidate) ProtoReflect() protoreflect.Message
type CandidatesResp ¶
type CandidatesResp struct { Candidates []*Candidate `protobuf:"bytes,1,rep,name=candidates,proto3" json:"candidates,omitempty"` // contains filtered or unexported fields }
func (*CandidatesResp) Descriptor
deprecated
func (*CandidatesResp) Descriptor() ([]byte, []int)
Deprecated: Use CandidatesResp.ProtoReflect.Descriptor instead.
func (*CandidatesResp) GetCandidates ¶
func (x *CandidatesResp) GetCandidates() []*Candidate
func (*CandidatesResp) ProtoMessage ¶
func (*CandidatesResp) ProtoMessage()
func (*CandidatesResp) ProtoReflect ¶
func (x *CandidatesResp) ProtoReflect() protoreflect.Message
func (*CandidatesResp) Reset ¶
func (x *CandidatesResp) Reset()
func (*CandidatesResp) String ¶
func (x *CandidatesResp) String() string
type HandshakeResp ¶
type HandshakeResp struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*HandshakeResp) Descriptor
deprecated
func (*HandshakeResp) Descriptor() ([]byte, []int)
Deprecated: Use HandshakeResp.ProtoReflect.Descriptor instead.
func (*HandshakeResp) GetKey ¶
func (x *HandshakeResp) GetKey() string
func (*HandshakeResp) ProtoMessage ¶
func (*HandshakeResp) ProtoMessage()
func (*HandshakeResp) ProtoReflect ¶
func (x *HandshakeResp) ProtoReflect() protoreflect.Message
func (*HandshakeResp) Reset ¶
func (x *HandshakeResp) Reset()
func (*HandshakeResp) String ¶
func (x *HandshakeResp) String() string
type IbftClient ¶
type IbftClient interface { Handshake(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*HandshakeResp, error) Message(ctx context.Context, in *MessageReq, opts ...grpc.CallOption) (*empty.Empty, error) }
IbftClient is the client API for Ibft service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewIbftClient ¶
func NewIbftClient(cc grpc.ClientConnInterface) IbftClient
type IbftOperatorClient ¶
type IbftOperatorClient interface { GetSnapshot(ctx context.Context, in *SnapshotReq, opts ...grpc.CallOption) (*Snapshot, error) Propose(ctx context.Context, in *Candidate, opts ...grpc.CallOption) (*empty.Empty, error) Candidates(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CandidatesResp, error) Status(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*IbftStatusResp, error) }
IbftOperatorClient is the client API for IbftOperator service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewIbftOperatorClient ¶
func NewIbftOperatorClient(cc grpc.ClientConnInterface) IbftOperatorClient
type IbftOperatorServer ¶
type IbftOperatorServer interface { GetSnapshot(context.Context, *SnapshotReq) (*Snapshot, error) Propose(context.Context, *Candidate) (*empty.Empty, error) Candidates(context.Context, *empty.Empty) (*CandidatesResp, error) Status(context.Context, *empty.Empty) (*IbftStatusResp, error) // contains filtered or unexported methods }
IbftOperatorServer is the server API for IbftOperator service. All implementations must embed UnimplementedIbftOperatorServer for forward compatibility
type IbftServer ¶
type IbftServer interface { Handshake(context.Context, *empty.Empty) (*HandshakeResp, error) Message(context.Context, *MessageReq) (*empty.Empty, error) // contains filtered or unexported methods }
IbftServer is the server API for Ibft service. All implementations must embed UnimplementedIbftServer for forward compatibility
type IbftStatusResp ¶
type IbftStatusResp struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*IbftStatusResp) Descriptor
deprecated
func (*IbftStatusResp) Descriptor() ([]byte, []int)
Deprecated: Use IbftStatusResp.ProtoReflect.Descriptor instead.
func (*IbftStatusResp) GetKey ¶
func (x *IbftStatusResp) GetKey() string
func (*IbftStatusResp) ProtoMessage ¶
func (*IbftStatusResp) ProtoMessage()
func (*IbftStatusResp) ProtoReflect ¶
func (x *IbftStatusResp) ProtoReflect() protoreflect.Message
func (*IbftStatusResp) Reset ¶
func (x *IbftStatusResp) Reset()
func (*IbftStatusResp) String ¶
func (x *IbftStatusResp) String() string
type MessageReq ¶
type MessageReq struct { // type is the type of the message Type MessageReq_Type `protobuf:"varint,1,opt,name=type,proto3,enum=v1.MessageReq_Type" json:"type,omitempty"` // from is the address of the sender From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` // seal is the committed seal if message is commit Seal string `protobuf:"bytes,3,opt,name=seal,proto3" json:"seal,omitempty"` // signature is the crypto signature of the message Signature string `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` // view is the view assigned to the message View *View `protobuf:"bytes,5,opt,name=view,proto3" json:"view,omitempty"` // hash of the locked block Digest string `protobuf:"bytes,6,opt,name=digest,proto3" json:"digest,omitempty"` // proposal is the rlp encoded block in preprepare messages Proposal *any.Any `protobuf:"bytes,7,opt,name=proposal,proto3" json:"proposal,omitempty"` // contains filtered or unexported fields }
func (*MessageReq) Copy ¶
func (m *MessageReq) Copy() *MessageReq
Copy makes a copy of the message request, and returns it
func (*MessageReq) Descriptor
deprecated
func (*MessageReq) Descriptor() ([]byte, []int)
Deprecated: Use MessageReq.ProtoReflect.Descriptor instead.
func (*MessageReq) FromAddr ¶
func (m *MessageReq) FromAddr() types.Address
FromAddr returns the from address in the message request
func (*MessageReq) GetDigest ¶
func (x *MessageReq) GetDigest() string
func (*MessageReq) GetFrom ¶
func (x *MessageReq) GetFrom() string
func (*MessageReq) GetProposal ¶
func (x *MessageReq) GetProposal() *any.Any
func (*MessageReq) GetSeal ¶
func (x *MessageReq) GetSeal() string
func (*MessageReq) GetSignature ¶
func (x *MessageReq) GetSignature() string
func (*MessageReq) GetType ¶
func (x *MessageReq) GetType() MessageReq_Type
func (*MessageReq) GetView ¶
func (x *MessageReq) GetView() *View
func (*MessageReq) PayloadNoSig ¶
func (m *MessageReq) PayloadNoSig() ([]byte, error)
PayloadNoSig returns the byte representation of the message request, without the signature field
func (*MessageReq) ProtoMessage ¶
func (*MessageReq) ProtoMessage()
func (*MessageReq) ProtoReflect ¶
func (x *MessageReq) ProtoReflect() protoreflect.Message
func (*MessageReq) Reset ¶
func (x *MessageReq) Reset()
func (*MessageReq) String ¶
func (x *MessageReq) String() string
type MessageReq_Type ¶
type MessageReq_Type int32
const ( MessageReq_Preprepare MessageReq_Type = 0 MessageReq_Prepare MessageReq_Type = 1 MessageReq_Commit MessageReq_Type = 2 MessageReq_RoundChange MessageReq_Type = 3 )
func (MessageReq_Type) Descriptor ¶
func (MessageReq_Type) Descriptor() protoreflect.EnumDescriptor
func (MessageReq_Type) Enum ¶
func (x MessageReq_Type) Enum() *MessageReq_Type
func (MessageReq_Type) EnumDescriptor
deprecated
func (MessageReq_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use MessageReq_Type.Descriptor instead.
func (MessageReq_Type) Number ¶
func (x MessageReq_Type) Number() protoreflect.EnumNumber
func (MessageReq_Type) String ¶
func (x MessageReq_Type) String() string
func (MessageReq_Type) Type ¶
func (MessageReq_Type) Type() protoreflect.EnumType
type ProposeReq ¶
type ProposeReq struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Auth bool `protobuf:"varint,2,opt,name=auth,proto3" json:"auth,omitempty"` // contains filtered or unexported fields }
func (*ProposeReq) Descriptor
deprecated
func (*ProposeReq) Descriptor() ([]byte, []int)
Deprecated: Use ProposeReq.ProtoReflect.Descriptor instead.
func (*ProposeReq) GetAddress ¶
func (x *ProposeReq) GetAddress() string
func (*ProposeReq) GetAuth ¶
func (x *ProposeReq) GetAuth() bool
func (*ProposeReq) ProtoMessage ¶
func (*ProposeReq) ProtoMessage()
func (*ProposeReq) ProtoReflect ¶
func (x *ProposeReq) ProtoReflect() protoreflect.Message
func (*ProposeReq) Reset ¶
func (x *ProposeReq) Reset()
func (*ProposeReq) String ¶
func (x *ProposeReq) String() string
type Snapshot ¶
type Snapshot struct { Validators []*Snapshot_Validator `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators,omitempty"` Number uint64 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"` Hash string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"` Votes []*Snapshot_Vote `protobuf:"bytes,4,rep,name=votes,proto3" json:"votes,omitempty"` // contains filtered or unexported fields }
func (*Snapshot) Descriptor
deprecated
func (*Snapshot) GetValidators ¶
func (x *Snapshot) GetValidators() []*Snapshot_Validator
func (*Snapshot) GetVotes ¶
func (x *Snapshot) GetVotes() []*Snapshot_Vote
func (*Snapshot) ProtoMessage ¶
func (*Snapshot) ProtoMessage()
func (*Snapshot) ProtoReflect ¶
func (x *Snapshot) ProtoReflect() protoreflect.Message
type SnapshotReq ¶
type SnapshotReq struct { Latest bool `protobuf:"varint,1,opt,name=latest,proto3" json:"latest,omitempty"` Number uint64 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"` // contains filtered or unexported fields }
func (*SnapshotReq) Descriptor
deprecated
func (*SnapshotReq) Descriptor() ([]byte, []int)
Deprecated: Use SnapshotReq.ProtoReflect.Descriptor instead.
func (*SnapshotReq) GetLatest ¶
func (x *SnapshotReq) GetLatest() bool
func (*SnapshotReq) GetNumber ¶
func (x *SnapshotReq) GetNumber() uint64
func (*SnapshotReq) ProtoMessage ¶
func (*SnapshotReq) ProtoMessage()
func (*SnapshotReq) ProtoReflect ¶
func (x *SnapshotReq) ProtoReflect() protoreflect.Message
func (*SnapshotReq) Reset ¶
func (x *SnapshotReq) Reset()
func (*SnapshotReq) String ¶
func (x *SnapshotReq) String() string
type Snapshot_Validator ¶
type Snapshot_Validator struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // contains filtered or unexported fields }
func (*Snapshot_Validator) Descriptor
deprecated
func (*Snapshot_Validator) Descriptor() ([]byte, []int)
Deprecated: Use Snapshot_Validator.ProtoReflect.Descriptor instead.
func (*Snapshot_Validator) GetAddress ¶
func (x *Snapshot_Validator) GetAddress() string
func (*Snapshot_Validator) ProtoMessage ¶
func (*Snapshot_Validator) ProtoMessage()
func (*Snapshot_Validator) ProtoReflect ¶
func (x *Snapshot_Validator) ProtoReflect() protoreflect.Message
func (*Snapshot_Validator) Reset ¶
func (x *Snapshot_Validator) Reset()
func (*Snapshot_Validator) String ¶
func (x *Snapshot_Validator) String() string
type Snapshot_Vote ¶
type Snapshot_Vote struct { Validator string `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"` Proposed string `protobuf:"bytes,2,opt,name=proposed,proto3" json:"proposed,omitempty"` Auth bool `protobuf:"varint,3,opt,name=auth,proto3" json:"auth,omitempty"` // contains filtered or unexported fields }
func (*Snapshot_Vote) Descriptor
deprecated
func (*Snapshot_Vote) Descriptor() ([]byte, []int)
Deprecated: Use Snapshot_Vote.ProtoReflect.Descriptor instead.
func (*Snapshot_Vote) GetAuth ¶
func (x *Snapshot_Vote) GetAuth() bool
func (*Snapshot_Vote) GetProposed ¶
func (x *Snapshot_Vote) GetProposed() string
func (*Snapshot_Vote) GetValidator ¶
func (x *Snapshot_Vote) GetValidator() string
func (*Snapshot_Vote) ProtoMessage ¶
func (*Snapshot_Vote) ProtoMessage()
func (*Snapshot_Vote) ProtoReflect ¶
func (x *Snapshot_Vote) ProtoReflect() protoreflect.Message
func (*Snapshot_Vote) Reset ¶
func (x *Snapshot_Vote) Reset()
func (*Snapshot_Vote) String ¶
func (x *Snapshot_Vote) String() string
type UnimplementedIbftOperatorServer ¶
type UnimplementedIbftOperatorServer struct { }
UnimplementedIbftOperatorServer must be embedded to have forward compatible implementations.
func (UnimplementedIbftOperatorServer) Candidates ¶
func (UnimplementedIbftOperatorServer) Candidates(context.Context, *empty.Empty) (*CandidatesResp, error)
func (UnimplementedIbftOperatorServer) GetSnapshot ¶
func (UnimplementedIbftOperatorServer) GetSnapshot(context.Context, *SnapshotReq) (*Snapshot, error)
func (UnimplementedIbftOperatorServer) Status ¶
func (UnimplementedIbftOperatorServer) Status(context.Context, *empty.Empty) (*IbftStatusResp, error)
type UnimplementedIbftServer ¶
type UnimplementedIbftServer struct { }
UnimplementedIbftServer must be embedded to have forward compatible implementations.
func (UnimplementedIbftServer) Handshake ¶
func (UnimplementedIbftServer) Handshake(context.Context, *empty.Empty) (*HandshakeResp, error)
func (UnimplementedIbftServer) Message ¶
func (UnimplementedIbftServer) Message(context.Context, *MessageReq) (*empty.Empty, error)
type UnsafeIbftOperatorServer ¶
type UnsafeIbftOperatorServer interface {
// contains filtered or unexported methods
}
UnsafeIbftOperatorServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to IbftOperatorServer will result in compilation errors.
type UnsafeIbftServer ¶
type UnsafeIbftServer interface {
// contains filtered or unexported methods
}
UnsafeIbftServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to IbftServer will result in compilation errors.
type View ¶
type View struct { Round uint64 `protobuf:"varint,1,opt,name=round,proto3" json:"round,omitempty"` Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` // contains filtered or unexported fields }
func (*View) Descriptor
deprecated
func (*View) GetSequence ¶
func (*View) ProtoMessage ¶
func (*View) ProtoMessage()
func (*View) ProtoReflect ¶
func (x *View) ProtoReflect() protoreflect.Message