-
Notifications
You must be signed in to change notification settings - Fork 140
System chains governace authorizes upgrade tests #783
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
System chains governace authorizes upgrade tests #783
Conversation
| pub UniversalLocation: InteriorLocation = | ||
| [GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into())].into(); | ||
| pub StakingPot: AccountId = CollatorSelection::account_id(); | ||
| pub const GovernanceLocation: Location = Location::parent(); |
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.
@karolk91 just thinking, can we just define this in the test file directly, when it is not used here? I think later we will have this constant here: https://github.com/polkadot-fellows/runtimes/blob/main/system-parachains/constants/src/kusama.rs#L153 right?
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.
➕
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.
@karolk91 just thinking, can we just define this in the test file directly, when it is not used here? I think later we will have this constant here: https://github.com/polkadot-fellows/runtimes/blob/main/system-parachains/constants/src/kusama.rs#L153 right?
I should probably just introduce this common constant as part of this PR
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.
I have introduced GovernanceLocation to common package in b5a8792. I have dropped const modifier because in future I expect it to point to AssetHubLocation and we would need to drop const anyway
@bkontur, I have followed the convention that GovernanceLocation is re-exported via xcm_config for every chain. In case of Encointer its only used for testing, do you think its worth breaking the convention for this single occurence and import straight in tests instead of via xcm_config ?
bkontur
left a comment
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.
| pub UniversalLocation: InteriorLocation = | ||
| [GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into())].into(); | ||
| pub StakingPot: AccountId = CollatorSelection::account_id(); | ||
| pub const GovernanceLocation: Location = Location::parent(); |
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.
➕
|
Review required! Latest push from author must always be reviewed |
Co-authored-by: Karol Kokoszka <[email protected]>
Governance integration tests on Kusama (by karolk91) (for OpenGov on RC)
bkontur
left a comment
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.
Co-authored-by: Branislav Kontur <[email protected]>
| ); | ||
|
|
||
| // whitelist | ||
| Kusama::execute_with(|| { |
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.
@karolk91 Karol, we forgot to add and use here macro_rules! assert_whitelisted { :), please
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.
done
pandres95
left a comment
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.
Overall, looks good. Just a minor nit, but can be handled on a further PR.
| [[package]] | ||
| name = "emulated-integration-tests-common" | ||
| version = "20.1.0" | ||
| version = "21.0.0" |
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.
Open question: Wouldn't it make sense to upgrade the entire set of dependencies to the latest patch version, now that we're making changes on Cargo.lock?
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.
Open question: Wouldn't it make sense to upgrade the entire set of dependencies to the latest patch version, now that we're making changes on
Cargo.lock?
Well, in the past we did both - PR with patch upgrade and also PR with just few patch deps upgrade - I think both ways are ok. We can do follow-up to bring the full stable2503-7
| frame-election-provider-support = { version = "40.1.1", default-features = false } | ||
| frame-executive = { version = "40.0.1", default-features = false } | ||
| frame-support = { version = "40.1.0", default-features = false } | ||
| frame-system = { version = "40.1.0", default-features = false } |
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.
Think it'd definitely be better if we update other related deps in the PSDK, to prevent having multiple versions of the crates pinned to multiple dependants. This tends to be messy sometimes,
|
/merge |
089c589
into
polkadot-fellows:main
|
Enabled Available commands
For more information see the documentation |
This PR introduces test case scenarios to verify if parachain is able to process
authorize_upgradecall as if it was send via governance chain (a Relay Chain for purpose of this PR)These test cases were introduced to polkadot-sdk and suggested via comment that it would be nice to port, so this is just integration of existing testnets cases for production networks
This PR also introduces integration tests covering all system chains that simulates real network upgrade using whitelisting (via Collectives chain in case of Polkadot)
Test Coverage
BasicParachainRuntimenot implementedFollow-up:
For AHM, we will add also the tests for OpenGov on AHs:
#776
#626