Companion for Trim compact solution for length during preparation (#2649)

* Companion for Trim compact solution for length during preparation

https://github.com/paritytech/substrate/pull/8317

* eliminate potential for overflow in OffchainSolutionLengthLimit

* Apply suggestions from code review

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>

* update substrate: cargo update -p sp-io

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
Peter Goodspeed-Niklaus
2021-04-13 15:53:51 +02:00
committed by GitHub
parent f1f9192a38
commit f822381c4c
5 changed files with 169 additions and 155 deletions
+4 -2
View File
@@ -34,7 +34,8 @@ use runtime_common::{
mmr as mmr_common,
SlowAdjustingFeeUpdate, CurrencyToVote,
impls::ToAuthor,
BlockHashCount, BlockWeights, BlockLength, RocksDbWeight, OffchainSolutionWeightLimit,
BlockHashCount, BlockWeights, BlockLength, RocksDbWeight,
OffchainSolutionWeightLimit, OffchainSolutionLengthLimit,
ParachainSessionKeyPlaceholder, AssignmentSessionKeyPlaceholder,
};
use sp_runtime::{
@@ -365,7 +366,8 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
type UnsignedPhase = UnsignedPhase;
type SolutionImprovementThreshold = SolutionImprovementThreshold;
type MinerMaxIterations = MinerMaxIterations;
type MinerMaxWeight = OffchainSolutionWeightLimit; // For now use the one from staking.
type MinerMaxWeight = OffchainSolutionWeightLimit;
type MinerMaxLength = OffchainSolutionLengthLimit;
type MinerTxPriority = NposSolutionPriority;
type DataProvider = Staking;
type OnChainAccuracy = Perbill;