rustc default compiler optimization level is O3. This change removes
the option that overrides the default optimization level, because it
is safe to do so. The code generation is incorrect in some cases
because of link-time optimizations, which remain disabled for
compiling BPF programs. In addition, this commit updates the expected
instruction counts for assert_instruction_count test.
* Resolve zeroize_derive audit warning by bumping version (#20182)
* Revert "temporarily disable new audit"
This reverts commit 3dfbd95ddc.
* Bump version of zeroize_derive from v1.0.0 to v1.2.0
(cherry picked from commit 0c62a6fe3f)
# Conflicts:
# ci/do-audit.sh
* resolve conflict
Co-authored-by: Justin Starry <justin@solana.com>
* sigverify to identify and mark simple vote transaction
* check vote tx at get_packet_offsets to cover both cpu and gpu paths
* add pubkey_len to PacketOffsets to reduce the redundant bytes counting
* Optimize RPC pubsub for multiple clients with the same subscription (#18943)
* reimplement rpc pubsub with a broadcast queue
* update tests for new pubsub implementation
* fix: fix review suggestions
* chore(rpc): add additional pubsub metrics
* integrate max subscriptions check into SubscriptionTracker to reduce locking
* separate subscription control from tracker
* limit memory usage of items in pubsub broadcast queue, improve error handling
* add more pubsub metrics
* add final count metrics to pubsub
* add metric for total number of subscriptions
* fix small review suggestions
* remove by_params from SubscriptionTracker and add node_progress_watchers map instead
* add subscription tracker tests
* add metrics for number of pubsub notifications as a counter
* ignore clippy lint in TokenCounter
* fix underflow in token counter
* reduce queue capacity in pubsub tests
* fix(rpc): fix test timeouts
* fix race in account subscription test
* Add RpcSubscriptions::new_for_tests
Co-authored-by: Pavel Strakhov <p.strakhov@iconic.vc>
Co-authored-by: Nikita Podoliako <n.podoliako@zubr.io>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
(cherry picked from commit 65227f44dc)
* Fix conflicts (and standardize naming to make future subscription backports easier)
Co-authored-by: Pavel Strakhov <ri@idzaaus.org>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
* rpc: performance fix for getProgramAccounts (#19941)
* rpc: performance fix for getProgramAccounts
The accounts were gradually pushed into a vector, which produced
significant slowdowns for very large responses.
* rpc: rewrite loops using iterators
Co-authored-by: Christian Kamm <ckamm@delightful-solutions.de>
(cherry picked from commit f1bbf1d8b0)
# Conflicts:
# core/src/rpc.rs
* fix conflicts
* Fix conflicts
Co-authored-by: Christian Kamm <mail@ckamm.de>
Co-authored-by: Justin Starry <justin@solana.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
* Add TransactionMemos column family
* Traitify extract_memos
* Write TransactionMemos in TransactionStatusService
* Populate memos from column
* Dedupe and add unit test
(cherry picked from commit 5fa3e5744c)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Newer clippy from +nightly have new errors about where annotations can and
cannot go. This commit fixes two of them.
(cherry picked from commit b074e86ad2)
Co-authored-by: Brooks Prumo <brooks@solana.com>
* excludes epoch-slots from nodes with unknown or different shred version (#17899)
Inspecting TDS gossip table shows that crds values of nodes with
different shred-versions are creeping in. Their epoch-slots are
accumulated in ClusterSlots causing bogus slots very far from current
root which are not purged and so cause ClusterSlots keep consuming more
memory:
https://github.com/solana-labs/solana/issues/17789https://github.com/solana-labs/solana/issues/14366#issuecomment-769896036https://github.com/solana-labs/solana/issues/14366#issuecomment-832754654
This commit updates ClusterInfo::get_epoch_slots, and discards entries
from nodes with unknown or different shred-version.
Follow up commits will patch gossip not to waste bandwidth and memory
over crds values of nodes with different shred-version.
(cherry picked from commit 985280ec0b)
# Conflicts:
# core/src/cluster_info.rs
* removes backport merge conflicts
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
* persists repair-peers cache across repair service loops (#18400)
The repair-peers cache is reset each time repair service loop runs,
and so computed repeatedly for the same slots:
https://github.com/solana-labs/solana/blob/d2b07dca9/core/src/repair_service.rs#L275
This commit uses an LRU cache to persists repair-peers for each slot.
In addition to LRU eviction rules, in order to avoid re-using outdated
data, each entry also has 10 seconds TTL.
(cherry picked from commit a0551b4054)
# Conflicts:
# core/src/repair_service.rs
# core/src/serve_repair.rs
* removes backport merge conflicts
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
* Fixing missing pubsub notification for programSubscribe and logsSubscribe (#19092)
#18587: programSubscribe is missing notifications randomly. The issue is because of two reasons
Not all rooted slots get OptimisticallyConfirmed notifications
The OptimisticallyConfirmed notifications can be out of order for slots: slot A and B with A < B can see notification for B first before A.
Summary of Changes
Changed OptimisticallyConfirmedBankTracker to send notifications for parent banks if they have not been notified yet. We use a new variable last_notified_slot to track that.
Tests:
With my validator running against testnet, before the fix, it was failing 75% of time, with the fix, it is passing consistently. Using the program mentioned in #18587.
(cherry picked from commit 1a372a792e)
# Conflicts:
# core/src/optimistically_confirmed_bank_tracker.rs
# core/src/rpc_subscriptions.rs
* Fix conflicts
Co-authored-by: Lijun Wang <83639177+lijunwangs@users.noreply.github.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>