regen-network / cosmos-sdk Goto Github PK
View Code? Open in Web Editor NEWThis project forked from cosmos/cosmos-sdk
:rocket: Regen Network fork of Cosmos SDK
Home Page: https://cosmos.network
License: Apache License 2.0
This project forked from cosmos/cosmos-sdk
:rocket: Regen Network fork of Cosmos SDK
Home Page: https://cosmos.network
License: Apache License 2.0
Cosmos-sdk Issue for full Proto Migration: cosmos#5444
When an upgrade fails due to a consensus failure, or for some other reason a validator causes is out of consensus (ex. running the wrong binary), it is sometimes useful to be able to revert the last committed block.
Given a user needs to revert a block
When they invoke their daemon with the --unsafe-retry-last-block
(ex. xrnd start --unsafe-retry-last-block
)
Then the state of the last committed block will be reverted and the daemon will try to reprocess that block
The upgrade handler for the upgrade module is able to handle migrations that can happen within BeginBlock
. Certain root multi-store migrations need to happen outside of BeginBlock - specifically renaming or deleting store keys. The basic support for doing this was added in cosmos#4724. This functionality needs to be integrated into the upgrade module.
Given that multi-store StoreUpgrade
s are needed and an upgrade is happening
When the new binary starts
Then the StoreUpgrade
s will be performed at the correct upgrade height before the ABCI app starts
upgrade.Keeper
BeginBlock
method, write a file $DAEMON_HOME/data/upgrade-needed.json
file to disk with the upgrade plan serialized at panic time with the actual upgrade height written in the file in the case of time-based upgrades.upgrade.Keeper
SetUpgradeHandler` method to: SetUpgradeHandler(name string, upgradeHandler types.UpgradeHandler, storeUpgrades []storytypes.StoreUpgrades)
so that whenever store key renames/deletions are needed they can be registered with the upgrade handler
BaseApp
and the multi-store before starting the ABCI app. The multi-store upgrades should only be performed when there is an upgrade-info.json present and the version of the store matches the upgrade height in the json file. This will prevent store upgrades from happening too early.BaseApp.UpgradeableStoreLoader
likely doesn't do what is required as this would require that the store upgrades are written to disk outside of the binary, presumably by the upgrade module. The actual behavior would likely be that the new binary contains a handler for the desired StoreUpgrade
s as mentioned above. Likely some hook between BaseApp
and the upgrade.Keeper
is neded.There are scenarios in which a planned upgrade handled by the upgrade module needs to be aborted. This could happen when:
--unsafe-roll-back
)Given that an upgrade needs to be aborted because the new binary simply doesn't work right
When a user invokes the old binary with the --unsafe-skip-upgrade
flag (ex. xrnd start --unsafe-skip-upgrade
)
Then old binary will continue to operate as before and clear the planned upgrade from state
Ref: #29
Epic to track staking module improvements and development towards an independent staking module.
For tracking cosmos#5782
Check in with @aaronc on the structure / protobuf encoding for this module.
Cosmos-sdk issue for Full Proto Encoding: cosmos#5444
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.