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 negative gas cost in debug_traceTransaction traces #6831

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

natebeauregard
Copy link
Contributor

Fixes #6669, #6810

Changes

  • Adds a check to ensure that the GasCost trace entry is not overwritten after the STOP or RETURN opcodes are executed and the gas cost is properly recorded in the trace entry
  • This approach is based on the way that ParityLikeTxTracer handles this situation

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (a change that causes existing functionality not to work as expected)
  • Optimization
  • Refactoring
  • Documentation update
  • Build-related changes
  • Other: Description

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

@natebeauregard natebeauregard changed the title Fix negative gas cost in debug_traceTransaction traces (#6669) Fix negative gas cost in debug_traceTransaction traces Mar 14, 2024
@LukaszRozmej LukaszRozmej merged commit ea0bbf0 into master Mar 15, 2024
67 checks passed
@LukaszRozmej LukaszRozmej deleted the fix/6669-negative-gas-costs branch March 15, 2024 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Negative gas cost in debug_traceTransaction traces
2 participants