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

continue-on-error foundations: refactor verification to a separate trait #918

Merged
merged 25 commits into from
Feb 26, 2025

Conversation

Dentosal
Copy link
Member

@Dentosal Dentosal commented Feb 25, 2025

Work towards #691

Follow-up: #915

Moves some parts of tx verification logic to a separate trait so it can be replaced. This initial PR only moves "is contract in inputs" check. More rules can be migrated as they are needed.

This is a breaking change, as we need to add a new type parameter to the VM. While the default value keeps the same behavior, existing trait implementations might still break.

The new trait is fully sealed: it cannot be implemented outside fuel-vm, and it's methods cannot be called outside it. This means adding or removing methods is not a breaking change in the future.

In addition, an internal InputContracts type is removed and it's field flattened on the containing structs.

Checklist

  • Breaking changes are clearly marked as such in the PR description and changelog
  • New behavior is reflected in tests: no behavior changes!

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 breaking A breaking api change fuel-vm Related to the `fuel-vm` crate. labels Feb 25, 2025
@Dentosal Dentosal self-assigned this Feb 25, 2025
@Dentosal Dentosal changed the title continue-on-error foundations: refactor verification to it's own trait/type continue-on-error foundations: refactor verification to separate type Feb 25, 2025
@Dentosal Dentosal changed the title continue-on-error foundations: refactor verification to separate type continue-on-error foundations: refactor verification to a separate trait Feb 25, 2025
@Dentosal Dentosal marked this pull request as ready for review February 25, 2025 22:49
@Dentosal Dentosal requested a review from a team February 25, 2025 22:49
Comment on lines 24 to 26
where
Self: Sized + Seal,
S: InterpreterStorage,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need S here at all? Based on the use cases that we discussed, it looks like we don't need it anymore=)

Copy link
Member Author

Choose a reason for hiding this comment

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

True. Removed in 9cc0677.

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.

Looks good to me=)

xgreenx
xgreenx previously approved these changes Feb 26, 2025
@xgreenx xgreenx requested a review from a team February 26, 2025 00:50
@Dentosal Dentosal added this pull request to the merge queue Feb 26, 2025
Merged via the queue into master with commit f7123ff Feb 26, 2025
39 checks passed
@Dentosal Dentosal deleted the dento/separate-verifier branch February 26, 2025 12:07
@Dentosal Dentosal mentioned this pull request Feb 26, 2025
xgreenx added a commit to FuelLabs/fuel-core that referenced this pull request Mar 12, 2025
…un (#2840)

This change starts using the
FuelLabs/fuel-vm#918 feature for the
`asemble_tx` endpoint.

---------

Co-authored-by: Mårten Blankfors <[email protected]>
Co-authored-by: AurelienFT <[email protected]>
Co-authored-by: Aaryamann Challani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking A breaking api change fuel-vm Related to the `fuel-vm` crate.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants