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

Encoder/decoder revamp #1246

Closed
digorithm opened this issue Jan 11, 2024 · 3 comments
Closed

Encoder/decoder revamp #1246

digorithm opened this issue Jan 11, 2024 · 3 comments
Assignees
Labels
big blocked epic An epic is a high-level master issue for large pieces of work. P1 High priority

Comments

@digorithm
Copy link
Member

digorithm commented Jan 11, 2024

The Sway compiler is going through a long-discussed revamp of its encoder/decoder scheme, eventually leading to an intermediary representation that both the SDK and the compiler will target.

Tasks:

  1. __log outputting encoded values sway#5306
  2. feat!: add support for experimental encoding in logs #1259
  3. Serialization and encoding/decoding sway#4769
  4. fix!: encoding capacity overflow #1249
  5. Support new encoder/decoder for contracts #1278
  6. Support new encoder/decoder for scripts and predicates #1279

This will enable, once and for all, the support of nested heap types, solving many open issues related to this problem, such as:

  1. Decoding string slices from logs #1151
  2. RawSlice as arguments in scripts #1152
  3. String slices support #1158
  4. Arbitrary nesting of heap types in contract returns #1046
  5. feat: enable Bytes logging in contracts #901
  6. feat: enable Vec logging in contracts #898
  7. feat: support heap types return from scripts #866

As seen above, many issues stem from a lack of support for nested heap types. This new encoding/decoding scheme implemented inside the Sway compiler will enable this.

@hal3e
Copy link
Contributor

hal3e commented Jan 30, 2024

We have several issues here that were solved with the experimental log encoding PR. Should we close them or keep them until we have this stabilized ?

@digorithm
Copy link
Member Author

@hal3e That's true. I'll check which ones of those were resolved and close them.

@kamyar-tm kamyar-tm added the epic An epic is a high-level master issue for large pieces of work. label Feb 15, 2024
@digorithm
Copy link
Member Author

Closing this as most of the work has been done, and the leftovers will be pushed as a follow-up work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
big blocked epic An epic is a high-level master issue for large pieces of work. P1 High priority
Projects
None yet
Development

No branches or pull requests

3 participants