This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Payout function should refund #8428
Labels
I9-optimisation
An enhancement to provide better overall performance in terms of time-to-completion for a task.
U2-some_time_soon
Issue is worth doing soon.
Z2-medium
Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase.
Z6-mentor
An easy task where a mentor is available. Please indicate in the issue who the mentor could be.
Comments
kianenigma
added
I9-optimisation
An enhancement to provide better overall performance in terms of time-to-completion for a task.
U2-some_time_soon
Issue is worth doing soon.
Z6-mentor
An easy task where a mentor is available. Please indicate in the issue who the mentor could be.
Z1-easy
Can be fixed primarily by duplicating and adapting code by an intermediate coder
Z2-medium
Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase.
and removed
Z1-easy
Can be fixed primarily by duplicating and adapting code by an intermediate coder
labels
Mar 23, 2021
I think this is probably overkill. Just track how many below the max payouts we actually made and make a refund there? |
Arguably yes, the former is much more important. |
@emostov wanna try this one to show us what you've got? :P |
emostov
added a commit
that referenced
this issue
Mar 25, 2021
ghost
pushed a commit
that referenced
this issue
Mar 28, 2021
* [pallet-staking] Refund unused weight for `payout_stakers` fixes #8428 * Use periods in comments * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs * Address Shawn's Feedback * Assert monotomic weights && improve test note * Remove stray new line * debug_assert payout_count <= max * Only track payouts to nominators; not validators * Trivial comment update Co-authored-by: Parity Benchmarking Bot <admin@parity.io>
hirschenberger
pushed a commit
to hirschenberger/substrate
that referenced
this issue
Apr 14, 2021
…h#8458) * [pallet-staking] Refund unused weight for `payout_stakers` fixes paritytech#8428 * Use periods in comments * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs * Address Shawn's Feedback * Assert monotomic weights && improve test note * Remove stray new line * debug_assert payout_count <= max * Only track payouts to nominators; not validators * Trivial comment update Co-authored-by: Parity Benchmarking Bot <admin@parity.io>
shawntabrizi
pushed a commit
that referenced
this issue
Jun 17, 2021
* [pallet-staking] Refund unused weight for `payout_stakers` fixes #8428 * Use periods in comments * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs * Address Shawn's Feedback * Assert monotomic weights && improve test note * Remove stray new line * debug_assert payout_count <= max * Only track payouts to nominators; not validators * Trivial comment update Co-authored-by: Parity Benchmarking Bot <admin@parity.io>
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
I9-optimisation
An enhancement to provide better overall performance in terms of time-to-completion for a task.
U2-some_time_soon
Issue is worth doing soon.
Z2-medium
Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase.
Z6-mentor
An easy task where a mentor is available. Please indicate in the issue who the mentor could be.
Current payout function of staking assumes that any payout pays exactly
T::MaxNominationPerValidator
accounts, not to mention that it also assumes the worse case of account target as well:Staked
.We should make this refund along two axes:
X
nominators, we should take this into account.Once we have this, we can bump the
MaxNominationPerValidator
to a much larger number safely, effectively nilling the chance of oversubscribed nominators.related paritytech/polkadot#2637
The text was updated successfully, but these errors were encountered: