Commit e47ee4db authored by vicotor's avatar vicotor

update protocol

parent 422eba15
...@@ -37,7 +37,7 @@ message TaskContent { ...@@ -37,7 +37,7 @@ message TaskContent {
} }
message TaskResponse { message TaskResponse {
string task_id = 1; string task_uuid = 1;
bytes task_result = 2; bytes task_result = 2;
string task_uid = 3; string task_uid = 3;
string task_fee = 4; string task_fee = 4;
......
...@@ -202,7 +202,7 @@ func (*TaskContent) XXX_MessageName() string { ...@@ -202,7 +202,7 @@ func (*TaskContent) XXX_MessageName() string {
} }
type TaskResponse struct { type TaskResponse struct {
TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` TaskUuid string `protobuf:"bytes,1,opt,name=task_uuid,json=taskUuid,proto3" json:"task_uuid,omitempty"`
TaskResult []byte `protobuf:"bytes,2,opt,name=task_result,json=taskResult,proto3" json:"task_result,omitempty"` TaskResult []byte `protobuf:"bytes,2,opt,name=task_result,json=taskResult,proto3" json:"task_result,omitempty"`
TaskUid string `protobuf:"bytes,3,opt,name=task_uid,json=taskUid,proto3" json:"task_uid,omitempty"` TaskUid string `protobuf:"bytes,3,opt,name=task_uid,json=taskUid,proto3" json:"task_uid,omitempty"`
TaskFee string `protobuf:"bytes,4,opt,name=task_fee,json=taskFee,proto3" json:"task_fee,omitempty"` TaskFee string `protobuf:"bytes,4,opt,name=task_fee,json=taskFee,proto3" json:"task_fee,omitempty"`
...@@ -237,9 +237,9 @@ func (m *TaskResponse) XXX_DiscardUnknown() { ...@@ -237,9 +237,9 @@ func (m *TaskResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_TaskResponse proto.InternalMessageInfo var xxx_messageInfo_TaskResponse proto.InternalMessageInfo
func (m *TaskResponse) GetTaskId() string { func (m *TaskResponse) GetTaskUuid() string {
if m != nil { if m != nil {
return m.TaskId return m.TaskUuid
} }
return "" return ""
} }
...@@ -292,43 +292,43 @@ func init() { ...@@ -292,43 +292,43 @@ func init() {
func init() { proto.RegisterFile("base/v1/odysseus.proto", fileDescriptor_91b466c680c1fa25) } func init() { proto.RegisterFile("base/v1/odysseus.proto", fileDescriptor_91b466c680c1fa25) }
var fileDescriptor_91b466c680c1fa25 = []byte{ var fileDescriptor_91b466c680c1fa25 = []byte{
// 601 bytes of a gzipped FileDescriptorProto // 594 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x93, 0xcb, 0x6e, 0xd3, 0x4c, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x93, 0xcd, 0x6e, 0xd3, 0x40,
0x14, 0xc7, 0x3b, 0x4e, 0xbf, 0x26, 0x99, 0x24, 0x4d, 0x3a, 0x9f, 0x00, 0x53, 0x04, 0x8d, 0x8a, 0x10, 0xc7, 0xbb, 0x4e, 0x69, 0x92, 0x4d, 0xd2, 0xa4, 0x8b, 0x00, 0x53, 0x04, 0x8d, 0x8a, 0x40,
0x40, 0xa1, 0x12, 0xb1, 0x02, 0xbb, 0x76, 0x85, 0x03, 0x45, 0x45, 0xaa, 0x88, 0xd2, 0x0b, 0x15, 0xa1, 0x12, 0xb1, 0x02, 0xb7, 0xf6, 0x84, 0x03, 0x45, 0x45, 0xaa, 0x88, 0xd2, 0x0f, 0x2a, 0x54,
0xaa, 0x14, 0x4d, 0xec, 0x53, 0xd7, 0x8a, 0xed, 0xb1, 0xe6, 0x52, 0xe4, 0xb7, 0x41, 0x2c, 0x79, 0x29, 0xda, 0xd8, 0x53, 0xd7, 0x8a, 0xed, 0xb5, 0xf6, 0xa3, 0xc8, 0x6f, 0x83, 0x38, 0xf2, 0x24,
0x0f, 0x24, 0xc4, 0x63, 0xc0, 0x8e, 0x97, 0x00, 0xcd, 0x8c, 0xe3, 0x2a, 0x0b, 0x56, 0x99, 0xfc, 0xc0, 0x63, 0xc0, 0x8d, 0x97, 0x00, 0xed, 0xae, 0xe3, 0xaa, 0x07, 0x38, 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 0x9a, 0x7f, 0x76, 0xf6, 0xd5, 0xa9,
0x6a, 0xfe, 0xc5, 0xc5, 0x57, 0xa7, 0xee, 0x6b, 0x8f, 0xf3, 0xd1, 0x0f, 0x7b, 0xba, 0x3c, 0x1f, 0xfb, 0x3a, 0xc7, 0xe9, 0xe8, 0x87, 0xb5, 0xce, 0x4f, 0x47, 0x3f, 0x9d, 0xdb, 0xa5, 0x75, 0xfe,
0xfd, 0x74, 0xfe, 0x2f, 0x4f, 0x97, 0x6f, 0x27, 0xfe, 0x31, 0x48, 0x1a, 0x52, 0x49, 0x7f, 0x3b, 0x76, 0xe2, 0x1f, 0x82, 0xa4, 0x21, 0x95, 0xf4, 0xb7, 0xd3, 0xd0, 0x74, 0x77, 0xf7, 0x74, 0x34,
0x0d, 0x4d, 0xf7, 0xf7, 0xcf, 0x47, 0xf3, 0x0d, 0x13, 0xf3, 0xe5, 0xdf, 0x00, 0x00, 0x00, 0xff, 0x5f, 0x33, 0x31, 0x5f, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x8d, 0xdb, 0x48, 0x1a, 0xed, 0x03,
0xff, 0xbc, 0x9b, 0x79, 0xf1, 0xe9, 0x03, 0x00, 0x00, 0x00, 0x00,
} }
...@@ -55,8 +55,9 @@ message DeviceInfoRequest { ...@@ -55,8 +55,9 @@ message DeviceInfoRequest {
message DeviceInfoResponse { message DeviceInfoResponse {
string miner_pubkey = 1; string miner_pubkey = 1;
repeated DeviceInfo devices = 2; string benefit_address = 2;
bytes device_signature = 3; // 由测试程序对设备信息进行签名 repeated DeviceInfo devices = 3;
bytes device_signature = 4; // 由测试程序对设备信息进行签名
} }
message DeviceUsage { message DeviceUsage {
...@@ -69,7 +70,7 @@ message StatusResponse { ...@@ -69,7 +70,7 @@ message StatusResponse {
} }
message PushTaskMessage { message PushTaskMessage {
string task_id = 1; string task_uuid = 1;
base.v1.TaskType task_type = 2; base.v1.TaskType task_type = 2;
uint64 workload = 3; uint64 workload = 3;
string task_cmd = 4; // string task_cmd = 4; //
...@@ -81,7 +82,7 @@ message PushTaskMessage { ...@@ -81,7 +82,7 @@ message PushTaskMessage {
// manager_signature = sign(hash((task_id+hash(task_param)+hash(task_result)+container_signature+miner_signature+workload)) // manager_signature = sign(hash((task_id+hash(task_param)+hash(task_result)+container_signature+miner_signature+workload))
message SubmitTaskResult { message SubmitTaskResult {
string task_id = 1; string task_uuid = 1;
bytes container_signature = 2; // 容器签名 bytes container_signature = 2; // 容器签名
bytes miner_signature = 3; // worker 签名 bytes miner_signature = 3; // worker 签名
bytes task_result = 4; // 任务结果 bytes task_result = 4; // 任务结果
...@@ -89,7 +90,7 @@ message SubmitTaskResult { ...@@ -89,7 +90,7 @@ message SubmitTaskResult {
} }
message ProofTaskResult { message ProofTaskResult {
string task_id = 1; string task_uuid = 1;
bytes manager_signature = 2; // nodemanager 签名 bytes manager_signature = 2; // nodemanager 签名
bytes container_pubkey = 3; bytes container_pubkey = 3;
} }
...@@ -100,7 +101,7 @@ message DispatchTaskRequest { ...@@ -100,7 +101,7 @@ message DispatchTaskRequest {
} }
message DispatchTaskResponse { message DispatchTaskResponse {
string task_id = 1; string task_uuid = 1;
string miner = 2; string miner = 2;
} }
......
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