Skip to content

Commit

Permalink
Merge pull request #1676 from JimmyShi22/release-3
Browse files Browse the repository at this point in the history
Release 3.3.0
  • Loading branch information
JimmyShi22 committed Apr 24, 2023
2 parents 7364090 + 59ba39d commit 565a789
Show file tree
Hide file tree
Showing 36 changed files with 677 additions and 407 deletions.
66 changes: 61 additions & 5 deletions 2.x/docs/compatibility.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 3.x/release_note.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v3.2.0
v3.3.0
2 changes: 1 addition & 1 deletion 3.x/zh_CN/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
# The short X.Y version.
version = '3.0'
# The full version, including alpha/beta/rc tags.
release = 'v3.2.0'
release = 'v3.3.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
1 change: 1 addition & 0 deletions 3.x/zh_CN/docs/design/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ FISCOBCOS 设计主版本号与次版本号,例如针对FISCOBCOS 3.x,版本
3.1.0: 0x03010000
3.1.1: 0x03010100
3.2.0: 0x03020000
3.3.0: 0x03030000
...
```

Expand Down
2 changes: 1 addition & 1 deletion 3.x/zh_CN/docs/design/contract_directory.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ FISCO BCOS 3.x版本引入区块链合约文件系统(Blockchain File System

BFS的使用体验主要集中体现在控制台,请参考控制台中BFS相关操作命令,以及使用控制台的BFS命令时的注意事项、错误出现情况请参考:[链接](../operation_and_maintenance/console/console_commands.html#bfs)

使用合约调用的BFS接口时的注意事项、错误出现情况请参考:[链接](../develop/precompiled/precompiled_contract_api.html#bfsprecompiled)
使用合约调用的BFS接口时的注意事项、错误出现情况请参考:[链接](../contract_develop/c++_contract/precompiled_contract_api.html#bfsprecompiled)

同时在部署合约和调用合约均支持BFS使用,请参考控制台中[deploy命令](../operation_and_maintenance/console/console_commands.html#deploy)[call命令](../operation_and_maintenance/console/console_commands.html#call)

Expand Down
2 changes: 1 addition & 1 deletion 3.x/zh_CN/docs/design/hsm.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## 一、密码机与GMT0018简介
### 密码机HSM
硬件安全模块(Hardware security module,HSM)是一种用于保障和管理强认证系统所使用的数字密钥,并同时提供相关密码学操作的计算机硬件设备。硬件安全模块一般通过扩展卡或外部设备的形式直接连接到电脑或网络服务器。[wiki百科](https://zh.wikipedia.org/zh-hans/%E7%A1%AC%E4%BB%B6%E5%AE%89%E5%85%A8%E6%A8%A1%E5%9D%97)
硬件安全模块(Hardware security module,HSM)是一种用于保障和管理强认证系统所使用的数字密钥,并同时提供相关密码学操作的计算机硬件设备。硬件安全模块一般通过扩展卡或外部设备的形式直接连接到电脑或网络服务器。[词条](https://baike.baidu.com/item/%E7%A1%AC%E4%BB%B6%E5%AE%89%E5%85%A8%E6%A8%A1%E5%9D%97)

### GMT0018
《GMT0018-2012 密码设备应用接口规范》是由国家密码管理局发布的,符合中国密码行业标准的一个密码设备应用接口规范。它为公钥密码基础设施应用体系框架下的服务类密码设备制定统一的应用接口标准,通过该接口调用密码设备,向上层提供基础密码服务。为该类密码设备的开发、使用及检测提供标准依据和指导,有利于提高该类密码设备的产品化、标准化和系列化水平。
Expand Down
141 changes: 140 additions & 1 deletion 3.x/zh_CN/docs/design/parallel/sharding.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,143 @@

-------

该方案已开发完成,在测试中,近请期待
## 概念

当一条区块链上承载了多个应用时,可采用“**块内分片**”技术实现应用间交易执行的并行化。

FISCO BCOS支持中对链上的合约进行分组。在执行一个区块内的交易时,一个区块内的交易会根据合约的分组情况拆分成多个“**块内分片**”下文简称:分片),相同分片的交易调度到同一个执行器中执行。

## 方案

**关键点**

* 并行:一个区块内的不同分片调度至不同的执行器中并行执行。
* 局部:分片内部合约的相互调用直接在同一个执行器中完成,分片间互不干扰。
* 跨分片:跨分片调用直接在一个区块内完成,对用户透明无感,其调度基于DMC机制,避免繁重的SPV证明。
* 配置:用户可用控制台管理合约所属的分片
* 继承:分片内合约部署的合约属于相同的分片,消除繁琐的分片管理操作。

## 实现

实现方法如下:

* 并行:基于[FISCO BCOS的架构](../architecture.md)实现多executor的调度。
* 局部:一个executor内部,采用[DAG的方式并行执行](./dag.md)
* 跨分片:跨分片的交易采用[DMC机制进行调度](./dmc.md),在一个区块内完成的同时,保证一致性与存在性。
* 配置:基于[BFS](../contract_directory.md)实现合约的分片管理,启动控制台,用linkShard命令可绑定合约至分片,用 ls 命令查看分片信息。
* 继承:分片内合约部署的合约自动继承所属分片配置

## 举例

分片1:`/shard/hello_shard`

```
/shard/hello_shard/hello1
/shard/hello_shard/hello2
/shard/hello_shard/hello3
```

分片2:`/shard/account_shard`

```
/shard/account_shard/alice
/shard/account_shard/bob
/shard/account_shard/charies
```



![](../../../images/parallel/sharding.png)



## 操作举例

该操作需要使用控制台,请参考[此处](../../operation_and_maintenance/console/console_config.md)部署控制台。分片管理操作请参考此处。

**部署合约**

> 部署两个合约:Asset、HelloWorld
```
[group0]: /apps> deploy Asset
transaction hash: 0x8dbee4602da3d3435ce73df3778ee975b650cfaf70ce6b53f14db6db478cec10
contract address: 0xcceef68c9b4811b32c75df284a1396c7c5509561
currentAccount: 0x988e6a553f434be3d37786c97abb1fe1f8b7341d
[group0]: /apps> deploy HelloWorld
transaction hash: 0xcb860822f8d74ac447fc3d18870109a202ff788a6b1ef32970fa53497ba386d5
contract address: 0xd24180cc0fef2f3e545de4f9aafc09345cd08903
currentAccount: 0x988e6a553f434be3d37786c97abb1fe1f8b7341d
```

**创建分片**

> 创建两个分片:account_shard 和 hello_shard
```
[group0]: /apps> makeShard account_shard
make shard account_shard Ok. You can use 'ls' to check
[group0]: /apps> makeShard hello_shard
make shard hello_shard Ok. You can use 'ls' to check
[group0]: /apps> ls /shards/
account_shard hello_shard
```

**合约绑定分片**

> 分别将上述的两个合约绑定到不同的shard
```
[group0]: /apps> linkShard 0xcceef68c9b4811b32c75df284a1396c7c5509561 account_shard
Add 0xcceef68c9b4811b32c75df284a1396c7c5509561 to account_shard Ok. You can use 'ls' to check
[group0]: /apps> linkShard 0xd24180cc0fef2f3e545de4f9aafc09345cd08903 hello_shard
Add 0xd24180cc0fef2f3e545de4f9aafc09345cd08903 to hello_shard Ok. You can use 'ls' to check
```

**查询分片信息**

> 用getContractShard命令查看合约已经绑定至特定的shard
```
[group0]: /apps> getContractShard 0xcceef68c9b4811b32c75df284a1396c7c5509561
/shards/account_shard
[group0]: /apps> getContractShard d24180cc0fef2f3e545de4f9aafc09345cd08903
/shards/hello_shard
```

> BFS的ls命令也可以查询
```
[group0]: /apps> ls /shards/account_shard/
cceef68c9b4811b32c75df284a1396c7c5509561
[group0]: /apps> ls /shards/hello_shard/
d24180cc0fef2f3e545de4f9aafc09345cd08903
```

**调用shard内的合约**

> 交易会自动调度至相应的shard中执行,不同的shard在不同的执行器中执行,该操作对用户透明,体验上与调用普通合约无区别
```
[group0]: /apps> call HelloWorld 0xd24180cc0fef2f3e545de4f9aafc09345cd08903 set nice
transaction hash: 0x41637d8eb5907e84fd2bda6303d444bb7b3b9fe8cd85750dc547139710439b6e
---------------------------------------------------------------------------------------------
transaction status: 0
description: transaction executed successfully
---------------------------------------------------------------------------------------------
Receipt message: Success
Return message: Success
Return value size:0
Return types: ()
Return values:()
---------------------------------------------------------------------------------------------
Event logs
Event: {}
```

4 changes: 2 additions & 2 deletions 3.x/zh_CN/docs/develop/console_deploy_contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ sudo yum install -y java java-devel
### 第二步. 下载控制台

```shell
cd ~/fisco && curl -LO https://github.com/FISCO-BCOS/console/releases/download/v3.2.0/download_console.sh && bash download_console.sh
cd ~/fisco && curl -LO https://github.com/FISCO-BCOS/console/releases/download/v3.3.0/download_console.sh && bash download_console.sh
```

```eval_rst
Expand Down Expand Up @@ -67,7 +67,7 @@ cd ~/fisco/console && bash start.sh

```shell
=============================================================================================
Welcome to FISCO BCOS console(3.2.0)!
Welcome to FISCO BCOS console(3.3.0)!
Type 'help' or 'h' for help. Type 'quit' or 'q' to quit console.
________ ______ ______ ______ ______ _______ ______ ______ ______
| | \/ \ / \ / \ | \ / \ / \ / \
Expand Down
4 changes: 2 additions & 2 deletions 3.x/zh_CN/docs/introduction/change_log/3_1_0.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

##### 查询数据兼容版本号(compatibility_version)

[控制台](https://fisco-bcos-doc.readthedocs.io/zh_CN/latest/docs/develop/console/console_commands.html#getsystemconfigbykey)进行查询,如当前返回的版本为3.0.1
[控制台](https://fisco-bcos-doc.readthedocs.io/zh_CN/latest/docs/operation_and_maintenance/console/console_commands.html#getsystemconfigbykey)进行查询,如当前返回的版本为3.0.1

```
[group0]: /apps> getSystemConfigByKey compatibility_version
Expand All @@ -63,7 +63,7 @@

##### 设置数据兼容版本号(compatibility_version)

[控制台](https://fisco-bcos-doc.readthedocs.io/zh_CN/latest/docs/develop/console/console_commands.html#setsystemconfigbykey)设置数据兼容版本号,如当前版本为3.1.0
[控制台](https://fisco-bcos-doc.readthedocs.io/zh_CN/latest/docs/operation_and_maintenance/console/console_commands.html#setsystemconfigbykey)设置数据兼容版本号,如当前版本为3.1.0

```
[group0]: /apps> setSystemConfigByKey compatibility_version 3.1.0
Expand Down
8 changes: 4 additions & 4 deletions 3.x/zh_CN/docs/introduction/change_log/3_1_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

* 历史版本升级

需要升级的链的“数据兼容版本号([compatibility_version](https://fisco-bcos-doc.readthedocs.io/zh_CN/latest/docs/change_log/3_1_1.html#id5))”为如下版本时:
需要升级的链的“数据兼容版本号([compatibility_version](#id5))”为如下版本时:

* 3.1.0:本版本的数据兼容版本号依然为3.1.0,直接替换二进制即可完成升级
* 3.0.x:支持通过替换二进制进行灰度升级,若需使用当前版本的新特性,需升级数据兼容版本号,操作见[文档](https://fisco-bcos-doc.readthedocs.io/zh_CN/latest/docs/change_log/3_1_1.html#id5)
* 3.0.x:支持通过替换二进制进行灰度升级,若需使用当前版本的新特性,需升级数据兼容版本号,操作见[文档](#id5)
* 3.0-rc x:数据不兼容,无法升级,可考虑逐步将业务迁移至3.x正式版
* 2.x:数据不兼容,2.x版本仍持续维护,可考虑升级为2.x的最新版本

Expand All @@ -38,7 +38,7 @@

##### 查询数据兼容版本号(compatibility_version)

[控制台](https://fisco-bcos-doc.readthedocs.io/zh_CN/latest/docs/develop/console/console_commands.html#getsystemconfigbykey)进行查询,如当前返回的版本为3.0.1
[控制台](https://fisco-bcos-doc.readthedocs.io/zh_CN/latest/docs/operation_and_maintenance/console/console_commands.html#getsystemconfigbykey)进行查询,如当前返回的版本为3.0.1

```
[group0]: /apps> getSystemConfigByKey compatibility_version
Expand All @@ -51,7 +51,7 @@

##### 设置数据兼容版本号(compatibility_version)

[控制台](https://fisco-bcos-doc.readthedocs.io/zh_CN/latest/docs/develop/console/console_commands.html#setsystemconfigbykey)设置数据兼容版本号,如当前版本为3.1.0
[控制台](https://fisco-bcos-doc.readthedocs.io/zh_CN/latest/docs/operation_and_maintenance/console/console_commands.html#setsystemconfigbykey)设置数据兼容版本号,如当前版本为3.1.0

```
[group0]: /apps> setSystemConfigByKey compatibility_version 3.1.0
Expand Down
8 changes: 4 additions & 4 deletions 3.x/zh_CN/docs/introduction/change_log/3_1_2.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

* 历史版本升级

需要升级的链的“数据兼容版本号([compatibility_version](https://fisco-bcos-doc.readthedocs.io/zh_CN/latest/docs/change_log/3_1_2.html#id5))”为如下版本时:
需要升级的链的“数据兼容版本号([compatibility_version](#id5))”为如下版本时:

* 3.1.0:本版本的数据兼容版本号依然为3.1.0,直接替换二进制即可完成升级
* 3.0.x:支持通过替换二进制进行灰度升级,若需使用当前版本的新特性,需升级数据兼容版本号,操作见[文档](https://fisco-bcos-doc.readthedocs.io/zh_CN/latest/docs/change_log/3_1_1.html#id5)
* 3.0.x:支持通过替换二进制进行灰度升级,若需使用当前版本的新特性,需升级数据兼容版本号,操作见[文档](#id5)
* 3.0-rc x:数据不兼容,无法升级,可考虑逐步将业务迁移至3.x正式版
* 2.x:数据不兼容,2.x版本仍持续维护,可考虑升级为2.x的最新版本

Expand All @@ -31,7 +31,7 @@

##### 查询数据兼容版本号(compatibility_version)

[控制台](https://fisco-bcos-doc.readthedocs.io/zh_CN/latest/docs/develop/console/console_commands.html#getsystemconfigbykey)进行查询,如当前返回的版本为3.0.1
[控制台](https://fisco-bcos-doc.readthedocs.io/zh_CN/latest/docs/operation_and_maintenance/console/console_commands.html#getsystemconfigbykey)进行查询,如当前返回的版本为3.0.1

```
[group0]: /apps> getSystemConfigByKey compatibility_version
Expand All @@ -44,7 +44,7 @@

##### 设置数据兼容版本号(compatibility_version)

[控制台](https://fisco-bcos-doc.readthedocs.io/zh_CN/latest/docs/develop/console/console_commands.html#setsystemconfigbykey)设置数据兼容版本号,如当前版本为3.1.0
[控制台](https://fisco-bcos-doc.readthedocs.io/zh_CN/latest/docs/operation_and_maintenance/console/console_commands.html#setsystemconfigbykey)设置数据兼容版本号,如当前版本为3.1.0

```
[group0]: /apps> setSystemConfigByKey compatibility_version 3.1.0
Expand Down
24 changes: 13 additions & 11 deletions 3.x/zh_CN/docs/introduction/change_log/3_2_0.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,32 @@

* 历史版本升级

需要升级的链的“数据兼容版本号([compatibility_version](https://fisco-bcos-doc.readthedocs.io/zh_CN/latest/docs/change_log/3_1_2.html#id5))”为如下版本时:
需要升级的链的“数据兼容版本号([compatibility_version](#id5))”为如下版本时:

* 3.2.0:数据完全兼容当前版本,直接替换二进制即可完成升级
* 3.1.x/3.0.x:支持通过替换二进制进行灰度升级,若需使用当前版本的新特性,需升级数据兼容版本号,操作见[文档](https://fisco-bcos-doc.readthedocs.io/zh_CN/latest/docs/change_log/3_2_0.html#id5)
* 3.1.x/3.0.x:支持通过替换二进制进行灰度升级,若需使用当前版本的新特性,需升级数据兼容版本号,操作见[文档](#id5)
* 3.0-rc x:数据不兼容,无法升级,可考虑逐步将业务迁移至3.x正式版
* 2.x:数据不兼容,2.x版本仍持续维护,可考虑升级为2.x的最新版本

* 组件兼容性

| | 推荐版本 | 最低版本 | 说明 |
| ---------- | --------- | ------------------------ | ---------------------------------- |
| Console | 3.2.0 | 3.0.0 | |
| Java SDK | 3.2.0 | 3.0.0 | |
| CPP SDK | 3.2.0 | 3.0.0 | |
| Solidity | 0.8.11 | 最低 0.4.25,最高 0.8.11 | 需根据合约版本下载编译器(控制台) |
| WBC-Liquid | 1.0.0-rc3 | 1.0.0-rc3 | |
| | 推荐版本 | 最低版本 | 说明 |
| ---------- | --------- | ------------------------ | --------------------------------------- |
| Console | 3.2.0 | 3.0.0 | |
| Java SDK | 3.2.0 | 3.0.0 | |
| CPP SDK | 3.2.0 | 3.0.0 | |
| Solidity | 0.8.11 | 最低 0.4.25,最高 0.8.11 | 需根据合约版本下载编译器(控制台) |
| WBC-Liquid | 1.0.0-rc3 | 1.0.0-rc3 | |
| WeBASE | - | - | 存在兼容bug,建议升级节点二进制至3.2.1+ |
| WeIdentity | - | - | 存在兼容bug,建议升级节点二进制至3.2.1+ |

#### 升级方法

该操作仅支持将3.x版本升级为本版本,不支持3.0-rc或2.x的升级。

##### 查询数据兼容版本号(compatibility_version)

[控制台](https://fisco-bcos-doc.readthedocs.io/zh_CN/latest/docs/develop/console/console_commands.html#getsystemconfigbykey)进行查询,如当前返回的版本为3.0.1
[控制台](https://fisco-bcos-doc.readthedocs.io/zh_CN/latest/docs/operation_and_maintenance/console/console_commands.html#getsystemconfigbykey)进行查询,如当前返回的版本为3.0.1

```
[group0]: /apps> getSystemConfigByKey compatibility_version
Expand All @@ -62,7 +64,7 @@

##### 设置数据兼容版本号(compatibility_version)

[控制台](https://fisco-bcos-doc.readthedocs.io/zh_CN/latest/docs/develop/console/console_commands.html#setsystemconfigbykey)设置数据兼容版本号,如当前版本为3.1.0。
[控制台](https://fisco-bcos-doc.readthedocs.io/zh_CN/latest/docs/operation_and_maintenance/console/console_commands.html#setsystemconfigbykey)设置数据兼容版本号,如当前版本为3.1.0。

```
[group0]: /apps> setSystemConfigByKey compatibility_version 3.1.0
Expand Down

0 comments on commit 565a789

Please sign in to comment.