Skip to content

Commit 7ffb644

Browse files
lexnvbkchr
andauthored
Update trie-db version to 0.28.0 (paritytech#1522)
This PR updates: - trie-db from 0.27.1 to 0.28.0 - trie-bench from 0.37.0 to 0.38.0 (deb-dependency) While at it, also adapts the recorder to take into account the newly added `TrieAccess::InlineValue`. Needed by: - paritytech#1153 @paritytech/subxt-team --------- Signed-off-by: Alexandru Vasile <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
1 parent c121dc0 commit 7ffb644

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
lines changed

substrate/primitives/state-machine/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ sp-externalities = { path = "../externalities", default-features = false}
2727
sp-panic-handler = { path = "../panic-handler", optional = true}
2828
sp-std = { path = "../std", default-features = false}
2929
sp-trie = { path = "../trie", default-features = false}
30-
trie-db = { version = "0.27.1", default-features = false }
30+
trie-db = { version = "0.28.0", default-features = false }
3131

3232
[dev-dependencies]
3333
array-bytes = "6.1"

substrate/primitives/trie/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ parking_lot = { version = "0.12.1", optional = true }
2929
scale-info = { version = "2.5.0", default-features = false, features = ["derive"] }
3030
thiserror = { version = "1.0.48", optional = true }
3131
tracing = { version = "0.1.29", optional = true }
32-
trie-db = { version = "0.27.0", default-features = false }
32+
trie-db = { version = "0.28.0", default-features = false }
3333
trie-root = { version = "0.18.0", default-features = false }
3434
sp-core = { path = "../core", default-features = false}
3535
sp-std = { path = "../std", default-features = false}
@@ -38,7 +38,7 @@ schnellru = { version = "0.2.1", optional = true }
3838
[dev-dependencies]
3939
array-bytes = "6.1"
4040
criterion = "0.4.0"
41-
trie-bench = "0.37.0"
41+
trie-bench = "0.38.0"
4242
trie-standardmap = "0.16.0"
4343
sp-runtime = { path = "../runtime" }
4444

substrate/primitives/trie/src/recorder.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,17 @@ impl<H: Hasher, I: DerefMut<Target = RecorderInner<H::Out>>> trie_db::TrieRecord
379379
// that the value doesn't exist in the trie.
380380
self.update_recorded_keys(full_key, RecordedForKey::Value);
381381
},
382+
TrieAccess::InlineValue { full_key } => {
383+
tracing::trace!(
384+
target: LOG_TARGET,
385+
key = ?sp_core::hexdisplay::HexDisplay::from(&full_key),
386+
"Recorded inline value access for key",
387+
);
388+
389+
// A value was accessed that is stored inline a node and we recorded all trie nodes
390+
// to access this value.
391+
self.update_recorded_keys(full_key, RecordedForKey::Value);
392+
},
382393
};
383394

384395
self.encoded_size_estimation.fetch_add(encoded_size_update, Ordering::Relaxed);

substrate/test-utils/runtime/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pallet-timestamp = { path = "../../frame/timestamp", default-features = false}
4040
sp-consensus-grandpa = { path = "../../primitives/consensus/grandpa", default-features = false, features = ["serde"] }
4141
sp-trie = { path = "../../primitives/trie", default-features = false}
4242
sp-transaction-pool = { path = "../../primitives/transaction-pool", default-features = false}
43-
trie-db = { version = "0.27.0", default-features = false }
43+
trie-db = { version = "0.28.0", default-features = false }
4444
sc-service = { path = "../../client/service", default-features = false, features = ["test-helpers"], optional = true}
4545
sp-state-machine = { path = "../../primitives/state-machine", default-features = false}
4646
sp-externalities = { path = "../../primitives/externalities", default-features = false}

substrate/utils/frame/rpc/state-trie-migration-rpc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ serde = { version = "1", features = ["derive"] }
1919
sp-core = { path = "../../../../primitives/core" }
2020
sp-state-machine = { path = "../../../../primitives/state-machine" }
2121
sp-trie = { path = "../../../../primitives/trie" }
22-
trie-db = "0.27.0"
22+
trie-db = "0.28.0"
2323

2424
jsonrpsee = { version = "0.16.2", features = ["client-core", "server", "macros"] }
2525

0 commit comments

Comments
 (0)