* Auto-generate shell completions for solana-cli (issue #8879 and #14005)
Implement `completion` SubCommand for solana-cli, which outputs
completion script to stdout and exits the process. The script generation
handled completely by clap.
In order to implement the generation, one minor design change was
necessary regarding the creation of clap `App`.
Previously: One part of App initialization was in the `app` function,
and some other arguments and subcommands were added later directly in
the `main` function.
Now: The whole construction of App was moved to `get_clap_app` function.
P.S. I wasn't sure if constructing App separately had visual importance,
so both constructing parts are still separate in `base_clap_app` and
`final_clap_app` functions. But they sure could be in one single
function.
* Dereplicode match expr, fix clippy warning.
* Move clap App construction into separate module
Also join two parts of the construction into a single function
* Fix tests
* Apply rustfmt lints
(cherry picked from commit 9d0a937a05)
Co-authored-by: theonekeyg <34949189+theonekeyg@users.noreply.github.com>
* filters crds values in parallel when responding to gossip pull-requests (#18877)
When responding to gossip pull-requests, filter_crds_values takes a lot of time
while holding onto read-lock:
https://github.com/solana-labs/solana/blob/f51d64868/gossip/src/crds_gossip_pull.rs#L509-L566
This commit will filter-crds-values in parallel using rayon thread-pools.
(cherry picked from commit f1198fc6d5)
# Conflicts:
# gossip/src/cluster_info.rs
# gossip/src/crds_gossip_pull.rs
* removes backport merge conflicts
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
* backport new column families from master to 1.6 (#18743)
* backporting bank_hash and program_costs column families from master to 1.6 for rocksdb backward compatibility
* missed a line to allow dead code
* include code for purge
* Exclude stubbed ProgramCosts column from compaction (#18840)
Co-authored-by: Tao Zhu <82401714+taozhu-chicago@users.noreply.github.com>
This feature requires clang to support -march=native on M1. Before this change,
cargo build would output a build error when building for aarch64.
(cherry picked from commit 8a9b7f5ef2)
# Conflicts:
# ledger/Cargo.toml
* Refactor account encoding to povide helper w/out querying Bank
* Use new method in get_program_accounts to properly return length err
(cherry picked from commit 3eecb6f4ae)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* removes id from push_lowest_slot args (#18645)
push_lowest_slot cannot sign the new crds-value unless the id (pubkey)
argument passed-in is the same pubkey as in ClusterInfo::keypair(), in
which case the id argument is redundant:
https://github.com/solana-labs/solana/blob/bb41cf346/gossip/src/cluster_info.rs#L824-L845
Additionally, the lookup is done with self.id(), but insert is done with
the id argument, which is logically a bug.
(cherry picked from commit c90af3cd63)
# Conflicts:
# gossip/src/cluster_info.rs
* removes backport merge conflicts
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
* refactor(rpc_client): simplfy send and confirm transaction flow
* chore: configurable num of retries for send and confirm
(cherry picked from commit 70234dfdf4)
Co-authored-by: hrls <viktor.kharitonovich@gmail.com>