Commit a053bd1e authored by vicotor's avatar vicotor

update protocol

;
parent 01297bbd
......@@ -31,6 +31,8 @@ message TaskContent {
string task_uid = 7;
string task_fee = 8;
// todo: add workload and container publickey
int64 task_workload = 9;
bytes container_pubkey = 10;
}
message TaskResponse {
......@@ -38,9 +40,6 @@ message TaskResponse {
bytes task_result = 2;
string task_uid = 3;
string task_fee = 4;
}
enum WorkerStatus {
WorkerStatusActive = 0;
WorkerStatusInActive = 1;
bool task_is_succeed = 5;
string task_error = 6;
}
\ No newline at end of file
This diff is collapsed.
......@@ -24,7 +24,6 @@ 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_Status
......@@ -154,7 +153,6 @@ 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/resource.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 ValidatedProof struct {
Miner string `protobuf:"bytes,1,opt,name=miner,proto3" json:"miner,omitempty"`
Balance uint64 `protobuf:"varint,2,opt,name=balance,proto3" json:"balance,omitempty"`
Workload uint64 `protobuf:"varint,3,opt,name=workload,proto3" json:"workload,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ValidatedProof) Reset() { *m = ValidatedProof{} }
func (m *ValidatedProof) String() string { return proto.CompactTextString(m) }
func (*ValidatedProof) ProtoMessage() {}
func (*ValidatedProof) Descriptor() ([]byte, []int) {
return fileDescriptor_8558ebcb7c19658f, []int{0}
}
func (m *ValidatedProof) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ValidatedProof.Unmarshal(m, b)
}
func (m *ValidatedProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ValidatedProof.Marshal(b, m, deterministic)
}
func (m *ValidatedProof) XXX_Merge(src proto.Message) {
xxx_messageInfo_ValidatedProof.Merge(m, src)
}
func (m *ValidatedProof) XXX_Size() int {
return xxx_messageInfo_ValidatedProof.Size(m)
}
func (m *ValidatedProof) XXX_DiscardUnknown() {
xxx_messageInfo_ValidatedProof.DiscardUnknown(m)
}
var xxx_messageInfo_ValidatedProof proto.InternalMessageInfo
func (m *ValidatedProof) GetMiner() string {
if m != nil {
return m.Miner
}
return ""
}
func (m *ValidatedProof) GetBalance() uint64 {
if m != nil {
return m.Balance
}
return 0
}
func (m *ValidatedProof) GetWorkload() uint64 {
if m != nil {
return m.Workload
}
return 0
}
func init() {
proto.RegisterType((*ValidatedProof)(nil), "witness.v1.ValidatedProof")
}
func init() { proto.RegisterFile("witness/v1/resource.proto", fileDescriptor_8558ebcb7c19658f) }
var fileDescriptor_8558ebcb7c19658f = []byte{
// 251 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2c, 0xcf, 0x2c, 0xc9,
0x4b, 0x2d, 0x2e, 0xd6, 0x2f, 0x33, 0xd4, 0x2f, 0x4a, 0x2d, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0xd5,
0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x82, 0x4a, 0xe9, 0x95, 0x19, 0x2a, 0xc5, 0x70, 0xf1,
0x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0x8c, 0x01, 0x01, 0x00,
0x00, 0xff, 0xff, 0xfc, 0xb2, 0x45, 0x84, 0x41, 0x01, 0x00, 0x00,
}
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