Rework storage iterators (#13284)

* Rework storage iterators

* Make sure storage iteration is also accounted for when benchmarking

* Use `trie-db` from crates.io

* Appease clippy

* Bump `trie-bench` to 0.35.0

* Fix tests' compilation

* Update comment to clarify how `IterArgs::start_at` works

* Add extra tests

* Fix iterators on `Client` so that they behave as before

* Add extra `unwrap`s in tests

* More clippy fixes

* Come on clippy, give me a break already

* Rename `allow_missing` to `stop_on_incomplete_database`

* Add `#[inline]` to `with_recorder_and_cache`

* Use `with_recorder_and_cache` in `with_trie_db`; add doc comment

* Simplify code: use `with_trie_db` in `next_storage_key_from_root`

* Remove `expect`s in the benchmarking CLI

* Add extra doc comments

* Move `RawIter` before `TrieBackendEssence` (no code changes; just cut-paste)

* Remove a TODO in tests

* Update comment for `StorageIterator::was_complete`

* Update `trie-db` to 0.25.1
This commit is contained in:
Koute
2023-02-22 16:49:25 +09:00
committed by GitHub
parent 236bbbd5ef
commit f8e3bdad3d
27 changed files with 1097 additions and 742 deletions
+2 -2
View File
@@ -29,7 +29,7 @@ parking_lot = { version = "0.12.1", optional = true }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.30", optional = true }
tracing = { version = "0.1.29", optional = true }
trie-db = { version = "0.24.0", default-features = false }
trie-db = { version = "0.25.0", default-features = false }
trie-root = { version = "0.17.0", default-features = false }
sp-core = { version = "7.0.0", default-features = false, path = "../core" }
sp-std = { version = "5.0.0", default-features = false, path = "../std" }
@@ -38,7 +38,7 @@ schnellru = { version = "0.2.1", optional = true }
[dev-dependencies]
array-bytes = "4.1"
criterion = "0.4.0"
trie-bench = "0.34.0"
trie-bench = "0.35.0"
trie-standardmap = "0.15.2"
sp-runtime = { version = "7.0.0", path = "../runtime" }