-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Conversation
prefix will be added at query and on full storage root lazilly. Also note that both type are implementation compatible so we do not need a different well known key.
@cheme: Adding that to the Polkdot JS API shouldn't be much work. So feel free to do these changes any time, I'd just need to change a few lines in the contracts-waterfall repo and the JS API |
are not general child struct, but default child struct only). Applying merge of ChildInfo and OwnedChildInfo.
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.
There is no reason to keep deprecated functions, if they are not used.
primitives/io/src/lib.rs
Outdated
|
||
|
||
/// Deprecated, please use dedicated runtime apis. | ||
fn child_get( |
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.
Is this code used somewhere? I don't think so?
So please remove it, the same goes for all deprecated unused functions.
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 did remove them first, but restore them back to retain compatibility with edgeware chain, but I would also really prefer to remove it (and the associated code).
Think we can break that?
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.
Yeah, if we not do it now, we need to keep this code forever.
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 did remove the code (it messed up my last master merge and it is in latest master merge commit).
Changes in |
This might be a good time to rename "child" to "subtree" or "substorage". Please vote if you think this is a good idea. |
My preference goes toward «substorage» (do not have to be a tree, just some storage with a proof system), I could also propose «substate». |
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.
for runtime interface part
619b454 is trying to do that, note that it assumes input data is of the right size (I found no other way to remove possible false positive when decoding with the latest encoding without changing to much the way things are encoded). |
That's a good point. If it is not used there's no need to bother with compatibility indeed. So |
Hum custom decoder looks like a better idea indeed (or at least put everything in RemoteReadChildRequest), but I am reverting it right now. |
Needs resolving @cheme Is there any reason we shouldn't merge this before 2.0? |
It is breaking some compatibility so I would think it is better if merge before 2.0. I am resolving the ci failures. |
@cheme this needs one more conflict resolution and can be merged. |
The child trie api got some questioning recently, so this pr try to make things cleaner and easier to specify.
Contract code falls in this category, polkadot crowdfund to, I think child trie module do also (cc @thiolliere).
Changes the way
StorageKey
is define to never include ':child_storage:default:' and include it only when needed (when reading or updating parent root).Separates child trie host function into their own runtime api (so future child trie of different kind could use their own).
So this breaks rpc, with this pr rpc would use storage_key without its prefix and no more child_info and child type fields. cc @Stefie
This PR also do break existing runtime by removing the child info and child type too.
This also changes
TrieIdGenerator
of contract pallet to stop including the child prefixes for the key, the changes needed are in the pr cc @pepyakin Closes #2325.So for other kind of child trie new rpc api and runtime host function will be needed.
polkadot companion: paritytech/polkadot#950