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

Fix incorrect padding of LDC mode 2 and release 0.58.2 #854

Merged
merged 4 commits into from
Oct 7, 2024

Conversation

Dentosal
Copy link
Member

@Dentosal Dentosal commented Oct 7, 2024

The following bug was reported:

I think we should only copy length_unpadded instead of length here, and the remaining length-length_padded should be filled with null bytes.

This PR fixes the issue and adds a test case to show that the padding works correcty. While technically breaking, this is a bugfix release. The patch is released immediately.

Checklist

  • Breaking changes are clearly marked as such in the PR description and changelog
  • New behavior is reflected in tests
  • If performance characteristic of an instruction change, update gas costs as well or make a follow-up PR for that
  • The specification matches the implemented behavior (link update PR if changes are needed)

Before requesting review

  • I have reviewed the code myself
  • I have created follow-up issues caused by this PR and linked them here

@Dentosal Dentosal added bug Something isn't working fuel-vm Related to the `fuel-vm` crate. labels Oct 7, 2024
@Dentosal Dentosal changed the title Fix incorrect padding bug with LDC mode 2 Fix incorrect padding of LDC mode 2 Oct 7, 2024
@Dentosal Dentosal changed the title Fix incorrect padding of LDC mode 2 Fix incorrect padding of LDC mode 2 and release 0.58.2 Oct 7, 2024
@Dentosal Dentosal self-assigned this Oct 7, 2024
@Dentosal Dentosal marked this pull request as ready for review October 7, 2024 17:39
@Dentosal Dentosal requested a review from a team October 7, 2024 17:39
CHANGELOG.md Outdated Show resolved Hide resolved
fuel-vm/src/interpreter/blockchain.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@xgreenx xgreenx 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
Contributor

@AurelienFT AurelienFT left a comment

Choose a reason for hiding this comment

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

Tests are passing I'm happy :D

@xgreenx xgreenx added this pull request to the merge queue Oct 7, 2024
Merged via the queue into master with commit de235f8 Oct 7, 2024
40 checks passed
@xgreenx xgreenx deleted the dento/fix-padding-ldc-mode-2 branch October 7, 2024 18:16
@xgreenx xgreenx mentioned this pull request Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fuel-vm Related to the `fuel-vm` crate.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants