send-transaction-service: use message hash and blockhash to look up committed tx status#6585
send-transaction-service: use message hash and blockhash to look up committed tx status#6585jstarry merged 2 commits intoanza-xyz:masterfrom
Conversation
steveluscher
left a comment
There was a problem hiding this comment.
…uses a slow signature lookup approach…
This is because it looks in all the blockhash partitions, right, instead of choosing the right one straight away?
| .map(|v| v.1) | ||
| } | ||
|
|
||
| pub fn get_committed_transaction_status_slot( |
There was a problem hiding this comment.
What if we skated where the puck was going here, and instead returned a boolean to say if the thing errored or not. This envisions a future where BankStatusCache no longer contains TransactionResult, but at most an indication of whether a seen transaction was a success or failure.
pub fn get_committed_transaction_status_and_slot(
&self,
message_hash: &Hash,
transaction_blockhash: &Hash,
) -> Option<(Slot, boolean)> {
let rcache = self.status_cache.read().unwrap();
rcache
.get_status(message_hash, transaction_blockhash, &self.ancestors)
.map(|(slot, transaction_result)| (slot, transaction_result.is_ok()))
}
Yes, that's correct. I updated the title and description to say that explicitly |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6585 +/- ##
=========================================
- Coverage 82.8% 82.8% -0.1%
=========================================
Files 849 849
Lines 379196 379301 +105
=========================================
+ Hits 314029 314113 +84
- Misses 65167 65188 +21 🚀 New features to boost your workflow:
|

Problem
The STS (used by the send transaction RPC method) uses a slow signature lookup approach to determine whether a transaction has been committed or not
Summary of Changes
Fixes #