-
Notifications
You must be signed in to change notification settings - Fork 4.5k
RPC getPerformanceSamples: Add numNonVoteTransaction
#29388
RPC getPerformanceSamples: Add numNonVoteTransaction
#29388
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love how simple this one turned out :)
Just a couple suggestions on your tests.
@@ -2074,6 +2079,7 @@ An array of: | |||
- `RpcPerfSample<object>` | |||
- `slot: <u64>` - Slot in which sample was taken at | |||
- `numTransactions: <u64>` - Number of transactions in sample | |||
- `numNonVoteTransaction: <u64>` - Number of non-vote transactions in sample |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I wonder if I should clarify numNonVoteTransaction
with an explanation that it is only present after upgrade to v1.15 and only for newer blocks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I was going to say that if we do document the version added, the public JSON-RPC docs are probably the place to do it. Historically, we've only done that for input parameters, not new output fields. But we could start.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do have some precedent of doing so for new methods:
solana/docs/src/developing/clients/jsonrpc-api.md
Line 1056 in 055c6a5
**NEW: This method is only available in solana-core v1.9 or newer. Please use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r+ a nit, CI's complaints, and whatever you decide on the jsonrpc-api docs
@@ -2074,6 +2079,7 @@ An array of: | |||
- `RpcPerfSample<object>` | |||
- `slot: <u64>` - Slot in which sample was taken at | |||
- `numTransactions: <u64>` - Number of transactions in sample | |||
- `numNonVoteTransaction: <u64>` - Number of non-vote transactions in sample |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I was going to say that if we do document the version added, the public JSON-RPC docs are probably the place to do it. Historically, we've only done that for input parameters, not new output fields. But we could start.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple small things but agreed with Tyera that is nice how clean / minimal this PR is
@@ -2074,6 +2079,7 @@ An array of: | |||
- `RpcPerfSample<object>` | |||
- `slot: <u64>` - Slot in which sample was taken at | |||
- `numTransactions: <u64>` - Number of transactions in sample | |||
- `numNonVoteTransaction: <u64>` - Number of non-vote transactions in sample |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do have some precedent of doing so for new methods:
solana/docs/src/developing/clients/jsonrpc-api.md
Line 1056 in 055c6a5
**NEW: This method is only available in solana-core v1.9 or newer. Please use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Erm, this one comment didn't post with my review. Not sure why. I'm having weird internet stuff at home, but also git seems sluggish independent of that 🤷♀️.
Pull request has been modified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r+ one remaining nit
Pull request has been modified.
Allow interested parties to see both total and non-vote transaction counts in each performance sample.
Problem
Allow interested parties to see both total and non-vote transaction counts in each performance sample.
Summary of Changes
bank
s now count non-vote transactions.blockstore
stores those counts into a new version of thePerfSample
column.SamplePerformanceService
pushes new count from thebank
s into the blockstore.Fixes #29159