solana icon indicating copy to clipboard operation
solana copied to clipboard

Plumb `CommitmentConfig` through `bench-tps` client types

Open gregcusack opened this issue 1 year ago • 1 comments

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 #

gregcusack avatar Feb 21 '24 22:02 gregcusack

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     

codecov[bot] avatar Feb 22 '24 04:02 codecov[bot]

Confirm that with this patch in testnet RpcClient doesn't log blockhash not found. So LGTM

KirillLykov avatar Feb 23 '24 15:02 KirillLykov

LGTM - nice to fix a bug that has seemingly been around for years

Probably since before RpcClients could be configured with a default commitment 😅

CriesofCarrots avatar Feb 23 '24 18:02 CriesofCarrots