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

[Docs][Upgrades] Add safeguards for upgrades #1065

Open
5 tasks
okdas opened this issue Feb 11, 2025 · 2 comments
Open
5 tasks

[Docs][Upgrades] Add safeguards for upgrades #1065

okdas opened this issue Feb 11, 2025 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@okdas
Copy link
Member

okdas commented Feb 11, 2025

Objective

In a recent update, the staking_fee parameter was inadvertently set to null, causing supplier staking commands to fail. This issue aims to outline the lessons learned and implement safeguards to prevent similar oversights.

Origin Document

https://discord.com/channels/553741558869131266/1234943674903953529/1338251927946789056

Image

Goals

  • Ensure that key parameters (such as staking_fee) are never set to null in future deployments.
  • Enhance E2E and automated testing to catch missing or invalid parameters before a release
  • Define a clear upgrade process to validate parameter changes on Alpha before promoting them to Beta.

Deliverables

  • Document the root cause of how the staking_fee parameter became null.
  • Update E2E tests to specifically verify parameter validity (e.g., ensuring staking_fee is not null).
  • Create automated checks or scripts that confirm parameter correctness in pre-release stages.
  • Add a step in the upgrade documentation/process for verifying all key parameters.
  • Ensure basic parameter validation inside the upgrade handlers (docs, copy-paste, etc...) like so (for example):
     sharedParams := k.sharedKeeper.Params(ctx)
     if err := sharedParams.ValidateBasic() {
       panic(err)
     }
     ...

Non-goals / Non-deliverables

  • Revisiting unrelated parameters that were not affected by the recent change.
  • Overhauling the entire upgrade process beyond the parameter checks related to this issue.

Creator: @okdas
Co-owner: @Olshansk

@okdas okdas added the documentation Improvements or additions to documentation label Feb 11, 2025
@okdas okdas added this to the Beta TestNet Iteration milestone Feb 11, 2025
@okdas okdas self-assigned this Feb 11, 2025
@okdas okdas added this to Shannon Feb 11, 2025
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Shannon Feb 11, 2025
@okdas okdas changed the title [REPLACE_WITH_IDENTIFIER] Provide a descriptive title [Docs][Upgrades] Add safeguards for upgrade testing Feb 11, 2025
@okdas okdas changed the title [Docs][Upgrades] Add safeguards for upgrade testing [Docs][Upgrades] Add safeguards for upgrades Feb 11, 2025
@okdas
Copy link
Member Author

okdas commented Feb 11, 2025

The place where hard-coded params were replaced with GetParams, but wrong parameter was updated.
Image

@Olshansk Olshansk moved this from 📋 Backlog to 🔖 Ready in Shannon Feb 11, 2025
@Olshansk
Copy link
Member

@okdas Great ticket. I've updated a few details and added the example from @red-0ne as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: 🔖 Ready
Development

No branches or pull requests

2 participants