-
Notifications
You must be signed in to change notification settings - Fork 254
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add pipeline desc * Add more desc for pipeline * Update version desc * Add experimental desc
- Loading branch information
Showing
6 changed files
with
180 additions
and
5 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# 读写集并行(实验功能) | ||
|
||
## 介绍 | ||
|
||
FISCO BCOS的最新并行架构为流水线执行架构,该功能为实验功能,后续版本可能有不向前兼容的修改,建议用于测试和体验,不建议在生产环境下使用。 | ||
|
||
流水线架构的优势: | ||
- 流水线架构的执行结果与串行执行结果一致,便于发现问题。 | ||
- 流水线架构提升性能的同时无需特殊前置条件,其他并行方案均有前置条件。 | ||
- 流水线架构的理论在计算机系统理论研究已经深入透彻,有诸多久经考验的优化措施,可直接应用到区块链。 | ||
|
||
FISCO BCOS支持两种流水线执行架构:标量流水线和超标量流水线,适合不同场景。 | ||
- 标量流水线将交易拆分为三个步骤并行执行,无论何种场景,相比普通串行至少能提升20%的性能。 | ||
- 超标量流水线会试图并行执行更多交易,性能提升幅度视交易读写数据的冲突量而定,冲突数量少时,相比普通串行能提升300%以上的性能,冲突数量多时,相比普通串行的性能更低。 | ||
|
||
## 使用条件 | ||
|
||
流水线执行器需要手工打开,加入流水线架构后,目前有5种执行模式: | ||
1. 普通串行(config.genesis,is_serial=true):默认模式。 | ||
1. DAG并行(config.ini,enable_dag=true):交易执行结果与普通串行一致,需要提前静态分析智能合约,适合合约逻辑简单的场景。 | ||
1. 标量流水线(config.ini,baseline_scheduler=true):交易执行结果与普通串行一致,性能比普通串行高20%,适合所有场景。 | ||
1. 超标量流水线(config.ini,baseline_scheduler_parallel=true):交易执行结果与普通串行一致,性能提升幅度视交易读写数据的冲突量而定,冲突量少时能提升300%以上的性能,冲突量多时性能较低,适合交易读写数据冲突量少的场景。 | ||
1. sharding模式(启用feature_sharding):需要用户手工将交易分配到不同的分区,多个分区的交易可并行执行,但发生跨分区调用时交易执行结果会与普通串行不一致,适合可以手工分配交易分区的场景。 | ||
|
||
模式1、2、3、4互相兼容,可以混跑,5与其它模式均不兼容。 | ||
|
||
流水线执行器的启用条件 | ||
- 启用所有bugfix | ||
- 节点架构为air | ||
- 使用串行(config.genesis,is_serial=true)模式,不打开feature_sharding | ||
- 使用evm虚拟机,非wasm | ||
|
||
满足这些条件,可启用流水线执行器,且可以与普通串行混合运行,如果不满足条件,节点将无法启动,并在stdout输出错误原因。 | ||
|
||
## 开启方法 | ||
|
||
### 启用标量流水线 | ||
|
||
节点配置文件config.ini,增加选项executor.baseline_scheduler | ||
|
||
``` | ||
[executor] | ||
baseline_scheduler=true | ||
``` | ||
|
||
### 启用超标量流水线 | ||
|
||
节点配置文件config.ini,增加选项executor.baseline_scheduler_parallel | ||
|
||
开启此选项之前,请先确认设置了baseline_scheduler=true,否则选项无效 | ||
|
||
``` | ||
[executor] | ||
baseline_scheduler=true | ||
baseline_scheduler_parallel=true | ||
``` | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# v3.8.0 | ||
|
||
#### 新增 | ||
|
||
* 新增流水线执行模式 | ||
|
||
#### 修改 | ||
|
||
* 增加4个bugfix,详见feature list | ||
|
||
* 历史版本升级 | ||
|
||
需要升级的链的“数据兼容版本号([compatibility_version](#id5))”为如下版本时: | ||
|
||
* 3.4.x、3.5.x,3.6.x、3.7.x:数据完全兼容当前版本,直接替换二进制即可完成升级 | ||
* 3.3.x、3.2.x、3.1.x、3.0.x:支持通过替换二进制进行灰度升级,若需使用当前版本的新特性,需升级数据兼容版本号,操作见[文档](#id5) | ||
* 3.0-rc x:数据不兼容,无法升级,可考虑逐步将业务迁移至3.x正式版 | ||
* 2.x:数据不兼容,2.x版本仍持续维护,可考虑升级为2.x的最新版本 | ||
|
||
|
||
* 开启实验功能 | ||
|
||
效果:通过feature开关控制实验功能的开启 | ||
|
||
操作:升级节点可执行程序后,通过控制台命令`setSystemConfigByKey <feature名> 1` 开启对应实验功能,具体操作见文档升级方法部分 | ||
|
||
注意事项: | ||
* feature操作不可逆,打开后不可关闭 | ||
* 需确认所有可执行程序版本相同后,再进行feature开启操作 | ||
|
||
| | Feature 名 | 默认状态 | 说明 | | ||
|-----------|----------------------------|------|--------------------------------------------| | ||
| 资产管理 | feature_balance | 关:0 | 默认关闭 | | ||
| 资产操作预编译合约 | feature_balance_precompile | 关:0 | 默认关闭 | | ||
| 计费模式 | feature_policy1 | 关:0 | 默认关闭 | | ||
| 块内分片 | feature_sharding | 关:0 | 默认关闭,仅在从3.3、3.4升级至当前版本时,feature_sharding打开 | | ||
| 同态加密 | feature_paillier | 关:0 | 默认关闭 | | ||
| rpbft共识 | feature_rpbft | 关:0 | 默认关闭 | | ||
| bug修复 | bugfix_\<bug_name\> | 开:1 | 从低版本升级默认关闭 | | ||
|
||
**组件兼容性** | ||
|
||
| | 推荐版本 | 最低版本 | 说明 | | ||
|------------|-------------|---------------------|-------------------| | ||
| WeBASE | 3.0.2 | 3.0.2 | | | ||
| WeIdentity | v3.0.0-rc.1 | v3.0.0-rc.1 | | | ||
| Console | 3.7.0 | 3.0.0 | | | ||
| Java SDK | 3.7.0 | 3.0.0 | | | ||
| CPP SDK | 3.7.0 | 3.0.0 | | | ||
| Solidity | 0.8.11 | 最低 0.4.25,最高 0.8.11 | 需根据合约版本下载编译器(控制台) | | ||
| WBC-Liquid | 1.0.0-rc3 | 1.0.0-rc3 | | | ||
|
||
#### 升级方法 | ||
|
||
该操作仅支持将3.x版本升级为本版本,不支持3.0-rc或2.x的升级。 | ||
|
||
##### 查询数据兼容版本号(compatibility_version) | ||
|
||
用[控制台](https://fisco-bcos-doc.readthedocs.io/zh_CN/latest/docs/operation_and_maintenance/console/console_commands.html#getsystemconfigbykey) | ||
进行查询,如当前返回的版本为3.6.0 | ||
|
||
``` | ||
[group0]: /apps> getSystemConfigByKey compatibility_version | ||
3.6.0 | ||
``` | ||
|
||
##### 替换节点二进制 | ||
|
||
需将**所有节点** | ||
的二进制逐步替换为当前版本。为了不影响业务,替换过程能够以灰度方式进行,逐个替换并重启节点。替换过程中,当前的链仍然会以旧的数据兼容版本号的逻辑继续执行。当所有节点二进制替换完成并重启后,需用控制台修改数据兼容版本号为当前版本。 | ||
|
||
##### 设置数据兼容版本号(compatibility_version) | ||
|
||
用[控制台](https://fisco-bcos-doc.readthedocs.io/zh_CN/latest/docs/operation_and_maintenance/console/console_commands.html#setsystemconfigbykey) | ||
设置数据兼容版本号,如当前版本为3.7.0。 | ||
|
||
``` | ||
[group0]: /apps> setSystemConfigByKey compatibility_version 3.7.0 | ||
{ | ||
"code":0, | ||
"msg":"success" | ||
} | ||
注:若开启权限治理功能,需要使用 setSysConfigProposal 命令 | ||
``` | ||
|
||
设置成功,再次查询,得到当前版本已升级为3.7.0 | ||
|
||
``` | ||
[group0]: /apps> getSystemConfigByKey compatibility_version | ||
3.7.0 | ||
``` | ||
|
||
当前链已经完成升级,至此,**链开始以新的逻辑继续运行**,并支持了新的特性。 |
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