Commit Graph

72 Commits

Author SHA1 Message Date
mergify[bot] 7104d713cc
v2.0: rolls out chained Merkle shreds to devnet (backport of #3722) (#3725)
rolls out chained Merkle shreds to devnet (#3722)

(cherry picked from commit 8030d2dfd977cf3897500728149537118d2869cc)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2024-11-20 22:10:31 +00:00
mergify[bot] e1b66ab4f0
v2.0: Revert "rolls back chained Merkle shreds for testnet downgrade (#3194)" (backport of #3503) (#3504)
Revert "rolls back chained Merkle shreds for testnet downgrade (#3194)" (#3503)

This reverts commit 69916f1077.

(cherry picked from commit db4f2d651683262eb133a4c1802876904e4fc130)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2024-11-07 13:33:39 +00:00
mergify[bot] 192460ba9e
v2.0: rolls back chained Merkle shreds for testnet downgrade (backport of #3194) (#3195)
rolls back chained Merkle shreds for testnet downgrade (#3194)

(cherry picked from commit 69916f1077)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2024-10-16 16:44:14 +00:00
mergify[bot] 77ed6dbe84
v2.0: rolls out chained Merkle shreds to 100% of testnet slots (backport of #2858) (#2995)
rolls out chained Merkle shreds to 100% of testnet slots (#2858)

(cherry picked from commit a15fef1b26)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2024-09-27 14:13:49 +00:00
mergify[bot] 1b4dfb3a03
v2.0: extends Turbine fanout experiment to wider fanout values (backport of #2373) (#2450)
extends Turbine fanout experiment to wider fanout values (#2373)

Based on previous Turbine fanout experiment, wider fanouts are more
effective in propagating shreds and reducing repairs:
https://discord.com/channels/428295358100013066/478692221441409024/1265782094211321897

In order to identify optimal fanout value, this commit extends the
experiment with wider fanout values.

(cherry picked from commit 57144b0cea)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2024-09-10 14:39:26 +00:00
mergify[bot] ced98f1ebe
v2.0: rolls out chained Merkle shreds to ~50% of testnet slots (backport of #2660) (#2833)
rolls out chained Merkle shreds to ~50% of testnet slots (#2660)

(cherry picked from commit f2b7ef4aea)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2024-09-04 19:43:21 +00:00
mergify[bot] 11b87c1ba3
v2.0: patches bug causing false duplicate nodes error (backport of #2666) (#2681)
* customizes override logic for gossip ContactInfo (#2579)

If there are two running instances of the same node, we want the
ContactInfo with more recent start time to be propagated through
gossip regardless of wallclocks.

The commit adds custom override logic for ContactInfo to first compare
by outset timestamp.

* updates ContactInfo.outset when hot-swapping identity (#2613)

When hot-swapping identity, ContactInfo.outset should be updated so that
the new ContactInfo overrides older node with the same pubkey.

* patches bug causing false duplicate nodes error (#2666)

The bootstrap code during the validator start pushes a contact-info with
more recent timestamp to gossip. If the node is staked the contact-info
lingers in gossip causing false duplicate node instances when the fully
initialized node joins gossip later on.

The commit refreshes the timestamp on contact-info so that it overrides
the one pushed by bootstrap and avoid false duplicates error.

---------

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2024-08-23 20:18:47 +00:00
mergify[bot] 54d08d739a
v2.0: adds feature-gate code to enforce retransmitter signature verification (backport of #1840) (#2415)
* adds feature-gate code to enforce retransmitter signature verification (#1840)

(cherry picked from commit 79cb077f10)

# Conflicts:
#	sdk/src/feature_set.rs

* resolves merge conflicts

---------

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2024-08-14 17:48:37 +00:00
mergify[bot] 858279ad9e
v2.0: rolls out chained Merkle shreds to ~21% of testnet (backport of #2503) (#2564)
rolls out chained Merkle shreds to ~21% of testnet slots (#2503)

(cherry picked from commit ea10d2e534)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2024-08-13 19:07:25 +00:00
mergify[bot] 0b1143e149
v2.0: verifies retransmitter signature on chained Merkle shreds (backport of #1735) (#2201)
verifies retransmitter signature on chained Merkle shreds (#1735)

(cherry picked from commit 6f94686181)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2024-08-02 18:01:46 +00:00
mergify[bot] 962085c0e4
v2.0: rolls out chained Merkle shreds to ~5% of testnet (backport of #2389) (#2407)
rolls out chained Merkle shreds to ~5% of testnet (#2389)

(cherry picked from commit a60fbc2288)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2024-08-02 17:43:33 +00:00
behzad nouri e804bcce29
patches bug in chained Merkle root update (#1689)
Option::ok_or_else always maps None to Err which is not what was intended in
this code.
2024-06-11 17:06:28 +00:00
steviez 2a5616f16a
Reduce to single blockstore inserter thread in BroadcastStage (#1473)
The implementation of Blockstore::insert_shreds() holds a write lock for
the entirety of the function. Thus, there is no point in having more
than one thread in BroadcastStage insert shreds.
2024-05-28 14:57:10 -05:00
behzad nouri 517e358d78
resigns chained Merkle shreds after signature verification (#1207)
Chained Merkle shreds with retransmitter's signature should be resigned
before broadcast to other nodes.
2024-05-15 16:39:19 +00:00
Illia Bobyr c0e51b4fd3
turbune: Use `Arc::unwrap_or_clone()`. (#1333)
It is stable since Rust 1.76.0.
2024-05-14 16:45:21 -07:00
Yihau Chen f050705f98
clippy: unnecessary_get_then_check (#1242) 2024-05-09 00:17:18 +08:00
behzad nouri fbe1dbc758
reverts back in SocketAddr dedup in retransmit stage (#1106)
This was erronously deemed as unnecessary and removed in:
https://github.com/anza-xyz/agave/pull/864

The commit partially reverts #864 and adds back socket-addr dedup.
2024-05-07 14:49:37 +00:00
behzad nouri 6b45dc95d8
retains chained Merkle root across leader slots (#1057)
Looking up Merkle root of the last erasure batch for the parent block
can fail if the slot-meta is not yet available in blockstore.
This commit instead retains chained Merkle root across leader slots. If
the parent of the current block is the previous leader slot, then the
chained Merkle root is readily available and we can bypass blockstore
lookup.
2024-05-03 20:20:10 +00:00
Brooks fbbae8a59a
clippy: clone_from() (#1177)
```
error: assigning the result of `Clone::clone()` may be inefficient
   --> bucket_map/src/bucket.rs:979:17
    |
979 |                 hashed = hashed_raw.clone();
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `hashed.clone_from(&hashed_raw)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
    = note: `-D clippy::assigning-clones` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::assigning_clones)]`
```
2024-05-03 15:21:10 +00:00
behzad nouri 443bb6c1dc
migrates to the new contact-info (#823)
The commit replaces (most) uses of LegacyContactInfo with the new ContactInfo.
2024-04-24 18:47:04 +00:00
behzad nouri c87b8303c7
limits number of nodes per IP address in Turbine (#864) 2024-04-22 22:31:42 +00:00
behzad nouri a94e221d52
caches Merkle shreds signature verifications (#230)
Merkle shreds sign the Merkle root of the erasure batch, so all shreds
within the same erasure batch have the same signature. The commit
improves shreds signature verification by adding an LRU cache.
2024-04-19 17:43:44 +00:00
steviez 0eae6adb2b
Add num_batches field to ShredSigVerifyStats (#866)
We have a similar field for transaction sigverify, and knowing the
number of batches gives us insight into how packets are being pulled out
by the shred receive sockets
2024-04-18 19:58:36 +02:00
behzad nouri f2612ef7b5
enables chained Merkle shreds for ClusterType::Development (#54)
The commit enables chained Merkle shreds for ClusterType::Development so that
we get ample coverage for further development.
2024-04-16 18:14:39 +00:00
behzad nouri 293414f482
pads last erasure batch with empty data shreds (#639)
For duplicate blocks prevention we want to verify that the last erasure
batch was sufficiently propagated through turbine. This requires
additional bookkeeping because, depending on the erasure coding schema,
the entire batch might be recovered from only a few coding shreds.

In order to simplify above, this commit instead ensures that the last
erasure batch has >= 32 data shreds so that the batch cannot be
recovered unless 32+ shreds are received from turbine or repair.
2024-04-11 14:50:43 +00:00
behzad nouri 42e8309c34
adds api to obtain the parent node in the turbine retransmit tree (#115)
Following commits will use this api to check retransmitter's signature
on incoming shreds.
2024-03-07 17:56:40 +00:00
behzad nouri d7ae65fc46
removes feature-gated code revising turbine epoch stakes for shreds propagation (#35226) 2024-02-20 16:04:32 +00:00
behzad nouri 0cfb06f745
adds rollout path for chained Merkle shreds (#35076)
The commit adds should_chain_merkle_shreds to incrementally roll out
chained Merkle shreds to clusters.
2024-02-08 23:06:00 +00:00
behzad nouri 1b9dfd447e
chains Merkle shreds in broadcast duplicates (#35058)
The commit migrates
    turbine/src/broadcast_stage/broadcast_duplicates_run.rs
to use chained Merkle shreds variant.
2024-02-07 22:14:31 +00:00
behzad nouri 7a95e4fa90
uses Merkle shreds in broadcast duplicates (#35115)
The  commit migrates away from legacy shreds in duplicate shreds tests.
2024-02-07 16:02:16 +00:00
behzad nouri 8fb389fe8d
chains Merkle shreds in fail-entry-verification broadcast (#35060)
The commit migrates
    turbine/src/broadcast_stage/fail_entry_verification_broadcast_run.rs
to use chained Merkle shreds variant.
2024-02-06 20:04:47 +00:00
behzad nouri 8d0ca9db78
chains Merkle shreds in broadcast fake shreds (#35061)
The commit migrates
    turbine/src/broadcast_stage/broadcast_fake_shreds_run.rs
to use chained Merkle shreds variant.
2024-02-06 20:02:38 +00:00
Lijun Wang 8fde8d26c7
don't sign X.509 certs (#34896)
This get rid of 3rd party components rcgen in the path of private key access to make the code more secure.
2024-01-28 16:17:46 -08:00
behzad nouri 79bbe4381a
adds chained_merkle_root to shredder arguments (#34952)
Working towards chaining Merkle root of erasure batches, the commit adds
chained_merkle_root to shredder arguments.
2024-01-27 15:04:31 +00:00
GoodDaisy 03386cc7b9
Fix typos (#34459)
* Fix typos

* Fix typos

* fix typo
2023-12-21 13:06:00 -07:00
Ashwin Sekar def3bc4c4f
Add feature flag for LastIndex and Erasure duplicate proofs (#34360)
* Add feature flag for LastIndex and Erasure duplicate proofs

* pr feedback: use root bank instead of 2 params

* pr feedback: & instead of &Arc

* pr feedback: reuse fn, remove redundant clones

* rebase: fix feature set conflict
2023-12-20 10:20:30 -05:00
behzad nouri 03fbe083b8
exits send_datagram_task if the connection is closed (#33836)
Waiting on receiver.recv() can unnecessarily block while the connection is already closed.
The commit exits send_datagram_task if the connection is closed.
2023-12-05 18:29:36 +00:00
Lucas Steuernagel b97b3dd4ab
Use BankForks on tests - Part 3 (#34248)
* Add BankForks to core tests

* Refactor functions under DCOU
2023-12-01 13:47:22 -03:00
Brooks 725ab37bf4
clippy: Replaces .get(0) with .first() (#34048) 2023-11-13 17:22:17 -05:00
behzad nouri 783f136214
expands transport configs in turbine QUIC endpoint (#33864) 2023-11-08 20:28:19 +00:00
Jeff Biseda 3f805ad06d
improve batch_send error handling (#33936) 2023-10-31 23:39:26 -07:00
behzad nouri 6470544ea2
adds metrics to turbine QUIC endpoint (#33819) 2023-10-24 14:59:15 +00:00
Pankaj Garg 9d42cd7efe
Initialize fork graph in program cache during bank_forks creation (#33810)
* Initialize fork graph in program cache during bank_forks creation

* rename BankForks::new to BankForks::new_rw_arc

* fix compilation

* no need to set fork_graph on insert()

* fix partition tests
2023-10-23 09:32:41 -07:00
steviez 56ccffdaa5
Replace get_tmp_ledger_path!() with self cleaning version (#33702)
This macro is used a lot for tests to create a ledger path in order to
open a Blockstore. Files will be left on disk unless the test remembers
to call Blockstore::destroy() on the directory. So, instead of requiring
this, use the get_tmp_ledger_path_auto_delete!() macro that creates a
TempDir (which automatically deletes itself when it goes out of scope).
2023-10-21 11:38:31 +02:00
behzad nouri e0b59a6f53
prunes turbine QUIC connections (#33663)
The commit implements lazy eviction for turbine QUIC connections.
The cache is allowed to grow to 2 x capacity at which point at least
half of the entries with lowest stake are evicted, resulting in an
amortized O(1) performance.
2023-10-20 21:52:37 +00:00
behzad nouri 8becb72b3e
separates out routing shreds from establishing connections (#33599)
Currently each outgoing shred will attempt to establish a connection if
one does not already exist. This is very wasteful and consumes many
tokio tasks if the remote node is down or unresponsive.

The commit decouples routing packets from establishing connections by
adding a buffering channel for each remote address. Outgoing packets are
always sent down this channel to be processed once the connection is
established. If connecting attempt fails, all packets already pushed to
the channel are dropped at once, reducing the number of attempts to make
a connection if the remote node is down or unresponsive.
2023-10-19 15:44:15 +00:00
behzad nouri 2151393271
adds more context why the first data shred is inserted synchronously (#33092) 2023-09-12 15:27:06 +00:00
behzad nouri 528a03f32a
removes outdated matches crate from dependencies (#33172)
removes outdated matches crate from the dependencies

std::matches has been stable since rust 1.42.0.
Other use-cases are covered by assert_matches crate.
2023-09-07 12:52:57 +00:00
behzad nouri 931665551e
rolls out merkle shreds to 100% of mainnet slots (#32979) 2023-09-01 16:58:32 +00:00
Alexander Meißner 9e703f85de
Upgrades Rust to 1.72.0 & nightly-2023-08-25 (#32961)
* allow pedantic invalid cast lint

* allow lint with false-positive triggered by `test-case` crate

* nightly `fmt` correction

* adapt to rust layout changes

* remove dubious test

* Use transmute instead of pointer cast and de/ref when check_aligned is false.

* Renames clippy::integer_arithmetic to clippy::arithmetic_side_effects.

* bump rust nightly to 2023-08-25

* Upgrades Rust to 1.72.0

---------

Co-authored-by: Trent Nelson <trent@solana.com>
2023-09-01 07:26:13 +00:00