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

feat!: add support for experimental encoding in logs #1259

Merged
merged 22 commits into from
Jan 29, 2024

Conversation

hal3e
Copy link
Contributor

@hal3e hal3e commented Jan 23, 2024

closes: #1247, #1151, #901, #898

This PR adds support for sway's experimental encoding in logs. The new encoder is enabled with the experimental rustflag.

To run the tests, first build the forc projects with:
forc build --path packages/fuels --experimental-new-encoding then run the tests with:
RUSTFLAGS='--cfg experimental' cargo test --test logs

What was done:

  • added ExperimentalBoundedDecoder
  • updated how RawSlice was encoded and decoded
  • added tests for the new encoding
  • add new CI step that runs tests with the new experimental flag

BREAKING CHANGE:

  • change RawSlice encoding and decoding

Checklist

  • I have linked to any relevant issues.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary labels.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@hal3e hal3e added enhancement New feature or request big dev-experience labels Jan 23, 2024
@hal3e hal3e changed the title feat: add support feat!: add support for experimental encoding in logs Jan 23, 2024
@hal3e hal3e self-assigned this Jan 23, 2024
Copy link
Contributor

@MujkicA MujkicA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@digorithm digorithm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work -- excited to see this new ABI decoding in action 😍

Left a minor question but it shouldn't be a blocker.

@hal3e hal3e merged commit 1221632 into master Jan 29, 2024
45 of 51 checks passed
@hal3e hal3e deleted the hal3e/new-log-encoding branch January 29, 2024 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support the Sway's new __log encoding scheme
4 participants