Git Product home page Git Product logo

regen-network / cosmos-sdk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cosmos/cosmos-sdk

3.0 3.0 5.0 246.5 MB

:rocket: Regen Network fork of Cosmos SDK

Home Page: https://cosmos.network

License: Apache License 2.0

Dockerfile 0.06% Makefile 0.29% Go 91.35% HTML 0.01% Shell 0.21% Python 0.04% C 6.79% M4 0.26% Sage 0.31% Assembly 0.29% Java 0.31% Gherkin 0.07%
blockchain cosmos-sdk

cosmos-sdk's People

Contributors

aaronc avatar adityasripal avatar aleem1314 avatar alessio avatar alexanderbez avatar amaury1093 avatar atheeshp avatar colin-axner avatar cwgoes avatar dependabot-preview[bot] avatar dependabot[bot] avatar ebuchman avatar ethanfrey avatar facundomedica avatar fedekunze avatar gamarin2 avatar jackzampolin avatar jaekwon avatar jgimeno avatar julienrbrt avatar kocubinski avatar likhita-809 avatar mossid avatar odeke-em avatar rigelrozanski avatar robert-zaremba avatar sunnya97 avatar tac0turtle avatar valardragon avatar zramsay avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

cosmos-sdk's Issues

Add --unsafe-retry-last-block CLI flag

Context

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.

Acceptance Criteria

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

Support multi-store upgrades that need to happen outside of BeginBlock

Context

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.

Acceptance Criteria

Given that multi-store StoreUpgrades are needed and an upgrade is happening
When the new binary starts
Then the StoreUpgrades will be performed at the correct upgrade height before the ABCI app starts

Proposed Design

  • In the 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.
  • Change the 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

  • Add a hook to the upgrade module that configures 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.

Notes

  • the current design of 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 StoreUpgrades as mentioned above. Likely some hook between BaseApp and the upgrade.Keeper is neded.

Add --unsafe-skip-upgrade CLI flag

Context

There are scenarios in which a planned upgrade handled by the upgrade module needs to be aborted. This could happen when:

  • an error happens in the upgrade handler in the new binary and the upgrade can't complete
  • there is a problem with the upgrade handler that causes a consensus failure (note that solving this also requires --unsafe-roll-back)

Acceptance Criteria

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

Migrate msgauth to use proto Any

Summary

Ref: #29


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Integrating upgrade module with gaia

Context

  • Currently the upgrade module can be tested only using simulation. I would like to propose integrating upgrade module with latest release of cosmos/gaia(v2.0.2). This would help in testing integration of upgrade module with the application.
  • The same PR can help for cosmos/gaia after upgrade PR is merged to cosmos-sdk

Proposed Design

  1. Integrate upgrade module with cosmos/gaia
  2. Create 2 releases with different version in regen-network/gaia
  3. Run a local testnet to check integration and working of upgrade module

@ethanfrey @aaronc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.