You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Rust RPC client assumes that the endpoint it's using isn't load-balanced, which can cause for false errors on transaction confirmations. For example, the confirmation logic in send_and_confirm_transaction is just checking that the given blockhash is valid for processed commitment:
Problem
The Rust RPC client assumes that the endpoint it's using isn't load-balanced, which can cause for false errors on transaction confirmations. For example, the confirmation logic in
send_and_confirm_transaction
is just checking that the given blockhash is valid forprocessed
commitment:agave/rpc-client/src/nonblocking/rpc_client.rs
Lines 612 to 631 in 8c7ae80
If that call hits an RPC node that's further behind, the confirmation may incorrectly return an error.
Proposed Solution
We already have the technology for this!
getLatestBlockhash
returns the last valid block height: https://solana.com/docs/rpc/http/getlatestblockhashgetSignatureStatuses
allows for aminContextSlot
which gives an error when hitting a node that's behind: https://solana.com/docs/rpc/http/getsignaturestatusesMake use of these and make the Rust RPC client a bit smarter, like the JS client.
The text was updated successfully, but these errors were encountered: