#### Summary of Changes
This PR adds raw_len() to ByteBlockWriter which returns
the length of the data after decoding. This information is needed
for the cold storage to keep track of the current size of the account
block after decompression.
#### Test Plan
Improved existing tests to verify the returned raw_len().
Tested in mnb w/ the prototype implementation of the tiered storage (https://github.com/solana-labs/solana/pull/30626)
* Fixing send-transaction-service using quic, tpu address is wrong
* Use Protocol field instead of bool for passing protocol info
* Address some code review comment from Behzad: get_leader_tpus per protocol
* ci: add missing description and documentation to zk-token-sdk/Cargo.toml
* ci: add missing description back to programs/bpf_loader/Cargo.toml
* ci: add missing description back to banks-client/Cargo.toml
`Arc` is already a reference internally, so it does not seem to be
beneficial to pass a reference to it. Just adds an extra layer of
indirection.
Functions that need to be able to increment `Arc` reference count need
to take `Arc<AtomicBool>`, but those that just want to read the
`AtomicBool` value can accept `&AtomicBool`, making them a bit more
generic.
This change focuses specifically on `Arc<AtomicBool>`. There are other
uses of `&Arc<T>` in the code base that could be converted in a similar
manner. But it would make the change even larger.
#### Summary of Changes
This PR implements AccountMetaFlags, which will later be used in
the tiered accounts storage to support optional fields.
#### Test Plan
Unit tests are included in this PR.
#### Summary of Changes
Support Lz4 in ByteBlockWriter.
#### Test Plan
Added test cases for Lz4.
Tested in mnb w/ the prototype implementation of the tiered storage (#30626)
This function has morphed as it has been updated, and the existing
function name is a bit of misnomer. Update the function name to use
terminology that I think is more clear and more consistent with what we
use core/src/validator.rs. Additionally, adjust the error messages to be
more clear about what exactly is wrong for when we can't process.
* refactor `instruction::transfer` and `instruction::transfer_with_fee` into separate submodule
* rename `transfer.rs` to `transfer_without_fee.rs` to satisfy clippy
* refactor transfer encryptions into separate submodule
* refactor `FeeParameters` to parent transfer module
* refactor `Role` and ciphertext arithmetic specific to transfer instruction into transfer submodule
* fix visibility
* cargo fmt
* change `transfer_with_fee` and `transfer_without_fee` to `with_fee` and `without_fee`
* fix rebase errors
The callstack updated in this PR passed an &Arc<...> down only to have
the bottom level clone the reference. Thus, we are giving shared
ownership so the reference is a bit redundant and arguably obscures the
intention to clone further down the callstack.
https://apache.org/licenses/LICENSE-2.0 lays out the correct way to apply the Apache 2.0 license to a work.
There is a section named "HOW TO APPLY THE APACHE LICENSE TO YOUR WORK". It says that applying the license to a work is easy: "Include a copy of the Apache License, typically in a file called LICENSE, in your work".
However, in the Solana repo, the contents of the file LICENSE is NOT a copy of the Apache 2.0 license. Instead, it is the text mention further down on that page, that is intended to be used as a SECTION within a specific FILE of a work, with the goal of applying the Apache license only to that SPECIFIC FILE.
This PR corrects these issue and places the correct contents of the Apache 2.0 license, as per https://apache.org/licenses/LICENSE-2.0, into the LICENSE file.
* Bump borsh to 0.10.3
transaction-status relies on SPL which still requires borsh 0.9, so
until SPL also gets updated that package alone will use an older version of
borsh.
* ci: Temporarily disable spl and openbook-dex builds
#### Summary of Changes
This PR includes the util structs for writing byte blocks, which will be used
by the TieredStorage writer (currently used in the prototype #30626).
The PR only includes the Raw encoding format. Will add more in subsequent PRs.
#### Test Plan
Tested in mnb with the prototype implementation of the tiered-storage (#30626)
Unit tests are also included in this PR.