-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Conversation
frame/democracy/src/lib.rs
Outdated
if Self::launch_next(now).is_ok() { | ||
weight = max_block_weight; | ||
} |
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.
What we should do here is actually create a benchmark of how much time it takes to process an empty queue, and use that weight here.
You are right that this is probably a huge overestimate, but not recording any weight at all is probably worse than this.
Are you familiar with how do make the benchmark, and are you interested to complete that?
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.
completed.
/benchmark runtime pallet pallet_democracy |
Benchmark Runtime Pallet for branch "fix-democracy-initialize-weight" with command cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_democracy --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/democracy/src/weights.rs --template=./.maintain/frame-weight-template.hbs Results
ERROR: Unable to commit file ./frame/democracy/src/weights.rs |
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.
seems like on_initialize_base is overestimated, apart from that it looks good to me
/benchmark runtime pallet pallet_democracy |
Benchmark Runtime Pallet for branch "fix-democracy-initialize-weight" with command cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_democracy --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/democracy/src/weights.rs --template=./.maintain/frame-weight-template.hbs Results
ERROR: Unable to commit file ./frame/democracy/src/weights.rs |
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.
thanks!
/tip medium |
Please fix the following problems before calling the tip bot again:
|
@zjb0807 ^^ |
bot merge |
Trying merge. |
Updated. Thanks for the tip. |
/tip medium |
A medium tip was successfully submitted for zjb0807 (FCunn2Rx8JqfT5g6noUKKazph4jLDba5rUee7o3ZmJ362Ju on kusama). |
* master: (67 commits) Downstream `node-template` pull (#9915) Implement core::fmt::Debug for BoundedVec (#9914) Quickly skip invalid transactions during block authorship. (#9789) Add SS58 prefix for Automata (#9805) Clean up sc-peerset (#9806) Test each benchmark case in own #[test] (#9860) Add build with docker section to README (#9792) Simple Trait to Inspect Metadata (#9893) Pallet Assets: Create new asset classes from genesis config (#9742) doc: subkey usage (#9905) Silence alert about large-statement-fetcher (#9882) Fix democracy on-initialize weight (#9890) Fix basic authorship flaky test (#9906) contracts: Add event field names (#9896) subkey readme update on install (#9900) add feature wasmtime-jitdump (#9871) Return `target_hash` for finality_target instead of an Option (#9867) Update wasmtime to 0.29.0 (#9552) Less sleeps (#9848) remove unidiomatic (#9895) ...
polkadot companion: paritytech/polkadot#3961
Democracy is taking the full weight even when there aren't proposals.
kusama address: FCunn2Rx8JqfT5g6noUKKazph4jLDba5rUee7o3ZmJ362Ju