-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Make the number of nominations configurable #8368
Conversation
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
…om:paritytech/substrate into kiz-election-provider-2-two-phase-unsigned
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
…om:paritytech/substrate into kiz-election-provider-2-two-phase-unsigned
…/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_election_provider_multi_phase --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/src/weights.rs --template=./.maintain/frame-weight-template.hbs
…om:paritytech/substrate into kiz-election-provider-2-two-phase-unsigned
this needs to merge master to be easier to review |
Done, but it was quite a mess, I have to re-review myself and make sure I didn't mess things up. |
Does someone know a way to also remove duplicate commits, while keeping the PR? I could just generate diff from this branch, and |
|
cheers @coriolinus |
|
||
// We only accept data provider who's maximum votes per voter matches our | ||
// `T::CompactSolution`'s `LIMIT`. | ||
assert_eq!( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note that the main reason why I need to add MAXIMUM_VOTES_PER_VOTER
const is so that I can make this assertion -- otherwise this might be a foot gun.
…ction-provider-21-24-nominators
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
bot merge |
Trying merge. |
* Companion for paritytech/substrate#8368 * "Update Substrate" Co-authored-by: parity-processbot <>
* Base features and traits. * pallet and unsigned phase * Undo bad formattings. * some formatting cleanup. * Small self-cleanup. * Make it all build * self-review * Some doc tests. * Some changes from other PR * Fix session test * Update Cargo.lock * Update frame/election-provider-multi-phase/src/lib.rs Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com> * Some review comments * Rename + make encode/decode * Do an assert as well, just in case. * Fix build * Update frame/election-provider-multi-phase/src/unsigned.rs Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com> * Las comment * fix staking fuzzer. * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_election_provider_multi_phase --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/src/weights.rs --template=./.maintain/frame-weight-template.hbs * Add one last layer of feasibility check as well. * Last fixes to benchmarks * Some more docs. * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_election_provider_multi_phase --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/src/weights.rs --template=./.maintain/frame-weight-template.hbs * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_election_provider_multi_phase --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/src/weights.rs --template=./.maintain/frame-weight-template.hbs * Some nits * It all works * Some self cleanup * Update frame/staking/src/lib.rs Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com> * remove most todos. * Round of self-review. * Fix migration * clean macro * Revert wrong merge * Make the number of nominations configurable * Self reivew * renmae. Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com> Co-authored-by: Parity Benchmarking Bot <admin@parity.io> Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
* Companion for paritytech/substrate#8368 * "Update Substrate" Co-authored-by: parity-processbot <>
* Companion for paritytech/substrate#8368 * "Update Substrate" Co-authored-by: parity-processbot <>
Builds on top of #8113, and makes the number of votes per nominator configurable, while adding integrity checks to prevent footguns.
I don't intend to change the value to 24 in the companion yet. That can happen afterwards.
cc @wpank @gavofyork
This has already been audited (almost identical logic in #7929) and the main feedback was that this will need re-benchmarking.
polkadot companion: paritytech/polkadot#2683