Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Split out voting and banking threads in banking stage
Browse files Browse the repository at this point in the history
Additionally this allows us to aggressively prune the buffer for voting threads
as with the new vote state only the latest vote from each validator is
necessary.
  • Loading branch information
AshwinSekar committed Sep 20, 2022
1 parent 8f96a39 commit 79a4b3a
Show file tree
Hide file tree
Showing 5 changed files with 587 additions and 351 deletions.
7 changes: 5 additions & 2 deletions core/benches/banking_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use {
leader_slot_banking_stage_metrics::LeaderSlotMetricsTracker,
qos_service::QosService,
unprocessed_packet_batches::*,
unprocessed_transaction_storage::{ThreadType, UnprocessedTransactionStorage},
},
solana_entry::entry::{next_hash, Entry},
solana_gossip::cluster_info::{ClusterInfo, Node},
Expand Down Expand Up @@ -80,8 +81,10 @@ fn bench_consume_buffered(bencher: &mut Bencher) {
let transactions = vec![tx; 4194304];
let batches = transactions_to_deserialized_packets(&transactions).unwrap();
let batches_len = batches.len();
let mut transaction_buffer =
UnprocessedPacketBatches::from_iter(batches.into_iter(), 2 * batches_len);
let mut transaction_buffer = UnprocessedTransactionStorage::new_transaction_storage(
UnprocessedPacketBatches::from_iter(batches.into_iter(), 2 * batches_len),
ThreadType::Transactions,
);
let (s, _r) = unbounded();
// This tests the performance of buffering packets.
// If the packet buffers are copied, performance will be poor.
Expand Down
Loading

0 comments on commit 79a4b3a

Please sign in to comment.