This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement StorageNMap #8635
Implement StorageNMap #8635
Changes from 23 commits
8456583
a52724a
42513d2
a89bf41
6b17d09
09b34ab
976e337
09be192
54b38e7
a3b48a7
69fbed3
d5598e5
bbf8459
9fbf1ad
275f5a5
7686c7b
b83dbf2
994e170
c3e4b9f
55c8544
c0b1516
fdc3e13
c041a6c
ce13f5e
1aeda76
3671857
707cf45
6e264ef
e8f9740
2ff4de0
f75bc5a
02b7ce3
e142267
dbcb1f6
d207d77
f259f46
b081885
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 think we should bump the metadata version. Because third-parties won't be able to make sense of this new variant.
Thus releasing RuntimeMetadataV13:
Also we could remove other variant as they can all be expressed as a NMap but I think it is better for compatibility to keep them (basically
Plain
would be aNMap
withkeys
andhashers
being array of length 0,Map
would be aNMap
with keys and arrays of length 1, etc..). cc @jacogr(Also it would make more sense to have something like
DecodeDifferentArray<(DecodeDifferentStr, StorageHasher)>
or something like this maybe, to ensure keys and hashers are of same length.)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.
Ok. This is the first I have seen this. This is a major revamp on my side for everything storage related.
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.
But yes, this is correct bumping - with metadata you can just change at will - it needs a bump to avoid issue like we have in the v9-late iteration metadata.
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.
@jacogr we wont spring anything on you here. This should be unused in the runtime for now, and might only get used in assets in the near future for a triple map.
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.
That is fine, appreciate it. Do bear in mind that once merged, it does immediately make Substrate master non-supported (if any enum changes are made to the storage descriptors or the metadata version is bumped), even if unused in practice.