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
Add Proof Size to Weight Output #11637
Merged
Merged
Changes from 1 commit
Commits
Show all changes
114 commits
Select commit
Hold shift + click to select a range
02d79f4
initial impl
shawntabrizi 0c8651c
add template test
shawntabrizi 6571394
linear fit proof size
shawntabrizi 9d22002
always record proof when tracking storage
shawntabrizi b05dca2
calculate worst case pov
shawntabrizi 04e8d61
remove duplicate worst case
shawntabrizi 1ab7c34
Merge branch 'master' of https://github.com/paritytech/substrate into…
1d6d2e7
cargo run --quiet --profile=production --features=runtime-benchmarks…
5d52c9c
more comment output
shawntabrizi 34c4467
Merge branch 'shawntabrizi-pov-in-cli' of https://github.com/parityte…
shawntabrizi 97acc2d
add cli for worst case map size
shawntabrizi 651f347
update name
shawntabrizi 9d0bdf9
clap does not support underscores
shawntabrizi 7c542d8
rename
shawntabrizi 625593e
expose worst case map values
shawntabrizi dfc55b4
Merge branch 'master' of https://github.com/paritytech/substrate into…
49c8132
improve some comments
shawntabrizi baeddb3
cargo run --quiet --profile=production --features=runtime-benchmarks…
9d11567
Merge branch 'shawntabrizi-pov-in-cli' of https://github.com/parityte…
shawntabrizi 232cb97
Merge branch 'master' into shawntabrizi-pov-in-cli
shawntabrizi 7a9a3d8
update template
shawntabrizi 6a0cf76
Merge branch 'master' of https://github.com/paritytech/substrate into…
c8cd738
cargo run --quiet --profile=production --features=runtime-benchmarks…
7c55e48
Merge branch 'master' into shawntabrizi-pov-in-cli
shawntabrizi e5e549f
Merge branch 'master' into shawntabrizi-pov-in-cli
shawntabrizi 8b272c4
fix fmt
shawntabrizi f2baa71
more fmt
shawntabrizi 3b44d68
more fmt
shawntabrizi 26daf32
Merge branch 'master' into shawntabrizi-pov-in-cli
shawntabrizi b6f849b
Merge remote-tracking branch 'origin/master' into shawntabrizi-pov-in…
ggwpez b5fedc4
Merge remote-tracking branch 'origin/master' into shawntabrizi-pov-in…
ggwpez a5ddf1f
Dont panic when there is no proof
ggwpez c0a4bc5
Fix test features
ggwpez 3108f6a
Whitelist :extrinsic_index
ggwpez 8eb47ec
Use whitelist when recording proof
ggwpez 309c0cb
Add logs
ggwpez 9926aef
Add PoV testing pallet
ggwpez 96a4b0d
Deploy PoV testing pallet
ggwpez c48bcc9
Storage benches reside in the PoV pallet
ggwpez 824785d
Linear regress PoV per component
ggwpez 27a335b
Put PoV into the weight templates
ggwpez 21d89aa
fmt
ggwpez 9e7a9f9
Merge remote-tracking branch 'origin/master' into shawntabrizi-pov-in…
ggwpez ba83ba6
Extra alanysis choise for PoV
ggwpez 879cf5b
Add+Fix tests
ggwpez 2b19fa1
Make benches faster
ggwpez b1f89b8
Cleanup
ggwpez c19e84a
Use same template comments
ggwpez 66a2d9b
Merge remote-tracking branch 'origin/master' into shawntabrizi-pov-in…
ggwpez 9da76e0
".git/.scripts/bench-bot.sh" pallet dev pallet_balances
cca1f74
".git/.scripts/bench-bot.sh" pallet dev pallet_democracy
170c358
Update referenda mock BlockWeights
ggwpez afb4a88
Take measured value size into account
ggwpez 774b383
clippy
ggwpez 43b2cdb
Merge branch 'master' of https://github.com/paritytech/substrate into…
cd5b536
".git/.scripts/bench-bot.sh" pallet dev pallet_scheduler
8ddaa2f
WIP
ggwpez fe5caf9
proof_size: None
ggwpez c34b538
WIP
ggwpez d69e0c4
WIP
ggwpez dc1410f
WIP
ggwpez 906c60e
ugly, but works
ggwpez 1e02140
WIP
ggwpez 5595b55
WIP
ggwpez 3a39968
WIP
ggwpez 74dde1e
wup
ggwpez 61b749e
WIP
ggwpez 2e96402
WIP
ggwpez 3991122
WIP
ggwpez 4c84f87
WIP
ggwpez 3bc2ec5
Add pov_mode attribute to the benchmarks! macro
ggwpez f2b8c8e
Use pov_mode attribute in PoV benchmarking
ggwpez b000667
Update tests
ggwpez 8e631b3
Scheduler, Whitelist: Add pov_mode attr
ggwpez 2f3ac23
Update PoV weights
5acb33a
Add CLI arg: default-pov-mode
ggwpez e2006ed
Fix tests
ggwpez 21b1c64
fmt
ggwpez 442394a
Merge remote-tracking branch 'server/oty-proof-size-attribute' into s…
ggwpez 0a4829d
fix
ggwpez 697eef7
Revert "Update PoV weights"
ggwpez 95bfa49
Revert "WIP"
ggwpez 467477e
Revert first approach
ggwpez debbc07
Clippy
ggwpez 213e340
Add extra benchmarks
ggwpez 9fe83c5
Merge branch 'master' of https://github.com/paritytech/substrate into…
a82f20a
".git/.scripts/commands/bench/bench.sh" pallet dev pallet_alliance
46fa61a
".git/.scripts/commands/bench/bench.sh" pallet dev pallet_whitelist
81e6723
".git/.scripts/commands/bench/bench.sh" pallet dev pallet_scheduler
9ac907d
fmt
ggwpez 637641b
Clippy
ggwpez 9bd0c3d
Clippy 🤦
ggwpez 1b87727
Add reference benchmarks
ggwpez 29b8eed
Fix doc comments
ggwpez c52210f
Merge remote-tracking branch 'origin/master' into shawntabrizi-pov-in…
3dd9a4c
Undo logging
ggwpez 44dce06
Merge remote-tracking branch 'origin/master' into shawntabrizi-pov-in…
ggwpez 6bc569b
Merge remote-tracking branch 'origin/master' into shawntabrizi-pov-in…
ggwpez a4bd72c
Add 'Ignored' pov_mode
ggwpez 52f460b
Allow multiple attributes per benchmark
ggwpez 4ea47d9
Validate pov_mode syntax
ggwpez 8878ab0
Ignore PoV for all contract benchmarks
ggwpez 5af9771
Test
ggwpez b5438b2
test
ggwpez 545f26f
Bump macro recursion limit
ggwpez fc33556
fmt
ggwpez b77fb33
Update contract weights
ggwpez d988e35
Merge remote-tracking branch 'origin/master' into shawntabrizi-pov-in…
ggwpez 20633ea
fix test ffs
ggwpez 4a6a3e7
pov_mode is unsupported in V2 syntax
ggwpez f45c2f8
Fix pallet ui tests
ggwpez 74f84d6
update pallet ui
ggwpez 2674325
Fix pallet ui tests
ggwpez 047cf4f
Update weights
ggwpez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Scheduler, Whitelist: Add pov_mode attr
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
- Loading branch information
commit 8e631b3ca4424da588d8082cb853a70dd279cb79
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,6 +62,10 @@ benchmarks! { | |
// We benchmark with the maximum possible size for a call. | ||
// If the resulting weight is too big, maybe it worth having a weight which depends | ||
// on the size of the call, with a new witness in parameter. | ||
#[pov_mode = MaxEncodedLen { | ||
// Use measured PoV size for the Preimages since we pass in a length witness. | ||
Preimage::PreimageFor: Measured | ||
}] | ||
dispatch_whitelisted_call { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here |
||
// NOTE: we remove `10` because we need some bytes to encode the variants and vec length | ||
let n in 1 .. T::Preimages::MAX_LENGTH as u32 - 10; | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
It is done on the benchmark. This way the same storage item can be used with and without length witness.
Same for the whitelist pallet. @gavofyork