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

Handle active upgrade proposals while a current plan is already in place #23

Open
pharr117 opened this issue Sep 12, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@pharr117
Copy link
Collaborator

Cosmos handles upgrades by scheduling a plan. There can only ever be 1 plan in place, see here for why:

https://github.com/cosmos/cosmos-sdk/blob/5eaa7b8d3c50eefc5dd95210c38c84c1e829509f/x/upgrade/keeper/keeper.go#L185-L189

However, there may be an active proposal being voted on while a current plan is in place. The code currently prefers the active proposal over the current plan, returning data only on that:

https://github.com/DefiantLabs/cosmos-upgrades/blob/18197052b24f9d07ddc1a9b0b8b9c80b1979d5e1/app.py#L563-L579

We should handle both these cases and return data on both instead of just one.

@pharr117 pharr117 added the enhancement New feature or request label Sep 12, 2023
@pharr117
Copy link
Collaborator Author

Relating this to #22, it may be better to handle the data by building this type of structure

[
    {
        "type": "mainnet",
        "network": "cosmoshub",
        "rpc_server": "[https://cosmoshub-rpc.lavenderfive.com:443](https://cosmoshub-rpc.lavenderfive.com/)",
        "rest_server": "https://rest-cosmoshub.goldenratiostaking.net/",
        "latest_block_height": 16964901,
        "upgrade_found": true,
        "active_upgrade_proposals": [
            <array of active upgrade proposals if they exist>
        ],
        "current_plan": {
            <current plan data if it exists>
        }
    }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant