Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterClientServiceServer(s grpc.ServiceRegistrar, srv ClientServiceServer)
- type Client
- type ClientServiceClient
- type ClientServiceServer
- type ConsensusRequest
- func (*ConsensusRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ConsensusRequest) GetBlock() []byte
- func (x *ConsensusRequest) GetBlockHash() []byte
- func (x *ConsensusRequest) GetBlockNum() uint64
- func (x *ConsensusRequest) GetPayload() []byte
- func (x *ConsensusRequest) GetSenderPubkey() []byte
- func (x *ConsensusRequest) GetSenderPubkeyBitmap() []byte
- func (x *ConsensusRequest) GetShardId() uint32
- func (x *ConsensusRequest) GetViewId() uint64
- func (*ConsensusRequest) ProtoMessage()
- func (x *ConsensusRequest) ProtoReflect() protoreflect.Message
- func (x *ConsensusRequest) Reset()
- func (x *ConsensusRequest) String() string
- type DrandRequest
- func (*DrandRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DrandRequest) GetBlockHash() []bytedeprecated
- func (x *DrandRequest) GetPayload() []bytedeprecated
- func (x *DrandRequest) GetSenderPubkey() []bytedeprecated
- func (x *DrandRequest) GetShardId() uint32deprecated
- func (*DrandRequest) ProtoMessage()
- func (x *DrandRequest) ProtoReflect() protoreflect.Message
- func (x *DrandRequest) Reset()
- func (x *DrandRequest) String() string
- type LastSignPowerBroadcast
- func (*LastSignPowerBroadcast) Descriptor() ([]byte, []int)deprecated
- func (x *LastSignPowerBroadcast) GetChange() int64
- func (x *LastSignPowerBroadcast) GetCommit() int64
- func (x *LastSignPowerBroadcast) GetPrepare() int64
- func (x *LastSignPowerBroadcast) GetSenderPubkey() []byte
- func (x *LastSignPowerBroadcast) GetShardId() uint32
- func (*LastSignPowerBroadcast) ProtoMessage()
- func (x *LastSignPowerBroadcast) ProtoReflect() protoreflect.Message
- func (x *LastSignPowerBroadcast) Reset()
- func (x *LastSignPowerBroadcast) String() string
- type LotteryRequest
- func (*LotteryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LotteryRequest) GetAmount() int64deprecated
- func (x *LotteryRequest) GetPrivateKey() stringdeprecated
- func (x *LotteryRequest) GetType() LotteryRequest_Typedeprecated
- func (*LotteryRequest) ProtoMessage()
- func (x *LotteryRequest) ProtoReflect() protoreflect.Message
- func (x *LotteryRequest) Reset()
- func (x *LotteryRequest) String() string
- type LotteryRequest_Type
- func (LotteryRequest_Type) Descriptor() protoreflect.EnumDescriptor
- func (x LotteryRequest_Type) Enum() *LotteryRequest_Type
- func (LotteryRequest_Type) EnumDescriptor() ([]byte, []int)deprecated
- func (x LotteryRequest_Type) Number() protoreflect.EnumNumber
- func (x LotteryRequest_Type) String() string
- func (LotteryRequest_Type) Type() protoreflect.EnumType
- type LotteryResponse
- func (*LotteryResponse) Descriptor() ([]byte, []int)deprecated
- func (x *LotteryResponse) GetBalances() []stringdeprecated
- func (x *LotteryResponse) GetPlayers() []stringdeprecated
- func (*LotteryResponse) ProtoMessage()
- func (x *LotteryResponse) ProtoReflect() protoreflect.Message
- func (x *LotteryResponse) Reset()
- func (x *LotteryResponse) String() string
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetConsensus() *ConsensusRequest
- func (x *Message) GetDrand() *DrandRequestdeprecated
- func (x *Message) GetLastSignPower() *LastSignPowerBroadcast
- func (x *Message) GetLotteryRequest() *LotteryRequestdeprecated
- func (m *Message) GetRequest() isMessage_Request
- func (x *Message) GetServiceType() ServiceType
- func (x *Message) GetSignature() []byte
- func (x *Message) GetStaking() *StakingRequestdeprecated
- func (x *Message) GetType() MessageType
- func (x *Message) GetViewchange() *ViewChangeRequest
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type MessageType
- func (MessageType) Descriptor() protoreflect.EnumDescriptor
- func (x MessageType) Enum() *MessageType
- func (MessageType) EnumDescriptor() ([]byte, []int)deprecated
- func (x MessageType) Number() protoreflect.EnumNumber
- func (x MessageType) String() string
- func (MessageType) Type() protoreflect.EnumType
- type Message_Consensus
- type Message_Drand
- type Message_LastSignPower
- type Message_LotteryRequest
- type Message_Staking
- type Message_Viewchange
- type Response
- func (*Response) Descriptor() ([]byte, []int)deprecated
- func (x *Response) GetLotteryResponse() *LotteryResponsedeprecated
- func (m *Response) GetResponse() isResponse_Response
- func (x *Response) GetServiceType() ServiceType
- func (x *Response) GetType() MessageType
- func (*Response) ProtoMessage()
- func (x *Response) ProtoReflect() protoreflect.Message
- func (x *Response) Reset()
- func (x *Response) String() string
- type Response_LotteryResponse
- type Server
- type ServiceType
- func (ServiceType) Descriptor() protoreflect.EnumDescriptor
- func (x ServiceType) Enum() *ServiceType
- func (ServiceType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ServiceType) Number() protoreflect.EnumNumber
- func (x ServiceType) String() string
- func (ServiceType) Type() protoreflect.EnumType
- type StakingRequest
- func (*StakingRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StakingRequest) GetNodeId() stringdeprecated
- func (x *StakingRequest) GetTransaction() []bytedeprecated
- func (*StakingRequest) ProtoMessage()
- func (x *StakingRequest) ProtoReflect() protoreflect.Message
- func (x *StakingRequest) Reset()
- func (x *StakingRequest) String() string
- type UnimplementedClientServiceServer
- type UnsafeClientServiceServer
- type ViewChangeRequest
- func (*ViewChangeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ViewChangeRequest) GetBlockNum() uint64
- func (x *ViewChangeRequest) GetLeaderPubkey() []byte
- func (x *ViewChangeRequest) GetM2Aggsigs() []byte
- func (x *ViewChangeRequest) GetM2Bitmap() []byte
- func (x *ViewChangeRequest) GetM3Aggsigs() []byte
- func (x *ViewChangeRequest) GetM3Bitmap() []byte
- func (x *ViewChangeRequest) GetPayload() []byte
- func (x *ViewChangeRequest) GetPreparedBlock() []byte
- func (x *ViewChangeRequest) GetSenderPubkey() []byte
- func (x *ViewChangeRequest) GetShardId() uint32
- func (x *ViewChangeRequest) GetViewId() uint64
- func (x *ViewChangeRequest) GetViewchangeSig() []byte
- func (x *ViewChangeRequest) GetViewidSig() []byte
- func (*ViewChangeRequest) ProtoMessage()
- func (x *ViewChangeRequest) ProtoReflect() protoreflect.Message
- func (x *ViewChangeRequest) Reset()
- func (x *ViewChangeRequest) String() string
Constants ¶
const ( IP = "127.0.0.1" Port = "30000" )
Constants for client service port.
const (
ClientService_Process_FullMethodName = "/harmonymessage.ClientService/Process"
)
Variables ¶
var ( ServiceType_name = map[int32]string{ 0: "CONSENSUS", 1: "STAKING", 2: "DRAND", 3: "CLIENT_SUPPORT", } ServiceType_value = map[string]int32{ "CONSENSUS": 0, "STAKING": 1, "DRAND": 2, "CLIENT_SUPPORT": 3, } )
Enum value maps for ServiceType.
var ( MessageType_name = map[int32]string{ 0: "NEWNODE_BEACON_STAKING", 1: "ANNOUNCE", 2: "PREPARE", 3: "PREPARED", 4: "COMMIT", 5: "COMMITTED", 6: "VIEWCHANGE", 7: "NEWVIEW", 10: "DRAND_INIT", 11: "DRAND_COMMIT", 12: "LOTTERY_REQUEST", 13: "LAST_SIGN_POWER", } MessageType_value = map[string]int32{ "NEWNODE_BEACON_STAKING": 0, "ANNOUNCE": 1, "PREPARE": 2, "PREPARED": 3, "COMMIT": 4, "COMMITTED": 5, "VIEWCHANGE": 6, "NEWVIEW": 7, "DRAND_INIT": 10, "DRAND_COMMIT": 11, "LOTTERY_REQUEST": 12, "LAST_SIGN_POWER": 13, } )
Enum value maps for MessageType.
var ( LotteryRequest_Type_name = map[int32]string{ 0: "ENTER", 1: "RESULT", 2: "PICK_WINNER", } LotteryRequest_Type_value = map[string]int32{ "ENTER": 0, "RESULT": 1, "PICK_WINNER": 2, } )
Enum value maps for LotteryRequest_Type.
var ClientService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "harmonymessage.ClientService", HandlerType: (*ClientServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Process", Handler: _ClientService_Process_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "harmonymessage.proto", }
ClientService_ServiceDesc is the grpc.ServiceDesc for ClientService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_harmonymessage_proto protoreflect.FileDescriptor
Functions ¶
func RegisterClientServiceServer ¶
func RegisterClientServiceServer(s grpc.ServiceRegistrar, srv ClientServiceServer)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the client model for client service.
type ClientServiceClient ¶
type ClientServiceClient interface {
Process(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Response, error)
}
ClientServiceClient is the client API for ClientService 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 NewClientServiceClient ¶
func NewClientServiceClient(cc grpc.ClientConnInterface) ClientServiceClient
type ClientServiceServer ¶
type ClientServiceServer interface { Process(context.Context, *Message) (*Response, error) // contains filtered or unexported methods }
ClientServiceServer is the server API for ClientService service. All implementations must embed UnimplementedClientServiceServer for forward compatibility
type ConsensusRequest ¶
type ConsensusRequest struct { ViewId uint64 `protobuf:"varint,1,opt,name=view_id,json=viewId,proto3" json:"view_id,omitempty"` BlockNum uint64 `protobuf:"varint,2,opt,name=block_num,json=blockNum,proto3" json:"block_num,omitempty"` ShardId uint32 `protobuf:"varint,3,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"` BlockHash []byte `protobuf:"bytes,4,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` Block []byte `protobuf:"bytes,5,opt,name=block,proto3" json:"block,omitempty"` SenderPubkey []byte `protobuf:"bytes,6,opt,name=sender_pubkey,json=senderPubkey,proto3" json:"sender_pubkey,omitempty"` Payload []byte `protobuf:"bytes,7,opt,name=payload,proto3" json:"payload,omitempty"` SenderPubkeyBitmap []byte `protobuf:"bytes,8,opt,name=sender_pubkey_bitmap,json=senderPubkeyBitmap,proto3" json:"sender_pubkey_bitmap,omitempty"` // contains filtered or unexported fields }
func (*ConsensusRequest) Descriptor
deprecated
func (*ConsensusRequest) Descriptor() ([]byte, []int)
Deprecated: Use ConsensusRequest.ProtoReflect.Descriptor instead.
func (*ConsensusRequest) GetBlock ¶
func (x *ConsensusRequest) GetBlock() []byte
func (*ConsensusRequest) GetBlockHash ¶
func (x *ConsensusRequest) GetBlockHash() []byte
func (*ConsensusRequest) GetBlockNum ¶
func (x *ConsensusRequest) GetBlockNum() uint64
func (*ConsensusRequest) GetPayload ¶
func (x *ConsensusRequest) GetPayload() []byte
func (*ConsensusRequest) GetSenderPubkey ¶
func (x *ConsensusRequest) GetSenderPubkey() []byte
func (*ConsensusRequest) GetSenderPubkeyBitmap ¶ added in v1.10.0
func (x *ConsensusRequest) GetSenderPubkeyBitmap() []byte
func (*ConsensusRequest) GetShardId ¶
func (x *ConsensusRequest) GetShardId() uint32
func (*ConsensusRequest) GetViewId ¶
func (x *ConsensusRequest) GetViewId() uint64
func (*ConsensusRequest) ProtoMessage ¶
func (*ConsensusRequest) ProtoMessage()
func (*ConsensusRequest) ProtoReflect ¶ added in v1.10.0
func (x *ConsensusRequest) ProtoReflect() protoreflect.Message
func (*ConsensusRequest) Reset ¶
func (x *ConsensusRequest) Reset()
func (*ConsensusRequest) String ¶
func (x *ConsensusRequest) String() string
type DrandRequest ¶
type DrandRequest struct { // Deprecated: Marked as deprecated in harmonymessage.proto. ShardId uint32 `protobuf:"varint,1,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"` // Deprecated: Marked as deprecated in harmonymessage.proto. SenderPubkey []byte `protobuf:"bytes,2,opt,name=sender_pubkey,json=senderPubkey,proto3" json:"sender_pubkey,omitempty"` // Deprecated: Marked as deprecated in harmonymessage.proto. BlockHash []byte `protobuf:"bytes,3,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // Deprecated: Marked as deprecated in harmonymessage.proto. Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` // contains filtered or unexported fields }
func (*DrandRequest) Descriptor
deprecated
func (*DrandRequest) Descriptor() ([]byte, []int)
Deprecated: Use DrandRequest.ProtoReflect.Descriptor instead.
func (*DrandRequest) GetBlockHash
deprecated
func (x *DrandRequest) GetBlockHash() []byte
Deprecated: Marked as deprecated in harmonymessage.proto.
func (*DrandRequest) GetPayload
deprecated
func (x *DrandRequest) GetPayload() []byte
Deprecated: Marked as deprecated in harmonymessage.proto.
func (*DrandRequest) GetSenderPubkey
deprecated
func (x *DrandRequest) GetSenderPubkey() []byte
Deprecated: Marked as deprecated in harmonymessage.proto.
func (*DrandRequest) GetShardId
deprecated
func (x *DrandRequest) GetShardId() uint32
Deprecated: Marked as deprecated in harmonymessage.proto.
func (*DrandRequest) ProtoMessage ¶
func (*DrandRequest) ProtoMessage()
func (*DrandRequest) ProtoReflect ¶ added in v1.10.0
func (x *DrandRequest) ProtoReflect() protoreflect.Message
func (*DrandRequest) Reset ¶
func (x *DrandRequest) Reset()
func (*DrandRequest) String ¶
func (x *DrandRequest) String() string
type LastSignPowerBroadcast ¶
type LastSignPowerBroadcast struct { Prepare int64 `protobuf:"varint,1,opt,name=prepare,proto3" json:"prepare,omitempty"` Commit int64 `protobuf:"varint,2,opt,name=commit,proto3" json:"commit,omitempty"` Change int64 `protobuf:"varint,3,opt,name=change,proto3" json:"change,omitempty"` SenderPubkey []byte `protobuf:"bytes,4,opt,name=sender_pubkey,json=senderPubkey,proto3" json:"sender_pubkey,omitempty"` ShardId uint32 `protobuf:"varint,5,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"` // contains filtered or unexported fields }
func (*LastSignPowerBroadcast) Descriptor
deprecated
func (*LastSignPowerBroadcast) Descriptor() ([]byte, []int)
Deprecated: Use LastSignPowerBroadcast.ProtoReflect.Descriptor instead.
func (*LastSignPowerBroadcast) GetChange ¶
func (x *LastSignPowerBroadcast) GetChange() int64
func (*LastSignPowerBroadcast) GetCommit ¶
func (x *LastSignPowerBroadcast) GetCommit() int64
func (*LastSignPowerBroadcast) GetPrepare ¶
func (x *LastSignPowerBroadcast) GetPrepare() int64
func (*LastSignPowerBroadcast) GetSenderPubkey ¶
func (x *LastSignPowerBroadcast) GetSenderPubkey() []byte
func (*LastSignPowerBroadcast) GetShardId ¶
func (x *LastSignPowerBroadcast) GetShardId() uint32
func (*LastSignPowerBroadcast) ProtoMessage ¶
func (*LastSignPowerBroadcast) ProtoMessage()
func (*LastSignPowerBroadcast) ProtoReflect ¶
func (x *LastSignPowerBroadcast) ProtoReflect() protoreflect.Message
func (*LastSignPowerBroadcast) Reset ¶
func (x *LastSignPowerBroadcast) Reset()
func (*LastSignPowerBroadcast) String ¶
func (x *LastSignPowerBroadcast) String() string
type LotteryRequest ¶
type LotteryRequest struct { // Deprecated: Marked as deprecated in harmonymessage.proto. Type LotteryRequest_Type `protobuf:"varint,1,opt,name=type,proto3,enum=harmonymessage.LotteryRequest_Type" json:"type,omitempty"` // Deprecated: Marked as deprecated in harmonymessage.proto. PrivateKey string `protobuf:"bytes,2,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` // Deprecated: Marked as deprecated in harmonymessage.proto. Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` // contains filtered or unexported fields }
func (*LotteryRequest) Descriptor
deprecated
func (*LotteryRequest) Descriptor() ([]byte, []int)
Deprecated: Use LotteryRequest.ProtoReflect.Descriptor instead.
func (*LotteryRequest) GetAmount
deprecated
func (x *LotteryRequest) GetAmount() int64
Deprecated: Marked as deprecated in harmonymessage.proto.
func (*LotteryRequest) GetPrivateKey
deprecated
func (x *LotteryRequest) GetPrivateKey() string
Deprecated: Marked as deprecated in harmonymessage.proto.
func (*LotteryRequest) GetType
deprecated
func (x *LotteryRequest) GetType() LotteryRequest_Type
Deprecated: Marked as deprecated in harmonymessage.proto.
func (*LotteryRequest) ProtoMessage ¶
func (*LotteryRequest) ProtoMessage()
func (*LotteryRequest) ProtoReflect ¶ added in v1.10.0
func (x *LotteryRequest) ProtoReflect() protoreflect.Message
func (*LotteryRequest) Reset ¶
func (x *LotteryRequest) Reset()
func (*LotteryRequest) String ¶
func (x *LotteryRequest) String() string
type LotteryRequest_Type ¶
type LotteryRequest_Type int32
const ( // Deprecated: Marked as deprecated in harmonymessage.proto. LotteryRequest_ENTER LotteryRequest_Type = 0 // Deprecated: Marked as deprecated in harmonymessage.proto. LotteryRequest_RESULT LotteryRequest_Type = 1 // Deprecated: Marked as deprecated in harmonymessage.proto. LotteryRequest_PICK_WINNER LotteryRequest_Type = 2 )
func (LotteryRequest_Type) Descriptor ¶ added in v1.10.0
func (LotteryRequest_Type) Descriptor() protoreflect.EnumDescriptor
func (LotteryRequest_Type) Enum ¶ added in v1.10.0
func (x LotteryRequest_Type) Enum() *LotteryRequest_Type
func (LotteryRequest_Type) EnumDescriptor
deprecated
func (LotteryRequest_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use LotteryRequest_Type.Descriptor instead.
func (LotteryRequest_Type) Number ¶ added in v1.10.0
func (x LotteryRequest_Type) Number() protoreflect.EnumNumber
func (LotteryRequest_Type) String ¶
func (x LotteryRequest_Type) String() string
func (LotteryRequest_Type) Type ¶ added in v1.10.0
func (LotteryRequest_Type) Type() protoreflect.EnumType
type LotteryResponse ¶
type LotteryResponse struct { // Deprecated: Marked as deprecated in harmonymessage.proto. Players []string `protobuf:"bytes,2,rep,name=players,proto3" json:"players,omitempty"` // Deprecated: Marked as deprecated in harmonymessage.proto. Balances []string `protobuf:"bytes,3,rep,name=balances,proto3" json:"balances,omitempty"` // contains filtered or unexported fields }
func (*LotteryResponse) Descriptor
deprecated
func (*LotteryResponse) Descriptor() ([]byte, []int)
Deprecated: Use LotteryResponse.ProtoReflect.Descriptor instead.
func (*LotteryResponse) GetBalances
deprecated
func (x *LotteryResponse) GetBalances() []string
Deprecated: Marked as deprecated in harmonymessage.proto.
func (*LotteryResponse) GetPlayers
deprecated
func (x *LotteryResponse) GetPlayers() []string
Deprecated: Marked as deprecated in harmonymessage.proto.
func (*LotteryResponse) ProtoMessage ¶
func (*LotteryResponse) ProtoMessage()
func (*LotteryResponse) ProtoReflect ¶ added in v1.10.0
func (x *LotteryResponse) ProtoReflect() protoreflect.Message
func (*LotteryResponse) Reset ¶
func (x *LotteryResponse) Reset()
func (*LotteryResponse) String ¶
func (x *LotteryResponse) String() string
type Message ¶
type Message struct { ServiceType ServiceType `` /* 127-byte string literal not displayed */ Type MessageType `protobuf:"varint,2,opt,name=type,proto3,enum=harmonymessage.MessageType" json:"type,omitempty"` Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` // Types that are assignable to Request: // // *Message_Staking // *Message_Consensus // *Message_Drand // *Message_Viewchange // *Message_LotteryRequest // *Message_LastSignPower Request isMessage_Request `protobuf_oneof:"request"` // contains filtered or unexported fields }
This is universal message for all communication protocols. There are different Requests for different message types. As we introduce a new type of message just add a new MessageType and new type of request in Message.
The request field will be either one of the structure corresponding to the MessageType type.
func (*Message) Descriptor
deprecated
func (*Message) GetConsensus ¶
func (x *Message) GetConsensus() *ConsensusRequest
func (*Message) GetDrand
deprecated
func (x *Message) GetDrand() *DrandRequest
Deprecated: Marked as deprecated in harmonymessage.proto.
func (*Message) GetLastSignPower ¶
func (x *Message) GetLastSignPower() *LastSignPowerBroadcast
func (*Message) GetLotteryRequest
deprecated
func (x *Message) GetLotteryRequest() *LotteryRequest
Deprecated: Marked as deprecated in harmonymessage.proto.
func (*Message) GetRequest ¶
func (m *Message) GetRequest() isMessage_Request
func (*Message) GetServiceType ¶
func (x *Message) GetServiceType() ServiceType
func (*Message) GetSignature ¶
func (*Message) GetStaking
deprecated
func (x *Message) GetStaking() *StakingRequest
Deprecated: Marked as deprecated in harmonymessage.proto.
func (*Message) GetType ¶
func (x *Message) GetType() MessageType
func (*Message) GetViewchange ¶
func (x *Message) GetViewchange() *ViewChangeRequest
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶ added in v1.10.0
func (x *Message) ProtoReflect() protoreflect.Message
type MessageType ¶
type MessageType int32
MessageType indicates what is the type of this message.
const ( // Deprecated: Marked as deprecated in harmonymessage.proto. MessageType_NEWNODE_BEACON_STAKING MessageType = 0 MessageType_ANNOUNCE MessageType = 1 MessageType_PREPARE MessageType = 2 MessageType_PREPARED MessageType = 3 MessageType_COMMIT MessageType = 4 MessageType_COMMITTED MessageType = 5 MessageType_VIEWCHANGE MessageType = 6 MessageType_NEWVIEW MessageType = 7 // Deprecated: Marked as deprecated in harmonymessage.proto. MessageType_DRAND_INIT MessageType = 10 // Deprecated: Marked as deprecated in harmonymessage.proto. MessageType_DRAND_COMMIT MessageType = 11 // Deprecated: Marked as deprecated in harmonymessage.proto. MessageType_LOTTERY_REQUEST MessageType = 12 // it should be either ENTER or GETPLAYERS but it will be removed later. MessageType_LAST_SIGN_POWER MessageType = 13 )
func (MessageType) Descriptor ¶ added in v1.10.0
func (MessageType) Descriptor() protoreflect.EnumDescriptor
func (MessageType) Enum ¶ added in v1.10.0
func (x MessageType) Enum() *MessageType
func (MessageType) EnumDescriptor
deprecated
func (MessageType) EnumDescriptor() ([]byte, []int)
Deprecated: Use MessageType.Descriptor instead.
func (MessageType) Number ¶ added in v1.10.0
func (x MessageType) Number() protoreflect.EnumNumber
func (MessageType) String ¶
func (x MessageType) String() string
func (MessageType) Type ¶ added in v1.10.0
func (MessageType) Type() protoreflect.EnumType
type Message_Consensus ¶
type Message_Consensus struct {
Consensus *ConsensusRequest `protobuf:"bytes,5,opt,name=consensus,proto3,oneof"`
}
type Message_Drand ¶
type Message_Drand struct { // Deprecated: Marked as deprecated in harmonymessage.proto. Drand *DrandRequest `protobuf:"bytes,6,opt,name=drand,proto3,oneof"` }
type Message_LastSignPower ¶
type Message_LastSignPower struct {
LastSignPower *LastSignPowerBroadcast `protobuf:"bytes,9,opt,name=last_sign_power,json=lastSignPower,proto3,oneof"`
}
type Message_LotteryRequest ¶
type Message_LotteryRequest struct { // Refactor this later after demo. // // Deprecated: Marked as deprecated in harmonymessage.proto. LotteryRequest *LotteryRequest `protobuf:"bytes,8,opt,name=lottery_request,json=lotteryRequest,proto3,oneof"` }
type Message_Staking ¶
type Message_Staking struct { // Deprecated: Marked as deprecated in harmonymessage.proto. Staking *StakingRequest `protobuf:"bytes,4,opt,name=staking,proto3,oneof"` }
type Message_Viewchange ¶
type Message_Viewchange struct {
Viewchange *ViewChangeRequest `protobuf:"bytes,7,opt,name=viewchange,proto3,oneof"`
}
type Response ¶
type Response struct { ServiceType ServiceType `` /* 127-byte string literal not displayed */ Type MessageType `protobuf:"varint,2,opt,name=type,proto3,enum=harmonymessage.MessageType" json:"type,omitempty"` // Types that are assignable to Response: // // *Response_LotteryResponse Response isResponse_Response `protobuf_oneof:"response"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) GetLotteryResponse
deprecated
func (x *Response) GetLotteryResponse() *LotteryResponse
Deprecated: Marked as deprecated in harmonymessage.proto.
func (*Response) GetResponse ¶
func (m *Response) GetResponse() isResponse_Response
func (*Response) GetServiceType ¶
func (x *Response) GetServiceType() ServiceType
func (*Response) GetType ¶
func (x *Response) GetType() MessageType
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶ added in v1.10.0
func (x *Response) ProtoReflect() protoreflect.Message
type Response_LotteryResponse ¶
type Response_LotteryResponse struct { // Deprecated: Marked as deprecated in harmonymessage.proto. LotteryResponse *LotteryResponse `protobuf:"bytes,3,opt,name=lottery_response,json=lotteryResponse,proto3,oneof"` }
type Server ¶
type Server struct { UnimplementedClientServiceServer CreateTransactionForEnterMethod func(int64, string) error GetResult func(string) ([]string, []*big.Int) CreateTransactionForPickWinner func() error // contains filtered or unexported fields }
Server is the Server struct for client service package.
func NewServer ¶
func NewServer( CreateTransactionForEnterMethod func(int64, string) error, GetResult func(string) ([]string, []*big.Int), CreateTransactionForPickWinner func() error) *Server
NewServer creates new Server which implements ClientServiceServer interface.
type ServiceType ¶
type ServiceType int32
ServiceType indicates which service used to generate this message.
const ( ServiceType_CONSENSUS ServiceType = 0 // Deprecated: Marked as deprecated in harmonymessage.proto. ServiceType_STAKING ServiceType = 1 // Deprecated: Marked as deprecated in harmonymessage.proto. ServiceType_DRAND ServiceType = 2 ServiceType_CLIENT_SUPPORT ServiceType = 3 )
func (ServiceType) Descriptor ¶ added in v1.10.0
func (ServiceType) Descriptor() protoreflect.EnumDescriptor
func (ServiceType) Enum ¶ added in v1.10.0
func (x ServiceType) Enum() *ServiceType
func (ServiceType) EnumDescriptor
deprecated
func (ServiceType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ServiceType.Descriptor instead.
func (ServiceType) Number ¶ added in v1.10.0
func (x ServiceType) Number() protoreflect.EnumNumber
func (ServiceType) String ¶
func (x ServiceType) String() string
func (ServiceType) Type ¶ added in v1.10.0
func (ServiceType) Type() protoreflect.EnumType
type StakingRequest ¶
type StakingRequest struct { // Deprecated: Marked as deprecated in harmonymessage.proto. Transaction []byte `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` // Deprecated: Marked as deprecated in harmonymessage.proto. NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` // contains filtered or unexported fields }
Staking Request from new node to beacon node.
func (*StakingRequest) Descriptor
deprecated
func (*StakingRequest) Descriptor() ([]byte, []int)
Deprecated: Use StakingRequest.ProtoReflect.Descriptor instead.
func (*StakingRequest) GetNodeId
deprecated
func (x *StakingRequest) GetNodeId() string
Deprecated: Marked as deprecated in harmonymessage.proto.
func (*StakingRequest) GetTransaction
deprecated
func (x *StakingRequest) GetTransaction() []byte
Deprecated: Marked as deprecated in harmonymessage.proto.
func (*StakingRequest) ProtoMessage ¶
func (*StakingRequest) ProtoMessage()
func (*StakingRequest) ProtoReflect ¶ added in v1.10.0
func (x *StakingRequest) ProtoReflect() protoreflect.Message
func (*StakingRequest) Reset ¶
func (x *StakingRequest) Reset()
func (*StakingRequest) String ¶
func (x *StakingRequest) String() string
type UnimplementedClientServiceServer ¶ added in v1.1.1
type UnimplementedClientServiceServer struct { }
UnimplementedClientServiceServer must be embedded to have forward compatible implementations.
type UnsafeClientServiceServer ¶
type UnsafeClientServiceServer interface {
// contains filtered or unexported methods
}
UnsafeClientServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ClientServiceServer will result in compilation errors.
type ViewChangeRequest ¶
type ViewChangeRequest struct { ViewId uint64 `protobuf:"varint,1,opt,name=view_id,json=viewId,proto3" json:"view_id,omitempty"` BlockNum uint64 `protobuf:"varint,2,opt,name=block_num,json=blockNum,proto3" json:"block_num,omitempty"` ShardId uint32 `protobuf:"varint,3,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"` SenderPubkey []byte `protobuf:"bytes,4,opt,name=sender_pubkey,json=senderPubkey,proto3" json:"sender_pubkey,omitempty"` LeaderPubkey []byte `protobuf:"bytes,5,opt,name=leader_pubkey,json=leaderPubkey,proto3" json:"leader_pubkey,omitempty"` Payload []byte `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"` // message payload: either m1 type or m2 type ViewchangeSig []byte `protobuf:"bytes,7,opt,name=viewchange_sig,json=viewchangeSig,proto3" json:"viewchange_sig,omitempty"` // signature on payload ViewidSig []byte `protobuf:"bytes,8,opt,name=viewid_sig,json=viewidSig,proto3" json:"viewid_sig,omitempty"` // signature on view_id // below is for newview message only // only need 1 valid m1 type message which is in payload M2Aggsigs []byte `protobuf:"bytes,9,opt,name=m2_aggsigs,json=m2Aggsigs,proto3" json:"m2_aggsigs,omitempty"` // m2: |nil| M2Bitmap []byte `protobuf:"bytes,10,opt,name=m2_bitmap,json=m2Bitmap,proto3" json:"m2_bitmap,omitempty"` M3Aggsigs []byte `protobuf:"bytes,11,opt,name=m3_aggsigs,json=m3Aggsigs,proto3" json:"m3_aggsigs,omitempty"` // m3: |viewID| M3Bitmap []byte `protobuf:"bytes,12,opt,name=m3_bitmap,json=m3Bitmap,proto3" json:"m3_bitmap,omitempty"` PreparedBlock []byte `protobuf:"bytes,13,opt,name=prepared_block,json=preparedBlock,proto3" json:"prepared_block,omitempty"` // contains filtered or unexported fields }
func (*ViewChangeRequest) Descriptor
deprecated
func (*ViewChangeRequest) Descriptor() ([]byte, []int)
Deprecated: Use ViewChangeRequest.ProtoReflect.Descriptor instead.
func (*ViewChangeRequest) GetBlockNum ¶
func (x *ViewChangeRequest) GetBlockNum() uint64
func (*ViewChangeRequest) GetLeaderPubkey ¶
func (x *ViewChangeRequest) GetLeaderPubkey() []byte
func (*ViewChangeRequest) GetM2Aggsigs ¶
func (x *ViewChangeRequest) GetM2Aggsigs() []byte
func (*ViewChangeRequest) GetM2Bitmap ¶
func (x *ViewChangeRequest) GetM2Bitmap() []byte
func (*ViewChangeRequest) GetM3Aggsigs ¶
func (x *ViewChangeRequest) GetM3Aggsigs() []byte
func (*ViewChangeRequest) GetM3Bitmap ¶
func (x *ViewChangeRequest) GetM3Bitmap() []byte
func (*ViewChangeRequest) GetPayload ¶
func (x *ViewChangeRequest) GetPayload() []byte
func (*ViewChangeRequest) GetPreparedBlock ¶ added in v1.3.12
func (x *ViewChangeRequest) GetPreparedBlock() []byte
func (*ViewChangeRequest) GetSenderPubkey ¶
func (x *ViewChangeRequest) GetSenderPubkey() []byte
func (*ViewChangeRequest) GetShardId ¶
func (x *ViewChangeRequest) GetShardId() uint32
func (*ViewChangeRequest) GetViewId ¶
func (x *ViewChangeRequest) GetViewId() uint64
func (*ViewChangeRequest) GetViewchangeSig ¶
func (x *ViewChangeRequest) GetViewchangeSig() []byte
func (*ViewChangeRequest) GetViewidSig ¶
func (x *ViewChangeRequest) GetViewidSig() []byte
func (*ViewChangeRequest) ProtoMessage ¶
func (*ViewChangeRequest) ProtoMessage()
func (*ViewChangeRequest) ProtoReflect ¶ added in v1.10.0
func (x *ViewChangeRequest) ProtoReflect() protoreflect.Message
func (*ViewChangeRequest) Reset ¶
func (x *ViewChangeRequest) Reset()
func (*ViewChangeRequest) String ¶
func (x *ViewChangeRequest) String() string