-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: bouncer command for submitting runtime upgrades #4122
Conversation
PRO-646 CFE upgrade testing
Once the upgrading functionality is in, we should add a bouncer test for it. There are two types of upgrades to handle:
The former is easy, and can be tested with a bump to the runtime version on the SC (without any other changes). Which could be done in an ordinary bouncer command. The latter is the more difficult. The upgrade tests could be in a separate module for bouncer, since it may require a specific setup step to create the second binary, rather than requiring that we always need the second binary even when we may not want to test upgrades. |
ada93ab
to
658adaf
Compare
const chainflip = await getChainflipApi(); | ||
|
||
let versionPercentRestriction; | ||
if (semverRestriction && percentNodesUpgraded) { |
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.
Is it possible to set only the semver restriction?
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.
No
Codecov Report
@@ Coverage Diff @@
## main #4122 +/- ##
=====================================
Coverage 72% 72%
=====================================
Files 378 378
Lines 60637 60637
Branches 60637 60637
=====================================
+ Hits 43492 43494 +2
+ Misses 14881 14880 -1
+ Partials 2264 2263 -1 see 3 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
// 2. Optional: A JSON string representing the semver restriction for the upgrade. If not provided, the upgrade will not be restricted by semver. | ||
// 3. Optional: A number representing the percentage of nodes that must be upgraded before the upgrade will be allowed to proceed. If not provided, the upgrade will not be restricted by the number of nodes that have upgraded. | ||
// | ||
// For example: ./commands/submit_runtime_upgrade.ts /path/to/state_chain_runtime.compact.compressed.wasm '{"major": 1, "minor": 2, "patch": 3}' 50 |
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.
Is it worth making the command easier for the caller by letting them specify the version using dot notation, e.g.:
./commands/submit_runtime_upgrade.ts /path/to/state_chain_runtime.compact.compressed.wasm 1.2.3 50
?
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.
Yeah thought about this, it'll mostly be used by other scripts - so it doesn't matter as much, but I may end up changing it to something like you've described as I go, because it is a bit nicer
* origin/main: chore: get gas parameters from statechain event (#4125) Feat: ingress-egress tracking for DOT (#4121) add support for hex encoded amounts on limit order and range order methods in LP API (#4120) feat: bouncer command for submitting runtime upgrades (#4122) Feat: ensure correct process termination in ingress/egress tracker (#4101) feat(custom-rpc): add flip balance to account info (#4119) chore: storage migration delete NextCompatibilityVersion (#4115) chore: delete unneeded function (#4116) # Conflicts: # state-chain/runtime/src/lib.rs
Pull Request
Part of: PRO-646
Checklist
Please conduct a thorough self-review before opening the PR.
Summary
This can then be composed with some future work, so we can have (more) automated upgrade testing 🙌