nearcore
nearcore copied to clipboard
TrieCosts should be in a config
Currently it's hardcoded in trie/mod.rs
, need to decide how to pass a config to trie code
@evgenykuzyakov Did you add it to config with your limiters?
@evgenykuzyakov Did you add it to config with your limiters?
Checked it. It's not.
@mikhailOK I spent quite a time to find out how and where the computed memory usage is applied..
@mikhailOK @nearmax
As far as I can see, memory_usage is stored in the node storage already with an applied TRIE_COSTS. To have an ability to apply new costs dynamically (in operating node), we should count raw values, but not the calculated ones and multiply them later. Correct?
Refs:
https://github.com/nearprotocol/nearcore/blob/ce11dfa277fe2c97ec7ccc9a417d28549358a757/core/store/src/trie/mod.rs#L60-L60
https://github.com/nearprotocol/nearcore/blob/ce11dfa277fe2c97ec7ccc9a417d28549358a757/core/store/src/trie/mod.rs#L86-L90
https://github.com/nearprotocol/nearcore/blob/ce11dfa277fe2c97ec7ccc9a417d28549358a757/core/store/src/trie/insert_delete.rs#L98-L98
https://github.com/nearprotocol/nearcore/blob/ce11dfa277fe2c97ec7ccc9a417d28549358a757/core/store/src/trie/mod.rs#L218-L244
@mikhailOK why TRIE_COSTS should be in config? What config it should be?
This issue has been automatically marked as stale because it has not had recent activity in the last 2 months. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
cc @nearmax @Longarithm looks like we still have this issue
This issue has been automatically marked as stale because it has not had recent activity in the last 2 months. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity in the last 2 months. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity in the last 2 months. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.