Skip to content

Commit 7ac8200

Browse files
authored
Adjust weight consumption in parachain-staking (#3258)
* reduce delegator count * use default pallet weights
1 parent 4a5e812 commit 7ac8200

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

parachain/runtime/litentry/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,9 +1008,9 @@ impl pallet_parachain_staking::Config for Runtime {
10081008
/// Minimum collators selected per round, default at genesis and minimum forever after
10091009
type MinSelectedCandidates = ConstU32<1>;
10101010
/// Maximum top delegations per candidate
1011-
type MaxTopDelegationsPerCandidate = ConstU32<1000>;
1011+
type MaxTopDelegationsPerCandidate = ConstU32<300>;
10121012
/// Maximum bottom delegations per candidate
1013-
type MaxBottomDelegationsPerCandidate = ConstU32<200>;
1013+
type MaxBottomDelegationsPerCandidate = ConstU32<100>;
10141014
/// Maximum delegations per delegator
10151015
type MaxDelegationsPerDelegator = ConstU32<100>;
10161016
type DefaultCollatorCommission = DefaultCollatorCommission;
@@ -1025,7 +1025,7 @@ impl pallet_parachain_staking::Config for Runtime {
10251025
type MinDelegatorStk = MinDelegatorStk;
10261026
type OnCollatorPayout = ();
10271027
type OnNewRound = ();
1028-
type WeightInfo = weights::pallet_parachain_staking::WeightInfo<Runtime>;
1028+
type WeightInfo = ();
10291029
type IssuanceAdapter = AssetsHandler;
10301030
type OnAllDelegationRemoved = ScoreStaking;
10311031
}

parachain/runtime/paseo/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,9 +1053,9 @@ impl pallet_parachain_staking::Config for Runtime {
10531053
/// Minimum collators selected per round, default at genesis and minimum forever after
10541054
type MinSelectedCandidates = ConstU32<1>;
10551055
/// Maximum top delegations per candidate
1056-
type MaxTopDelegationsPerCandidate = ConstU32<1000>;
1056+
type MaxTopDelegationsPerCandidate = ConstU32<300>;
10571057
/// Maximum bottom delegations per candidate
1058-
type MaxBottomDelegationsPerCandidate = ConstU32<200>;
1058+
type MaxBottomDelegationsPerCandidate = ConstU32<100>;
10591059
/// Maximum delegations per delegator
10601060
type MaxDelegationsPerDelegator = ConstU32<100>;
10611061
type DefaultCollatorCommission = DefaultCollatorCommission;
@@ -1070,7 +1070,7 @@ impl pallet_parachain_staking::Config for Runtime {
10701070
type MinDelegatorStk = MinDelegatorStk;
10711071
type OnCollatorPayout = ();
10721072
type OnNewRound = ();
1073-
type WeightInfo = weights::pallet_parachain_staking::WeightInfo<Runtime>;
1073+
type WeightInfo = ();
10741074
type IssuanceAdapter = AssetsHandler;
10751075
type OnAllDelegationRemoved = ScoreStaking;
10761076
}

parachain/scripts/benchmark-weight-remote.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ docker pull litentry/litentry-parachain:runtime-benchmarks
2323
# clone the repo
2424
TMPDIR=/tmp
2525
cd "$TMPDIR"
26-
[ -d litentry-parachain ] && rm -rf litentry-parachain
27-
git clone https://github.com/litentry/litentry-parachain
28-
cd litentry-parachain/parachain
26+
[ -d heima ] && rm -rf heima
27+
git clone https://github.com/litentry/heima
28+
cd heima/parachain
2929
git checkout "$2"
3030

3131
# copy binary out

0 commit comments

Comments
 (0)