* wire up fork stats fork_weight
* convert weight to percentage for logging
* add bank_stake
* remove old fork choice measure and stats - vote stake * lockout
* update tests
* fix bank_weight and rename it to fork_weight
* fix u64 multiple overflow in fork_weight calculation
* format fork_weight as percentage in logging
---------
Co-authored-by: HaoranYi <haoran.yi@solana.com>
```
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> core/src/banking_stage/consumer.rs:153:29
|
153 | packets_to_process: &Vec<Arc<ImmutableDeserializedPacket>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[Arc<ImmutableDeserializedPacket>]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
= note: `#[warn(clippy::ptr_arg)]` on by default
warning: `solana-core` (lib) generated 1 warning
```
```
warning: unit tests in doctest are not executed
--> core/tests/fork-selection.rs:15:5
|
15 | //! #[test]
| _____^
16 | | //! #[ignore]
17 | | //! fn test_all_partitions() {
| |__________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#test_attr_in_doctest
= note: `#[warn(clippy::test_attr_in_doctest)]` on by default
warning: `solana-core` (test "fork-selection") generated 1 warning
```
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.
* Finalize unified scheduler plumbing with min impl
* Fix comment
* Rename leftover type name...
* Make logging text less ambiguous
* Make PhantomData simplyer without already used S
* Make TaskHandler stateless again
* Introduce HandlerContext to simplify TaskHandler
* Add comment for coexistence of Pool::{new,new_dyn}
* Fix grammar
* Remove confusing const for upcoming changes
* Demote InstalledScheduler::context() into dcou
* Delay drop of context up to return_to_pool()-ing
* Revert "Demote InstalledScheduler::context() into dcou"
This reverts commit 049a126c905df0ba8ad975c5cb1007ae90a21050.
* Revert "Delay drop of context up to return_to_pool()-ing"
This reverts commit 60b1bd2511a714690b0b2331e49bc3d0c72e3475.
* Make context handling really type-safe
* Update comment
* Fix grammar...
* Refine type aliases for boxed traits
* Swap the tuple order for readability & semantics
* Simplify PooledScheduler::result_with_timings type
* Restore .in_sequence()
* Use where for aesthetics
* Simplify if...
* Fix typo...
* Polish ::schedule_execution() a bit
* Fix rebase conflicts..
* Make test more readable
* Fix test failures after rebase...
BankForks has two constructors; one that takes a single Bank (the root)
and one that can take an arbitrary number of Banks plus the root slot.
However, the constructor that accepts multiple banks is unnecessary; it
isn't used in production and is only used in several tests.
So, remove the multi-bank constructor and update unit tests.
There are operations in bank_fork_utils that may fail; we explicitly
call std::process::exit() on several of these. Granted we may end up
exiting the process higher up the callstack, bubbling the errors up
allow a caller that could handle the error to do so.
Currently, the file is generated when a node drops a block that was
produced by another node. However, it would also be beneficial to see
the account state when a node drops its' own block.
Output the file in this additional failure codepath