add metrics on throttled streams (#34579)
(cherry picked from commit 1a001751dd)
Co-authored-by: Lijun Wang <83639177+lijunwangs@users.noreply.github.com>
Add ContactInfo handling for shred versioning (#34286)
* handle ContactInfo in places where only LegacyContactInfo was used
* missed a spot
* missed a spot
* import contact info for crds lookup
* cargo fmt
* rm contactinfo from crds_entry. not supported yet
* typo
* remove crds.nodes insert for ContactInfo. not supported yet
* forgot to remove clusterinfo in remove()
* move around contactinfo match arm
* remove contactinfo updating crds.shred_version
(cherry picked from commit 8ed149a3f2)
Co-authored-by: Greg Cusack <greg.cusack@solana.com>
ledger-tool: support v0 transactions in blocks from bigtable (#34544)
Support v0 transactions
(cherry picked from commit 7d209a448d)
Co-authored-by: Tyera <tyera@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>
cargo-install-all: use full path for sourcing (#34525)
Use full path for sourcing
(cherry picked from commit 51c9963a60)
Co-authored-by: Tyera <tyera@solana.com>
* Disables verification-less reloading.
* Refactors LoadedPrograms::extract() to use a mutable parameter instead of returning the list of missing entries.
* cargo fmt
* Refactors LoadedPrograms::extract() to use a mutable parameter instead of returning a LoadedProgramsForTxBatch.
* Adds explicit SecondLevel structure to LoadedPrograms.
* Adds cooperative_loading_task.
* Implements cooperative loading in the bank.
* Fixes fork graph in tests.
* Adds LoadingTaskWaiter.
CI: add check for explicit spl-token-cli version (#34430)
* Add script to specify spl-token-cli version
* Add check for spl-token-cli version to CI
* Add minor release branch cleanup instruction to unblock CI on the new stable branch
---------
Co-authored-by: Will Hickey <will.hickey@solana.com>
(cherry picked from commit e6e191f843)
Co-authored-by: Tyera <tyera@solana.com>
blockstore: Allow fallback for AddressSignature index
A change landed somewhat recently in master that changed the key format
of the transaction metadata columns. A compatibility backport was
introduced to allow a blockstore that had been populated with this newer
version to still be readable by v1.17 (backwards software compat).
However, there was an oversight in the backport. Namely, the index()
function for AddressSignatures column did a regular unwrap() on the
try_current_index() result. try_current_index() can fail if a key with
an unknown size is encountered. This would be exactly the case for
encountering a key that was populated by the newer software version with
the different key format.
So, use .unwrap_or_else() in the index() implementation for
AddressSignatures; this will now be consistent with the implementation
of index() for TransactionStatus column.
* Patch tokio to vendored version (#34240)
* Patch tokio to vendored version
* Fix typo
(cherry picked from commit aaa48ec8db)
# Conflicts:
# Cargo.toml
* Fix conflict
---------
Co-authored-by: Tyera <tyera@solana.com>
Cleanup - program runtime (#34318)
* Removes retain() from prune_by_deployment_slot() as that is covered in remove_programs_with_no_entries() already.
* Removes remove_programs_with_no_entries() from sort_and_unload().
* Fixes ix_usage_counter in LoadedProgram::to_unloaded().
* Fixes doc comment of LoadedProgram::ix_usage_counter.
* Removes unused num_total_programs from test_eviction().
* Replaces .as_ref() in lambda with std::option::Option::as_ref.
* Replaces .for_each() with a for-loop.
* Uses .retain() instead of iter().filter().cloned().collect().
(cherry picked from commit cf0c52c207)
Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net>
* ci: add macos clippy test (#34272)
* ci: add clippy test for macos and windows
* ci: remove windows from clippy test
* ci: cancel cargo clippy on Github Actions when new commits comming
* ci: set -e for .github/scripts/cargo-clippy-before-script.sh
(cherry picked from commit 4832b4ecec)
* scripts/cargo-clippy.sh: Extract our non-trivial cargo clippy command (manual backport of #33982)
---------
Co-authored-by: Yihau Chen <a122092487@gmail.com>
Co-authored-by: yihau <yihau.chen@icloud.com>
chore: Update light-poseidon to 0.2.0 (#33923)
That new release contains an important change which prevents a
potential DDoS.
* Lightprotocol/light-poseidon#32
Invoking `from_bytes_be` function light-poseidon 0.1.1 inverts all
the inputs before performing a check whether their length exceeds
the modulus of the prime field. Therefore, it was prone to an
attack, where a mailicious user could submit long byte slices just
to DDoS the validator, being stuck on inverting large byte sequences.
The update and mentioned change fixes the same issue as #33363 aims
to address.
The new release contains also few other less important changes like:
* Lightprotocol/light-poseidon#37
* Lightprotocol/light-poseidon#38
* Lightprotocol/light-poseidon#39
(cherry picked from commit 67f8daf6e9)
Co-authored-by: vadorovsky <vadorovsky@protonmail.com>
Comment sysvar and builtin lists as deprecated and remove new keys (#34365)
(cherry picked from commit 79739e1b78)
Co-authored-by: Justin Starry <justin.starry@icloud.com>
Fix `solana-address-lookup-table-program` compilation (#34353)
* Add checks to decide which SDK crate to use
* Make module only available in non-program environments
* Remove `solana-sdk` export and only export from `solana-program`
(cherry picked from commit 46921b3135)
Co-authored-by: acheron <98934430+acheroncrypto@users.noreply.github.com>
shred: expose merkle root for use in blockstore (#34063)
* shred: expose merkle root for use in blockstore
* pr feedback: sorted, keep Result return type
* convert Result<Hash> -> Option<Hash>
(cherry picked from commit 6a5b8e86f3)
Co-authored-by: Ashwin Sekar <ashwin@solana.com>
exits send_datagram_task if the connection is closed (#33836)
Waiting on receiver.recv() can unnecessarily block while the connection is already closed.
The commit exits send_datagram_task if the connection is closed.
(cherry picked from commit 03fbe083b8)
Co-authored-by: behzad nouri <behzadnouri@gmail.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>