Use trie-cache for validate_block (#2813)

* Simple cache

* Fix node insertion

* Switch to hashbrown hashmap

* Remove unused phantomdata

* Return error when fetch_node fails

* Remove cargo patches

* Move trie cache to extra module

* Add ReadOnceBackend

* Add readonlybackend

* Improve naming and get_or_insert

* Stylistic improvements

* Improve naming, add docs

* Revert unwanted changes

* Remove unused dependencies

* Improve docs

* Use RefCell

* lockfile

* Remove ReadOnceBackend

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <git@kchr.de>

* Code review

* Do not use value cache when calculating storage roots

* Apply suggestions from code review

Co-authored-by: Davide Galassi <davxy@datawok.net>

* Remove hash-db dep

* Update pallets/parachain-system/src/validate_block/trie_cache.rs

Co-authored-by: Anton <anton.kalyaev@gmail.com>

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Davide Galassi <davxy@datawok.net>
Co-authored-by: Anton <anton.kalyaev@gmail.com>
This commit is contained in:
Sebastian Kunert
2023-07-19 13:46:58 +02:00
committed by GitHub
parent 18340b304b
commit 5b5942ef60
5 changed files with 124 additions and 4 deletions
+1
View File
@@ -2907,6 +2907,7 @@ dependencies = [
"sp-tracing",
"sp-trie",
"sp-version",
"trie-db",
"xcm",
]