* account-decoder: Add string format helpers to UiTokenAmount
(cherry picked from commit bb144bf758)
* cli-output: Add CliTokenAccount type
(cherry picked from commit d95bce2600)
Co-authored-by: Trent Nelson <trent@solana.com>
For crds_gossip_pull, we want to parallelize build_crds_filters, which
requires concurrent writes to bloom filters.
This commit implements a variant of the bloom filter which uses atomics
for its bits vector and so is thread-safe.
(cherry picked from commit bb183938d9)
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
* shards crds values based on their hash prefix (#12187)
filter_crds_values checks every crds filter against every hash value:
https://github.com/solana-labs/solana/blob/ee646aa7/core/src/crds_gossip_pull.rs#L432
which can be inefficient if the filter's bit-mask only matches small
portion of the entire crds table.
This commit shards crds values into separate tables based on shard_bits
first bits of their hash prefix. Given a (mask, mask_bits) filter,
filtering crds can be done by inspecting only relevant shards.
If CrdsFilter.mask_bits <= shard_bits, then precisely only the crds
values which match (mask, mask_bits) bit pattern are traversed.
If CrdsFilter.mask_bits > shard_bits, then approximately only
1/2^shard_bits of crds values are inspected.
Benchmarking on a gce cluster of 20 nodes, I see ~10% improvement in
generate_pull_responses metric, but with larger clusters, crds table and
2^mask_bits are both larger, so the impact should be more significant.
(cherry picked from commit 9b866d79fb)
* bumps indexmap to 1.6.0
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
* Record invoked instructions and store in transaction meta
* Enable cpi recording if transaction sender is some
* Rename invoked to innerInstructions
(cherry picked from commit 6601ec8f26)
Co-authored-by: Justin Starry <justin@solana.com>
* Submit a vote timestamp every vote (#10630)
* Submit a timestamp for every vote
* Submit at most one vote timestamp per second
* Submit a timestamp for every new vote
Co-authored-by: Tyera Eulberg <tyera@solana.com>
* Timestamp first vote (#11856)
* Cache block time in Blockstore (#11955)
* Add blockstore column to cache block times
* Add method to cache block time
* Add service to cache block time
* Update rpc getBlockTime to use new method, and refactor blockstore slightly
* Return block_time with confirmed block, if available
* Add measure and warning to cache-block-time
Co-authored-by: Michael Vines <mvines@gmail.com>
* Add blockstore column to store performance sampling data (#12251)
* Add blockstore column to store performance sampling data
* introduce timer and write performance metrics to blockstore
* introduce getRecentPerformanceSamples rpc
* only run on rpc nodes enabled with transaction history
* add unit tests for get_recent_performance_samples
* remove RpcResponse from rpc call
* refactor to use Instant::now and elapsed for timer
* switch to root bank and ensure not negative subraction
* Add PerfSamples to purge/compaction
* refactor to use Instant::now and elapsed for timer
* switch to root bank and ensure not negative subraction
* remove duplicate constants
Co-authored-by: Tyera Eulberg <tyera@solana.com>
(cherry picked from commit 65a6bfad09)
# Conflicts:
# core/src/validator.rs
# ledger/src/blockstore.rs
* merge cherry pick of 65a6bfad0
Co-authored-by: Josh <josh.hundley@gmail.com>
* Implement keccak-secp256k1 instruction
Verifies eth addreses with ecrecover function
* Move secp256k1 test
Co-authored-by: sakridge <sakridge@gmail.com>
* Give the duplicate send_transaction_service a different thread name
(cherry picked from commit 75c3690ccd)
* SendTransactionServices now exit their thread on channel drop instead of by a flag
(cherry picked from commit c4913e3c9e)
Co-authored-by: Michael Vines <mvines@gmail.com>