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

bugfix: Produce correct receipts with debugger breakpoints enabled #889

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Dentosal
Copy link
Member

@Dentosal Dentosal commented Jan 15, 2025

While working on execution traces, I noticed that the receipts are produced in incorrect oder when the debugger is enabled. The PR moves the end-of-execution receipt generation to run_program, so it's also done when called using Interpreter::resume.

This is technically a breaking change, but it's a bugfix so it doesn't necessarily warrant a breakng-version bump.

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 (none!)

@Dentosal Dentosal added bug Something isn't working fuel-vm Related to the `fuel-vm` crate. labels Jan 15, 2025
@Dentosal Dentosal self-assigned this Jan 15, 2025
@Dentosal Dentosal changed the title Produce correct receipts with debugger Produce correct receipts with debugger breakpoints enabled Jan 15, 2025
@Dentosal Dentosal changed the title Produce correct receipts with debugger breakpoints enabled bugfix: Produce correct receipts with debugger breakpoints enabled Jan 15, 2025
@Dentosal Dentosal marked this pull request as ready for review January 15, 2025 15:08
@Dentosal Dentosal requested a review from a team January 15, 2025 15:29
Copy link
Member Author

Choose a reason for hiding this comment

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

These changes are unrelated, but the CI wont pass without them. The import would have to be moved behind a feature, but I found it cleaner to just inline them.

fuel-vm/src/tests/debugger.rs Show resolved Hide resolved
ProgramState::Return(return_val),
)
} else {
// TODO set tree balance
Copy link
Contributor

Choose a reason for hiding this comment

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

I know this is not introduced in this PR so it's not blocking, but do we have an issue for this?

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