Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bridges/primitives/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sp-runtime = { path = "../../../substrate/primitives/runtime", default-features
sp-state-machine = { path = "../../../substrate/primitives/state-machine", default-features = false }
sp-std = { path = "../../../substrate/primitives/std", default-features = false }
sp-trie = { path = "../../../substrate/primitives/trie", default-features = false }
trie-db = { version = "0.27.1", default-features = false }
trie-db = { version = "0.28.0", default-features = false }

[dev-dependencies]
hex-literal = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion cumulus/pallets/parachain-system/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features =
environmental = { version = "1.1.4", default-features = false }
impl-trait-for-tuples = "0.2.1"
log = { version = "0.4.20", default-features = false }
trie-db = { version = "0.27.1", default-features = false }
trie-db = { version = "0.28.0", default-features = false }
scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }

# Substrate
Expand Down
2 changes: 1 addition & 1 deletion substrate/primitives/state-machine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ sp-externalities = { path = "../externalities", default-features = false}
sp-panic-handler = { path = "../panic-handler", optional = true}
sp-std = { path = "../std", default-features = false}
sp-trie = { path = "../trie", default-features = false}
trie-db = { version = "0.27.1", default-features = false }
trie-db = { version = "0.28.0", default-features = false }

[dev-dependencies]
array-bytes = "6.1"
Expand Down
4 changes: 2 additions & 2 deletions substrate/primitives/trie/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ parking_lot = { version = "0.12.1", optional = true }
scale-info = { version = "2.5.0", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.48", optional = true }
tracing = { version = "0.1.29", optional = true }
trie-db = { version = "0.27.0", default-features = false }
trie-db = { version = "0.28.0", default-features = false }
trie-root = { version = "0.18.0", default-features = false }
sp-core = { path = "../core", default-features = false}
sp-std = { path = "../std", default-features = false}
Expand All @@ -38,7 +38,7 @@ schnellru = { version = "0.2.1", optional = true }
[dev-dependencies]
array-bytes = "6.1"
criterion = "0.4.0"
trie-bench = "0.37.0"
trie-bench = "0.38.0"
trie-standardmap = "0.16.0"
sp-runtime = { path = "../runtime" }

Expand Down
13 changes: 13 additions & 0 deletions substrate/primitives/trie/src/recorder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,19 @@ impl<H: Hasher, I: DerefMut<Target = RecorderInner<H::Out>>> trie_db::TrieRecord
// that the value doesn't exist in the trie.
self.update_recorded_keys(full_key, RecordedForKey::Value);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should switch to RecordedForKey::None I think

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No the current value is correct. The comment also says why we pass there Value.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand it (this did make sense to me).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good find 🙈

paritytech/trie#202

See this docs: https://github.com/paritytech/trie/blob/692ee41a6bd0df36252663d2f7974ab1c368d9a0/trie-db/src/lib.rs#L193-L220

Maybe I should have given None a different name, but the docs are explaining it.

},
TrieAccess::InlineValue { full_key } => {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bkchr Would like to double check this with you 🙏

(introduced by: paritytech/trie#194)

tracing::trace!(
target: LOG_TARGET,
key = ?sp_core::hexdisplay::HexDisplay::from(&full_key),
"Recorded inline value access for key",
);

// A value was accessed that is stored inline a node.
//
// As the value is stored inline there is no need to separately record the value as
// it is part of a node.
Comment thread
lexnv marked this conversation as resolved.
Outdated
self.update_recorded_keys(full_key, RecordedForKey::Value);
},
};

self.encoded_size_estimation.fetch_add(encoded_size_update, Ordering::Relaxed);
Expand Down
2 changes: 1 addition & 1 deletion substrate/test-utils/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pallet-timestamp = { path = "../../frame/timestamp", default-features = false}
sp-consensus-grandpa = { path = "../../primitives/consensus/grandpa", default-features = false, features = ["serde"] }
sp-trie = { path = "../../primitives/trie", default-features = false}
sp-transaction-pool = { path = "../../primitives/transaction-pool", default-features = false}
trie-db = { version = "0.27.0", default-features = false }
trie-db = { version = "0.28.0", default-features = false }
sc-service = { path = "../../client/service", default-features = false, features = ["test-helpers"], optional = true}
sp-state-machine = { path = "../../primitives/state-machine", default-features = false}
sp-externalities = { path = "../../primitives/externalities", default-features = false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ serde = { version = "1", features = ["derive"] }
sp-core = { path = "../../../../primitives/core" }
sp-state-machine = { path = "../../../../primitives/state-machine" }
sp-trie = { path = "../../../../primitives/trie" }
trie-db = "0.27.0"
trie-db = "0.28.0"

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

Expand Down