Skip to content

Commit

Permalink
add MaxProposalWeight (#217)
Browse files Browse the repository at this point in the history
* bump spec version

* add 50% proposalWeight limit

* bump collator version for new release
  • Loading branch information
brenzi committed Jun 12, 2023
1 parent d3ac9a0 commit 3511cdc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion polkadot-parachains/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "integritee-collator"
description = "The Integritee parachain collator binary"
# align major.minor revision with the runtimes. bump patch revision ad lib. make this the github release tag
version = "1.5.38"
version = "1.5.39"
authors = ["Integritee AG <hello@integritee.network>"]
homepage = "https://integritee.network/"
repository = "https://github.com/integritee-network/parachain"
Expand Down
2 changes: 1 addition & 1 deletion polkadot-parachains/integritee-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "integritee-runtime"
description = "The Integritee parachain runtime"
# patch revision must match runtime spec_version
version = "1.5.33"
version = "1.5.34"
authors = ["Integritee AG <hello@integritee.network>"]
homepage = "https://integritee.network/"
repository = "https://github.com/integritee-network/parachain"
Expand Down
7 changes: 4 additions & 3 deletions polkadot-parachains/integritee-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("integritee-parachain"),
impl_name: create_runtime_str!("integritee-full"),
authoring_version: 2,
spec_version: 33,
spec_version: 34,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 5,
Expand Down Expand Up @@ -588,6 +588,7 @@ parameter_types! {
pub const CouncilMotionDuration: BlockNumber = prod_or_fast!(3 * DAYS, 2 * MINUTES);
pub const CouncilMaxProposals: u32 = 100;
pub const CouncilMaxMembers: u32 = 100;
pub MaxProposalWeight: Weight = Perbill::from_percent(50) * RuntimeBlockWeights::get().max_block;
}

impl pallet_collective::Config<CouncilInstance> for Runtime {
Expand All @@ -600,7 +601,7 @@ impl pallet_collective::Config<CouncilInstance> for Runtime {
type DefaultVote = pallet_collective::PrimeDefaultVote;
type WeightInfo = weights::pallet_collective::WeightInfo<Runtime>;
type SetMembersOrigin = EnsureRootOrMoreThanHalfCouncil;
type MaxProposalWeight = ();
type MaxProposalWeight = MaxProposalWeight;
}

pub type EnsureRootOrMoreThanHalfCouncil = EitherOfDiverse<
Expand Down Expand Up @@ -633,7 +634,7 @@ impl pallet_collective::Config<TechnicalCommitteeInstance> for Runtime {
type DefaultVote = pallet_collective::MoreThanMajorityThenPrimeDefaultVote;
type WeightInfo = weights::pallet_collective::WeightInfo<Runtime>;
type SetMembersOrigin = EnsureRootOrMoreThanHalfCouncil;
type MaxProposalWeight = ();
type MaxProposalWeight = MaxProposalWeight;
}

pub type EnsureRootOrMoreThanHalfTechnicalCommittee = EitherOfDiverse<
Expand Down

0 comments on commit 3511cdc

Please sign in to comment.