Skip to content

Commit

Permalink
Revert "Solving issue of finalized meta after processed block (#365)"
Browse files Browse the repository at this point in the history
This reverts commit c09700f.

Production runs show more stable memory use but worse performance on
landing transactions.
  • Loading branch information
ckamm committed Mar 22, 2024
1 parent e6bace6 commit 5f72d5a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
4 changes: 2 additions & 2 deletions bench/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ fn transaction_size_small() {
let rand_string = random_strings.first().unwrap();
let tx = BenchHelper::create_memo_tx_small(rand_string, &payer_keypair, blockhash);

assert_eq!(bincode::serialized_size(&tx).unwrap(), 231);
assert_eq!(bincode::serialized_size(&tx).unwrap(), 179);
}

#[test]
Expand All @@ -172,5 +172,5 @@ fn transaction_size_large() {
let rand_string = random_strings.first().unwrap();
let tx = BenchHelper::create_memo_tx_large(rand_string, &payer_keypair, blockhash);

assert_eq!(bincode::serialized_size(&tx).unwrap(), 1230);
assert_eq!(bincode::serialized_size(&tx).unwrap(), 1186);
}
7 changes: 0 additions & 7 deletions cluster-endpoints/src/grpc_multiplex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ pub fn create_grpc_multiplex_blocks_subscription(
let mut cleanup_without_confirmed_recv_blocks_meta: u32 = 0;
let mut cleanup_without_finalized_recv_blocks_meta: u32 = 0;
let mut confirmed_block_not_yet_processed = HashSet::<String>::new();
let mut finalized_block_not_yet_processed = HashSet::<String>::new();

// start logging errors when we recieve first finalized block
let mut startup_completed = false;
Expand All @@ -189,11 +188,6 @@ pub fn create_grpc_multiplex_blocks_subscription(
warn!("produced block channel has no receivers {e:?}");
}
}
if finalized_block_not_yet_processed.remove(&processed_block.blockhash) {
if let Err(e) = producedblock_sender.send(processed_block.to_finalized_block()) {
warn!("produced block channel has no receivers {e:?}");
}
}
recent_processed_blocks.insert(processed_block.blockhash.clone(), processed_block);
},
meta_confirmed = confirmed_blockmeta_stream.next() => {
Expand Down Expand Up @@ -226,7 +220,6 @@ pub fn create_grpc_multiplex_blocks_subscription(
} else if startup_completed {
// this warning is ok for first few blocks when we start lrpc
log::warn!("finalized block meta received for blockhash {} which was never seen or already emitted", blockhash);
finalized_block_not_yet_processed.insert(blockhash);
}
},
_ = cleanup_tick.tick() => {
Expand Down

0 comments on commit 5f72d5a

Please sign in to comment.