* banking_stage: do not insert legacy vote ixs, refactor & unstaked (#2888)
* banking_stage: do not insert legacy vote ixs, refactor & unstaked
* pr feedback: use matches instead of separate fn
(cherry picked from commit 1334fb5248)
# Conflicts:
# core/src/banking_stage/latest_unprocessed_votes.rs
* fix conflicts
* rekey feature to indicate it must not be activated
---------
Co-authored-by: Ashwin Sekar <ashwin@anza.xyz>
Co-authored-by: Ashwin Sekar <ashwin@solana.com>
* customizes override logic for gossip ContactInfo (#2579)
If there are two running instances of the same node, we want the
ContactInfo with more recent start time to be propagated through
gossip regardless of wallclocks.
The commit adds custom override logic for ContactInfo to first compare
by outset timestamp.
* updates ContactInfo.outset when hot-swapping identity (#2613)
When hot-swapping identity, ContactInfo.outset should be updated so that
the new ContactInfo overrides older node with the same pubkey.
* patches bug causing false duplicate nodes error (#2666)
The bootstrap code during the validator start pushes a contact-info with
more recent timestamp to gossip. If the node is staked the contact-info
lingers in gossip causing false duplicate node instances when the fully
initialized node joins gossip later on.
The commit refreshes the timestamp on contact-info so that it overrides
the one pushed by bootstrap and avoid false duplicates error.
---------
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
Check poh_recorder.start_slot() hasn't been dumped previously before checking it in ProgressMap. (#2676)
* Check poh_recorder.start_slot() hasn't been dumped previously before checking it in progress_map.
* Add more comments and put in checks for maybe_start_leader.
* Update core/src/replay_stage.rs
Co-authored-by: Ashwin Sekar <ashwin@solana.com>
* Use a slot which I am not leader to avoid dumping my own slot panic.
* Address reviewer comments.
* Address reviewer comments.
---------
Co-authored-by: Ashwin Sekar <ashwin@solana.com>
(cherry picked from commit 053faa6a29)
Co-authored-by: Wen <113942165+wen-coding@users.noreply.github.com>
* replay: do not start leader for a block we already have shreds for (#2416)
* replay: do not start leader for a block we already have shreds for
* pr feedback: comment, move existing check to blockstore fn
* move blockstore read after tick height check
* pr feedback: resuse blockstore fn in next_leader_slot
(cherry picked from commit 15dbe7fb0f)
# Conflicts:
# poh/src/poh_recorder.rs
* fix conflicts
---------
Co-authored-by: Ashwin Sekar <ashwin@anza.xyz>
Co-authored-by: Ashwin Sekar <ashwin@solana.com>
* Cleanup PoH speed check logs and error
The current logging and error message from the Poh speed check are
confusing. If the node fails, the error message states that the node is
too slow. But, the reported numbers are slot durations in nanoseconds
where a slower node will have a larger number. Lastly, the reported
numbers aren't labeled with a unit so it is hard to make sense of this
without looking at the actual code.
The check now computes and reports hashes per second.
(cherry picked from commit ecc05c50b8)
# Conflicts:
# core/src/validator.rs
* merge conflicts
---------
Co-authored-by: steviez <steven@anza.xyz>
blockstore: only consume duplicate proofs from root_slot + 1 on startup (#1971)
* blockstore: only consume duplicate proofs from root_slot + 1 on startup
* pr feedback: update test comments
* pr feedback: add pub behind dcou for test fns
(cherry picked from commit 2a48564b59)
Co-authored-by: Ashwin Sekar <ashwin@anza.xyz>
Use node's latest vote for commitment calc. too (#1964)
* Use node's latest vote for commitment calc. too
* Make local_cluster test use finalized
* Update core/src/commitment_service.rs
Co-authored-by: Tyera <teulberg@gmail.com>
* Don't wrap with Option and update tests
---------
Co-authored-by: Tyera Eulberg <tyera@anza.xyz>
Co-authored-by: Tyera <teulberg@gmail.com>
(cherry picked from commit 556298982a)
Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
* Refactor cost tracking (#1954)
* Refactor and additional metrics for cost tracking (#1888)
* Refactor and add metrics:
- Combine remove_* and update_* functions to reduce locking on cost-tracker and iteration.
- Add method to calculate executed transaction cost by directly using actual execution cost and loaded accounts size;
- Wireup histogram to report loaded accounts size;
- Report time of block limits checking;
- Move account counters from ExecuteDetailsTimings to ExecuteAccountsDetails;
* Move committed transactions adjustment into its own function
* remove histogram for loaded accounts size due to performance impact
(cherry picked from commit f8630a3522)
* rename cost_tracker.account_data_size to better describe its purpose is to tracker per-block new account allocation
---------
Co-authored-by: Tao Zhu <82401714+tao-stones@users.noreply.github.com>
Co-authored-by: Tao Zhu <tao@solana.com>
gossip: do not allow duplicate proofs for incorrect shred versions (#1931)
* gossip: do not allow duplicate proofs for incorrect shred versions
* pr feedback: refactor test function to take shred_version
(cherry picked from commit 69ea21e947)
Co-authored-by: Ashwin Sekar <ashwin@anza.xyz>
* Refactor and additional metrics for cost tracking (#1888)
* Refactor and add metrics:
- Combine remove_* and update_* functions to reduce locking on cost-tracker and iteration.
- Add method to calculate executed transaction cost by directly using actual execution cost and loaded accounts size;
- Wireup histogram to report loaded accounts size;
- Report time of block limits checking;
- Move account counters from ExecuteDetailsTimings to ExecuteAccountsDetails;
* Move committed transactions adjustment into its own function
(cherry picked from commit c3fadacf69)
* rename cost_tracker.account_data_size to better describe its purpose is to tracker per-block new account allocation
---------
Co-authored-by: Tao Zhu <82401714+tao-stones@users.noreply.github.com>
Co-authored-by: Tao Zhu <tao@solana.com>
* SVM: hoist `program_modification_slot` up from bank
* SVM: add `check_program_modification_slot` to processing config
* SVM: hoist `program_match_criteria` up from bank
* SVM: drop `get_program_match_critera` from callbacks
* Adjust replay-related metrics for unified schduler
* Fix grammar
* Don't compute slowest for unified scheduler
* Rename to is_unified_scheduler_enabled
* Hoist uses to top of file
* Conditionally disable replay-slot-end-to-end-stats
* Remove the misleading fairly balanced text
* Add num_partitions field to Rewards proto definition
* Add type to hold rewards plus num_partitions
* Add Bank method to get rewards plus num_partitions for recording
* Update Blockstore::write_rewards to use num_partitions
* Update RewardsRecorderService to handle num_partitions
* Populate num_partitions in ReplayStage::record_rewards
* Write num_partitions to Bigtable
* Reword KeyedRewardsAndNumPartitions method
* Clone immediately
* Determine epoch boundary by checking parent epoch
* Rename UiConfirmedBlock field
* nit: fix comment typo
* Add test_get_rewards_and_partitions
* Add pre-activation test
* Add should_record unit test
* Make unified schedler abort on tx execution errors
* Fix typo and improve wording
* Indicate panic _should_ be enforced by trait impls
* Fix typo
* Avoid closure of closure...
* Rename: is_threads_joined => are_threads_joined
* Add some comments for trashed_scheduler_inners
* Ensure 100% coverage of end_session by more tests
* Document relation of aborted thread and is_trashed
* Replace sleep()s with sleepless_testing
* Fix lints from newer rust