-
Notifications
You must be signed in to change notification settings - Fork 15
Scenarios for runtime upgrades using referendas (root & whitelisted caller tracks) #461
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
base: master
Are you sure you want to change the base?
Scenarios for runtime upgrades using referendas (root & whitelisted caller tracks) #461
Conversation
…listed caller tracks)
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.
The changes introduce new test suites for runtime upgrades via governance referenda. However, there are several copy-paste errors in the new test suite helper functions in packages/shared/src/upgrade.ts that cause them to test the wrong scenarios (self-upgrade instead of cross-chain upgrade). Additionally, there is a brittle try-catch block for resolving type definitions and a commented-out test that should be addressed.
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.
Found critical logic issues in the scheduler manipulation helper moveScheduledCallToNextBlock within packages/shared/src/upgrade.ts, including incorrect index handling for lookups and potential data loss when moving agendas. Also identified questionable usage of the test suites where AssetHub is configured as the governance chain upgrading the Relay Chain.
Scenarios here aim to test
authorize_upgrade+apply_authorized_upgradetwo-step runtime upgrade approach as its done in real-life networks through Referendum via Root track or Whitelisted Caller trackThere are multiple combinations that can occur:
Roottrack orWhitelisted CallertrackWhitelisted Callertrack used then there is also Fellowship entity involved which approves (whitelists) theauthorize_upgradecall before execution of the referendum itself. Fellowship entity resides on relay (Kusama) or collectives chain (Polkadot)set_storagecalls to artificially speed-up the referendum - eg. schedulenudge_referendumcalls on next block to fast forward ref state transitions, and then also scheduling the ref call itself once confirmed it got eventually approved (based on https://docs.polkadot.com/tutorials/onchain-governance/fast-track-gov-proposal/)