* Resolve conflicts
* add end_of_slot_filtered_invalid_count
* Increment end_of_slot_filtered_invalid_count
* Fixup comment
* Remove comment
* Move all process_tx metris into common function
* Switch to saturating_add_assign macro
* Refactor timings so each struct reports own timing
* Move into accumulate
* Remove unnecessary struct
Co-authored-by: Carl Lin <carl@solana.com>
* tracks erasure coding shreds' indices explicitly (#21822)
The indices for erasure coding shreds are tied to data shreds:
https://github.com/solana-labs/solana/blob/90f41fd9b/ledger/src/shred.rs#L921
However with the upcoming changes to erasure schema, there will be more
erasure coding shreds than data shreds and we can no longer infer coding
shreds indices from data shreds.
The commit adds constructs to track coding shreds indices explicitly.
(cherry picked from commit 65d59f4ef0)
# Conflicts:
# core/benches/retransmit_stage.rs
# core/benches/shredder.rs
# core/src/broadcast_stage/broadcast_duplicates_run.rs
# core/src/broadcast_stage/broadcast_fake_shreds_run.rs
# core/src/broadcast_stage/fail_entry_verification_broadcast_run.rs
# core/src/window_service.rs
# ledger/src/blockstore.rs
# ledger/src/shred.rs
# ledger/tests/shred.rs
* removes mergify merge conflicts
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
* removes next_shred_index from return value of entries to shreds api (#21961)
next-shred-index is already readily available from returned data shreds.
The commit simplifies the api for upcoming changes to erasure coding
schema which will require explicit tracking of indices for coding shreds
as well as data shreds.
(cherry picked from commit 89d66c3210)
# Conflicts:
# core/benches/shredder.rs
# core/src/broadcast_stage/broadcast_duplicates_run.rs
# core/src/broadcast_stage/broadcast_fake_shreds_run.rs
# core/src/broadcast_stage/fail_entry_verification_broadcast_run.rs
# core/src/broadcast_stage/standard_broadcast_run.rs
# gossip/src/duplicate_shred.rs
# ledger/src/blockstore.rs
# ledger/src/shred.rs
# ledger/tests/shred.rs
* removes mergify merge conflicts
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
* uses Option<Slot> for SlotMeta.parent_slot (#21808)
SlotMeta.parent_slot for the head of a detached chain of slots is
unknown and that is indicated by u64::MAX which lacks type-safety:
https://github.com/solana-labs/solana/blob/6c108c8fc/ledger/src/blockstore_meta.rs#L203-L205
The commit changes the type to Option<Slot>. Backward compatibility is
maintained by customizing serde serialize/deserialize implementations.
(cherry picked from commit 8d980f07ba)
# Conflicts:
# core/src/repair_generic_traversal.rs
# ledger-tool/src/main.rs
# ledger/src/blockstore.rs
* removes mergify merge conflicts
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
* Set the correct root in block commitment cache initialization
* clean up test
* bump
(cherry picked from commit d9c259a231)
# Conflicts:
# replica-node/src/replica_node.rs
Co-authored-by: Justin Starry <justin@solana.com>
* improves sigverify discard_excess_packets performance (#22577)
As shown by the added benchmark, current code does worse if there is a
spam address plus a lot of unique addresses.
on current master:
test bench_packet_discard_many_senders ... bench: 1,997,960 ns/iter (+/- 103,715)
test bench_packet_discard_mixed_senders ... bench: 14,256,116 ns/iter (+/- 534,865)
test bench_packet_discard_single_sender ... bench: 1,306,809 ns/iter (+/- 61,992)
with this commit:
test bench_packet_discard_many_senders ... bench: 1,644,025 ns/iter (+/- 83,715)
test bench_packet_discard_mixed_senders ... bench: 1,089,789 ns/iter (+/- 86,324)
test bench_packet_discard_single_sender ... bench: 955,234 ns/iter (+/- 55,953)
(cherry picked from commit dcf44d2523)
# Conflicts:
# core/benches/sigverify_stage.rs
# core/src/sigverify_stage.rs
* removes mergify merge conflicts
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
* discard time histogram
* closer to the if
* update
(cherry picked from commit e616a7ebfc)
# Conflicts:
# core/src/sigverify_stage.rs
Co-authored-by: anatoly yakovenko <anatoly@solana.com>
* consolidate execute timings to a common module
* Add execute metrics
* Add metrics for executor creation
* Use saturating_add_assign macro
Co-authored-by: Trent Nelson <trent@solana.com>
Co-authored-by: Carl Lin <carl@solana.com>
avoid bad performance of remove(0) for a single sender
(cherry picked from commit 49443406fd)
# Conflicts:
# core/src/sigverify_stage.rs
Co-authored-by: sakridge <sakridge@gmail.com>
* implements copy-on-write for staked-nodes (#19090)
Bank::staked_nodes and Bank::epoch_staked_nodes redundantly clone
staked-nodes HashMap even though an immutable reference will suffice:
https://github.com/solana-labs/solana/blob/a9014cece/runtime/src/vote_account.rs#L77
This commit implements copy-on-write semantics for staked-nodes by
wrapping the underlying HashMap in Arc<...>.
(cherry picked from commit f302774cf7)
# Conflicts:
# runtime/src/bank.rs
# runtime/src/stakes.rs
# runtime/src/vote_account.rs
* removes backport merge conflicts
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
* removes epoch_authorized_voters from VoteTracker (#22192)
https://github.com/solana-labs/solana/pull/22169
verifies authorized-voter early on in vote-listener pipeline; and so
VoteTracker no longer needs to maintain and check for epoch authorized
voters.
(cherry picked from commit 69d71f8f86)
# Conflicts:
# core/src/cluster_info_vote_listener.rs
* removes backport merge conflicts
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
* checks for authorized voter early on in the vote-listener pipeline (#22169)
Before votes are verified that they are signed by the authorized voter,
they might be dropped in verified-vote-packets code. If there are
enough many spam votes from unauthorized voters, this may potentially
drop valid votes but keep the false ones.
https://github.com/solana-labs/solana/blob/57986f982/core/src/verified_vote_packets.rs#L165-L168
(cherry picked from commit c0c6038654)
# Conflicts:
# core/src/cluster_info_vote_listener.rs
* removes backport merge conflicts
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
* makes solana_runtime::vote_account::VoteAccount private
VoteAccount is an implementation detail, and should not be public.
Only ArcVoteAccount is the public type.
(cherry picked from commit 1403eaeefc)
# Conflicts:
# runtime/src/vote_account.rs
* renames solana_runtime::vote_account::VoteAccount
Rename:
VoteAccount -> VoteAccountInner # the private type
ArcVoteAccount -> VoteAccount # the public type
(cherry picked from commit 00e5e12906)
# Conflicts:
# core/src/progress_map.rs
# ledger/src/blockstore_processor.rs
# ledger/src/staking_utils.rs
# runtime/src/bank.rs
# runtime/src/epoch_stakes.rs
# runtime/src/serde_snapshot/tests.rs
# runtime/src/stakes.rs
# runtime/src/vote_account.rs
* removes backport merge conflicts
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
* removes redundant args from Shredder::try_recovery (#21226)
Shredder::try_recovery is already taking a Vec<Shred> as an argument. All the
other arguments are embedded in the shreds, and are so redundant.
(cherry picked from commit 5fb0ab9d00)
# Conflicts:
# ledger/src/shred.rs
* removes backport merge conflicts
Co-authored-by: behzad nouri <behzadnouri@gmail.com>