* Discard packets statically known to fail (#370)
* Discard packets statically known to fail
* add test
(cherry picked from commit 5f1693224e)
# Conflicts:
# core/src/banking_stage/transaction_scheduler/scheduler_controller.rs
* resolve conflict
---------
Co-authored-by: Andrew Fitzgerald <apfitzge@gmail.com>
replay: reload tower if set-identity during startup (#35173)
* replay: reload tower if set-identity during startup
* pr feedback: add unit tests
* pr feedback: use tower.node_pubkey, more descriptive names
(cherry picked from commit befe8b9d98)
Co-authored-by: Ashwin Sekar <ashwin@solana.com>
* disables turbine and repair QUIC endpoints on mainnet-beta (#34523)
On mainnet-beta, respective QUIC endpoint are unnecessary for now until
testnet has fully migrated to QUIC. The commit disables turbine and
repair QUIC endpoints on mainnet-beta.
(cherry picked from commit 4feadbdb7c)
# Conflicts:
# core/src/validator.rs
* resolves mergify merge conflicts
---------
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
* replay: feature flag consumption of duplicate proofs from blockstore (#34372)
* replay: feature flag consumption of duplicate proofs from blockstore
* pr feedback: reorder check, add flag for restart logic
(cherry picked from commit 4a8d27d921)
# Conflicts:
# sdk/src/feature_set.rs
* fix feature set conflict
---------
Co-authored-by: Ashwin Sekar <ashwin@solana.com>
exits send_requests_task if the connection is closed (#33837)
receiver.recv() can unnecessarily block when the connection is already closed.
The commit exits send_requests_task if the connection is closed.
(cherry picked from commit 2096626633)
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
Output BankHashDetails file when leader drops its' own block (#34256)
Currently, the file is generated when a node drops a block that was
produced by another node. However, it would also be beneficial to see
the account state when a node drops its' own block.
Output the file in this additional failure codepath
(cherry picked from commit 935e06f8f1)
Co-authored-by: steviez <steven@solana.com>
adds keep-alive-interval to repair QUIC transport config (#33866)
QUIC connections may timeout due to infrequent repair requests. The commit
configures keep_alive_interval and max_idle_timeout to avoid timeouts.
(cherry picked from commit 3ac2507d36)
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
Geyser: return real parent blockhash, or default (#33873)
Return real parent blockhash, or default
(cherry picked from commit d6ac9bea84)
Co-authored-by: Tyera <tyera@solana.com>
Use program cache fork graph in extract() (#33806)
* Use program cache fork graph instead of WorkingSlot trait
* Fix deadlocked tests
* keep WorkingSlot trait for now
(cherry picked from commit 78c31aa6b8)
Co-authored-by: Pankaj Garg <pankaj@solana.com>
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.
(cherry picked from commit e0b59a6f53)
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
Set a global fork graph in program cache (#33776)
* Set a global fork graph in program cache
* fix deadlock
* review feedback
(cherry picked from commit 59cb3b57ee)
Co-authored-by: Pankaj Garg <pankaj@solana.com>
prunes repair QUIC connections (#33775)
The commit implements lazy eviction for repair 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.
(cherry picked from commit dc3c827299)
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
separates out routing repair requests from establishing connections (#33742)
Currently each outgoing repair request 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.
(cherry picked from commit 7aa0faea96)
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
Change getHealth to compare optimistically confirmed slots (#33651)
The current getHealth mechanism checks a local accounts hash slot vs.
those of other nodes as specified by --known-validator. This is a
very coarse comparison given that the default for this value is 100
slots. More so, any nodes using a value larger than the default
(ie --incremental-snapshot-interval 500) will likely see getHealth
return status behind at some point.
Change the underlying mechanism of how health is computed. Instead of
using the accounts hash slots published in gossip, use the latest
optimistically confirmed slot from the cluster. Even when a node is
behind, it is able to observe cluster optimistically confirmed by slots
by viewing votes published in gossip.
Thus, the latest cluster optimistically confirmed slot can be compared
against the latest optimistically confirmed bank from replay to
determine health. This new comparison is much more granular, and not
needing to depend on individual known validators is also a plus.
(cherry picked from commit 8bd0e4cd95)
Co-authored-by: steviez <steven@solana.com>
* Separate simple-vote transaction cost from non-vote transaction cost
* remove is_simple_vote flag from transaction UsageCostDetails
* update test and comment
* set static usage cost for SimpleVote transaction
* Move vote related code to its own crate
* Update imports in code and tests
* update programs/sbf/Cargo.lock
* fix check errors
* update abi_digest
* rebase fixes
* fixes after rebase
* Adds a module `address_lookup_table` to the SDK.
* Adds a module `address_lookup_table::instruction` to the SDK.
* Adds a module `address_lookup_table::error` to the SDK.
* Adds a module `address_lookup_table::state` to the SDK.
* Moves AddressLookupTable into SDK as well.
* Moves AddressLookupTableAccount into address_lookup_table.
* Adds deprecation messages.
* Disentangles dependencies across cargo files.
The commit implements server-side of repair using QUIC protocol.
UDP repair requests are adapted as RemoteRequest and sent down the same
channel as remote requests arriving over QUIC, and the rest of the
server code is update to process over RemoteRequest type.
Working towards using QUIC protocol for repair, the commit adds a QUIC
endpoint for repair service.
Outgoing local requests are sent as
struct LocalRequest {
remote_address: SocketAddr,
bytes: Vec<u8>,
num_expected_responses: usize,
response_sender: Sender<(SocketAddr, Vec<u8>)>,
}
to the client-side of the endpoint. The client opens a bidirectional
stream with the LocalRequest.remote_address and once received the
response, sends it down the LocalRequest.response_sender channel.
Incoming requests from remote nodes are received from bidirectional
streams and sent as
struct RemoteRequest {
remote_pubkey: Option<Pubkey>,
remote_address: SocketAddr,
bytes: Vec<u8>,
response_sender: Option<OneShotSender<Vec<Vec<u8>>>>,
}
to the repair-service. The response is received from the receiver end of
RemoteRequest.response_sender channel and send back to the remote node
using the send side of the bidirectional stream.
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.