* Allow SetUpgradeAuthority instruction in CPI calls (#16676)
* feat: allow SetAuthority in CLI calls
* chore: clippy match_like_matches_macro
* chore: clippy match_like_matches_macro
* chore: rename CLI to CPI
* chore: move check for cpi authorised instruction to syscalls
* chore: add set_upgrade_authority cpi test
* chore: assert upgrade authority was changed
* feat: gate set_upgrade_authority via cpi with a feature
* chore: move feature to the end of the list
* chore: remove white spaces
* chore: remove white spaces
* chore: update comment to rerun build
(cherry picked from commit 1a658c7f31)
# Conflicts:
# programs/bpf/Cargo.toml
# programs/bpf_loader/src/syscalls.rs
# sdk/src/feature_set.rs
* chore: fixe merge conflicts
Co-authored-by: Sebastian Bor <Sebastian_Bor@hotmail.com>
* Refactor SignerSource to expose DerivationPath to other kinds of signers (#16933)
* One use statement
* Add stdin uri scheme
* Convert parse_signer_source to return Result
* A-Z deps
* Convert Usb data to Locator
* Pull DerivationPath out of Locator
* Wrap SignerSource to share derivation_path
* Review comments
* Check Filepath existence, readability in parse_signer_source
(cherry picked from commit d6f30b7537)
# Conflicts:
# sdk/Cargo.toml
* Fix conflicts
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
* SDK: More conversions for `Pubkey`
(cherry picked from commit 9b7120bf73)
* SDK: More conversion for `DerivationPath`
(cherry picked from commit 722de942ca)
* remote-wallet: Add helpers for locating remote wallets
(cherry picked from commit 64fcb792c2)
* remote-wallet: Plumb `Locator` into `RemoteWalletInfo`
(cherry picked from commit 3d12be29ec)
* remote-wallet: `derivation-path` crate doesn't like empty trailing child indexes
(cherry picked from commit 4ce4f04c58)
* remote-wallet: Move `Locator` to its own module
(cherry picked from commit cac666d035)
Co-authored-by: Trent Nelson <trent@solana.com>
* Retain alloc'd and updated data in cpi (#16850)
(cherry picked from commit 9b3a59f030)
# Conflicts:
# programs/bpf_loader/src/syscalls.rs
# sdk/src/feature_set.rs
* resolve conflicts
Co-authored-by: Jack May <jack@solana.com>
* Update bpf loader info on native-programs docs
* Link to program deployment docs
(cherry picked from commit 5eb5d9b2f5)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Local timestamps are updated for records associated with a pubkey if the
origin is still active:
https://github.com/solana-labs/solana/blob/c8ed14c64/core/src/crds.rs#L301-L311
However this is done inconsistently on some gossip paths (pull requests
and pull responses) but not all (e.g. push messages). Additionally
update_record_timestamp is inefficient since there can be ~800 values
associated with each pubkey.
This commit updates records timestamps only on contact-infos; and,
instead utilizes origin's timestamp when purging old values.
(cherry picked from commit 2c82f2154d)
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
* Add TPU client for sending txs to the current leader tpu port
* Update tpu_client.rs
(cherry picked from commit 75b8434b76)
Co-authored-by: Justin Starry <justin@solana.com>
Previously, running the tests with RUST_LOG=none would fail, because the
env logger would set its filter level to reject all log messages, and
incrementing a counter only happens if the global logger has at least
the specified log level. Having the tests behave differently when
RUST_LOG is set is surprising, they should be self-contained.
Nix' buildRustPackage sets RUST_LOG="" to make the build logs less
verbose. I have trouble packaging Solana for Nix because of this, and I
believe making the tests independent of the environment is a good
solution for this.
(cherry picked from commit 3f92abedd5)
Co-authored-by: Ruud van Asseldonk <dev@veniogames.com>
* expands number of erasure coding shreds in the last batch in slots (#16484)
Number of parity coding shreds is always less than the number of data
shreds in FEC blocks:
https://github.com/solana-labs/solana/blob/6907a2366/ledger/src/shred.rs#L719
Data shreds are batched in chunks of 32 shreds each:
https://github.com/solana-labs/solana/blob/6907a2366/ledger/src/shred.rs#L714
However the very last batch of data shreds in a slot can be small, in
which case the loss rate can be exacerbated.
This commit expands the number of coding shreds in the last FEC block in
slots to: 64 - number of data shreds; so that FEC blocks are always 64
data and parity coding shreds each.
As a consequence of this, the last FEC block has more parity coding
shreds than data shreds. So for some shred indices we will have a coding
shred but no data shreds. This should not cause any kind of overlapping
FEC blocks as in:
https://github.com/solana-labs/solana/pull/10095
since this is done only for the very last batch in a slot, and the next
slot will reset the shred index.
(cherry picked from commit 37b8587d4e)
# Conflicts:
# core/benches/shredder.rs
# ledger/src/shred.rs
* removes backport merge conflicts
* ignore the flaky test for now
Co-authored-by: behzad nouri <behzadnouri@gmail.com>