Optimize packet dedup (#22571)

* Use bloom filter to dedup packets

* dedup first

* Update bloom/src/bloom.rs

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>

* Update core/src/sigverify_stage.rs

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>

* Update core/src/sigverify_stage.rs

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>

* Update core/src/sigverify_stage.rs

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>

* fixup

* fixup

* fixup

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
This commit is contained in:
anatoly yakovenko
2022-01-19 13:58:20 -08:00
committed by GitHub
parent b448472037
commit d343713f61
25 changed files with 296 additions and 152 deletions

View File

@ -10,7 +10,6 @@ use {
rayon::prelude::*,
solana_core::{
banking_stage::{BankingStage, BankingStageStats},
packet_deduper::PacketDeduper,
qos_service::QosService,
},
solana_entry::entry::{next_hash, Entry},
@ -222,7 +221,6 @@ fn bench_banking(bencher: &mut Bencher, tx_type: TransactionType) {
);
let cluster_info = Arc::new(cluster_info);
let (s, _r) = unbounded();
let packet_deduper = PacketDeduper::default();
let _banking_stage = BankingStage::new(
&cluster_info,
&poh_recorder,
@ -232,7 +230,6 @@ fn bench_banking(bencher: &mut Bencher, tx_type: TransactionType) {
None,
s,
Arc::new(RwLock::new(CostModel::default())),
packet_deduper.clone(),
);
poh_recorder.lock().unwrap().set_bank(&bank);
@ -267,7 +264,6 @@ fn bench_banking(bencher: &mut Bencher, tx_type: TransactionType) {
// in this chunk, but since we rotate between CHUNKS then
// we should clear them by the time we come around again to re-use that chunk.
bank.clear_signatures();
packet_deduper.reset();
trace!(
"time: {} checked: {} sent: {}",
duration_as_us(&now.elapsed()),