Commit 1aaee35d authored by 贾浩@五瓣科技's avatar 贾浩@五瓣科技

add witness

parent 79961ac2
......@@ -3,3 +3,4 @@ directories:
- baseapi
- scheduler
- nodemanager
- witness
......@@ -23,6 +23,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type WorkerMessage struct {
// Types that are valid to be assigned to Message:
//
// *WorkerMessage_HeartbeatResponse
// *WorkerMessage_SubmitTaskResult
// *WorkerMessage_StatusResp
......@@ -113,6 +114,7 @@ func (*WorkerMessage) XXX_OneofWrappers() []interface{} {
type ManagerMessage struct {
// Types that are valid to be assigned to Message:
//
// *ManagerMessage_HeartbeatRequest
// *ManagerMessage_PushTaskMessage
// *ManagerMessage_ProofTaskResult
......
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: witness/v1/request_response.proto
package witnessv1
import (
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type WitnessStatusRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *WitnessStatusRequest) Reset() { *m = WitnessStatusRequest{} }
func (m *WitnessStatusRequest) String() string { return proto.CompactTextString(m) }
func (*WitnessStatusRequest) ProtoMessage() {}
func (*WitnessStatusRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_fcd71b26d9e7af56, []int{0}
}
func (m *WitnessStatusRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WitnessStatusRequest.Unmarshal(m, b)
}
func (m *WitnessStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WitnessStatusRequest.Marshal(b, m, deterministic)
}
func (m *WitnessStatusRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_WitnessStatusRequest.Merge(m, src)
}
func (m *WitnessStatusRequest) XXX_Size() int {
return xxx_messageInfo_WitnessStatusRequest.Size(m)
}
func (m *WitnessStatusRequest) XXX_DiscardUnknown() {
xxx_messageInfo_WitnessStatusRequest.DiscardUnknown(m)
}
var xxx_messageInfo_WitnessStatusRequest proto.InternalMessageInfo
type WitnessStatusResponse struct {
WitnessId string `protobuf:"bytes,1,opt,name=witness_id,json=witnessId,proto3" json:"witness_id,omitempty"`
Peers []string `protobuf:"bytes,2,rep,name=peers,proto3" json:"peers,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *WitnessStatusResponse) Reset() { *m = WitnessStatusResponse{} }
func (m *WitnessStatusResponse) String() string { return proto.CompactTextString(m) }
func (*WitnessStatusResponse) ProtoMessage() {}
func (*WitnessStatusResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_fcd71b26d9e7af56, []int{1}
}
func (m *WitnessStatusResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WitnessStatusResponse.Unmarshal(m, b)
}
func (m *WitnessStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WitnessStatusResponse.Marshal(b, m, deterministic)
}
func (m *WitnessStatusResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_WitnessStatusResponse.Merge(m, src)
}
func (m *WitnessStatusResponse) XXX_Size() int {
return xxx_messageInfo_WitnessStatusResponse.Size(m)
}
func (m *WitnessStatusResponse) XXX_DiscardUnknown() {
xxx_messageInfo_WitnessStatusResponse.DiscardUnknown(m)
}
var xxx_messageInfo_WitnessStatusResponse proto.InternalMessageInfo
func (m *WitnessStatusResponse) GetWitnessId() string {
if m != nil {
return m.WitnessId
}
return ""
}
func (m *WitnessStatusResponse) GetPeers() []string {
if m != nil {
return m.Peers
}
return nil
}
type PushProofRequest struct {
Workload uint64 `protobuf:"varint,1,opt,name=workload,proto3" json:"workload,omitempty"`
TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
NmSignature string `protobuf:"bytes,3,opt,name=nm_signature,json=nmSignature,proto3" json:"nm_signature,omitempty"`
ContainerSignature string `protobuf:"bytes,4,opt,name=container_signature,json=containerSignature,proto3" json:"container_signature,omitempty"`
MinerSignature string `protobuf:"bytes,5,opt,name=miner_signature,json=minerSignature,proto3" json:"miner_signature,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PushProofRequest) Reset() { *m = PushProofRequest{} }
func (m *PushProofRequest) String() string { return proto.CompactTextString(m) }
func (*PushProofRequest) ProtoMessage() {}
func (*PushProofRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_fcd71b26d9e7af56, []int{2}
}
func (m *PushProofRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PushProofRequest.Unmarshal(m, b)
}
func (m *PushProofRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PushProofRequest.Marshal(b, m, deterministic)
}
func (m *PushProofRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_PushProofRequest.Merge(m, src)
}
func (m *PushProofRequest) XXX_Size() int {
return xxx_messageInfo_PushProofRequest.Size(m)
}
func (m *PushProofRequest) XXX_DiscardUnknown() {
xxx_messageInfo_PushProofRequest.DiscardUnknown(m)
}
var xxx_messageInfo_PushProofRequest proto.InternalMessageInfo
func (m *PushProofRequest) GetWorkload() uint64 {
if m != nil {
return m.Workload
}
return 0
}
func (m *PushProofRequest) GetTaskId() string {
if m != nil {
return m.TaskId
}
return ""
}
func (m *PushProofRequest) GetNmSignature() string {
if m != nil {
return m.NmSignature
}
return ""
}
func (m *PushProofRequest) GetContainerSignature() string {
if m != nil {
return m.ContainerSignature
}
return ""
}
func (m *PushProofRequest) GetMinerSignature() string {
if m != nil {
return m.MinerSignature
}
return ""
}
type PushProofResponse struct {
Workload uint64 `protobuf:"varint,1,opt,name=workload,proto3" json:"workload,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PushProofResponse) Reset() { *m = PushProofResponse{} }
func (m *PushProofResponse) String() string { return proto.CompactTextString(m) }
func (*PushProofResponse) ProtoMessage() {}
func (*PushProofResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_fcd71b26d9e7af56, []int{3}
}
func (m *PushProofResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PushProofResponse.Unmarshal(m, b)
}
func (m *PushProofResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PushProofResponse.Marshal(b, m, deterministic)
}
func (m *PushProofResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_PushProofResponse.Merge(m, src)
}
func (m *PushProofResponse) XXX_Size() int {
return xxx_messageInfo_PushProofResponse.Size(m)
}
func (m *PushProofResponse) XXX_DiscardUnknown() {
xxx_messageInfo_PushProofResponse.DiscardUnknown(m)
}
var xxx_messageInfo_PushProofResponse proto.InternalMessageInfo
func (m *PushProofResponse) GetWorkload() uint64 {
if m != nil {
return m.Workload
}
return 0
}
type GetMinerProofRequest struct {
Ymd string `protobuf:"bytes,1,opt,name=ymd,proto3" json:"ymd,omitempty"`
Miner string `protobuf:"bytes,2,opt,name=miner,proto3" json:"miner,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetMinerProofRequest) Reset() { *m = GetMinerProofRequest{} }
func (m *GetMinerProofRequest) String() string { return proto.CompactTextString(m) }
func (*GetMinerProofRequest) ProtoMessage() {}
func (*GetMinerProofRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_fcd71b26d9e7af56, []int{4}
}
func (m *GetMinerProofRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetMinerProofRequest.Unmarshal(m, b)
}
func (m *GetMinerProofRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetMinerProofRequest.Marshal(b, m, deterministic)
}
func (m *GetMinerProofRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetMinerProofRequest.Merge(m, src)
}
func (m *GetMinerProofRequest) XXX_Size() int {
return xxx_messageInfo_GetMinerProofRequest.Size(m)
}
func (m *GetMinerProofRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetMinerProofRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetMinerProofRequest proto.InternalMessageInfo
func (m *GetMinerProofRequest) GetYmd() string {
if m != nil {
return m.Ymd
}
return ""
}
func (m *GetMinerProofRequest) GetMiner() string {
if m != nil {
return m.Miner
}
return ""
}
type GetMinerProofResponse struct {
Workload uint64 `protobuf:"varint,1,opt,name=workload,proto3" json:"workload,omitempty"`
Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetMinerProofResponse) Reset() { *m = GetMinerProofResponse{} }
func (m *GetMinerProofResponse) String() string { return proto.CompactTextString(m) }
func (*GetMinerProofResponse) ProtoMessage() {}
func (*GetMinerProofResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_fcd71b26d9e7af56, []int{5}
}
func (m *GetMinerProofResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetMinerProofResponse.Unmarshal(m, b)
}
func (m *GetMinerProofResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetMinerProofResponse.Marshal(b, m, deterministic)
}
func (m *GetMinerProofResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetMinerProofResponse.Merge(m, src)
}
func (m *GetMinerProofResponse) XXX_Size() int {
return xxx_messageInfo_GetMinerProofResponse.Size(m)
}
func (m *GetMinerProofResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GetMinerProofResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GetMinerProofResponse proto.InternalMessageInfo
func (m *GetMinerProofResponse) GetWorkload() uint64 {
if m != nil {
return m.Workload
}
return 0
}
func (m *GetMinerProofResponse) GetAmount() string {
if m != nil {
return m.Amount
}
return ""
}
type GetProofRequest struct {
Ymd string `protobuf:"bytes,1,opt,name=ymd,proto3" json:"ymd,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetProofRequest) Reset() { *m = GetProofRequest{} }
func (m *GetProofRequest) String() string { return proto.CompactTextString(m) }
func (*GetProofRequest) ProtoMessage() {}
func (*GetProofRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_fcd71b26d9e7af56, []int{6}
}
func (m *GetProofRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetProofRequest.Unmarshal(m, b)
}
func (m *GetProofRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetProofRequest.Marshal(b, m, deterministic)
}
func (m *GetProofRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetProofRequest.Merge(m, src)
}
func (m *GetProofRequest) XXX_Size() int {
return xxx_messageInfo_GetProofRequest.Size(m)
}
func (m *GetProofRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetProofRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetProofRequest proto.InternalMessageInfo
func (m *GetProofRequest) GetYmd() string {
if m != nil {
return m.Ymd
}
return ""
}
type GetProofResponse struct {
Workload uint64 `protobuf:"varint,1,opt,name=workload,proto3" json:"workload,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetProofResponse) Reset() { *m = GetProofResponse{} }
func (m *GetProofResponse) String() string { return proto.CompactTextString(m) }
func (*GetProofResponse) ProtoMessage() {}
func (*GetProofResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_fcd71b26d9e7af56, []int{7}
}
func (m *GetProofResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetProofResponse.Unmarshal(m, b)
}
func (m *GetProofResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetProofResponse.Marshal(b, m, deterministic)
}
func (m *GetProofResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetProofResponse.Merge(m, src)
}
func (m *GetProofResponse) XXX_Size() int {
return xxx_messageInfo_GetProofResponse.Size(m)
}
func (m *GetProofResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GetProofResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GetProofResponse proto.InternalMessageInfo
func (m *GetProofResponse) GetWorkload() uint64 {
if m != nil {
return m.Workload
}
return 0
}
type GetWithdrawProofRequest struct {
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetWithdrawProofRequest) Reset() { *m = GetWithdrawProofRequest{} }
func (m *GetWithdrawProofRequest) String() string { return proto.CompactTextString(m) }
func (*GetWithdrawProofRequest) ProtoMessage() {}
func (*GetWithdrawProofRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_fcd71b26d9e7af56, []int{8}
}
func (m *GetWithdrawProofRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetWithdrawProofRequest.Unmarshal(m, b)
}
func (m *GetWithdrawProofRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetWithdrawProofRequest.Marshal(b, m, deterministic)
}
func (m *GetWithdrawProofRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetWithdrawProofRequest.Merge(m, src)
}
func (m *GetWithdrawProofRequest) XXX_Size() int {
return xxx_messageInfo_GetWithdrawProofRequest.Size(m)
}
func (m *GetWithdrawProofRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetWithdrawProofRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetWithdrawProofRequest proto.InternalMessageInfo
func (m *GetWithdrawProofRequest) GetAddress() string {
if m != nil {
return m.Address
}
return ""
}
type GetWithdrawProofResponse struct {
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"`
MerkleProof []string `protobuf:"bytes,3,rep,name=merkleProof,proto3" json:"merkleProof,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetWithdrawProofResponse) Reset() { *m = GetWithdrawProofResponse{} }
func (m *GetWithdrawProofResponse) String() string { return proto.CompactTextString(m) }
func (*GetWithdrawProofResponse) ProtoMessage() {}
func (*GetWithdrawProofResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_fcd71b26d9e7af56, []int{9}
}
func (m *GetWithdrawProofResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetWithdrawProofResponse.Unmarshal(m, b)
}
func (m *GetWithdrawProofResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetWithdrawProofResponse.Marshal(b, m, deterministic)
}
func (m *GetWithdrawProofResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetWithdrawProofResponse.Merge(m, src)
}
func (m *GetWithdrawProofResponse) XXX_Size() int {
return xxx_messageInfo_GetWithdrawProofResponse.Size(m)
}
func (m *GetWithdrawProofResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GetWithdrawProofResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GetWithdrawProofResponse proto.InternalMessageInfo
func (m *GetWithdrawProofResponse) GetAddress() string {
if m != nil {
return m.Address
}
return ""
}
func (m *GetWithdrawProofResponse) GetAmount() string {
if m != nil {
return m.Amount
}
return ""
}
func (m *GetWithdrawProofResponse) GetMerkleProof() []string {
if m != nil {
return m.MerkleProof
}
return nil
}
func init() {
proto.RegisterType((*WitnessStatusRequest)(nil), "witness.v1.witnessStatusRequest")
proto.RegisterType((*WitnessStatusResponse)(nil), "witness.v1.witnessStatusResponse")
proto.RegisterType((*PushProofRequest)(nil), "witness.v1.pushProofRequest")
proto.RegisterType((*PushProofResponse)(nil), "witness.v1.pushProofResponse")
proto.RegisterType((*GetMinerProofRequest)(nil), "witness.v1.getMinerProofRequest")
proto.RegisterType((*GetMinerProofResponse)(nil), "witness.v1.getMinerProofResponse")
proto.RegisterType((*GetProofRequest)(nil), "witness.v1.getProofRequest")
proto.RegisterType((*GetProofResponse)(nil), "witness.v1.getProofResponse")
proto.RegisterType((*GetWithdrawProofRequest)(nil), "witness.v1.getWithdrawProofRequest")
proto.RegisterType((*GetWithdrawProofResponse)(nil), "witness.v1.getWithdrawProofResponse")
}
func init() { proto.RegisterFile("witness/v1/request_response.proto", fileDescriptor_fcd71b26d9e7af56) }
var fileDescriptor_fcd71b26d9e7af56 = []byte{
// 480 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0xc1, 0x6a, 0xdb, 0x40,
0x10, 0x45, 0x52, 0xe2, 0xd4, 0xe3, 0x92, 0xb8, 0x5b, 0xc7, 0x11, 0x85, 0x82, 0xa3, 0x1e, 0x9a,
0x4b, 0x25, 0x44, 0x6e, 0x29, 0xf4, 0xe0, 0x4b, 0x08, 0x6d, 0xc0, 0x38, 0x60, 0x87, 0x12, 0x30,
0x1b, 0x6b, 0x2a, 0x0b, 0x5b, 0xbb, 0xee, 0xee, 0xca, 0x26, 0xbf, 0xd3, 0x63, 0xbf, 0xa0, 0x1f,
0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 0xaf, 0x15, 0xb8, 0x1b, 0x84, 0xbf, 0xed, 0x76, 0x05, 0xee, 0x2e, 0x7b, 0xdd,
0x6b, 0x54, 0x34, 0xa2, 0x8a, 0xfe, 0xb1, 0x1b, 0xe6, 0xe2, 0xe2, 0x62, 0x10, 0xde, 0xd7, 0xb4,
0xcb, 0xf9, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x43, 0x72, 0x70, 0x2a, 0xd7, 0x03, 0x00, 0x00,
}
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: witness/v1/service.proto
package witnessv1
import (
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
func init() { proto.RegisterFile("witness/v1/service.proto", fileDescriptor_687af857651c0e7f) }
var fileDescriptor_687af857651c0e7f = []byte{
// 337 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xc1, 0x4a, 0xf3, 0x40,
0x10, 0xc7, 0xbf, 0xa6, 0xf0, 0xa1, 0xab, 0x2d, 0x92, 0x83, 0x48, 0xad, 0x60, 0xd5, 0xab, 0x59,
0x56, 0x6f, 0xf5, 0xd6, 0xcb, 0x82, 0x50, 0x08, 0x0a, 0x69, 0x91, 0x42, 0x49, 0xd3, 0x31, 0x0d,
0xd8, 0x6c, 0xdd, 0x9d, 0xa4, 0xf8, 0x3a, 0x1e, 0x3d, 0x79, 0xf2, 0x21, 0x7c, 0x0c, 0x8f, 0x3e,
0x85, 0xd8, 0xdd, 0xa4, 0x49, 0xa8, 0xbd, 0xcd, 0xcc, 0xff, 0x3f, 0xbf, 0x19, 0x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, 0xab, 0xfb, 0x07, 0xe2, 0x89, 0x86, 0x10, 0xd3, 0x55,
0x42, 0x43, 0x41, 0xd7, 0x1f, 0x73, 0x63, 0xc2, 0x94, 0xbd, 0x5a, 0xf5, 0xc1, 0x70, 0xf8, 0x66,
0x11, 0xf3, 0x16, 0x8e, 0xc7, 0x3e, 0xf3, 0x64, 0xe4, 0xb1, 0x2f, 0xeb, 0x70, 0x9d, 0x8c, 0xb8,
0xdb, 0xeb, 0x03, 0xfa, 0x53, 0x1f, 0xfd, 0x6f, 0x6b, 0xcf, 0x08, 0xdd, 0xae, 0xc7, 0x26, 0xff,
0x57, 0x53, 0xae, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xd8, 0x30, 0x98, 0x73, 0xbd, 0x02, 0x00,
0x00,
}
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc (unknown)
// source: witness/v1/service.proto
package witnessv1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// WitnessServiceClient is the client API for WitnessService 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.
type WitnessServiceClient interface {
WitnessStatus(ctx context.Context, in *WitnessStatusRequest, opts ...grpc.CallOption) (*WitnessStatusResponse, error)
PushProof(ctx context.Context, in *PushProofRequest, opts ...grpc.CallOption) (*PushProofResponse, error)
GetMinerProof(ctx context.Context, in *GetMinerProofRequest, opts ...grpc.CallOption) (*GetMinerProofResponse, error)
GetProof(ctx context.Context, in *GetProofRequest, opts ...grpc.CallOption) (*GetProofResponse, error)
GetWithdrawProof(ctx context.Context, in *GetWithdrawProofRequest, opts ...grpc.CallOption) (*GetWithdrawProofResponse, error)
}
type witnessServiceClient struct {
cc grpc.ClientConnInterface
}
func NewWitnessServiceClient(cc grpc.ClientConnInterface) WitnessServiceClient {
return &witnessServiceClient{cc}
}
func (c *witnessServiceClient) WitnessStatus(ctx context.Context, in *WitnessStatusRequest, opts ...grpc.CallOption) (*WitnessStatusResponse, error) {
out := new(WitnessStatusResponse)
err := c.cc.Invoke(ctx, "/witness.v1.witnessService/WitnessStatus", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *witnessServiceClient) PushProof(ctx context.Context, in *PushProofRequest, opts ...grpc.CallOption) (*PushProofResponse, error) {
out := new(PushProofResponse)
err := c.cc.Invoke(ctx, "/witness.v1.witnessService/PushProof", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *witnessServiceClient) GetMinerProof(ctx context.Context, in *GetMinerProofRequest, opts ...grpc.CallOption) (*GetMinerProofResponse, error) {
out := new(GetMinerProofResponse)
err := c.cc.Invoke(ctx, "/witness.v1.witnessService/GetMinerProof", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *witnessServiceClient) GetProof(ctx context.Context, in *GetProofRequest, opts ...grpc.CallOption) (*GetProofResponse, error) {
out := new(GetProofResponse)
err := c.cc.Invoke(ctx, "/witness.v1.witnessService/GetProof", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *witnessServiceClient) GetWithdrawProof(ctx context.Context, in *GetWithdrawProofRequest, opts ...grpc.CallOption) (*GetWithdrawProofResponse, error) {
out := new(GetWithdrawProofResponse)
err := c.cc.Invoke(ctx, "/witness.v1.witnessService/GetWithdrawProof", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// WitnessServiceServer is the server API for WitnessService service.
// All implementations must embed UnimplementedWitnessServiceServer
// for forward compatibility
type WitnessServiceServer interface {
WitnessStatus(context.Context, *WitnessStatusRequest) (*WitnessStatusResponse, error)
PushProof(context.Context, *PushProofRequest) (*PushProofResponse, error)
GetMinerProof(context.Context, *GetMinerProofRequest) (*GetMinerProofResponse, error)
GetProof(context.Context, *GetProofRequest) (*GetProofResponse, error)
GetWithdrawProof(context.Context, *GetWithdrawProofRequest) (*GetWithdrawProofResponse, error)
mustEmbedUnimplementedWitnessServiceServer()
}
// UnimplementedWitnessServiceServer must be embedded to have forward compatible implementations.
type UnimplementedWitnessServiceServer struct {
}
func (UnimplementedWitnessServiceServer) WitnessStatus(context.Context, *WitnessStatusRequest) (*WitnessStatusResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method WitnessStatus not implemented")
}
func (UnimplementedWitnessServiceServer) PushProof(context.Context, *PushProofRequest) (*PushProofResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PushProof not implemented")
}
func (UnimplementedWitnessServiceServer) GetMinerProof(context.Context, *GetMinerProofRequest) (*GetMinerProofResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetMinerProof not implemented")
}
func (UnimplementedWitnessServiceServer) GetProof(context.Context, *GetProofRequest) (*GetProofResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetProof not implemented")
}
func (UnimplementedWitnessServiceServer) GetWithdrawProof(context.Context, *GetWithdrawProofRequest) (*GetWithdrawProofResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetWithdrawProof not implemented")
}
func (UnimplementedWitnessServiceServer) mustEmbedUnimplementedWitnessServiceServer() {}
// UnsafeWitnessServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to WitnessServiceServer will
// result in compilation errors.
type UnsafeWitnessServiceServer interface {
mustEmbedUnimplementedWitnessServiceServer()
}
func RegisterWitnessServiceServer(s grpc.ServiceRegistrar, srv WitnessServiceServer) {
s.RegisterService(&WitnessService_ServiceDesc, srv)
}
func _WitnessService_WitnessStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(WitnessStatusRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WitnessServiceServer).WitnessStatus(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/witness.v1.witnessService/WitnessStatus",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WitnessServiceServer).WitnessStatus(ctx, req.(*WitnessStatusRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WitnessService_PushProof_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PushProofRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WitnessServiceServer).PushProof(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/witness.v1.witnessService/PushProof",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WitnessServiceServer).PushProof(ctx, req.(*PushProofRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WitnessService_GetMinerProof_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetMinerProofRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WitnessServiceServer).GetMinerProof(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/witness.v1.witnessService/GetMinerProof",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WitnessServiceServer).GetMinerProof(ctx, req.(*GetMinerProofRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WitnessService_GetProof_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetProofRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WitnessServiceServer).GetProof(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/witness.v1.witnessService/GetProof",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WitnessServiceServer).GetProof(ctx, req.(*GetProofRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WitnessService_GetWithdrawProof_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetWithdrawProofRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WitnessServiceServer).GetWithdrawProof(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/witness.v1.witnessService/GetWithdrawProof",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WitnessServiceServer).GetWithdrawProof(ctx, req.(*GetWithdrawProofRequest))
}
return interceptor(ctx, in, info, handler)
}
// WitnessService_ServiceDesc is the grpc.ServiceDesc for WitnessService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var WitnessService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "witness.v1.witnessService",
HandlerType: (*WitnessServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "WitnessStatus",
Handler: _WitnessService_WitnessStatus_Handler,
},
{
MethodName: "PushProof",
Handler: _WitnessService_PushProof_Handler,
},
{
MethodName: "GetMinerProof",
Handler: _WitnessService_GetMinerProof_Handler,
},
{
MethodName: "GetProof",
Handler: _WitnessService_GetProof_Handler,
},
{
MethodName: "GetWithdrawProof",
Handler: _WitnessService_GetWithdrawProof_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "witness/v1/service.proto",
}
syntax = "proto3";
package scheduler.v1;
package witness.v1;
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
import "scheduler/v1/resource.proto";
message witnessStatusRequest {
}
message witnessStatusResponse {
string witness_id = 1;
repeated string peers = 2;
}
message pushProofRequest {
uint64 workload = 1;
string task_id = 2;
string nm_signature = 3;
string container_signature = 4;
string miner_signature = 5;
}
message pushProofResponse {
uint64 workload = 1;
}
message getMinerProofRequest {
string ymd = 1;
string miner = 2;
}
message getMinerProofResponse {
uint64 workload = 1;
string amount = 2;
}
message getProofRequest {
string ymd = 1;
}
message getProofResponse {
uint64 workload = 1;
}
message getWithdrawProofRequest {
string address = 1;
}
message getWithdrawProofResponse {
string address = 1;
string amount = 2;
repeated string merkleProof = 3;
}
\ No newline at end of file
syntax = "proto3";
package scheduler.v1;
package witness.v1;
import "google/protobuf/empty.proto";
import "scheduler/v1/request_response.proto";
import "scheduler/v1/web3.proto";
import "base/v1/eth_blocks.proto";
import "witness/v1/request_response.proto";
service SchedulerService {
// block info service
rpc BlockNumber(google.protobuf.Empty) returns (HeightResponse) {};
rpc BlockTransactionCountByHash(BlockTransactionCountByHashRequest) returns (BlockTransactionCountByHashResponse) {};
// subscribe service
rpc SubscribeNewTx(google.protobuf.Empty) returns (stream SubscribeNewTxResponse) {}
service witnessService {
rpc WitnessStatus(witnessStatusRequest) returns (witnessStatusResponse) {}; // witness status
rpc PushProof(pushProofRequest) returns (pushProofResponse) {}; // miner push proof
rpc GetMinerProof(getMinerProofRequest) returns (getMinerProofResponse) {}; // proof of a miner per day
rpc GetProof(getProofRequest) returns (getProofResponse) {}; // proof per day
rpc GetWithdrawProof(getWithdrawProofRequest) returns (getWithdrawProofResponse) {}; // get merkle proof of withdraw token
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment