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

Support new encode/decode for __log #1671

Closed
arboleya opened this issue Jan 22, 2024 · 1 comment · Fixed by #1673
Closed

Support new encode/decode for __log #1671

arboleya opened this issue Jan 22, 2024 · 1 comment · Fixed by #1673
Assignees
Labels
feat Issue is a feature

Comments

@arboleya
Copy link
Member

New encoding/decoding was implemented for __log calls, as per:

We need to start the work around the TS SDK to support it.

@danielbate
Copy link
Contributor

danielbate commented Jan 23, 2024

Full details for the changes can be found here, however here are the high level changes that we should make for the SDK.

  • Types now only use the exact number of bits that they need. For example, bool and u8 now only take up a single byte.
  • No additional padding or alignment, as seen in feat!: represent small values as single bytes #1435.
  • Arrays, Tuples and fixed size String Arrays are encoded without any additional padding, and take up the size of it’s contents. A dynamic sized string will have a u64 length at the start.
  • Vec, Byte and Raw Slice are also encoded like a dynamic array, with a u64 length and then it's contents.
  • We should also look to handle versioning within our encoding services. Encoding is subject to change so we should support different coders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Issue is a feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants