From 7ac82003bef56871c889fbc93d52ec84d4d44ab3 Mon Sep 17 00:00:00 2001 From: Kai <7630809+Kailai-Wang@users.noreply.github.com> Date: Fri, 14 Feb 2025 23:59:18 +0100 Subject: [PATCH] Adjust weight consumption in parachain-staking (#3258) * reduce delegator count * use default pallet weights --- parachain/runtime/litentry/src/lib.rs | 6 +++--- parachain/runtime/paseo/src/lib.rs | 6 +++--- parachain/scripts/benchmark-weight-remote.sh | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/parachain/runtime/litentry/src/lib.rs b/parachain/runtime/litentry/src/lib.rs index 18b57a31a0..40b181b217 100644 --- a/parachain/runtime/litentry/src/lib.rs +++ b/parachain/runtime/litentry/src/lib.rs @@ -1008,9 +1008,9 @@ impl pallet_parachain_staking::Config for Runtime { /// Minimum collators selected per round, default at genesis and minimum forever after type MinSelectedCandidates = ConstU32<1>; /// Maximum top delegations per candidate - type MaxTopDelegationsPerCandidate = ConstU32<1000>; + type MaxTopDelegationsPerCandidate = ConstU32<300>; /// Maximum bottom delegations per candidate - type MaxBottomDelegationsPerCandidate = ConstU32<200>; + type MaxBottomDelegationsPerCandidate = ConstU32<100>; /// Maximum delegations per delegator type MaxDelegationsPerDelegator = ConstU32<100>; type DefaultCollatorCommission = DefaultCollatorCommission; @@ -1025,7 +1025,7 @@ impl pallet_parachain_staking::Config for Runtime { type MinDelegatorStk = MinDelegatorStk; type OnCollatorPayout = (); type OnNewRound = (); - type WeightInfo = weights::pallet_parachain_staking::WeightInfo; + type WeightInfo = (); type IssuanceAdapter = AssetsHandler; type OnAllDelegationRemoved = ScoreStaking; } diff --git a/parachain/runtime/paseo/src/lib.rs b/parachain/runtime/paseo/src/lib.rs index d530bf0857..8e369333d0 100644 --- a/parachain/runtime/paseo/src/lib.rs +++ b/parachain/runtime/paseo/src/lib.rs @@ -1053,9 +1053,9 @@ impl pallet_parachain_staking::Config for Runtime { /// Minimum collators selected per round, default at genesis and minimum forever after type MinSelectedCandidates = ConstU32<1>; /// Maximum top delegations per candidate - type MaxTopDelegationsPerCandidate = ConstU32<1000>; + type MaxTopDelegationsPerCandidate = ConstU32<300>; /// Maximum bottom delegations per candidate - type MaxBottomDelegationsPerCandidate = ConstU32<200>; + type MaxBottomDelegationsPerCandidate = ConstU32<100>; /// Maximum delegations per delegator type MaxDelegationsPerDelegator = ConstU32<100>; type DefaultCollatorCommission = DefaultCollatorCommission; @@ -1070,7 +1070,7 @@ impl pallet_parachain_staking::Config for Runtime { type MinDelegatorStk = MinDelegatorStk; type OnCollatorPayout = (); type OnNewRound = (); - type WeightInfo = weights::pallet_parachain_staking::WeightInfo; + type WeightInfo = (); type IssuanceAdapter = AssetsHandler; type OnAllDelegationRemoved = ScoreStaking; } diff --git a/parachain/scripts/benchmark-weight-remote.sh b/parachain/scripts/benchmark-weight-remote.sh index 4faf62d59c..b8d5086437 100755 --- a/parachain/scripts/benchmark-weight-remote.sh +++ b/parachain/scripts/benchmark-weight-remote.sh @@ -23,9 +23,9 @@ docker pull litentry/litentry-parachain:runtime-benchmarks # clone the repo TMPDIR=/tmp cd "$TMPDIR" -[ -d litentry-parachain ] && rm -rf litentry-parachain -git clone https://github.com/litentry/litentry-parachain -cd litentry-parachain/parachain +[ -d heima ] && rm -rf heima +git clone https://github.com/litentry/heima +cd heima/parachain git checkout "$2" # copy binary out