-
Notifications
You must be signed in to change notification settings - Fork 470
Closed
Labels
A-ink_metadata[ink_metadata] Work item[ink_metadata] Work itemB-designDesigning a new component, interface or functionality.Designing a new component, interface or functionality.B-researchResearch task that has open questions that need to be resolved.Research task that has open questions that need to be resolved.C-discussionAn issue for discussion for a given topic.An issue for discussion for a given topic.
Description
Blocker for use-ink/cargo-contract#101.
I'm just copy/pasting from the discussion there:
The current metadata format cannot represent some more or less common scenarios and really needs some restructuring. When I tried some weeks ago I immediately hit a wall for recursive data structures.
We first have to define semantics, definitions and structures for a new and better
layout
metadata section before we should tackle this issue. We have to think about cases like:
- recursively defined data structures such as
enum Tree { Leaf(i32), Node(Box<Tree>, Box<Tree>) }
or in case ofink_storage
:ink_storage::Vec<ink_storage::Vec<i32>>
, packed elements where some elements actually have some further pointersPack<(i32, ink_storage::Box<i32>)
and more.Maybe we have to restrict the final metadata to not support certain use cases because their metadata format would become too complex otherwise.
Metadata
Metadata
Assignees
Labels
A-ink_metadata[ink_metadata] Work item[ink_metadata] Work itemB-designDesigning a new component, interface or functionality.Designing a new component, interface or functionality.B-researchResearch task that has open questions that need to be resolved.Research task that has open questions that need to be resolved.C-discussionAn issue for discussion for a given topic.An issue for discussion for a given topic.