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

bank: Add errored compute units during simulation #34450

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

joncinque
Copy link
Contributor

Problem

Transaction simulations only sum up the compute units of successful instructions, meaning that the compute units used on the errored instruction are lost. This creates a divergence between execution and simulation.

Summary of Changes

This one was pretty simple! Simply include the errored units to the reported units consumed. We could also read it out of the execution_results and avoid using the timings, but it seemed fine to stick with the timings since they gave the correct result.

Fixes #34445

Copy link
Contributor

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

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

Easy enough! Lgtm

Copy link

codecov bot commented Dec 14, 2023

Codecov Report

Merging #34450 (69c61cd) into master (39a3566) will decrease coverage by 0.1%.
Report is 23 commits behind head on master.
The diff coverage is 100.0%.

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #34450     +/-   ##
=========================================
- Coverage    81.9%    81.8%   -0.1%     
=========================================
  Files         819      819             
  Lines      220984   220999     +15     
=========================================
- Hits       181015   180995     -20     
- Misses      39969    40004     +35     

@joncinque joncinque merged commit d36b211 into solana-labs:master Dec 14, 2023
34 checks passed
@joncinque joncinque deleted the simunits branch December 14, 2023 00:35
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.

RPC node simulate transaction consumed units
2 participants