-
Notifications
You must be signed in to change notification settings - Fork 2.6k
pallet-glutton
: over-unity consumption
#14338
Conversation
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
The changes seem good to me. The only question I have may be a bit off-topic. |
Co-authored-by: Guillaume Yu Thiolliere <gui.thiolliere@gmail.com>
The whole reason to have |
@ggwpez Where did you see it is consuming only 19% of the |
https://grafana.parity-mgmt.parity.io/goto/tJ1Pf9l4g?orgId=1
|
bot bench $ pallet dev pallet-glutton |
@ggwpez https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2978867 was started for your command Comment |
@ggwpez Command |
bot bench $ pallet dev pallet-glutton |
@ggwpez https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2979580 was started for your command Comment |
@ggwpez Command |
bot merge |
* pallet-glutton: over-unity consumption * Add hard limit Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Cleanup Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Highlight warning Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix docs * Review test fixes Co-authored-by: Guillaume Yu Thiolliere <gui.thiolliere@gmail.com> * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet-glutton * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet-glutton --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Guillaume Yu Thiolliere <gui.thiolliere@gmail.com> Co-authored-by: command-bot <>
The PoV benchmarking is over-estimating the actual proof size of storage reads.
Now after testing the pallet on Versi, we saw that it consumed 19% (compressed) PoV when requested to use 50%.
To make it possible to eventually consume the full 100%; over-unity values are needed for the proof and computation weight.
This is done by changing
Perbill
toFixedU64
with a range of[0, 10]
that will be interpreted as[0, 1000]%
.As next value to archive 50% PoV consumption we could try a proof limit of
1.31
since50/(19/50) = 131%
.Changes:
pallet_glutton::{set_compute, set_storage}
args fromPerbill
toFixedU64
GenesisConfig
FixedU64
insp-runtime
andsp-arithmetic
👉 Pallet glutton is not (and never will be) advised for deployment on value-bearing chains. Note that there is no storage migration provided. Test chains using this need to be re-genesised.
Cumulus companion: paritytech/cumulus#2730
@NachoPal @Szegoo please let me know if you see something amiss.