* 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
* buffer accounts field for hash
* use smallvec to allocate hash buffer on stack
* sort deps
* more opt
* clippy
---------
Co-authored-by: HaoranYi <haoran.yi@solana.com>
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).
`aes-gcm-siv` v0.10.3 has a constraints on maximum `zeroize` version,
set to be 1.3 or below.
At the same time, `cargo` does not want to construct a dependency graph
with duplicate instances of a crate, when the first non-zero version of
those instances are the same. That is, it refuses to build a workspace
with both 1.3 and 1.4 versions of `zeroize`.
`zeroize` is actually backward compatible, and `aes-gcm-siv` restriction
is overly pessimistic. This package lifted this restriction in a newer
versions, but we still depend on older versions and can not immediately
update.
In order to be able to use a version of `zeroize` newer than 1.3 we need
to remove a similar restriction from `curve25519-dalek` as well.
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.
* limit max seed length for elgamal keypairs
* limit max seed length for authenticated encryption keys
* Apply suggestions from code review
Co-authored-by: Jon Cinque <me@jonc.dev>
* rename `SeedLengthTooLarge` to `SeedLengthTooLong`
---------
Co-authored-by: Jon Cinque <me@jonc.dev>
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.
fix(dockerfile): make sure to use the bullseye image for building
Solana's release image is based on bullseye, make sure we compile Solana with the same environment
Revert "Split compute budget instructions process from struct itself (#33513)"
This reverts commit c73bebe984. This
was found to be a consensus breaking change.
A previous change removed logic that populated the
TransactionStatusIndex entries at each of the legacy primary index keys
(0 and 1). While these entries will not be read or written in the
future, these entries are necessary for backwards compatibility. Namely,
branches <= v1.17 expect these entries to be present and .unwrap()'s
could fail if they are not.
So, add the initialization of these entries back into Blockstore logic.
We can remove initialization of these entries once our stable and beta
branches are both versions that do not expect these entries to be
present (should be v1.18).
* Split compute budget instruction processing from ComputeBudget struct itself, allow compute_budget_instructions be processed elsewhere without having to instantiate ComputeBudget
* updated tests
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.
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.