-
Notifications
You must be signed in to change notification settings - Fork 683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate DB weights for top
and child
keys
#387
Comments
Why would you need to separate them? Is the db weight calculated based on the maximum depth of the main trie? |
This would only help in case that the developer knows that child keys will be read with higher or lower probability than top keys. So it's not strictly needed but more of an optimization for power users. |
Yeah I got this. I just don't know how this influences the weight calculation. |
It does not influence the formula with which it is calculated, but how granular the output is. |
* get Substrate dependencies from crates.io * removing unused dependencies * cargo fmt --all * remove commented dependencies * remove commented dependencies again * try to fix compilation
* get Substrate dependencies from crates.io * removing unused dependencies * cargo fmt --all * remove commented dependencies * remove commented dependencies again * try to fix compilation
* get Substrate dependencies from crates.io * removing unused dependencies * cargo fmt --all * remove commented dependencies * remove commented dependencies again * try to fix compilation
* get Substrate dependencies from crates.io * removing unused dependencies * cargo fmt --all * remove commented dependencies * remove commented dependencies again * try to fix compilation
* get Substrate dependencies from crates.io * removing unused dependencies * cargo fmt --all * remove commented dependencies * remove commented dependencies again * try to fix compilation
* get Substrate dependencies from crates.io * removing unused dependencies * cargo fmt --all * remove commented dependencies * remove commented dependencies again * try to fix compilation
* get Substrate dependencies from crates.io * removing unused dependencies * cargo fmt --all * remove commented dependencies * remove commented dependencies again * try to fix compilation
* get Substrate dependencies from crates.io * removing unused dependencies * cargo fmt --all * remove commented dependencies * remove commented dependencies again * try to fix compilation
* get Substrate dependencies from crates.io * removing unused dependencies * cargo fmt --all * remove commented dependencies * remove commented dependencies again * try to fix compilation
* get Substrate dependencies from crates.io * removing unused dependencies * cargo fmt --all * remove commented dependencies * remove commented dependencies again * try to fix compilation
* get Substrate dependencies from crates.io * removing unused dependencies * cargo fmt --all * remove commented dependencies * remove commented dependencies again * try to fix compilation
paritytech/substrate#12021 allows to also benchmark child storage keys.
We can now then think about how to generate custom weights for both and combine them, instead of directly combining them.
One use-case is that some chains may have much more child than top keys or vice-versa.
There are multiple approaches:
RuntimeDbWeight
struct (Will collide with WeightsV2)RuntimeDbWeight
(top
,child
andcombined
)--child-key-weight-ratio PERCENT
.The text was updated successfully, but these errors were encountered: