Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Companion for #11649: Bound uses of Call (#5729)
Browse files Browse the repository at this point in the history
* Fixes

* Clear out old weights

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Resolve merges

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix weight traits

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* polkadot runtime: Clippy

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* rococo runtime: update pallet configs

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add preimage migration

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add all migrations

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Democracy is not on Westend

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* [Migration] Refund stored multisig calls (#6075)

* Add Preimages to referenda config

Needed since Gov V2 just merged.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update weights

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add multisig migration to Westend+Rococo

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix Executive syntax

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Bump Substrate

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: parity-processbot <>
Co-authored-by: Roman Useinov <roman.useinov@gmail.com>
  • Loading branch information
3 people authored Oct 5, 2022
1 parent df4a1c3 commit 7870daf
Show file tree
Hide file tree
Showing 19 changed files with 720 additions and 1,183 deletions.
379 changes: 192 additions & 187 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions runtime/kusama/src/governance/fellowship.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ impl pallet_referenda::Config<FellowshipReferendaInstance> for Runtime {
type UndecidingTimeout = UndecidingTimeout;
type AlarmInterval = AlarmInterval;
type Tracks = TracksInfo;
type Preimages = Preimage;
}

pub type FellowshipCollectiveInstance = pallet_ranked_collective::Instance1;
Expand Down
1 change: 1 addition & 0 deletions runtime/kusama/src/governance/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,5 @@ impl pallet_referenda::Config for Runtime {
type UndecidingTimeout = UndecidingTimeout;
type AlarmInterval = AlarmInterval;
type Tracks = TracksInfo;
type Preimages = Preimage;
}
6 changes: 3 additions & 3 deletions runtime/kusama/src/governance/old.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ parameter_types! {
}

impl pallet_democracy::Config for Runtime {
type Proposal = RuntimeCall;
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type EnactmentPeriod = EnactmentPeriod;
Expand Down Expand Up @@ -74,14 +73,15 @@ impl pallet_democracy::Config for Runtime {
// only do it once and it lasts only for the cooloff period.
type VetoOrigin = pallet_collective::EnsureMember<AccountId, TechnicalCollective>;
type CooloffPeriod = CooloffPeriod;
type PreimageByteDeposit = PreimageByteDeposit;
type OperationalPreimageOrigin = pallet_collective::EnsureMember<AccountId, CouncilCollective>;
type Slash = Treasury;
type Scheduler = Scheduler;
type PalletsOrigin = OriginCaller;
type MaxVotes = MaxVotes;
type WeightInfo = weights::pallet_democracy::WeightInfo<Runtime>;
type MaxProposals = MaxProposals;
type Preimages = Preimage;
type MaxDeposits = ConstU32<100>;
type MaxBlacklisted = ConstU32<100>;
}

parameter_types! {
Expand Down
13 changes: 8 additions & 5 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,10 @@ impl pallet_scheduler::Config for Runtime {
type MaxScheduledPerBlock = MaxScheduledPerBlock;
type WeightInfo = weights::pallet_scheduler::WeightInfo<Runtime>;
type OriginPrivilegeCmp = OriginPrivilegeCmp;
type PreimageProvider = Preimage;
type NoPreimagePostponement = NoPreimagePostponement;
type Preimages = Preimage;
}

parameter_types! {
pub const PreimageMaxSize: u32 = 4096 * 1024;
pub const PreimageBaseDeposit: Balance = deposit(2, 64);
pub const PreimageByteDeposit: Balance = deposit(0, 1);
}
Expand All @@ -239,8 +237,7 @@ impl pallet_preimage::Config for Runtime {
type WeightInfo = weights::pallet_preimage::WeightInfo<Runtime>;
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type ManagerOrigin = EnsureRoot<AccountId>; // This might be too strong a requirenent?
type MaxSize = PreimageMaxSize;
type ManagerOrigin = EnsureRoot<AccountId>;
type BaseDeposit = PreimageBaseDeposit;
type ByteDeposit = PreimageByteDeposit;
}
Expand Down Expand Up @@ -1471,6 +1468,12 @@ pub type Executive = frame_executive::Executive<
StakingMigrationV11OldPallet,
>,
pallet_staking::migrations::v12::MigrateToV12<Runtime>,
// "Bound uses of call" <https://github.com/paritytech/polkadot/pull/5729>
pallet_preimage::migration::v1::Migration<Runtime>,
pallet_scheduler::migration::v3::MigrateToV4<Runtime>,
pallet_democracy::migrations::v1::Migration<Runtime>,
pallet_multisig::migrations::v1::MigrateToV1<Runtime>,
// "Properly migrate weights to v2" <https://github.com/paritytech/polkadot/pull/6091>
parachains_configuration::migration::v3::MigrateToV3<Runtime>,
),
>;
Expand Down
Loading

0 comments on commit 7870daf

Please sign in to comment.