-
Couldn't load subscription status.
- Fork 54
feat(evmengine): defer upgrade scheduling to upgrade keeper #566
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
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
7562888 to
8cea7d7
Compare
|
Am i able to sync from block 0 to chain tip using only the latest story binary with this feature? |
Good question. I tested that it synced well from the genesis, but not til the tip. Will test it and let you know. I will full sync from the genesis, so it might take some time. |
98d6a20 to
09afa00
Compare
|
Removed to use Note: added to dump this |
Does Cosmovisor support multiple entries in |
No, they just support the single entry, the latest one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the main purposes of Celestia's signal module is to await 4/5 majority signals for the next binary version (signal tx) before upgrading (upgrade tx). Thus, there's no "upgrade height," and nodes await the 4/5 signals. This ensures that the chain upgrades without halting, which happens when quorum on new binary is not met.
Just want to note that deferring the upgrade scheduling (this PR) doesn't achieve that purpose as it sets the upgrade height (from EL). This allows validators to swap the binary before the upgrade height, assuming the new binary is backward-compatible.
(But all current version upgrades have been triggered on EL by Story, so I suppose the above purpose of the original signal module doesn't matter much for some time.)
|
@jdubpark Thanks for the notes. Right. Since we trigger the upgrade from EL, quorum of validators for the upgrade is not needed for Story.
I expect we can make our upgrade process be more decentralized by improving our upgrade entry contract on EL. |
09afa00 to
6715e6f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, just to confirm this doesn't have any impact to state sync of older blocks since genesis since we used different way of upgrading the network.
It should. But after finding a sync issue in v1.2.1, I have not tested again with the updated branch. I will test again to make sure this works for syncing blocks from the genesis. |
6715e6f to
8afd43c
Compare
Binary uploaded successfully 🎉📦 Version Name: 1.3.2-unstable-847a369 |
This PR adds support for rolling upgrades via the
UpgradeEntrypointcontract. The core implementation is mostly adapted from thesignalmodule in Celestia. Instead of introducing a new module, the logic is integrated into theevmenginemodule, which is responsible for handling EVM-triggered upgrades. Since our upgrades are initiated from within the EVM and do not require validator quorum, we were able to adopt only the necessary parts of thesignalmodule and implement them withinevmenginefor simplicity.Functionally, this is very similar to how we previously supported rolling upgrades using
Fork.As you may know, in Cosmos SDK, a node must not upgrade its binary before the scheduled upgrade height, if the upgrade has already been registered in the
upgradekeeper. This constraint prevents validators from upgrading early when the upgrade is pre-scheduled.To address this, we can defer scheduling upgrade. When the
UpgradeEntrypointcontract emits an upgrade event, the upgrade information is temporarily stored in theevmengine's state. The actual scheduling of the upgrade in theupgradekeeper is deferred until the block reaches the specified upgrade height. At that point, during thePreBlockphase, the upgrade is scheduled inupgradekeeper so that it can be applied within that same block.issue: #149