-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Translate chinese to english and remove redundant parameters
- Loading branch information
1 parent
beec9d0
commit ceada20
Showing
3 changed files
with
27 additions
and
82 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,38 @@ | ||
``` | ||
/--groups // for manager;通过决议以后构造/更新的Group对象放在这里,更新步骤 | ||
| | // 1.得到一个创建/更新一个Group的决议(旧成员一定量的投票+所有新成员签名) | ||
| | // 形成决议的方式可以是合约,也可以是超送用`DEC框架`实现的DEC | ||
| | // 2.跟friend管理一样,用决议设定到系统更新Group信息 | ||
| | // 3.更新Group下所有r-path的本地Group版本,并达成共识;这里主要要同步ood-list | ||
| |--list-->Set<GroupId> | ||
| |--option-->GroupOption | ||
| | ||
|--${group-id} | ||
|--${group-id} // one group | ||
| |--${DecId("shells", ${group-id})} | ||
| | |--.shells | ||
| | |--.latest-->GroupShell // latest version | ||
| | |--${group.version}-->GroupShell // add shells for history versions of group | ||
| |--${dec-id} | ||
| |--.dec-state-->ObjectId // for dec;各Group的dec状态放这里 | ||
| | // APP控制的实体状态,通常是个map-id | ||
| | // 最终在APP看到的${r-path}结构是这级物理结构的相对路径 | ||
| | // 其他内部逻辑隐藏掉 | ||
| | // 每个${r-path}管理范围内是串行的 | ||
| | // 不同${r-path}范围内的操作是并行的 | ||
| | // 且不同${r-path}之间是并列的,不能嵌套 | ||
| |--.link // 区块链结构,记录状态变更链条 | ||
| |--${r-path} | ||
| |--users | ||
| |--${dec-id} // one dec for a group | ||
| |--${r-path} | ||
| |--.dec-state-->ObjectId // for dec;the latest state of all groups | ||
| | // one state of a r-path, It's calculated by the app, and it's a map-id in most times | ||
| | // Each state change for same ${r-path} is serial | ||
| | // Each state change for different ${r-path} is parallel | ||
| | // **The process of state change for different ${r-path} should always not be nested, Because the change of each branch will affect the state of the root** | ||
| |--.link // Blockchain for hotstuff, record the state change chain,Most of the time, application developers do not need to pay attention | ||
| |--group-blob-->BLOB(Group) // the latest group, it's store as chunk, so, it'll not be updated by different version | ||
| |--users // info of any user, is useful? | ||
| | |--${user-id} | ||
| | |--xxx | ||
| |--last-vote-round-->u64 // 最后一次投票的 轮次 | ||
| |--last-qc-->GroupQuorumCertificate // 最后一次被确认的共识证明 | ||
| |--last-vote-round-->u64 // the round that I voted last time | ||
| |--last-qc-->GroupQuorumCertificate | ||
| | | ||
| |--range-->(${first_height}, ${header_height}) // 保留的历史block序列号区间 | ||
| |--str(${height})->block | ||
| |--range-->(${first_height}, ${header_height}) // the range retained, we can remove some history | ||
| |--str(${height})->block // commited blocks with any height, QC(Quorum Certificate) by next blocks at least 2 | ||
| | | ||
| |--prepares // Prepare状态的block | ||
| |--prepares // prepare blocks, with QC for pre-block(pre-commit/commited), but not QC by any one | ||
| | |--${block.id} | ||
| | |--block | ||
| | |--result-state-->ObjectId(result-state) | ||
| |--pre-commits // pre-commit状态的block | ||
| | |--block | ||
| | |--result-state-->ObjectId(result-state) // hold the ref to avoid recycle | ||
| |--pre-commits // pre-commit blocks, with QC for the header block, and is QC by a prepare block | ||
| | |--${block.id} | ||
| | |--block | ||
| | |--result-state-->ObjectId(result-state) | ||
| | |--block | ||
| | |--result-state-->ObjectId(result-state) // hold the ref to avoid recycle | ||
| | | ||
| |--finish-proposals | ||
| | |--flip-time-->Timestamp // 取block时间戳 | ||
| | |--over-->Set<ObjectId> | ||
| |--finish-proposals // The proposal is de-duplicated. Proposals that exceed the timeout period are directly discarded, and those within the timeout period are de-duplicated by the list | ||
| | |--flip-time-->Timestamp // the timestamp of the first block | ||
| | |--recycle-->Set<ObjectId> | ||
| | |--adding-->Set<ObjectId> | ||
``` | ||
|
||
``` | ||
// .group结构 | ||
/--${group-id} | ||
|--ObjectId(.group) | ||
|--.update | ||
|--voting | ||
| |--${proposal-id} | ||
| |--proposal-->GroupUpdateProposal | ||
| |--decides-->Set<decide-proposal> | ||
|--latest-version-->GroupUpdateProposal // Chunk(Encode(group)) | ||
|--str(version-seq)-->GroupUpdateProposal // Chunk(Encode(group)) | ||
|--str(group-hash)-->GroupUpdateProposal | ||
``` | ||
|
||
member 同步结构 | ||
|
||
``` | ||
|--${/} // config by the DecAPP | ||
|--${group-id} | ||
|--${r-path} | ||
|--state-->ObjectId // the latest state | ||
|--block-->Block // the hightest block | ||
|--qc-->qc-block // the qc for the ${block} | ||
``` |