From d98e64c2ea06b575a23c8e16a6148d61a94e9e71 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Thu, 11 May 2023 12:35:13 +0200 Subject: [PATCH 1/2] Clarify the childTrie parameter of chainHead_unstable_storage --- src/api/chainHead_unstable_storage.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/chainHead_unstable_storage.md b/src/api/chainHead_unstable_storage.md index 0a2daa5..7d7808f 100644 --- a/src/api/chainHead_unstable_storage.md +++ b/src/api/chainHead_unstable_storage.md @@ -5,12 +5,12 @@ - `followSubscription`: An opaque string that was returned by `chainHead_unstable_follow`. - `hash`: String containing an hexadecimal-encoded hash of the header of the block whose storage to fetch. - `key`: String containing the hexadecimal-encoded key to fetch in the storage. -- `childKey`: `null` for main storage look-ups, or a string containing the hexadecimal-encoded key of the trie key of the trie that `key` refers to. **TODO**: I don't know enough about child tries to design this properly +- `childTrie`: `null` for main storage look-ups, or a string containing the hexadecimal-encoded key of the child trie of the "default" namespace. - `networkConfig` (optional): Object containing the configuration of the networking part of the function. See [here](./api.md) for details. Ignored if the JSON-RPC server doesn't need to perform a network request. Sensible defaults are used if not provided. **Return value**: String containing an opaque value representing the operation. -The JSON-RPC server must start obtaining the value of the entry with the given `key` (and possibly `childKey`) from the storage. +The JSON-RPC server must start obtaining the value of the entry with the given `key` from the storage, either from the main trie of from `childTrie`. The operation will continue even if the given block is unpinned while it is in progress. From 51a1489752328413e86edb7afcfe18d1adaf0b82 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Tue, 16 May 2023 06:46:51 +0000 Subject: [PATCH 2/2] Update src/api/chainHead_unstable_storage.md Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com> --- src/api/chainHead_unstable_storage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/chainHead_unstable_storage.md b/src/api/chainHead_unstable_storage.md index 7d7808f..63444dc 100644 --- a/src/api/chainHead_unstable_storage.md +++ b/src/api/chainHead_unstable_storage.md @@ -10,7 +10,7 @@ **Return value**: String containing an opaque value representing the operation. -The JSON-RPC server must start obtaining the value of the entry with the given `key` from the storage, either from the main trie of from `childTrie`. +The JSON-RPC server must start obtaining the value of the entry with the given `key` from the storage, either from the main trie or from `childTrie`. The operation will continue even if the given block is unpinned while it is in progress.