v1.8: Enforce tx metadata upload to bigtable (#23105)

* v1.8: Enforce tx metadata upload to bigtable

* fix bpf ci step
This commit is contained in:
Justin Starry
2022-02-16 18:02:03 +08:00
committed by GitHub
parent 52c959e7f0
commit 3424ace92c
15 changed files with 243 additions and 178 deletions

View File

@@ -250,6 +250,10 @@ pub fn run_cluster_partition<C>(
..ValidatorConfig::default_for_test()
};
// Enabled so that transaction statuses are written to blockstore which enables
// tests to detect when a block has been replayed.
validator_config.rpc_config.enable_rpc_transaction_history = true;
// Returns:
// 1) The keys for the validators
// 2) The amount of time it would take to iterate through one full iteration of the given

View File

@@ -725,13 +725,19 @@ fn find_latest_replayed_slot_from_ledger(
// Wait for the slot to be replayed
loop {
info!("Waiting for slot {} to be replayed", latest_slot);
if !blockstore
let replayed_transactions = blockstore
.map_transactions_to_statuses(
latest_slot,
non_tick_entry.transactions.clone().into_iter(),
)
.is_empty()
{
.unwrap_or_else(|_| {
info!(
"Transaction statuses for slot {} haven't been written yet",
latest_slot
);
Vec::new()
});
if !replayed_transactions.is_empty() {
return (
latest_slot,
AncestorIterator::new(latest_slot, &blockstore).collect(),