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
Param estimator reuses accounts for measuring different host function gas numbers.
Some of these arguments depend on the existing storage. If we use an account, then the 2nd estimate run on this account will hit a modified storage and may receive a different result.
For example storage_remove_10b_key_10kib_value_1k has only 1 account with keys (for some reason). It requires the existing values in the trie to be able to count the number of bytes removed. It causes the cost to either overestimate or underestimate.
The text was updated successfully, but these errors were encountered:
For example storage_remove_10b_key_10kib_value_1k
has only 1 account with keys (for some reason). It requires the
existing values in the trie to be able to count the number of bytes
removed. It causes the cost to either overestimate or underestimate.
it's because the key added is by the previous storage_write_10kib_key_10b_value_1k test, which is random select block_sizeiter_block accounts from total accounts-num accountsThen, storage_remove_10b_key_10kib_value_1k is randomly select block_sizeiter_block accounts from total accounts-num accounts, and they (most likely) have no keys at all.
A fix should be, before test like storage_remove_10b_key_10kib_value_1k (there's several similar storage_remove tests), either
add storage key,value to all accounts instead of random selected accounts
in storage_remove_10b_key_10kib_value_1k reuse exact same accounts in storage_write_10kib_key_10b_value_1k instead of currently we randomly select from total account-num accounts again.
Fix#3601. get new numbers which is very different from existing genesis.json, but reasonable compare to run runtime-param-estimator from master branch
Test Plan
------------
runtime-param-estimator works, no #3598 and #3601. And every delete storage actually delete, not noop.
Param estimator reuses accounts for measuring different host function gas numbers.
Some of these arguments depend on the existing storage. If we use an account, then the 2nd estimate run on this account will hit a modified storage and may receive a different result.
For example
storage_remove_10b_key_10kib_value_1k
has only 1 account with keys (for some reason). It requires the existing values in the trie to be able to count the number of bytes removed. It causes the cost to either overestimate or underestimate.The text was updated successfully, but these errors were encountered: