Skip to content
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

Research and implement new layout metadata format #767

Closed
cmichi opened this issue Apr 16, 2021 · 1 comment
Closed

Research and implement new layout metadata format #767

cmichi opened this issue Apr 16, 2021 · 1 comment
Labels
A-ink_metadata [ink_metadata] Work item B-design Designing a new component, interface or functionality. B-research Research task that has open questions that need to be resolved. C-discussion An issue for discussion for a given topic.

Comments

@cmichi
Copy link
Collaborator

cmichi commented Apr 16, 2021

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 of ink_storage: ink_storage::Vec<ink_storage::Vec<i32>>, packed elements where some elements actually have some further pointers Pack<(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.

@cmichi cmichi added B-design Designing a new component, interface or functionality. C-discussion An issue for discussion for a given topic. A-ink_metadata [ink_metadata] Work item P-high High priority issue. B-research Research task that has open questions that need to be resolved. and removed P-high High priority issue. labels Apr 16, 2021
@HCastano
Copy link
Contributor

In #1331 we updated the how the storage was defined in the metadata. I believe it should be parsable now, allowing to work on use-ink/cargo-contract#101.

cc @xermicus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ink_metadata [ink_metadata] Work item B-design Designing a new component, interface or functionality. B-research Research task that has open questions that need to be resolved. C-discussion An issue for discussion for a given topic.
Projects
None yet
Development

No branches or pull requests

2 participants