-
Notifications
You must be signed in to change notification settings - Fork 666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better child storage support #368
Comments
I can imagine this:
This storage instead of inserting into top storage it will insert into the child trie with at the place $String. Also $ChildString could be hashed but I see no value of it, is there some ? Does that fits all need ? also if someone doesn't want its stuff to be hashed in the childtrie (because it is already isolated from everything else) then we can introduce Identity Hasher. |
Also do we want those child trie to be created in genesis or do we want them to be created on first insert ? |
+1. It was mentioned in some previous conversations that would be good to, exactly as mentioned, allow syntax like:
|
I had an experimental branch with full switch to child module. |
We still need this, but with the new FRAME v2 macros. Could be a good project for a more advance hiring exercise. |
paritytech#368) * update * fix tests * fast test * ethapp tests working * eth erc20 working * fix eth erc20 * done * no p * np P * rehydrate * fix * fixed * refactor * fixz * fix * fixes * write start * script extra
no one love child storage |
Improve
decl_storage
macro or create a newdecl_child_storage
macro to provide a proper support of child storage.Currently child storage can only be used with raw key which requires some boilerplate code to use and easy to make mistake (e.g. pick a bad hasher). Those information also are not exposed on metadata which makes JS SDK implementation hard.
Usage of child storage should be similar to StorageMap / StorageValue for better developer experience.
Previous discussion: paritytech/polkadot#315 (comment)
The text was updated successfully, but these errors were encountered: