Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade module : design doc and the framework codes #46

Merged
merged 1 commit into from
Jul 25, 2018
Merged

upgrade module : design doc and the framework codes #46

merged 1 commit into from
Jul 25, 2018

Conversation

wukongcheng
Copy link
Contributor

No description provided.

* switch的投票将在约定高度进行检查,需要95%的Voting Power才视为投票通过
* switch通过后开启切换流程:
1. check_tx全部返回fail,以拒绝新tx的处理
2. 处理mempool中留存的tx,直到生成一个empty block

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

一个empty block可能有点少,只有一个空块只能说明这个块对应的proposal 节点的memory pool里面是空的,建议等多个empty block

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

社区会公告在第多少高度进行版本升级,提醒届时会终止服务,不要在升级时间段内发交易。所以这里算是一个防御检查,保守一点可以先等两个空块,后续压测发现不足的话再调整。

2. 处理mempool中留存的tx,直到生成一个empty block
3. 配置新版本的路由开关,并打开check_tx接受新tx
* 发生老版本AppHash冲突,检查自己是否在switch voter list中,否则reset rootMultiStore到上一个commit,并下载新版本开始同步block
* 新增Module的升级方式(现有Module逻辑修改也通过新Module完成),新老版本的Module共享同一个store,对于查询需要路由到相应版本的Module

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

从iris角度看,查询操作就是直接访问store,然后返回value和proof,具体字段的解析逻辑都是iriscli里面,所以iris本身不需要对查询操作做特殊处理,可能需要在iriscli里面做改动

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@@ -0,0 +1,32 @@
package upgrade

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个switch msg应该是中交易吧,那发起这个交易的应该是轻客户端做的吧,是不是要求一定要 validator owner的签名

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

只接受他是validator的switch

@irisnet irisnet deleted a comment from MrXJC Jul 25, 2018
1. check_tx全部返回fail,以拒绝新tx的处理
2. 处理mempool中留存的tx,直到生成一个empty block
3. 配置新版本的路由开关,并打开check_tx接受新tx
* 发生老版本AppHash冲突,检查自己是否在switch voter list中,否则reset rootMultiStore到上一个commit,并下载新版本开始同步block
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

回滚是应该的,但是之前只考虑了App中store当前版本的回滚,目前讨论下来还需要用新版本软件对自己tendermint node中的last block进行replay,否则还是会有AppHash冲突

@wukongcheng wukongcheng merged commit 06e6621 into irisnet:feature/software-upgrade Jul 25, 2018
wukongcheng added a commit that referenced this pull request Aug 27, 2018
upgrade module : design doc and the framework codes
Nimrostafarian pushed a commit to petri-labs/petrihub that referenced this pull request Jan 3, 2023
…-tokens

feat: take rate does not result in zero tokens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants