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.
#### Problem
HotStorageReader currently only implements get_footer(). It does not
have a function to obtain the account meta.
#### Summary of Changes
This PR implements HotStorageReader::get_account_meta_from_offset().
A function that returns the account meta located at the specified offset.
This will be the helper function that will be later used to obtain the account
meta when the offset is available from the index block of a hot storage file.
#### Test Plan
A new test is included in this PR.
It is a pretty standard set of traits to implement on most types. Both `Pubkey`
and `LoadedAddresses` contained within the `AccountKeys` already implement them.
Doing the same for `AccountKeys` could simplify unit tests and/or some common
value manipulation logic.
Push message propagation has improved in recent versions of the gossip
code and we don't rely on pull requests as much as before. Handling pull
requests is also inefficient and expensive.
The commit reduces number of outgoing pull requests by down sampling.
When debugging CI failures it helps when I can see all the variables set
by `env.sh`.
Order environment variables in the output to match the order they are
set a bit better.
`CI_BASE_BRANCH` was not set at all for unknown environment. Does not
matter much, but it seems consistent to include it in the list next to
all the other variables.
#### Problem
HotStorageReader currently doesn't have a test that covers its footer.
#### Summary of Changes
This PR includes a test for HotStorageReader that verifies the footer.