From 479ee158eb061a3051d1341db326dd7904f21a87 Mon Sep 17 00:00:00 2001 From: hmiao <739025250@qq.com> Date: Wed, 10 Nov 2021 10:37:53 +0800 Subject: [PATCH 1/2] [doc] change some param name --- docs/contracts_en.md | 50 ++++++++++++++++++++++---------------------- docs/contracts_zh.md | 50 ++++++++++++++++++++++---------------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/docs/contracts_en.md b/docs/contracts_en.md index b6e26f5..e494022 100644 --- a/docs/contracts_en.md +++ b/docs/contracts_en.md @@ -248,7 +248,7 @@ params: | taskID | bytes32 | task ID | | round | uint64 | the sequence number of round | | owner | address | owner of SK2 (must be an offline clients in this context) | -| skmask | bytes | piece of SK2 | +| skMask | bytes | piece of SK2 | events: [SecretKeyUploaded](#SecretKeyUploaded) @@ -262,7 +262,7 @@ params: | name | type | description | | --- | --- | --- | -| taskId | bytes32 | task id | +| taskID | bytes32 | task id | | round | uint64 | the sequence number of round | events: @@ -279,28 +279,28 @@ params: |name | type | description | |--- | --- | --- | -| creator | address | creator address | -| taskId | bytes32 | task id | +| address | address | address of node which create this task | +| taskID | bytes32 | task id | | dataSet | string | dataset name | -| creatorUrl | string | server url provided by creator| +| url | string | server url of the node | | commitment | bytes32 | training code hash| ### RoundStarted triggered upon starting a new round -event RoundStarted(bytes32 taskId,uint64 round); +event RoundStarted(bytes32 taskID,uint64 round); |name | type | description | | --- | --- | --- | -| taskId | string | task Id| +| taskID | string | task ID| | round | uint64 | the sequence number of round | ### RoundEnded triggered upon finishing round -event RoundEnded(bytes32 taskId,uint64 round); +event RoundEnded(bytes32 taskID,uint64 round); |name | type | description | | --- | --- | --- | -| taskId | string | task id| +| taskID | string | task id| | round | uint64 | the sequence number of round | @@ -308,10 +308,10 @@ event RoundEnded(bytes32 taskId,uint64 round); triggered upon task developer selecting candidates -event PartnerSelected(bytes32 taskId,uint64 round,address[] addrs); +event PartnerSelected(bytes32 taskID,uint64 round,address[] addrs); |name | type | description | | --- | --- | --- | -| taskId | string | task Id| +| taskID | string | task ID| | round | uint64 | the sequence number of round | | addrs | address[] | chosen addresses | @@ -319,31 +319,31 @@ event PartnerSelected(bytes32 taskId,uint64 round,address[] addrs); ### AggregateStarted triggered upon the inauguration of aggregating phase -event AggregatStarted(bytes32 taskId,uint64 round,address[] addrs); +event AggregatStarted(bytes32 taskID,uint64 round,address[] addrs); |name | type | description | | --- | --- | --- | -| taskId | string | task id| +| taskID | string | task id| | round | uint64 | the sequence number of round | | addrs | address[] | online addresses | ### CalculateStarted triggered upon the moment of task developer deciding to calculate gradients -event CalculateStarted(bytes32 taskId,uint64 round,address[] addrs); +event CalculateStarted(bytes32 taskID,uint64 round,address[] addrs); |name | type | description | | --- | --- | --- | -| taskId | string | task id| +| taskID | string | task id| | round | uint64 | the sequence number of round | | addrs | address[] | computation nodes that has finished secret sharing | ### SeedUploaded triggered upon seed uploading succeeded -event SeedUploaded(bytes32 taskId,uint64 round,address owner,address sharee,bytes content); +event SeedUploaded(bytes32 taskID,uint64 round,address owner,address sharee,bytes content); |name | type | description | | --- | --- | --- | -| taskId | string | task Id| +| taskID | string | task ID| | round | uint64 | the sequence number of round | | owner | address | owner address | | sharee | address | sharee address | @@ -353,11 +353,11 @@ event SeedUploaded(bytes32 taskId,uint64 round,address owner,address sharee,byte ### SeedCommitmentUploaded triggered upon seed commitment uploading succeeded -event SeedCommitmentUploaded(bytes32 taskId,uint64 round,address owner,address sharee,bytes content); +event SeedCommitmentUploaded(bytes32 taskID,uint64 round,address owner,address sharee,bytes content); |name | type | description | | --- | --- | --- | -| taskId | string | task Id| +| taskID | string | task ID| | round | uint64 | the sequence number of round | | owner | address | owner address | | sharee | address | sharee address | @@ -367,11 +367,11 @@ event SeedCommitmentUploaded(bytes32 taskId,uint64 round,address owner,address s ### SecretKeyCommitmentUploaded triggered upon SecretKey commitment uploading succeeded -event SecretKeyCommitmentUploaded(bytes32 taskId,uint64 round,address owner,address sharee,bytes content); +event SecretKeyCommitmentUploaded(bytes32 taskID,uint64 round,address owner,address sharee,bytes content); |name | type | description | | --- | --- | --- | -| taskId | string | task id| +| taskID | string | task id| | round | uint64 | round number | | owner | address | owner address | | sharer | address | sharee address | @@ -381,11 +381,11 @@ event SecretKeyCommitmentUploaded(bytes32 taskId,uint64 round,address owner,addr ### SecretKeyUploaded triggered upon SecretKey uploading succeeded -event SeedCommitmentUploaded(bytes32 taskId,uint64 round,address owner,address sharer,bytes content); +event SeedCommitmentUploaded(bytes32 taskID,uint64 round,address owner,address sharer,bytes content); |name | type | description | | --- | --- | --- | -| taskId | string | task Id| +| taskID | string | task ID| | round | uint64 | round number | | owner | address | owner address | | sharee | address | sharee address | @@ -395,11 +395,11 @@ event SeedCommitmentUploaded(bytes32 taskId,uint64 round,address owner,address s ### ResultUploaded triggered upon Result uploading succeeded -event ResultUploaded(bytes32 taskId,uint64 round,address owner,bytes content); +event ResultUploaded(bytes32 taskID,uint64 round,address owner,bytes content); |name | type | description | | --- | --- | --- | -| taskId | string | task Id| +| taskID | string | task ID| | round | uint64 | round number | | owner | address | owner address | | content | bytes | result | diff --git a/docs/contracts_zh.md b/docs/contracts_zh.md index bb6200d..4c96998 100644 --- a/docs/contracts_zh.md +++ b/docs/contracts_zh.md @@ -239,7 +239,7 @@ params: | taskID | bytes32 | 任务ID | | round | uint64 | 轮次 | | owner | address | SK2的拥有者(离线的客户端) | -| skmask | bytes | SK2的秘密分享片段 | +| skMask | bytes | SK2的秘密分享片段 | events: [SecretKeyUploaded](#SecretKeyUploaded) @@ -253,7 +253,7 @@ params: | name | type | description | | --- | --- | --- | -| taskId | bytes32 | 任务ID | +| taskID | bytes32 | 任务ID | | round | uint64 | 轮次 | events: @@ -270,65 +270,65 @@ params: |name | type | description | |--- | --- | --- | -| creator | address | 创建者的地址 | -| taskId | bytes32 | 生成的任务Id | +| address | address | 创建者的地址 | +| taskID | bytes32 | 生成的任务ID | | dataSet | string | 数据集名称 | -| creatorUrl | string | 创建任务的服务器url | +| url | string | 创建任务的服务器url | | commitment | bytes32 | 任务训练代码的哈希(用于客户端校验任务训练代码)| ### RoundStarted 任务发布者新建任务时触发 -event RoundStarted(bytes32 taskId,uint64 round); +event RoundStarted(bytes32 taskID,uint64 round); |name | type | description | | --- | --- | --- | -| taskId | string | 任务Id| +| taskID | string | 任务ID| | round | uint64 | 轮次 | ### RoundEnded 任务发布者结束轮次时触发 -event RoundEnded(bytes32 taskId,uint64 round); +event RoundEnded(bytes32 taskID,uint64 round); |name | type | description | | --- | --- | --- | -| taskId | string | 任务Id| +| taskID | string | 任务ID| | round | uint64 | 轮次 | ### PartnerSelected 任务发布者结束轮次时触发 -event PartnerSelected(bytes32 taskId,uint64 round,address[] addrs); +event PartnerSelected(bytes32 taskID,uint64 round,address[] addrs); |name | type | description | | --- | --- | --- | -| taskId | string | 任务Id| +| taskID | string | 任务ID| | round | uint64 | 轮次 | | addrs | address[] | 任务发布者选择的节点地址 | ### AggregateStarted 开始安全聚合时触发 -event AggregatStarted(bytes32 taskId,uint64 round,address[] addrs); +event AggregatStarted(bytes32 taskID,uint64 round,address[] addrs); |name | type | description | | --- | --- | --- | -| taskId | string | 任务Id| +| taskID | string | 任务ID| | round | uint64 | 轮次 | | addrs | address[] | 还在线的节点地址 | ### CalculateStarted 任务发布者决定开始计算梯度时触发 -event CalculateStarted(bytes32 taskId,uint64 round,address[] addrs); +event CalculateStarted(bytes32 taskID,uint64 round,address[] addrs); |name | type | description | | --- | --- | --- | -| taskId | string | 任务Id| +| taskID | string | 任务ID| | round | uint64 | 轮次 | | addrs | address[] | 已完成secret sharing 的计算节点 | ### SeedUploaded 计算节点上传内容时触发 -event SeedUploaded(bytes32 taskId,uint64 round,address owner,address sharer,bytes content); +event SeedUploaded(bytes32 taskID,uint64 round,address owner,address sharer,bytes content); |name | type | description | | --- | --- | --- | -| taskId | string | 任务Id| +| taskID | string | 任务ID| | round | uint64 | 轮次 | | owner | address | 秘密分享拥有者的地址 | | sharer | address | 秘密分享的对象地址 | @@ -337,11 +337,11 @@ event SeedUploaded(bytes32 taskId,uint64 round,address owner,address sharer,byte ### SeedCommitmentUploaded 计算节点上传内容时触发 -event SeedCommitmentUploaded(bytes32 taskId,uint64 round,address owner,address sharer,bytes content); +event SeedCommitmentUploaded(bytes32 taskID,uint64 round,address owner,address sharer,bytes content); |name | type | description | | --- | --- | --- | -| taskId | string | 任务Id| +| taskID | string | 任务ID| | round | uint64 | 轮次 | | owner | address | 秘密分享拥有者的地址 | | sharer | address | 秘密分享的对象地址 | @@ -350,11 +350,11 @@ event SeedCommitmentUploaded(bytes32 taskId,uint64 round,address owner,address s ### SecretKeyCommitmentUploaded 计算节点上传内容时触发 -event SecretKeyCommitmentUploaded(bytes32 taskId,uint64 round,address owner,address sharer,bytes content); +event SecretKeyCommitmentUploaded(bytes32 taskID,uint64 round,address owner,address sharer,bytes content); |name | type | description | | --- | --- | --- | -| taskId | string | 任务Id| +| taskID | string | 任务ID| | round | uint64 | 轮次 | | owner | address | Sk2密钥的拥有者地址 | | sharer | address | 秘密分享的目标地址 | @@ -363,11 +363,11 @@ event SecretKeyCommitmentUploaded(bytes32 taskId,uint64 round,address owner,addr ### SecretKeyUploaded 计算节点上传内容时触发 -event SeedCommitmentUploaded(bytes32 taskId,uint64 round,address owner,address sharer,bytes content); +event SeedCommitmentUploaded(bytes32 taskID,uint64 round,address owner,address sharer,bytes content); |name | type | description | | --- | --- | --- | -| taskId | string | 任务Id| +| taskID | string | 任务ID| | round | uint64 | 轮次 | | owner | address | SK2秘密分享拥有者的地址 | | sharer | address | SK2秘密分享的对象地址 | @@ -376,11 +376,11 @@ event SeedCommitmentUploaded(bytes32 taskId,uint64 round,address owner,address s ### ResultUploaded 计算节点上传内容时触发 -event ResultUploaded(bytes32 taskId,uint64 round,address owner,bytes content); +event ResultUploaded(bytes32 taskID,uint64 round,address owner,bytes content); |name | type | description | | --- | --- | --- | -| taskId | string | 任务Id| +| taskID | string | 任务ID| | round | uint64 | 轮次 | | owner | address | 梯度计算者的地址 | | content | bytes | 梯度的上传内容 | From 423178a36fae4122d777ac5f1f705ff41556c170 Mon Sep 17 00:00:00 2001 From: hmiao <739025250@qq.com> Date: Wed, 10 Nov 2021 11:39:03 +0800 Subject: [PATCH 2/2] [doc] change owner and sharee to sender and receiver --- docs/contracts_en.md | 48 +++++++++++++++++----------------- docs/contracts_zh.md | 62 ++++++++++++++++++++++---------------------- 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/docs/contracts_en.md b/docs/contracts_en.md index e494022..9b55884 100644 --- a/docs/contracts_en.md +++ b/docs/contracts_en.md @@ -52,7 +52,7 @@ events: [PartnerSelected](#PartnerSelected) -### startCalculate +### startCalculation Start calculating phase and at the same time close the secret sharing phase. The address of those who has done the secret sharing will be broadcasted via events @@ -90,7 +90,7 @@ returns: | commitment | bytes | the hash of this commitment | -### startAggregate +### startAggregation start aggregating phase as well as ending calculating phase, broadcasting the address list of clients who has uploaded result. @@ -120,8 +120,8 @@ params: | --- | --- | --- | | taskID | bytes32 | task ID | | round | uint64 | the sequence number of round | -| owner | address | the owner address | -| sharee | address | the sharee address | +| sender | address | the sender address | +| receiver | address | the receiver address | returns: @@ -178,8 +178,8 @@ params: | --- | --- | --- | | taskID | bytes32 | task ID | | round | uint64 | the sequence number of round | -| owner | address| seed owner | -| sharee | address | seed sharee | +| sender | address| seed sender | +| receiver | address | seed receiver | | seedCommitment | bytes | seed hash | events: @@ -195,8 +195,8 @@ params: | --- | --- | --- | | taskID | bytes32 | task id | | round | uint64 | the sequence number of round | -| owner | address| secret key owner | -| sharee | address | secret key sharee | +| sender | address| secret key sender | +| receiver | address | secret key receiver | | skCommitment | bytes | secret key hash | events: @@ -230,7 +230,7 @@ params: | --- | --- | --- | | taskID | bytes32 | task id | | round | uint64 | the sequence number of round | -| sharee | address | sharee address | +| receiver | address | receiver address | | seed | bytes | seed to upload | events: @@ -247,7 +247,7 @@ params: | --- | --- | --- | | taskID | bytes32 | task ID | | round | uint64 | the sequence number of round | -| owner | address | owner of SK2 (must be an offline clients in this context) | +| sender | address | sender of SK2 (must be an offline clients in this context) | | skMask | bytes | piece of SK2 | events: @@ -339,69 +339,69 @@ event CalculateStarted(bytes32 taskID,uint64 round,address[] addrs); ### SeedUploaded triggered upon seed uploading succeeded -event SeedUploaded(bytes32 taskID,uint64 round,address owner,address sharee,bytes content); +event SeedUploaded(bytes32 taskID,uint64 round,address sender,address receiver,bytes content); |name | type | description | | --- | --- | --- | | taskID | string | task ID| | round | uint64 | the sequence number of round | -| owner | address | owner address | -| sharee | address | sharee address | +| sender | address | sender address | +| receiver | address | receiver address | | seed | bytes | seed | ### SeedCommitmentUploaded triggered upon seed commitment uploading succeeded -event SeedCommitmentUploaded(bytes32 taskID,uint64 round,address owner,address sharee,bytes content); +event SeedCommitmentUploaded(bytes32 taskID,uint64 round,address sender,address receiver,bytes content); |name | type | description | | --- | --- | --- | | taskID | string | task ID| | round | uint64 | the sequence number of round | -| owner | address | owner address | -| sharee | address | sharee address | +| sender | address | sender address | +| receiver | address | receiver address | | content | bytes | seed hash | ### SecretKeyCommitmentUploaded triggered upon SecretKey commitment uploading succeeded -event SecretKeyCommitmentUploaded(bytes32 taskID,uint64 round,address owner,address sharee,bytes content); +event SecretKeyCommitmentUploaded(bytes32 taskID,uint64 round,address sender,address receiver,bytes content); |name | type | description | | --- | --- | --- | | taskID | string | task id| | round | uint64 | round number | -| owner | address | owner address | -| sharer | address | sharee address | +| sender | address | sender address | +| receiver | address | receiver address | | content | bytes | sk2 hash | ### SecretKeyUploaded triggered upon SecretKey uploading succeeded -event SeedCommitmentUploaded(bytes32 taskID,uint64 round,address owner,address sharer,bytes content); +event SeedCommitmentUploaded(bytes32 taskID,uint64 round,address sender,address receiver,bytes content); |name | type | description | | --- | --- | --- | | taskID | string | task ID| | round | uint64 | round number | -| owner | address | owner address | -| sharee | address | sharee address | +| sender | address | sender address | +| receiver | address | receiver address | | content | bytes | sk2 | ### ResultUploaded triggered upon Result uploading succeeded -event ResultUploaded(bytes32 taskID,uint64 round,address owner,bytes content); +event ResultUploaded(bytes32 taskID,uint64 round,address sender,bytes content); |name | type | description | | --- | --- | --- | | taskID | string | task ID| | round | uint64 | round number | -| owner | address | owner address | +| sender | address | sender address | | content | bytes | result | diff --git a/docs/contracts_zh.md b/docs/contracts_zh.md index 4c96998..af60882 100644 --- a/docs/contracts_zh.md +++ b/docs/contracts_zh.md @@ -51,7 +51,7 @@ events: [PartnerSelected](#PartnerSelected) -### startCalculate +### startCalculation 开始计算阶段,并结束本轮训练的秘密分享阶段。通过事件广播上传过秘密分享的客户端地址列表。 @@ -87,7 +87,7 @@ returns: | commitment | bytes | 目标客户端结果的哈希 | -### startAggregate +### startAggregation 开始聚合阶段,并结束本轮训练的计算阶段。通过事件广播上传了结果的客户端地址列表。 @@ -114,8 +114,8 @@ params: | --- | --- | --- | | taskID | bytes32 | 任务ID | | round | uint64 | 开始的轮次 | -| owner | address | 随机种子的拥有者 | -| sharee | address | 秘密分享的目标 | +| sender | address | 随机种子的拥有者 | +| receiver | address | 秘密分享的目标 | returns: @@ -151,7 +151,7 @@ params: | --- | --- | --- | | taskID | bytes32 | 任务ID | | round | uint64 | 轮次 | -| candidateAddr | address | 客户端地址 | +| candidateAddress | address | 客户端地址 | returns: @@ -170,8 +170,8 @@ params: | --- | --- | --- | | taskID | bytes32 | 任务ID | | round | uint64 | 轮次 | -| owner | address| 随机种子的拥有者 | -| sharer | address | 秘密分享的目标 | +| sender | address| 随机种子的拥有者 | +| recevier | address | 秘密分享的目标 | | seedCommitment | bytes | 随机种子的哈希 | events: @@ -187,8 +187,8 @@ params: | --- | --- | --- | | taskID | bytes32 | 任务ID | | round | uint64 | 轮次 | -| owner | address| 随机种子的拥有者 | -| sharer | address | 秘密分享的目标 | +| sender | address| 随机种子的拥有者 | +| receiver | address | 秘密分享的目标 | | skCommitment | bytes | SK2的哈希 | events: @@ -221,7 +221,7 @@ params: | --- | --- | --- | | taskID | bytes32 | 任务ID | | round | uint64 | 轮次 | -| sharee | address | 秘密分享的目标 | +| receiver | address | 秘密分享的目标 | | seed | bytes | 随机种子的秘密分享片段 | events: @@ -238,7 +238,7 @@ params: | --- | --- | --- | | taskID | bytes32 | 任务ID | | round | uint64 | 轮次 | -| owner | address | SK2的拥有者(离线的客户端) | +| sender | address | SK2的拥有者(离线的客户端) | | skMask | bytes | SK2的秘密分享片段 | events: @@ -295,94 +295,94 @@ event RoundEnded(bytes32 taskID,uint64 round); ### PartnerSelected 任务发布者结束轮次时触发 -event PartnerSelected(bytes32 taskID,uint64 round,address[] addrs); +event PartnerSelected(bytes32 taskID,uint64 round,address[] address); |name | type | description | | --- | --- | --- | | taskID | string | 任务ID| | round | uint64 | 轮次 | -| addrs | address[] | 任务发布者选择的节点地址 | +| address | address[] | 任务发布者选择的节点地址 | ### AggregateStarted 开始安全聚合时触发 -event AggregatStarted(bytes32 taskID,uint64 round,address[] addrs); +event AggregatStarted(bytes32 taskID,uint64 round,address[] address); |name | type | description | | --- | --- | --- | | taskID | string | 任务ID| | round | uint64 | 轮次 | -| addrs | address[] | 还在线的节点地址 | +| address | address[] | 还在线的节点地址 | ### CalculateStarted 任务发布者决定开始计算梯度时触发 -event CalculateStarted(bytes32 taskID,uint64 round,address[] addrs); +event CalculateStarted(bytes32 taskID,uint64 round,address[] address); |name | type | description | | --- | --- | --- | | taskID | string | 任务ID| | round | uint64 | 轮次 | -| addrs | address[] | 已完成secret sharing 的计算节点 | +| address | address[] | 已完成secret sharing 的计算节点 | ### SeedUploaded 计算节点上传内容时触发 -event SeedUploaded(bytes32 taskID,uint64 round,address owner,address sharer,bytes content); +event SeedUploaded(bytes32 taskID,uint64 round,address sender,address receiver,bytes content); |name | type | description | | --- | --- | --- | | taskID | string | 任务ID| | round | uint64 | 轮次 | -| owner | address | 秘密分享拥有者的地址 | -| sharer | address | 秘密分享的对象地址 | +| sender | address | 秘密分享拥有者的地址 | +| receiver | address | 秘密分享的对象地址 | | seed | bytes | 随机种子的秘密分享碎片 | ### SeedCommitmentUploaded 计算节点上传内容时触发 -event SeedCommitmentUploaded(bytes32 taskID,uint64 round,address owner,address sharer,bytes content); +event SeedCommitmentUploaded(bytes32 taskID,uint64 round,address sender,address receiver,bytes content); |name | type | description | | --- | --- | --- | | taskID | string | 任务ID| | round | uint64 | 轮次 | -| owner | address | 秘密分享拥有者的地址 | -| sharer | address | 秘密分享的对象地址 | +| sender | address | 秘密分享拥有者的地址 | +| receiver | address | 秘密分享的对象地址 | | commitment | bytes | 随机种子的哈希 | ### SecretKeyCommitmentUploaded 计算节点上传内容时触发 -event SecretKeyCommitmentUploaded(bytes32 taskID,uint64 round,address owner,address sharer,bytes content); +event SecretKeyCommitmentUploaded(bytes32 taskID,uint64 round,address sender,address receiver,bytes content); |name | type | description | | --- | --- | --- | | taskID | string | 任务ID| | round | uint64 | 轮次 | -| owner | address | Sk2密钥的拥有者地址 | -| sharer | address | 秘密分享的目标地址 | +| sender | address | Sk2密钥的拥有者地址 | +| receiver | address | 秘密分享的目标地址 | | commitment | bytes | Sk2秘密分享的哈希 | ### SecretKeyUploaded 计算节点上传内容时触发 -event SeedCommitmentUploaded(bytes32 taskID,uint64 round,address owner,address sharer,bytes content); +event SeedCommitmentUploaded(bytes32 taskID,uint64 round,address sender,address receiver,bytes content); |name | type | description | | --- | --- | --- | | taskID | string | 任务ID| | round | uint64 | 轮次 | -| owner | address | SK2秘密分享拥有者的地址 | -| sharer | address | SK2秘密分享的对象地址 | +| sender | address | SK2秘密分享拥有者的地址 | +| receiver | address | SK2秘密分享的对象地址 | | content | bytes | sk2的秘密分享碎片 | ### ResultUploaded 计算节点上传内容时触发 -event ResultUploaded(bytes32 taskID,uint64 round,address owner,bytes content); +event ResultUploaded(bytes32 taskID,uint64 round,address sender,bytes content); |name | type | description | | --- | --- | --- | | taskID | string | 任务ID| | round | uint64 | 轮次 | -| owner | address | 梯度计算者的地址 | +| sender | address | 梯度计算者的地址 | | content | bytes | 梯度的上传内容 |