solana
solana copied to clipboard
Plumb `CommitmentConfig` through `bench-tps` client types
Problem
consistently get blockhash not found
errors when running the rpc-client
in bench-tps
. This is due to bench-tps
grabbing blockhashes that are processed
(too new), rather than confirmed
or finalized
.
Summary of Changes
Add in a --commitment-config <commitment-level>
to bench-tps
that accepts the desired blockhash CommitmentConfig
level. This commitment_level
is propagated down into the bench-tps
rpc-client
and tpu-client
.
Fixes #
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 81.6%. Comparing base (
531793b
) to head (e66a226
). Report is 16 commits behind head on master.
:exclamation: Current head e66a226 differs from pull request most recent head 70e79ee. Consider uploading reports for the commit 70e79ee to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## master #35282 +/- ##
=======================================
Coverage 81.6% 81.6%
=======================================
Files 834 834
Lines 224803 224803
=======================================
+ Hits 183467 183520 +53
+ Misses 41336 41283 -53
Confirm that with this patch in testnet RpcClient doesn't log blockhash not found. So LGTM
LGTM - nice to fix a bug that has seemingly been around for years
Probably since before RpcClients could be configured with a default commitment 😅