Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterClientServiceServer(s *grpc.Server, srv ClientServiceServer)
- type Client
- type ClientServiceClient
- type ClientServiceServer
- type ConsensusRequest
- func (*ConsensusRequest) Descriptor() ([]byte, []int)
- func (m *ConsensusRequest) GetBlock() []byte
- func (m *ConsensusRequest) GetBlockHash() []byte
- func (m *ConsensusRequest) GetBlockNum() uint64
- func (m *ConsensusRequest) GetPayload() []byte
- func (m *ConsensusRequest) GetSenderPubkey() []byte
- func (m *ConsensusRequest) GetShardId() uint32
- func (m *ConsensusRequest) GetViewId() uint64
- func (*ConsensusRequest) ProtoMessage()
- func (m *ConsensusRequest) Reset()
- func (m *ConsensusRequest) String() string
- func (m *ConsensusRequest) XXX_DiscardUnknown()
- func (m *ConsensusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ConsensusRequest) XXX_Merge(src proto.Message)
- func (m *ConsensusRequest) XXX_Size() int
- func (m *ConsensusRequest) XXX_Unmarshal(b []byte) error
- type DrandRequest
- func (*DrandRequest) Descriptor() ([]byte, []int)
- func (m *DrandRequest) GetBlockHash() []byte
- func (m *DrandRequest) GetPayload() []byte
- func (m *DrandRequest) GetSenderPubkey() []byte
- func (m *DrandRequest) GetShardId() uint32
- func (*DrandRequest) ProtoMessage()
- func (m *DrandRequest) Reset()
- func (m *DrandRequest) String() string
- func (m *DrandRequest) XXX_DiscardUnknown()
- func (m *DrandRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DrandRequest) XXX_Merge(src proto.Message)
- func (m *DrandRequest) XXX_Size() int
- func (m *DrandRequest) XXX_Unmarshal(b []byte) error
- type LotteryRequest
- func (*LotteryRequest) Descriptor() ([]byte, []int)
- func (m *LotteryRequest) GetAmount() int64
- func (m *LotteryRequest) GetPrivateKey() string
- func (m *LotteryRequest) GetType() LotteryRequest_Type
- func (*LotteryRequest) ProtoMessage()
- func (m *LotteryRequest) Reset()
- func (m *LotteryRequest) String() string
- func (m *LotteryRequest) XXX_DiscardUnknown()
- func (m *LotteryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LotteryRequest) XXX_Merge(src proto.Message)
- func (m *LotteryRequest) XXX_Size() int
- func (m *LotteryRequest) XXX_Unmarshal(b []byte) error
- type LotteryRequest_Type
- type LotteryResponse
- func (*LotteryResponse) Descriptor() ([]byte, []int)
- func (m *LotteryResponse) GetBalances() []string
- func (m *LotteryResponse) GetPlayers() []string
- func (*LotteryResponse) ProtoMessage()
- func (m *LotteryResponse) Reset()
- func (m *LotteryResponse) String() string
- func (m *LotteryResponse) XXX_DiscardUnknown()
- func (m *LotteryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LotteryResponse) XXX_Merge(src proto.Message)
- func (m *LotteryResponse) XXX_Size() int
- func (m *LotteryResponse) XXX_Unmarshal(b []byte) error
- type Message
- func (*Message) Descriptor() ([]byte, []int)
- func (m *Message) GetConsensus() *ConsensusRequest
- func (m *Message) GetDrand() *DrandRequest
- func (m *Message) GetLotteryRequest() *LotteryRequest
- func (m *Message) GetRequest() isMessage_Request
- func (m *Message) GetServiceType() ServiceType
- func (m *Message) GetSignature() []byte
- func (m *Message) GetStaking() *StakingRequest
- func (m *Message) GetType() MessageType
- func (m *Message) GetViewchange() *ViewChangeRequest
- func (*Message) ProtoMessage()
- func (m *Message) Reset()
- func (m *Message) String() string
- func (m *Message) XXX_DiscardUnknown()
- func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Message) XXX_Merge(src proto.Message)
- func (*Message) XXX_OneofWrappers() []interface{}
- func (m *Message) XXX_Size() int
- func (m *Message) XXX_Unmarshal(b []byte) error
- type MessageType
- type Message_Consensus
- type Message_Drand
- type Message_LotteryRequest
- type Message_Staking
- type Message_Viewchange
- type Response
- func (*Response) Descriptor() ([]byte, []int)
- func (m *Response) GetLotteryResponse() *LotteryResponse
- func (m *Response) GetResponse() isResponse_Response
- func (m *Response) GetServiceType() ServiceType
- func (m *Response) GetType() MessageType
- func (*Response) ProtoMessage()
- func (m *Response) Reset()
- func (m *Response) String() string
- func (m *Response) XXX_DiscardUnknown()
- func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Response) XXX_Merge(src proto.Message)
- func (*Response) XXX_OneofWrappers() []interface{}
- func (m *Response) XXX_Size() int
- func (m *Response) XXX_Unmarshal(b []byte) error
- type Response_LotteryResponse
- type Server
- type ServiceType
- type StakingRequest
- func (*StakingRequest) Descriptor() ([]byte, []int)
- func (m *StakingRequest) GetNodeId() string
- func (m *StakingRequest) GetTransaction() []byte
- func (*StakingRequest) ProtoMessage()
- func (m *StakingRequest) Reset()
- func (m *StakingRequest) String() string
- func (m *StakingRequest) XXX_DiscardUnknown()
- func (m *StakingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StakingRequest) XXX_Merge(src proto.Message)
- func (m *StakingRequest) XXX_Size() int
- func (m *StakingRequest) XXX_Unmarshal(b []byte) error
- type UnimplementedClientServiceServer
- type ViewChangeRequest
- func (*ViewChangeRequest) Descriptor() ([]byte, []int)
- func (m *ViewChangeRequest) GetBlockNum() uint64
- func (m *ViewChangeRequest) GetLeaderPubkey() []byte
- func (m *ViewChangeRequest) GetM2Aggsigs() []byte
- func (m *ViewChangeRequest) GetM2Bitmap() []byte
- func (m *ViewChangeRequest) GetM3Aggsigs() []byte
- func (m *ViewChangeRequest) GetM3Bitmap() []byte
- func (m *ViewChangeRequest) GetPayload() []byte
- func (m *ViewChangeRequest) GetSenderPubkey() []byte
- func (m *ViewChangeRequest) GetShardId() uint32
- func (m *ViewChangeRequest) GetViewId() uint64
- func (m *ViewChangeRequest) GetViewchangeSig() []byte
- func (m *ViewChangeRequest) GetViewidSig() []byte
- func (*ViewChangeRequest) ProtoMessage()
- func (m *ViewChangeRequest) Reset()
- func (m *ViewChangeRequest) String() string
- func (m *ViewChangeRequest) XXX_DiscardUnknown()
- func (m *ViewChangeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ViewChangeRequest) XXX_Merge(src proto.Message)
- func (m *ViewChangeRequest) XXX_Size() int
- func (m *ViewChangeRequest) XXX_Unmarshal(b []byte) error
Constants ¶
const ( IP = "127.0.0.1" Port = "30000" )
Constants for client service port.
Variables ¶
var ( ErrWrongMessage = errors.New("Error as receiving wrong message") ErrEnterMethod = errors.New("Error when processing enter method") ErrResultMethod = errors.New("Error when processing result/getPlayers method") ErrEnterProcessorNotReady = errors.New("Error because enter processor is not ready") ErrWhenPickingWinner = errors.New("Error when picking winner") )
Error of host package
var LotteryRequest_Type_name = map[int32]string{
0: "ENTER",
1: "RESULT",
2: "PICK_WINNER",
}
var LotteryRequest_Type_value = map[string]int32{
"ENTER": 0,
"RESULT": 1,
"PICK_WINNER": 2,
}
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",
}
var 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,
}
var ServiceType_name = map[int32]string{
0: "CONSENSUS",
1: "STAKING",
2: "DRAND",
3: "CLIENT_SUPPORT",
}
var ServiceType_value = map[string]int32{
"CONSENSUS": 0,
"STAKING": 1,
"DRAND": 2,
"CLIENT_SUPPORT": 3,
}
Functions ¶
func RegisterClientServiceServer ¶
func RegisterClientServiceServer(s *grpc.Server, 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://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewClientServiceClient ¶
func NewClientServiceClient(cc *grpc.ClientConn) ClientServiceClient
type ClientServiceServer ¶
ClientServiceServer is the server API for ClientService service.
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ConsensusRequest) Descriptor ¶
func (*ConsensusRequest) Descriptor() ([]byte, []int)
func (*ConsensusRequest) GetBlock ¶
func (m *ConsensusRequest) GetBlock() []byte
func (*ConsensusRequest) GetBlockHash ¶
func (m *ConsensusRequest) GetBlockHash() []byte
func (*ConsensusRequest) GetBlockNum ¶
func (m *ConsensusRequest) GetBlockNum() uint64
func (*ConsensusRequest) GetPayload ¶
func (m *ConsensusRequest) GetPayload() []byte
func (*ConsensusRequest) GetSenderPubkey ¶
func (m *ConsensusRequest) GetSenderPubkey() []byte
func (*ConsensusRequest) GetShardId ¶
func (m *ConsensusRequest) GetShardId() uint32
func (*ConsensusRequest) GetViewId ¶
func (m *ConsensusRequest) GetViewId() uint64
func (*ConsensusRequest) ProtoMessage ¶
func (*ConsensusRequest) ProtoMessage()
func (*ConsensusRequest) Reset ¶
func (m *ConsensusRequest) Reset()
func (*ConsensusRequest) String ¶
func (m *ConsensusRequest) String() string
func (*ConsensusRequest) XXX_DiscardUnknown ¶
func (m *ConsensusRequest) XXX_DiscardUnknown()
func (*ConsensusRequest) XXX_Marshal ¶
func (m *ConsensusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ConsensusRequest) XXX_Merge ¶
func (m *ConsensusRequest) XXX_Merge(src proto.Message)
func (*ConsensusRequest) XXX_Size ¶
func (m *ConsensusRequest) XXX_Size() int
func (*ConsensusRequest) XXX_Unmarshal ¶
func (m *ConsensusRequest) XXX_Unmarshal(b []byte) error
type DrandRequest ¶
type DrandRequest struct { ShardId uint32 `protobuf:"varint,1,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"` SenderPubkey []byte `protobuf:"bytes,2,opt,name=sender_pubkey,json=senderPubkey,proto3" json:"sender_pubkey,omitempty"` BlockHash []byte `protobuf:"bytes,3,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*DrandRequest) Descriptor ¶
func (*DrandRequest) Descriptor() ([]byte, []int)
func (*DrandRequest) GetBlockHash ¶
func (m *DrandRequest) GetBlockHash() []byte
func (*DrandRequest) GetPayload ¶
func (m *DrandRequest) GetPayload() []byte
func (*DrandRequest) GetSenderPubkey ¶
func (m *DrandRequest) GetSenderPubkey() []byte
func (*DrandRequest) GetShardId ¶
func (m *DrandRequest) GetShardId() uint32
func (*DrandRequest) ProtoMessage ¶
func (*DrandRequest) ProtoMessage()
func (*DrandRequest) Reset ¶
func (m *DrandRequest) Reset()
func (*DrandRequest) String ¶
func (m *DrandRequest) String() string
func (*DrandRequest) XXX_DiscardUnknown ¶
func (m *DrandRequest) XXX_DiscardUnknown()
func (*DrandRequest) XXX_Marshal ¶
func (m *DrandRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DrandRequest) XXX_Merge ¶
func (m *DrandRequest) XXX_Merge(src proto.Message)
func (*DrandRequest) XXX_Size ¶
func (m *DrandRequest) XXX_Size() int
func (*DrandRequest) XXX_Unmarshal ¶
func (m *DrandRequest) XXX_Unmarshal(b []byte) error
type LotteryRequest ¶
type LotteryRequest struct { Type LotteryRequest_Type `protobuf:"varint,1,opt,name=type,proto3,enum=message.LotteryRequest_Type" json:"type,omitempty"` PrivateKey string `protobuf:"bytes,2,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LotteryRequest) Descriptor ¶
func (*LotteryRequest) Descriptor() ([]byte, []int)
func (*LotteryRequest) GetAmount ¶
func (m *LotteryRequest) GetAmount() int64
func (*LotteryRequest) GetPrivateKey ¶
func (m *LotteryRequest) GetPrivateKey() string
func (*LotteryRequest) GetType ¶
func (m *LotteryRequest) GetType() LotteryRequest_Type
func (*LotteryRequest) ProtoMessage ¶
func (*LotteryRequest) ProtoMessage()
func (*LotteryRequest) Reset ¶
func (m *LotteryRequest) Reset()
func (*LotteryRequest) String ¶
func (m *LotteryRequest) String() string
func (*LotteryRequest) XXX_DiscardUnknown ¶
func (m *LotteryRequest) XXX_DiscardUnknown()
func (*LotteryRequest) XXX_Marshal ¶
func (m *LotteryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LotteryRequest) XXX_Merge ¶
func (m *LotteryRequest) XXX_Merge(src proto.Message)
func (*LotteryRequest) XXX_Size ¶
func (m *LotteryRequest) XXX_Size() int
func (*LotteryRequest) XXX_Unmarshal ¶
func (m *LotteryRequest) XXX_Unmarshal(b []byte) error
type LotteryRequest_Type ¶
type LotteryRequest_Type int32
const ( LotteryRequest_ENTER LotteryRequest_Type = 0 LotteryRequest_RESULT LotteryRequest_Type = 1 LotteryRequest_PICK_WINNER LotteryRequest_Type = 2 )
func (LotteryRequest_Type) EnumDescriptor ¶
func (LotteryRequest_Type) EnumDescriptor() ([]byte, []int)
func (LotteryRequest_Type) String ¶
func (x LotteryRequest_Type) String() string
type LotteryResponse ¶
type LotteryResponse struct { Players []string `protobuf:"bytes,2,rep,name=players,proto3" json:"players,omitempty"` Balances []string `protobuf:"bytes,3,rep,name=balances,proto3" json:"balances,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LotteryResponse) Descriptor ¶
func (*LotteryResponse) Descriptor() ([]byte, []int)
func (*LotteryResponse) GetBalances ¶
func (m *LotteryResponse) GetBalances() []string
func (*LotteryResponse) GetPlayers ¶
func (m *LotteryResponse) GetPlayers() []string
func (*LotteryResponse) ProtoMessage ¶
func (*LotteryResponse) ProtoMessage()
func (*LotteryResponse) Reset ¶
func (m *LotteryResponse) Reset()
func (*LotteryResponse) String ¶
func (m *LotteryResponse) String() string
func (*LotteryResponse) XXX_DiscardUnknown ¶
func (m *LotteryResponse) XXX_DiscardUnknown()
func (*LotteryResponse) XXX_Marshal ¶
func (m *LotteryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LotteryResponse) XXX_Merge ¶
func (m *LotteryResponse) XXX_Merge(src proto.Message)
func (*LotteryResponse) XXX_Size ¶
func (m *LotteryResponse) XXX_Size() int
func (*LotteryResponse) XXX_Unmarshal ¶
func (m *LotteryResponse) XXX_Unmarshal(b []byte) error
type Message ¶
type Message struct { ServiceType ServiceType `protobuf:"varint,1,opt,name=service_type,json=serviceType,proto3,enum=message.ServiceType" json:"service_type,omitempty"` Type MessageType `protobuf:"varint,2,opt,name=type,proto3,enum=message.MessageType" json:"type,omitempty"` Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` // Types that are valid to be assigned to Request: // *Message_Staking // *Message_Consensus // *Message_Drand // *Message_Viewchange // *Message_LotteryRequest Request isMessage_Request `protobuf_oneof:"request"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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 ¶
func (*Message) GetConsensus ¶
func (m *Message) GetConsensus() *ConsensusRequest
func (*Message) GetDrand ¶
func (m *Message) GetDrand() *DrandRequest
func (*Message) GetLotteryRequest ¶
func (m *Message) GetLotteryRequest() *LotteryRequest
func (*Message) GetRequest ¶
func (m *Message) GetRequest() isMessage_Request
func (*Message) GetServiceType ¶
func (m *Message) GetServiceType() ServiceType
func (*Message) GetSignature ¶
func (*Message) GetStaking ¶
func (m *Message) GetStaking() *StakingRequest
func (*Message) GetType ¶
func (m *Message) GetType() MessageType
func (*Message) GetViewchange ¶
func (m *Message) GetViewchange() *ViewChangeRequest
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) XXX_DiscardUnknown ¶
func (m *Message) XXX_DiscardUnknown()
func (*Message) XXX_Marshal ¶
func (*Message) XXX_OneofWrappers ¶
func (*Message) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*Message) XXX_Unmarshal ¶
type MessageType ¶
type MessageType int32
MessageType indicates what is the type of this message.
const ( 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 MessageType_DRAND_INIT MessageType = 10 MessageType_DRAND_COMMIT MessageType = 11 MessageType_LOTTERY_REQUEST MessageType = 12 )
func (MessageType) EnumDescriptor ¶
func (MessageType) EnumDescriptor() ([]byte, []int)
func (MessageType) String ¶
func (x MessageType) String() string
type Message_Consensus ¶
type Message_Consensus struct {
Consensus *ConsensusRequest `protobuf:"bytes,5,opt,name=consensus,proto3,oneof"`
}
type Message_Drand ¶
type Message_Drand struct {
Drand *DrandRequest `protobuf:"bytes,6,opt,name=drand,proto3,oneof"`
}
type Message_LotteryRequest ¶
type Message_LotteryRequest struct {
LotteryRequest *LotteryRequest `protobuf:"bytes,8,opt,name=lottery_request,json=lotteryRequest,proto3,oneof"`
}
type Message_Staking ¶
type Message_Staking struct {
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 `protobuf:"varint,1,opt,name=service_type,json=serviceType,proto3,enum=message.ServiceType" json:"service_type,omitempty"` Type MessageType `protobuf:"varint,2,opt,name=type,proto3,enum=message.MessageType" json:"type,omitempty"` // Types that are valid to be assigned to Response: // *Response_LotteryResponse Response isResponse_Response `protobuf_oneof:"response"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Response) Descriptor ¶
func (*Response) GetLotteryResponse ¶
func (m *Response) GetLotteryResponse() *LotteryResponse
func (*Response) GetResponse ¶
func (m *Response) GetResponse() isResponse_Response
func (*Response) GetServiceType ¶
func (m *Response) GetServiceType() ServiceType
func (*Response) GetType ¶
func (m *Response) GetType() MessageType
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) XXX_DiscardUnknown ¶
func (m *Response) XXX_DiscardUnknown()
func (*Response) XXX_Marshal ¶
func (*Response) XXX_OneofWrappers ¶
func (*Response) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*Response) XXX_Unmarshal ¶
type Response_LotteryResponse ¶
type Response_LotteryResponse struct {
LotteryResponse *LotteryResponse `protobuf:"bytes,3,opt,name=lottery_response,json=lotteryResponse,proto3,oneof"`
}
type Server ¶
type Server struct { 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 ServiceType_STAKING ServiceType = 1 ServiceType_DRAND ServiceType = 2 ServiceType_CLIENT_SUPPORT ServiceType = 3 )
func (ServiceType) EnumDescriptor ¶
func (ServiceType) EnumDescriptor() ([]byte, []int)
func (ServiceType) String ¶
func (x ServiceType) String() string
type StakingRequest ¶
type StakingRequest struct { Transaction []byte `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Staking Request from new node to beacon node.
func (*StakingRequest) Descriptor ¶
func (*StakingRequest) Descriptor() ([]byte, []int)
func (*StakingRequest) GetNodeId ¶
func (m *StakingRequest) GetNodeId() string
func (*StakingRequest) GetTransaction ¶
func (m *StakingRequest) GetTransaction() []byte
func (*StakingRequest) ProtoMessage ¶
func (*StakingRequest) ProtoMessage()
func (*StakingRequest) Reset ¶
func (m *StakingRequest) Reset()
func (*StakingRequest) String ¶
func (m *StakingRequest) String() string
func (*StakingRequest) XXX_DiscardUnknown ¶
func (m *StakingRequest) XXX_DiscardUnknown()
func (*StakingRequest) XXX_Marshal ¶
func (m *StakingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StakingRequest) XXX_Merge ¶
func (m *StakingRequest) XXX_Merge(src proto.Message)
func (*StakingRequest) XXX_Size ¶
func (m *StakingRequest) XXX_Size() int
func (*StakingRequest) XXX_Unmarshal ¶
func (m *StakingRequest) XXX_Unmarshal(b []byte) error
type UnimplementedClientServiceServer ¶ added in v1.1.1
type UnimplementedClientServiceServer struct { }
UnimplementedClientServiceServer can be embedded to have forward compatible implementations.
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"` ViewchangeSig []byte `protobuf:"bytes,7,opt,name=viewchange_sig,json=viewchangeSig,proto3" json:"viewchange_sig,omitempty"` ViewidSig []byte `protobuf:"bytes,8,opt,name=viewid_sig,json=viewidSig,proto3" json:"viewid_sig,omitempty"` // 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"` 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"` M3Bitmap []byte `protobuf:"bytes,12,opt,name=m3_bitmap,json=m3Bitmap,proto3" json:"m3_bitmap,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ViewChangeRequest) Descriptor ¶
func (*ViewChangeRequest) Descriptor() ([]byte, []int)
func (*ViewChangeRequest) GetBlockNum ¶
func (m *ViewChangeRequest) GetBlockNum() uint64
func (*ViewChangeRequest) GetLeaderPubkey ¶
func (m *ViewChangeRequest) GetLeaderPubkey() []byte
func (*ViewChangeRequest) GetM2Aggsigs ¶
func (m *ViewChangeRequest) GetM2Aggsigs() []byte
func (*ViewChangeRequest) GetM2Bitmap ¶
func (m *ViewChangeRequest) GetM2Bitmap() []byte
func (*ViewChangeRequest) GetM3Aggsigs ¶
func (m *ViewChangeRequest) GetM3Aggsigs() []byte
func (*ViewChangeRequest) GetM3Bitmap ¶
func (m *ViewChangeRequest) GetM3Bitmap() []byte
func (*ViewChangeRequest) GetPayload ¶
func (m *ViewChangeRequest) GetPayload() []byte
func (*ViewChangeRequest) GetSenderPubkey ¶
func (m *ViewChangeRequest) GetSenderPubkey() []byte
func (*ViewChangeRequest) GetShardId ¶
func (m *ViewChangeRequest) GetShardId() uint32
func (*ViewChangeRequest) GetViewId ¶
func (m *ViewChangeRequest) GetViewId() uint64
func (*ViewChangeRequest) GetViewchangeSig ¶
func (m *ViewChangeRequest) GetViewchangeSig() []byte
func (*ViewChangeRequest) GetViewidSig ¶
func (m *ViewChangeRequest) GetViewidSig() []byte
func (*ViewChangeRequest) ProtoMessage ¶
func (*ViewChangeRequest) ProtoMessage()
func (*ViewChangeRequest) Reset ¶
func (m *ViewChangeRequest) Reset()
func (*ViewChangeRequest) String ¶
func (m *ViewChangeRequest) String() string
func (*ViewChangeRequest) XXX_DiscardUnknown ¶
func (m *ViewChangeRequest) XXX_DiscardUnknown()
func (*ViewChangeRequest) XXX_Marshal ¶
func (m *ViewChangeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ViewChangeRequest) XXX_Merge ¶
func (m *ViewChangeRequest) XXX_Merge(src proto.Message)
func (*ViewChangeRequest) XXX_Size ¶
func (m *ViewChangeRequest) XXX_Size() int
func (*ViewChangeRequest) XXX_Unmarshal ¶
func (m *ViewChangeRequest) XXX_Unmarshal(b []byte) error