Skip to content

Commit

Permalink
OpenGov in Westend and Rococo (#1177)
Browse files Browse the repository at this point in the history
Migrating [PR from the archived polkadot
repo](paritytech/polkadot#7272)

As per
paritytech/polkadot#7272 (comment),
the changes in this MR include the following pallets into [x] Rococo and
[x] Westend runtimes:

    pallet_conviction_voting
    pallet_referenda
    pallet_ranked_collective
    pallet_custom_origins
    pallet_whitelist

And only for westend-runtime:

    pallet_treasury

Following [Kusama runtime
config](https://github.com/paritytech/polkadot/tree/dbae30efe080a1d41fe54ef4da8af47614c9ca93/runtime/kusama/src)
as a baseline.

Benchmarking of the following pallets done for both Rococo and Westend:

    pallet_conviction_voting
    pallet_referenda
    pallet_ranked_collective (only on Rococo)
    pallet_whitelist

And only for Westend:

    pallet_treasury

Removed Gov1 from Rococo as in
paritytech/polkadot#6701

Rococo Gov1 storage will be cleaned in a different PR - [issue ](#1618)

---------

Co-authored-by: Giles Cope <gilescope@gmail.com>
  • Loading branch information
al3mart and gilescope authored Sep 27, 2023
1 parent 8b061a5 commit 69ed308
Show file tree
Hide file tree
Showing 35 changed files with 4,964 additions and 2,385 deletions.
39 changes: 24 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 2 additions & 16 deletions polkadot/node/service/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ fn westend_staging_testnet_config_genesis(wasm_binary: &[u8]) -> westend::Runtim
vesting: westend::VestingConfig { vesting: vec![] },
sudo: westend::SudoConfig { key: Some(endowed_accounts[0].clone()) },
hrmp: Default::default(),
treasury: Default::default(),
configuration: westend::ConfigurationConfig {
config: default_parachains_host_configuration(),
},
Expand Down Expand Up @@ -716,21 +717,13 @@ fn rococo_staging_testnet_config_genesis(
})
.collect::<Vec<_>>(),
},
phragmen_election: Default::default(),
babe: rococo_runtime::BabeConfig {
authorities: Default::default(),
epoch_config: Some(rococo_runtime::BABE_GENESIS_EPOCH_CONFIG),
..Default::default()
},
grandpa: Default::default(),
im_online: Default::default(),
democracy: rococo_runtime::DemocracyConfig::default(),
council: rococo::CouncilConfig { members: vec![], phantom: Default::default() },
technical_committee: rococo::TechnicalCommitteeConfig {
members: vec![],
phantom: Default::default(),
},
technical_membership: Default::default(),
treasury: Default::default(),
authority_discovery: rococo_runtime::AuthorityDiscoveryConfig {
keys: vec![],
Expand Down Expand Up @@ -992,6 +985,7 @@ pub fn westend_testnet_genesis(
vesting: westend::VestingConfig { vesting: vec![] },
sudo: westend::SudoConfig { key: Some(root_key) },
hrmp: Default::default(),
treasury: Default::default(),
configuration: westend::ConfigurationConfig {
config: default_parachains_host_configuration(),
},
Expand Down Expand Up @@ -1062,14 +1056,6 @@ pub fn rococo_testnet_genesis(
},
grandpa: Default::default(),
im_online: Default::default(),
phragmen_election: Default::default(),
democracy: rococo::DemocracyConfig::default(),
council: rococo::CouncilConfig { members: vec![], phantom: Default::default() },
technical_committee: rococo::TechnicalCommitteeConfig {
members: vec![],
phantom: Default::default(),
},
technical_membership: Default::default(),
treasury: Default::default(),
claims: rococo::ClaimsConfig { claims: vec![], vesting: vec![] },
vesting: rococo::VestingConfig { vesting: vec![] },
Expand Down
18 changes: 18 additions & 0 deletions polkadot/runtime/rococo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ sp-api = { path = "../../../substrate/primitives/api", default-features = false
sp-genesis-builder = { path = "../../../substrate/primitives/genesis-builder", default-features = false }
inherents = { package = "sp-inherents", path = "../../../substrate/primitives/inherents", default-features = false }
offchain-primitives = { package = "sp-offchain", path = "../../../substrate/primitives/offchain", default-features = false }
sp-arithmetic = { path = "../../../substrate/primitives/arithmetic", default-features = false }
sp-std = { package = "sp-std", path = "../../../substrate/primitives/std", default-features = false }
sp-io = { path = "../../../substrate/primitives/io", default-features = false }
sp-mmr-primitives = { path = "../../../substrate/primitives/merkle-mountain-range", default-features = false }
Expand All @@ -48,6 +49,7 @@ pallet-state-trie-migration = { path = "../../../substrate/frame/state-trie-migr
pallet-transaction-payment = { path = "../../../substrate/frame/transaction-payment", default-features = false }
pallet-transaction-payment-rpc-runtime-api = { path = "../../../substrate/frame/transaction-payment/rpc/runtime-api", default-features = false }
pallet-collective = { path = "../../../substrate/frame/collective", default-features = false }
pallet-conviction-voting = { path = "../../../substrate/frame/conviction-voting", default-features = false }
pallet-democracy = { path = "../../../substrate/frame/democracy", default-features = false }
pallet-elections-phragmen = { path = "../../../substrate/frame/elections-phragmen", default-features = false }
frame-executive = { path = "../../../substrate/frame/executive", default-features = false }
Expand All @@ -63,7 +65,9 @@ pallet-nis = { path = "../../../substrate/frame/nis", default-features = false }
pallet-offences = { path = "../../../substrate/frame/offences", default-features = false }
pallet-preimage = { path = "../../../substrate/frame/preimage", default-features = false }
pallet-proxy = { path = "../../../substrate/frame/proxy", default-features = false }
pallet-ranked-collective = { path = "../../../substrate/frame/ranked-collective", default-features = false }
pallet-recovery = { path = "../../../substrate/frame/recovery", default-features = false }
pallet-referenda = { path = "../../../substrate/frame/referenda", default-features = false }
pallet-scheduler = { path = "../../../substrate/frame/scheduler", default-features = false }
pallet-session = { path = "../../../substrate/frame/session", default-features = false }
pallet-society = { path = "../../../substrate/frame/society", default-features = false }
Expand All @@ -77,6 +81,7 @@ pallet-tips = { path = "../../../substrate/frame/tips", default-features = false
pallet-treasury = { path = "../../../substrate/frame/treasury", default-features = false }
pallet-utility = { path = "../../../substrate/frame/utility", default-features = false }
pallet-vesting = { path = "../../../substrate/frame/vesting", default-features = false }
pallet-whitelist = { path = "../../../substrate/frame/whitelist", default-features = false }
pallet-xcm = { path = "../../xcm/pallet-xcm", default-features = false }
pallet-xcm-benchmarks = { path = "../../xcm/pallet-xcm-benchmarks", default-features = false, optional = true }

Expand Down Expand Up @@ -135,6 +140,7 @@ std = [
"pallet-bounties/std",
"pallet-child-bounties/std",
"pallet-collective/std",
"pallet-conviction-voting/std",
"pallet-democracy/std",
"pallet-elections-phragmen/std",
"pallet-grandpa/std",
Expand All @@ -149,7 +155,9 @@ std = [
"pallet-offences/std",
"pallet-preimage/std",
"pallet-proxy/std",
"pallet-ranked-collective/std",
"pallet-recovery/std",
"pallet-referenda/std",
"pallet-scheduler/std",
"pallet-session/std",
"pallet-society/std",
Expand All @@ -163,6 +171,7 @@ std = [
"pallet-treasury/std",
"pallet-utility/std",
"pallet-vesting/std",
"pallet-whitelist/std",
"pallet-xcm-benchmarks?/std",
"pallet-xcm/std",
"parity-scale-codec/std",
Expand All @@ -175,6 +184,7 @@ std = [
"serde/std",
"serde_derive",
"sp-api/std",
"sp-arithmetic/std",
"sp-core/std",
"sp-genesis-builder/std",
"sp-io/std",
Expand All @@ -201,6 +211,7 @@ runtime-benchmarks = [
"pallet-bounties/runtime-benchmarks",
"pallet-child-bounties/runtime-benchmarks",
"pallet-collective/runtime-benchmarks",
"pallet-conviction-voting/runtime-benchmarks",
"pallet-democracy/runtime-benchmarks",
"pallet-elections-phragmen/runtime-benchmarks",
"pallet-grandpa/runtime-benchmarks",
Expand All @@ -215,7 +226,9 @@ runtime-benchmarks = [
"pallet-offences/runtime-benchmarks",
"pallet-preimage/runtime-benchmarks",
"pallet-proxy/runtime-benchmarks",
"pallet-ranked-collective/runtime-benchmarks",
"pallet-recovery/runtime-benchmarks",
"pallet-referenda/runtime-benchmarks",
"pallet-scheduler/runtime-benchmarks",
"pallet-society/runtime-benchmarks",
"pallet-staking/runtime-benchmarks",
Expand All @@ -226,6 +239,7 @@ runtime-benchmarks = [
"pallet-treasury/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"pallet-vesting/runtime-benchmarks",
"pallet-whitelist/runtime-benchmarks",
"pallet-xcm-benchmarks/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"polkadot-parachain-primitives/runtime-benchmarks",
Expand All @@ -252,6 +266,7 @@ try-runtime = [
"pallet-bounties/try-runtime",
"pallet-child-bounties/try-runtime",
"pallet-collective/try-runtime",
"pallet-conviction-voting/try-runtime",
"pallet-democracy/try-runtime",
"pallet-elections-phragmen/try-runtime",
"pallet-grandpa/try-runtime",
Expand All @@ -266,7 +281,9 @@ try-runtime = [
"pallet-offences/try-runtime",
"pallet-preimage/try-runtime",
"pallet-proxy/try-runtime",
"pallet-ranked-collective/try-runtime",
"pallet-recovery/try-runtime",
"pallet-referenda/try-runtime",
"pallet-scheduler/try-runtime",
"pallet-session/try-runtime",
"pallet-society/try-runtime",
Expand All @@ -279,6 +296,7 @@ try-runtime = [
"pallet-treasury/try-runtime",
"pallet-utility/try-runtime",
"pallet-vesting/try-runtime",
"pallet-whitelist/try-runtime",
"pallet-xcm/try-runtime",
"runtime-common/try-runtime",
"runtime-parachains/try-runtime",
Expand Down
Loading

0 comments on commit 69ed308

Please sign in to comment.