#43220 [BC-Insight] The GC_INTERVAL might not be fitting for the configured sequence_number_ttl_ms
Description
Brief/Intro
Vulnerability Details
pub(crate) async fn receive_transaction_tick(&mut self) -> Result<(), Error> {
... ...
>> if self.last_gc.elapsed() >= GC_INTERVAL {
// todo: these will be slightly off, but gc does not need to be exact
let now = Instant::now();
let epoch_ms_now = chrono::Utc::now().timestamp_millis() as u64;
// garbage collect the used sequence number pool
self.used_sequence_number_pool.gc(epoch_ms_now);
// garbage collect the transactions in flight
{
// unwrap because failure indicates poisoned lock
let mut transactions_in_flight = self.transactions_in_flight.write().unwrap();
transactions_in_flight.gc(epoch_ms_now);
}
// garbage collect the core mempool
self.core_mempool.gc();
self.last_gc = now;
}
... ...
}Impact Details
References
Proof of Concept
Proof of Concept
Previous#43217 [BC-Insight] Incorrect public key notification after key rotationNext#43221 [BC-Insight] Expired transactions prevent new submissions due to delayed garbage collection
Was this helpful?