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

v1.18: RPC: fix numNonVoteTransactions in getPerformanceSamples (backport of #1189) #1208

Merged
merged 1 commit into from
May 9, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented May 7, 2024

Problem

The value numNonVoteTransactions returned in the RPC getPerformanceSamples endpoint was actually reporting the number of successful non vote transactions that were executed. That field is documented in the RPC docs with the following statement:

To get a number of voting transactions compute numTransactions - numNonVoteTransaction"

But before this fix, numTransactions - numNonVoteTransaction is actually computing the number of vote transactions + errored non-vote transactions.

Summary of Changes

  • Increment executed_non_vote_transactions_count whether the non-vote tx failed or succeeded. This value will get fixed on restart since we don't persist the value in snapshots

Fixes #


This is an automatic backport of pull request #1189 done by [Mergify](https://mergify.com).

@mergify mergify bot requested a review from a team as a code owner May 7, 2024 01:25
@mergify mergify bot assigned jstarry May 7, 2024
@mergify mergify bot requested a review from a team as a code owner May 7, 2024 01:25
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.6%. Comparing base (a73b6cb) to head (2eacc4f).

Additional details and impacted files
@@            Coverage Diff            @@
##            v1.18    #1208     +/-   ##
=========================================
- Coverage    81.6%    81.6%   -0.1%     
=========================================
  Files         827      827             
  Lines      225352   225352             
=========================================
- Hits       184043   184036      -7     
- Misses      41309    41316      +7     

Copy link

@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.

Low-risk change that fixes a bug and is isolated to the SamplePerformanceService and the related RPC call; I'm okay with the backport.

@jstarry jstarry merged commit 117892a into v1.18 May 9, 2024
35 checks passed
@jstarry jstarry deleted the mergify/bp/v1.18/pr-1189 branch May 9, 2024 02:58
anwayde pushed a commit to firedancer-io/agave that referenced this pull request Jul 23, 2024
…port of anza-xyz#1189) (anza-xyz#1208)

RPC: fix numNonVoteTransactions in getPerformanceSamples (anza-xyz#1189)

(cherry picked from commit 3f6c567)

Co-authored-by: Justin Starry <justin@anza.xyz>
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.

4 participants