You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This allows to avoid fetching a big value, but in case the value size is less than 33 it brings the overhead of calculating the hash instead.
Generally in frame calls to contains_key or exists or storage_hash should only be when the value can be bigger than 32 bytes in length.
There may be multiple place where we can switch to a simple get. Proper fix would be to have the size limit info in the storage map type and do it automatically in these cases.
Steps to reproduce
No response
The text was updated successfully, but these errors were encountered:
* Check max_sigops and past_median_time
* Add --major-sync-confirmation-depth
* Separate out header_verifier module
* refactor: extract start() in RunCmd
* Rename to calculate_median_time_past()
* Check size limits
* Check output value
* Panic if an error occurred in the block import
* Check MTP when CSV is activated
* Check if tx is final
* Nit
* Log too many blocks in the queue every 5 seconds
It was printed way too frequent.
Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
Description of bug
Calls as https://github.com/paritytech/substrate/blob/1cc2a007290ce32314a17e7d03af7b986e0630dc/frame/system/src/lib.rs#L1016 are accessing the merkle trie with
get_hash
function.This allows to avoid fetching a big value, but in case the value size is less than 33 it brings the overhead of calculating the hash instead.
Generally in frame calls to
contains_key
orexists
orstorage_hash
should only be when the value can be bigger than 32 bytes in length.There may be multiple place where we can switch to a simple
get
. Proper fix would be to have the size limit info in the storage map type and do it automatically in these cases.Steps to reproduce
No response
The text was updated successfully, but these errors were encountered: