-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[upgrade] Upgrade::upgrade_reconfig needs to increment epoch (#945)
* scaffold upgrade logic emit reconfig which doesn't increment epoch. * move compiles * patch e2e test * validator node file should have path to genesis * testing epoch reconfig * need to increment epoch otherwise safty rules get lost. * patch incrementing of epoch * make upgrade prints always appear * comments on possible rust implementation * stashing vm triggering reconfiguration until v5.0.11 * changelog
- Loading branch information
1 parent
34b436e
commit e68acaf
Showing
6 changed files
with
117 additions
and
36 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
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
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,67 @@ | ||
## 5.0.10 | ||
|
||
Resolving the Move Cache issue (https://github.com/OLSF/libra/issues/941) will require a two step upgrade process. | ||
|
||
1. Initially Move changes will be propagated (on chain Hot Upgrade) then, | ||
2. later Rust changes will be propagated (Node Upgrade). Read about upgrade types here: ol/documentation/network-upgrades/upgrades.md | ||
|
||
This version `v5.0.10` is only the first fase; updates the Move stdlib. DO NOT UPDATE NODE BINARIES. You are only required to vote on the new stdlib file. | ||
|
||
Changes to the upgrade logic must be in place on the chain, BEFORE any diem-node changes can be deployed. So for safety and clarity, this version 5.0.10 will NOT implement any interfaces to the Move changes. | ||
|
||
|
||
### TL;DR Deployment | ||
|
||
You are only required to submit a vote for the new stdlib file. | ||
|
||
The correct way is to build the Move files from source and submit a tx with the file. | ||
|
||
``` | ||
cd ~/libra | ||
git fetch | ||
git checkout v5.0.10 -f | ||
make stdlib | ||
# now vote on the upgrade with the file compiled above | ||
txs upgrade-oracle -v -f <source>/language/diem-framework/staged/stdlib.mv | ||
``` | ||
|
||
The lazy way is just to vote with the hash of the stdlib which was proposed. | ||
``` | ||
txs upgrade-oracle -v -h <hash> | ||
``` | ||
|
||
### Summary | ||
|
||
This upgrade corrects behavior of vfn.node.yaml config creator, and provides tooling for updating on-chain node discovery information (update IP addresses). | ||
|
||
### Changes | ||
|
||
##### Move Changes | ||
From issue: https://github.com/OLSF/libra/issues/941 | ||
|
||
When a "hot upgrade" is taking place the upgrade payload is submitted as a writeset on round 2 of consensus. | ||
|
||
If one or more transactions are submitted on this block (which is likely, since at the epoch boundary there is downtime and transactions will accumulate), may be using different mempool caches than what is newly on chain. The solution is to patch the cache. | ||
|
||
(https://github.com/diem/diem/blob/main/diem-move/diem-framework/core/sources/DiemConfig.move#L321) is the Move code for emitting the magic reconfiguration event, and here is the Rust code that picks it up. I'm less clear about the exact mechanism for spreading the news of a reconfiguration outward from the latter code, but I believe that it's a mix of the caller looking for these events and ReconfigNotificationListener (depending on the component) | ||
|
||
|
||
PRs: | ||
https://github.com/OLSF/libra/pull/942 | ||
|
||
https://github.com/OLSF/libra/pull/945 | ||
|
||
##### Rust Changes | ||
|
||
None | ||
|
||
##### Tests | ||
|
||
- All continuous integration tests passed. | ||
- QA was performed on Rex Devnet. | ||
|
||
##### Compatibility | ||
The Move stdlib and framework changes are backwards compatible with `diem-node` from v5.0.1 | ||
|