steviez
b48fd4eec2
Construct PacketBatches from PongMessages directly ( #24708 )
...
Serialize pongs directly into PacketBatch to save copying the data from
intermediate packets into PacketBatch.
2022-04-26 21:30:00 -05:00
behzad nouri
12ae8d3be5
returns Error when Shred::sanitize fails ( #24653 )
...
Including the error in the output allows to debug when Shred::sanitize
fails.
2022-04-25 23:19:37 +00:00
behzad nouri
895f76a93c
hides implementation details of shred from its public interface ( #24563 )
...
Working towards embedding versioning into shreds binary, so that a new
variant of shred struct can include merkle tree hashes of the erasure
set.
2022-04-25 12:43:22 +00:00
behzad nouri
1d50832389
replaces counters with datapoints in gossip metrics ( #24451 )
2022-04-18 23:14:59 +00:00
HaoranYi
6d1b6bdd7c
typo ( #24400 )
2022-04-18 08:52:56 -05:00
Tyera Eulberg
afeb1d3cca
Bump lru crate ( #24150 )
2022-04-06 16:18:42 -06:00
behzad nouri
cd09390367
reduces gossip crds stats ( #24132 )
2022-04-06 15:35:25 +00:00
BG Zhu
22224127e0
Refactor thin_client::create_client ( #24067 )
...
Refactor the thin_client::create_client to take addresses separately instead of as a tuple
Co-authored-by: Bijie Zhu <bijiezhu@Bijies-MBP.cable.rcn.com>
2022-04-06 11:03:38 -04:00
ryleung-solana
a38bd4acc8
Use LRU in connection-cache ( #24109 )
...
Switch to using LRU for connection-cache
2022-04-06 10:58:32 -04:00
behzad nouri
db23295e1c
removes legacy weighted_shuffle and weighted_best methods ( #24125 )
...
Older weighted_shuffle is based on a heuristic which results in biased
samples as shown in:
https://github.com/solana-labs/solana/pull/18343
and can be replaced with WeightedShuffle.
Also, as described in:
https://github.com/solana-labs/solana/pull/13919
weighted_best can be replaced with rand::distributions::WeightedIndex,
or WeightdShuffle::first.
2022-04-05 19:19:22 +00:00
behzad nouri
2b718d00b0
removes legacy compatibility turbine peers shuffle code
2022-04-05 12:04:12 +00:00
behzad nouri
7cb3b6cbe2
demotes WeightedShuffle failures to error metrics ( #24079 )
...
Since call-sites are calling unwrap anyways, panicking seems too punitive
for our use cases.
2022-04-03 16:20:06 +00:00
ryleung-solana
8b72200afb
Thin client quic ( #23973 )
...
Change thin-client to use connection-cache
2022-03-31 15:47:00 -04:00
Michael Vines
7ef18f220a
Update Version CrdsData on node identity changes
2022-03-28 15:57:16 -07:00
ryleung-solana
17b00ad3a4
Add quic-client module ( #23166 )
...
* Add quic-client module to send transactions via quic, abstracted behind the TpuConnection trait (along with a legacy UDP implementation of TpuConnection) and change thin-client to use TpuConnection
2022-03-09 21:33:05 -05:00
sakridge
a4f4ac5279
add plumbing to allow for arbitrary tpu address in gossip ( #22703 )
...
* add plumbing to allow for arbitrary tpu address in gossip
* make clippy happy
* Review comments
Co-authored-by: CherryWorm <nico.gruendel@web.de>
2022-03-02 09:42:14 +01:00
behzad nouri
1282277126
bumps up crds-shards-bits ( #23220 )
...
The commit adjust CRDS_SHARDS_BITS up to be in-line with mask_bits in
gossip pull request. This will avoid redundant filtering of irrelevant
crds entries when responding to pull requests.
2022-03-01 15:14:11 +00:00
sakridge
514aab46d9
Search for consecutive ports ( #22979 )
2022-02-07 17:53:40 +01:00
sakridge
5a230f418d
Add quic port for accepting transactions ( #22753 )
...
using quinn library
streamer: Sign TLS cert with validator identity key
Handle multiple incoming chunks
2022-02-04 15:27:09 +01:00
behzad nouri
e3b137066d
caches WeightedShuffle struct in ClusterNodes ( #22877 )
...
Instead of reconstructing WeightedShuffle struct for each shred
broadcast or retransmit, we can use the same struct with minimal
mutations.
2022-02-02 15:12:26 +00:00
behzad nouri
45e09664b8
removes Rng field from WeightedShuffle struct ( #22850 )
2022-02-01 15:27:23 +00:00
behzad nouri
604ca9316c
includes zero weighted entries in WeightedShuffle ( #22829 )
...
Current WeightedShuffle implementation excludes zero weighted entries
from the shuffle:
https://github.com/solana-labs/solana/blob/13e631dcf/gossip/src/weighted_shuffle.rs#L29-L30
Though mathematically this might make more sense, for our use-cases
(turbine specifically), this results in less efficient code:
https://github.com/solana-labs/solana/blob/13e631dcf/core/src/cluster_nodes.rs#L409-L430
This commit changes the implementation so that zero weighted indices are
also included in the shuffle but appear only at the end after non-zero
weighted indices.
2022-01-31 16:23:50 +00:00
Michael Vines
6d5bbca630
Pacify clippy
2022-01-21 19:12:57 -08:00
Justin Starry
7f20c6149e
Refactor: move simple vote parsing to runtime ( #22537 )
2022-01-20 10:39:21 +08:00
anatoly yakovenko
d343713f61
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>
2022-01-19 13:58:20 -08:00
Jeff Biseda
8b66625c95
convert std::sync::mpsc to crossbeam_channel ( #22264 )
2022-01-11 02:44:46 -08:00
behzad nouri
49da347d84
limits gossip vote stats to the top most voted slots ( #22416 )
2022-01-10 21:23:41 +00:00
behzad nouri
c9c78622a8
discards serialized gossip crds votes if cannot parse tx ( #22129 )
2021-12-29 19:31:26 +00:00
behzad nouri
65d59f4ef0
tracks erasure coding shreds' indices explicitly ( #21822 )
...
The indices for erasure coding shreds are tied to data shreds:
https://github.com/solana-labs/solana/blob/90f41fd9b/ledger/src/shred.rs#L921
However with the upcoming changes to erasure schema, there will be more
erasure coding shreds than data shreds and we can no longer infer coding
shreds indices from data shreds.
The commit adds constructs to track coding shreds indices explicitly.
2021-12-19 22:37:55 +00:00
carllin
7f6fb6937a
Ensure AncestorHashesSerice selects an open port ( #21919 )
2021-12-18 00:44:01 -05:00
Jeff Biseda
97a1fa10a6
streamer send destination metrics for repair, gossip ( #21564 )
2021-12-17 15:21:05 -08:00
behzad nouri
89d66c3210
removes next_shred_index from return value of entries to shreds api ( #21961 )
...
next-shred-index is already readily available from returned data shreds.
The commit simplifies the api for upcoming changes to erasure coding
schema which will require explicit tracking of indices for coding shreds
as well as data shreds.
2021-12-17 15:01:55 +00:00
Justin Starry
254ef3e7b6
Rename Packets to PacketBatch ( #21794 )
2021-12-11 09:44:15 -05:00
Ashwin Sekar
f0acf7681e
Add vote instructions that directly update on chain vote state ( #21531 )
...
* Add vote state instructions
UpdateVoteState and UpdateVoteStateSwitch
* cargo tree
* extract vote state version conversion to common fn
2021-12-07 16:47:26 -08:00
Michael Vines
b8837c04ec
Reformat imports to a consistent style for imports
...
rustfmt.toml configuration:
imports_granularity = "One"
group_imports = "One"
2021-12-03 09:19:13 -08:00
behzad nouri
9886366977
exempts AccountsHashes from stake check ( #21565 )
...
Otherwise getHealth fails if account hashes are not propagated.
2021-12-02 18:01:32 +00:00
behzad nouri
57057f8d39
uses enum for shred type
...
Current code is using u8 which does not have any type-safety and can
contain invalid values:
https://github.com/solana-labs/solana/blob/66fa062f1/ledger/src/shred.rs#L167
Checks for invalid shred-types are scattered through the code:
https://github.com/solana-labs/solana/blob/66fa062f1/ledger/src/blockstore.rs#L849-L851
https://github.com/solana-labs/solana/blob/66fa062f1/ledger/src/shred.rs#L346-L348
The commit uses enum for shred type with #[repr(u8)]. Backward
compatibility is maintained by implementing Serialize and Deserialize
compatible with u8, and adding a test to assert that.
2021-11-19 14:16:39 +00:00
carllin
b30c94ce55
ClusterInfoVoteListener send only missing votes to BankingStage ( #20873 )
2021-11-18 15:20:41 -08:00
behzad nouri
3fc858eb60
adds methods to obtain data/coding shreds indices from ErasureMeta
2021-11-13 17:08:05 +00:00
Michael Keleti
b0ca335463
Rename "trusted" to "known" in `validators/` ( #21197 )
...
* Replaced trusted with known validator
* Format Convention
2021-11-12 11:57:55 -07:00
behzad nouri
eea3fb327f
seeds rng for test_build_crds_filter test ( #21031 )
2021-10-28 18:29:32 +00:00
behzad nouri
43168e6365
doubles crds unique pubkey capacity ( #20947 )
2021-10-26 13:06:55 +00:00
behzad nouri
1297a13586
adds metrics tracking crds writes and votes ( #20953 )
2021-10-26 13:02:30 +00:00
Brooks Prumo
14af1957d6
Make pub IncrementalSnapshotHashes fields ( #20727 )
2021-10-18 13:38:43 -05:00
behzad nouri
0c0384ec32
revises turbine peers shuffling order ( #20480 )
...
Turbine randomly shuffles cluster nodes on a broadcast tree for each
shred. This requires knowing the stakes and nodes' contact-infos (from
gossip).
However gossip is subject to partitioning and propogation delays.
Additionally unstaked nodes may join and leave the cluster at any
moment, changing the cluster view from one node to another.
This commit:
* Always arranges the unstaked nodes at the bottom of turbine broadcast
tree.
* Staked nodes are always included regardless of if their contact-info
is available in gossip or not.
* Uses the unbiased WeightedShuffle construct for shuffling nodes.
2021-10-14 15:09:36 +00:00
Brooks Prumo
1fcfbfccbb
Add fn to push IncrementalSnapshotHashes to cluster via gossip ( #20395 )
2021-10-08 08:20:35 -05:00
Brooks Prumo
57592e463e
Add get_incremental_snapshot_hash_for_node() to gossip ( #20394 )
2021-10-07 19:47:14 -05:00
behzad nouri
0da661de62
adds metrics for number of nodes vs number of pubkeys ( #20512 )
2021-10-07 18:56:05 +00:00
Tao Zhu
177a375479
Tpu vote 1.7 ( #20187 ) ( #20494 )
...
* Add separate vote processing tpu port
* Add feature to send to tpu vote port
* Add vote rejecting sigverify mode
* use packet.meta.is_simple_vote_tx in place of deserialization
* consolidate code that identifies vote tx atcommon path for cpu and gpu
* new key for feature set
* banking forward tpu vote
* add tpu vote port to dockerfile and other review changes
* Simplify thread id compare
* fix a test; updated cluster_info ABI change
Co-authored-by: Tao Zhu <tao@solana.com>
Co-authored-by: sakridge <sakridge@gmail.com>
2021-10-07 09:38:23 +00:00
Brooks Prumo
4e3818e5c1
Add CrdsData::IncrementalSnapshotHashes ( #20374 )
2021-10-05 09:57:46 -05:00