-
Notifications
You must be signed in to change notification settings - Fork 8
Corner cases about (child) storage #241
base: main
Are you sure you want to change the base?
Conversation
this is a bit odd, I would expect that we could get them by querying with the prefix appended to the storage_key. Maybe it is filtered at a different level than where I did look, but on principle I see no issue in allowing it (quite the opposite in fact).
as mention in dm the operation is skipped (a warning is emitted but the set_storage operation is ignored in: https://github.com/paritytech/substrate/blob/df81976c40e2e0573d59c51e12eb3c15c3ff3057/primitives/state-machine/src/ext.rs#L394 ).
the host function is using the part of the key after |
While looking for a reason get should fail, I realize that another one that is block is using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure I would start moving away from the current naming scheme and just extend the existing tests for now.
You will also have to implement these changes in the other adapter as well.
Lastly, please do not touch the submodules unless there is a good reason. It is probably also why the CI is broken,
Regarding w3f/polkadot-spec#540
Current behavior: child keys cannot be retrieved via
ext_storage_*
functions, meaning the functions returnNone
.Current behavior:
the keys can co-exist, meaning that you can useK
for both as a regular storage key and as a child key (does not destroy the child storage).EDIT:
Actually, it does look like when you callext_default_child_storage_set_version_1
first, it does not allow you to use the same key forrtm_ext_storage_set_version_1
. Not sure if this is intentional. See https://github.com/w3f/polkadot-tests/pull/241/files#diff-dab36c8cbf0299b6a8ed1f420f3ab4d641873ca8573c24a1089a70a4d5803004R337EDIT-2: Emeric confirmed that
ext_storage_set_*
silently drops:child_storage:default:*
keys.Current behavior: No panic, it just returns
None
.(btw I'm still having issues with setting up a container for all of this, there' some weird behavior going on. Will follow up later)