Commit 299e46cb authored by 贾浩@五瓣科技's avatar 贾浩@五瓣科技

update proof payload

parent e47ee4db
...@@ -24,6 +24,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package ...@@ -24,6 +24,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type WorkerMessage struct { type WorkerMessage struct {
// Types that are valid to be assigned to Message: // Types that are valid to be assigned to Message:
//
// *WorkerMessage_HeartbeatResponse // *WorkerMessage_HeartbeatResponse
// *WorkerMessage_SubmitTaskResult // *WorkerMessage_SubmitTaskResult
// *WorkerMessage_Status // *WorkerMessage_Status
...@@ -153,6 +154,7 @@ func (*WorkerMessage) XXX_OneofWrappers() []interface{} { ...@@ -153,6 +154,7 @@ func (*WorkerMessage) XXX_OneofWrappers() []interface{} {
type ManagerMessage struct { type ManagerMessage struct {
// Types that are valid to be assigned to Message: // Types that are valid to be assigned to Message:
//
// *ManagerMessage_HeartbeatRequest // *ManagerMessage_HeartbeatRequest
// *ManagerMessage_PushTaskMessage // *ManagerMessage_PushTaskMessage
// *ManagerMessage_ProofTaskResult // *ManagerMessage_ProofTaskResult
......
...@@ -98,7 +98,8 @@ func (m *WitnessStatusResponse) GetPeers() []string { ...@@ -98,7 +98,8 @@ func (m *WitnessStatusResponse) GetPeers() []string {
type PushProofRequest struct { type PushProofRequest struct {
Proofs []*Proof `protobuf:"bytes,1,rep,name=proofs,proto3" json:"proofs,omitempty"` Proofs []*Proof `protobuf:"bytes,1,rep,name=proofs,proto3" json:"proofs,omitempty"`
Miner string `protobuf:"bytes,2,opt,name=miner,proto3" json:"miner,omitempty"` RewardAddress string `protobuf:"bytes,2,opt,name=reward_address,json=rewardAddress,proto3" json:"reward_address,omitempty"`
MinerAddress string `protobuf:"bytes,3,opt,name=miner_address,json=minerAddress,proto3" json:"miner_address,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
...@@ -135,9 +136,16 @@ func (m *PushProofRequest) GetProofs() []*Proof { ...@@ -135,9 +136,16 @@ func (m *PushProofRequest) GetProofs() []*Proof {
return nil return nil
} }
func (m *PushProofRequest) GetMiner() string { func (m *PushProofRequest) GetRewardAddress() string {
if m != nil { if m != nil {
return m.Miner return m.RewardAddress
}
return ""
}
func (m *PushProofRequest) GetMinerAddress() string {
if m != nil {
return m.MinerAddress
} }
return "" return ""
} }
...@@ -543,40 +551,42 @@ func init() { ...@@ -543,40 +551,42 @@ func init() {
func init() { proto.RegisterFile("witness/v1/request_response.proto", fileDescriptor_fcd71b26d9e7af56) } func init() { proto.RegisterFile("witness/v1/request_response.proto", fileDescriptor_fcd71b26d9e7af56) }
var fileDescriptor_fcd71b26d9e7af56 = []byte{ var fileDescriptor_fcd71b26d9e7af56 = []byte{
// 548 bytes of a gzipped FileDescriptorProto // 584 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0xcd, 0x6e, 0xd3, 0x40, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xdd, 0x6e, 0xd3, 0x30,
0x10, 0x96, 0xed, 0xe6, 0x6f, 0x82, 0xda, 0x64, 0x49, 0x53, 0x03, 0x42, 0x0a, 0xe6, 0x40, 0x10, 0x14, 0x56, 0x9a, 0xad, 0x5d, 0xcf, 0xfe, 0x3a, 0xd3, 0x6d, 0x01, 0x84, 0x54, 0x32, 0x21, 0x8a,
0xc2, 0x96, 0xe9, 0xad, 0x48, 0x1c, 0x72, 0x09, 0x15, 0x54, 0x8a, 0x12, 0x29, 0xa9, 0x50, 0xa5, 0x10, 0x89, 0xc2, 0xee, 0x86, 0x84, 0x44, 0x6f, 0xca, 0x04, 0x93, 0xaa, 0x4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0x24, 0xe5, 0x8b, 0xc5, 0x2b, 0xf9, 0x05, 0x0c, 0xe8, 0xd8, 0x1d,
0xc1, 0x4d, 0xb7, 0xd7, 0xb9, 0x22, 0x02, 0x7b, 0x58, 0xe0, 0xdf, 0x7a, 0x55, 0x25, 0x2e, 0x2e, 0x92, 0xc4, 0x95, 0xc0, 0x1d, 0x52, 0xb7, 0xf8, 0x34, 0xde, 0xe8, 0xe5, 0xcc, 0xfb, 0x5a, 0x32,
0x86, 0xee, 0x6d, 0x51, 0xba, 0x9c, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xbf, 0x71, 0x5a, 0x34, 0x7b, 0x57, 0x57, 0xdf, 0x4a, 0xa0, 0x3f, 0x02, 0xa7, 0xeb, 0xfd, 0x58, 0x80, 0xeb, 0xae, 0xf7,
0x63, 0x04, 0x00, 0x00, 0xb3, 0x74, 0x54, 0x80, 0xeb, 0x76, 0xa7, 0x75, 0x41, 0x04, 0x0e, 0xb0, 0xc0, 0xbf, 0x4a, 0xdb,
0x3a, 0x70, 0x76, 0xd6, 0xf5, 0x6e, 0xca, 0xd2, 0xe5, 0xf4, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff,
0xb7, 0xc2, 0xbe, 0x65, 0x9a, 0x04, 0x00, 0x00,
} }
...@@ -79,7 +79,7 @@ message PushTaskMessage { ...@@ -79,7 +79,7 @@ message PushTaskMessage {
// container_signature = sign(hash(task_id+hash(task_param)+hash(task_result))) // container_signature = sign(hash(task_id+hash(task_param)+hash(task_result)))
// miner_signature = sign(hash(task_id+hash(task_param)+hash(task_result))) // miner_signature = sign(hash(task_id+hash(task_param)+hash(task_result)))
// manager_signature = sign(hash((task_id+hash(task_param)+hash(task_result)+container_signature+miner_signature+workload)) // manager_signature = sign(hash((task_id+(reward_address).Bytes()+(miner_address).Bytes()+hash(task_param)+hash(task_result)+container_signature+miner_signature+workload))
message SubmitTaskResult { message SubmitTaskResult {
string task_uuid = 1; string task_uuid = 1;
......
...@@ -12,7 +12,8 @@ message WitnessStatusResponse { ...@@ -12,7 +12,8 @@ message WitnessStatusResponse {
message PushProofRequest { message PushProofRequest {
repeated Proof proofs = 1; repeated Proof proofs = 1;
string miner = 2; string reward_address = 2;
string miner_address = 3;
} }
message Proof { message Proof {
......
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