solana/core/src
Lijun Wang ada6136a6c
Refactor connection cache to support generic msgs (#29774)
tpu-client/tpu_connection_cache is refactored out the module and moved to connection-cache/connection_cache and the logic in client/connection_cache is consolidated to connection-cache/connection_cache as well. client/connection_cache only has a thin wrapper which forward calls to connection-cache/connection_cache and deal with constructions of quic/udp connection cache for clients using them both.2.

The TpuConnection is refactored to ClientConnection to make it generic and functions renamed to be proper for other workflows. eg. tpu_addr -> server_addr, send_transaction --> send_data and etc...

The enum dispatch is removed so that we can make the bulk of code of quic and udp agnostic of each other. The client is possible to load quic or udp only into its runtime.

The generic type parameter in the tpu-client/tpu_connection_cache is removed in order to create both quic and udp connection cache and use the object to send transactions with multiple branching when sending data. The generic type parameters and associated types are dropped in other types in order to make the trait "object safe" for this purpose.

I have annotated the code explaining the reasoning and the refactoring source -> destination.

There is no functional changes

bench-tps has been performed for rpc-client, thin-client and tpu-client. And it is found the performance number largely match the ones before the refactoring.
2023-02-01 18:10:06 -08:00
..
banking_stage Refactor connection cache to support generic msgs (#29774) 2023-02-01 18:10:06 -08:00
broadcast_stage expands api parity between the new and the legacy contact-info (#30038) 2023-02-01 13:07:42 +00:00
accounts_hash_verifier.rs asserts that cluster-info keypair is consistent with contact-info id (#29818) 2023-01-24 16:57:55 +00:00
ancestor_hashes_service.rs renames ContactInfo to LegacyContactInfo (#29566) 2023-01-08 16:00:55 +00:00
banking_stage.rs BankingStage Refactor: Committer Simplify (#29958) 2023-02-01 15:44:53 -08:00
banking_trace.rs Add fully-reproducible online tracer for banking (#29196) 2023-01-25 21:54:38 +09:00
broadcast_stage.rs asserts that cluster-info keypair is consistent with contact-info id (#29818) 2023-01-24 16:57:55 +00:00
cache_block_meta_service.rs Standardize thread names 2022-08-20 07:49:39 -07:00
cluster_info_vote_listener.rs Add fully-reproducible online tracer for banking (#29196) 2023-01-25 21:54:38 +09:00
cluster_nodes.rs asserts that cluster-info keypair is consistent with contact-info id (#29818) 2023-01-24 16:57:55 +00:00
cluster_slot_state_verifier.rs Exit when stuck in an unrecoverable repair/purge loop (#28596) 2022-10-27 20:06:06 -07:00
cluster_slots.rs adjust normalized stake calculation in compute_weight (#29694) 2023-01-17 11:27:57 -08:00
cluster_slots_service.rs asserts that cluster-info keypair is consistent with contact-info id (#29818) 2023-01-24 16:57:55 +00:00
commitment_service.rs vote: encapsulate `Lockout` (#29753) 2023-01-18 19:28:28 -07:00
completed_data_sets_service.rs Standardize thread names 2022-08-20 07:49:39 -07:00
consensus.rs vote: encapsulate `Lockout` (#29753) 2023-01-18 19:28:28 -07:00
cost_update_service.rs Update cost model to use requested_cu instead of estimated cu #27608 (#28281) 2022-11-22 11:55:56 -06:00
drop_bank_service.rs Standardize thread names 2022-08-20 07:49:39 -07:00
duplicate_repair_status.rs patches errors from clippy::uninlined_format_args 2022-12-06 19:32:15 +00:00
fetch_stage.rs Refactor connection cache to support generic msgs (#29774) 2023-02-01 18:10:06 -08:00
find_packet_sender_stake_stage.rs sdk: Make Packet::meta private, use accessor functions (#29092) 2022-12-06 12:54:49 +01:00
fork_choice.rs
forward_packet_batches_by_accounts.rs Remove gate from accepting packets for forwarding (#29049) 2022-12-06 12:13:01 -06:00
gen_keys.rs
heaviest_subtree_fork_choice.rs Clear parent in repair weighting when dumping from replay (#29770) 2023-01-23 12:55:09 -08:00
immutable_deserialized_packet.rs sdk: Make Packet::meta private, use accessor functions (#29092) 2022-12-06 12:54:49 +01:00
latest_unprocessed_votes.rs sdk: Make Packet::meta private, use accessor functions (#29092) 2022-12-06 12:54:49 +01:00
latest_validator_votes_for_frozen_banks.rs
leader_slot_banking_stage_metrics.rs Refactor/banking_stage_make_decision_consume_bank (#28946) 2022-12-02 10:07:01 -06:00
leader_slot_banking_stage_timing_metrics.rs Refactor/banking_stage_make_decision_consume_bank (#28946) 2022-12-02 10:07:01 -06:00
ledger_cleanup_service.rs Reduce the amount of IO that LedgerCleanupService performs (#29239) 2023-01-23 04:39:47 -06:00
ledger_metric_report_service.rs Standardize thread names 2022-08-20 07:49:39 -07:00
lib.rs Add fully-reproducible online tracer for banking (#29196) 2023-01-25 21:54:38 +09:00
multi_iterator_scanner.rs Fix doc warnings (#29537) 2023-01-07 09:24:50 +00:00
next_leader.rs BankingStage Refactor: Separate Next Leader Functions (#29401) 2023-01-20 10:02:29 -08:00
optimistic_confirmation_verifier.rs patches errors from clippy::uninlined_format_args 2022-12-06 19:32:15 +00:00
outstanding_requests.rs
packet_deserializer.rs Add fully-reproducible online tracer for banking (#29196) 2023-01-25 21:54:38 +09:00
packet_hasher.rs skips shreds deserialization before retransmit (#26230) 2022-06-30 12:13:00 +00:00
packet_threshold.rs
poh_timing_report_service.rs Standardize thread names 2022-08-20 07:49:39 -07:00
poh_timing_reporter.rs patches errors from clippy::uninlined_format_args 2022-12-06 19:32:15 +00:00
progress_map.rs patches errors from clippy::uninlined_format_args 2022-12-06 19:32:15 +00:00
qos_service.rs BankingStage Refactor: Separate transaction commiting module (#29808) 2023-01-25 19:02:21 -08:00
read_write_account_set.rs Feature/multi-iterator-scanner-read-locks (#28862) 2022-11-28 11:23:04 -06:00
repair_generic_traversal.rs Increase turbine propagation const (#29742) 2023-01-17 15:01:00 -08:00
repair_response.rs Use Ipv4Addr::{LOCALHOST, UNSPECIFIED} constants (#29813) 2023-01-23 16:49:51 -06:00
repair_service.rs get_best_weighted_repairs parameter cleanup (#30010) 2023-01-31 03:12:25 -08:00
repair_weight.rs get_best_weighted_repairs parameter cleanup (#30010) 2023-01-31 03:12:25 -08:00
repair_weighted_traversal.rs Add dump_node to update stake for heaviest subtrees (#28827) 2022-11-30 09:26:13 -08:00
replay_stage.rs geyser: add parent slot/blockhash to block (#29855) 2023-01-25 14:20:24 -08:00
request_response.rs
result.rs restructure repair decode error handling (#29977) 2023-01-31 02:44:58 -08:00
retransmit_stage.rs errors out when retransmit loopbacks to the slot leader (#29789) 2023-01-20 17:20:51 +00:00
rewards_recorder_service.rs Standardize thread names 2022-08-20 07:49:39 -07:00
sample_performance_service.rs ledger/blockstore: PerfSampleV2: num_non_vote_transactions (#29404) 2023-01-12 19:14:04 -08:00
serve_repair.rs restructure repair decode error handling (#29977) 2023-01-31 02:44:58 -08:00
serve_repair_service.rs Standardize thread names 2022-08-20 07:49:39 -07:00
shred_fetch_stage.rs feature gates merkle shreds on all clusters (#29957) 2023-01-27 21:02:51 +00:00
sigverify.rs Add fully-reproducible online tracer for banking (#29196) 2023-01-25 21:54:38 +09:00
sigverify_shreds.rs asserts that cluster-info keypair is consistent with contact-info id (#29818) 2023-01-24 16:57:55 +00:00
sigverify_stage.rs Move Deduper into a separate file (#29891) 2023-01-25 15:34:53 -06:00
snapshot_packager_service.rs Add slot deltas into the bank snapshot directory (#29409) 2023-02-01 16:51:32 -08:00
staked_nodes_updater_service.rs removes staked-nodes updater service excessive locks on gossip (#29936) 2023-01-26 23:31:35 +00:00
stats_reporter_service.rs Standardize thread names 2022-08-20 07:49:39 -07:00
system_monitor_service.rs Reduce cpuid reporting frequency to once an hour (#29849) 2023-01-24 09:27:43 -06:00
tower1_7_14.rs Move vote program state and instructions to solana-program 2022-08-09 20:52:47 -07:00
tower_storage.rs patches errors from clippy::uninlined_format_args 2022-12-06 19:32:15 +00:00
tpu.rs Add fully-reproducible online tracer for banking (#29196) 2023-01-25 21:54:38 +09:00
tracer_packet_stats.rs tracer-packet-stats reporting should not reset id (#27012) 2022-08-09 06:38:08 -07:00
tree_diff.rs Add dump_node to update stake for heaviest subtrees (#28827) 2022-11-30 09:26:13 -08:00
tvu.rs Add fully-reproducible online tracer for banking (#29196) 2023-01-25 21:54:38 +09:00
unfrozen_gossip_verified_vote_hashes.rs removes erroneous allow(dead_code) annotations from core (#26660) 2022-07-18 17:15:47 +00:00
unprocessed_packet_batches.rs sdk: Make Packet::meta private, use accessor functions (#29092) 2022-12-06 12:54:49 +01:00
unprocessed_transaction_storage.rs fixes errors from clippy::useless_conversion (#29534) 2023-01-05 18:05:32 +00:00
validator.rs Refactor connection cache to support generic msgs (#29774) 2023-02-01 18:10:06 -08:00
verified_vote_packets.rs vote: encapsulate `Lockout` (#29753) 2023-01-18 19:28:28 -07:00
vote_simulator.rs vote: encapsulate `Lockout` (#29753) 2023-01-18 19:28:28 -07:00
vote_stake_tracker.rs
voting_service.rs BankingStage Refactor: Separate Next Leader Functions (#29401) 2023-01-20 10:02:29 -08:00
warm_quic_cache_service.rs Refactor connection cache to support generic msgs (#29774) 2023-02-01 18:10:06 -08:00
window_service.rs Use Ipv4Addr::{LOCALHOST, UNSPECIFIED} constants (#29813) 2023-01-23 16:49:51 -06:00