Skip to content

Commit

Permalink
Update rc2 encode protocol (#653)
Browse files Browse the repository at this point in the history
* update protocol description

* update rc2 description
  • Loading branch information
JimmyShi22 committed Sep 20, 2019
1 parent 84922f2 commit 3585fbd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/design/protocol_description.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ RC2的生成流程也类似,只是在第一步`rlp+hash`的transaction结构

## 区块结构及其RLP编码描述

FISCO BCOS的区块由以下五部分组成(rc1版本):
FISCO BCOS的区块由以下五部分组成

**rc1版本**

| name | description | RLP index |
| :------------------ | :----------------------------------------------- | --------- |
Expand All @@ -41,7 +43,8 @@ FISCO BCOS的区块由以下五部分组成(rc1版本):
| hash | 区块头RLP编码后的哈希值 | 3 |
| sigList | PBFT共识落盘阶段收集到的节点签名信息,Raft不使用 | 4 |

在rc2及以上的版本:
**rc2、rc3、2.0及以上版本**

| name | description | RLP index |
| :------------------ | :----------------------------------------------- | --------- |
| blockHeader | 区块头RLP编码 | 0 |
Expand Down Expand Up @@ -141,4 +144,4 @@ AMOP消息包继承ChannelMessage包机构,在data字段添加了自定义内
| 0 | 成功 |
| 100 | 节点不可达 |
| 101 | SDK不可达 |
| 102 | 超时 |
| 102 | 超时 |
11 changes: 11 additions & 0 deletions en/docs/design/protocol_description.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ It is similar with RC2 generation process, only that the transaction struct of `

The block of FISCO BCOS consists of the following five parts:

**rc1:**

| name | description | RLP index |
| :------------------ | :----------------------------------------------- | --------- |
| blockHeader | Block header RLP coding | 0 |
Expand All @@ -41,6 +43,15 @@ The block of FISCO BCOS consists of the following five parts:
| hash | The hash encoded by block header RLP encoded | 3 |
| sigList | The node signature list that is collected during PBFT consensus. Raft does not use this. | 4 |

**rc2, rc3, 2.0 and newer**

| name | description | RLP index |
| :------------------ | :----------------------------------------------------------- | --------- |
| blockHeader | Block header RLP coding | 0 |
| transactions | Transaction list RLP code | 1 |
| hash | The hash encoded by block header RLP encoded | 2 |
| sigList | The node signature list that is collected during PBFT consensus. Raft does not use this. | 3 |
| transactionReceipts | Transaction receipt list RLP code | 4 |

The description of each field in the block header of FISCO BCOS is as follows:

Expand Down

0 comments on commit 3585fbd

Please sign in to comment.