* zk-token-sdk: add multi-thread for discrete log
* zk-token-sdk: some clean-up
* zk-token-sdk: change default discrete log thread to 1
* zk-token-sdk: allow discrete log thread nums to be chosen as param
* zk-token-sdk: join discrete log threads
* zk-token-sdk: join thread handles before returning
* zk-token-sdk: Apply suggestions from code review
Co-authored-by: Michael Vines <mvines@gmail.com>
* zk-token-sdk: update tests to use num_threads
* zk-token-sdk: simplify discrete log by removing mpsc and just using join
* zk-token-sdk: minor
Co-authored-by: Michael Vines <mvines@gmail.com>
#### Summary of Changes
This PR enables RocksDB read side performance metrics to report to blockstore_rocksdb_read_perf.
The sampling rate is controlled by an env arg `SOLANA_METRICS_ROCKSDB_PERF_SAMPLES_IN_1K`,
specifies the number of perf samples for every 1000 operations. The default value is set to 10, meaning
we will report 10 out of 1000 (or 1/100) reads.
The metrics are based on the RocksDB [PerfContext](https://github.com/facebook/rocksdb/blob/main/include/rocksdb/perf_context.h).
It includes many useful metrics including block read time, cache hit rate, and time spent on decompressing the block.
* Adds transaction_context and instruction_context where invoke_context.get_keyed_accounts() is used.
* Use instruction_context.get_instruction_data() instead of an explicit parameter.
* Removes instruction_data parameter from Executor::execute().
* Removes instruction_data parameter from ProcessInstructionWithContext.
* initial work for poh timing report service
* add poh_timing_report_service to validator
* fix comments
* clippy
* imrove test coverage
* delete record when complete
* rename shred full to slot full.
* debug logging
* fix slot full
* remove debug comments
* adding fmt trait
* derive default
* default for poh timing reporter
* better comments
* remove commented code
* fix test
* more test fixes
* delete timestamps for slot that are older than root_slot
* debug log
* record poh start end in bank reset
* report full to start time instead
* fix poh slot offset
* report poh start for normal ticks
* fix typo
* refactor out poh point report fn
* rename
* optimize delete - delete only when last_root changed
* change log level to trace
* convert if to match
* remove redudant check
* fix SlotPohTiming comments
* review feedback on poh timing reporter
* review feedback on poh_recorder
* add test case for out-of-order arrival of timing points and incomplete timing points
* refactor poh_timing_points into its own mod
* remove option for poh_timing_report service
* move poh_timing_point_sender to constructor
* clippy
* better comments
* more clippy
* more clippy
* add slot poh timing point macro
* clippy
* assert in test
* comments and display fmt
* fix check
* assert format
* revise comments
* refactor
* extrac send fn
* revert reporting_poh_timing_point
* align loggin
* small refactor
* move type declaration to the top of the module
* replace macro with constructor
* clippy: remove redundant closure
* review comments
* simplify poh timing point creation
Co-authored-by: Haoran Yi <hyi@Haorans-MacBook-Air.local>
Now that nodes correctly populate position field in coding shreds, and
first_coding_index in erasure meta, the old code to maintain backward
compatibility can be removed.
The commit is working towards changing erasure coding schema to 32:64.
* Replaces KeyedAccount in create_executor().
* Refactors len to write_offset in write_program_data().
* Replaces KeyedAccount in write_program_data().
* Use transaction_context.get_key_of_account_at_index() in process_instruction_common().
* Renames next_first_instruction_account to program_account_index.
* Replaces program KeyedAccount by BorrowedAccount in process_instruction_common().
* Removes _program in process_instruction_common().
* Replaces first_account KeyedAccount by BorrowedAccount in process_instruction_common().
* Moves KeyedAccount lookup inside common_close_account().
* Replaces close_account, recipient_account and authority_account KeyedAccount by BorrowedAccount in common_close_account().