* Faucet: repurpose cap and slice args to apply to single IPs (#16381)
* Single use stmt
* Log request IP
* Switch cap and slice to apply per IP
* Use SOL in logs, error msgs
* Use thiserror instead of overloading io::Error
* Return memo transaction for requests that exceed per-request-cap
* Handle faucet memos in cli
* Add some docs, esp about memo transaction
* Use SOL symbol & standardize memo
Co-authored-by: Michael Vines <mvines@gmail.com>
* Differentiate faucet tx-length errors
* Populate signature in cli airdrop memo case
Co-authored-by: Michael Vines <mvines@gmail.com>
* Add address_cache and exclude loopback from ip limit (#16487)
Co-authored-by: Michael Vines <mvines@gmail.com>
* Simplify some pattern-matches (#16402)
When those match an exact combinator on Option / Result.
Tool-aided by [comby-rust](https://github.com/huitseeker/comby-rust).
(cherry picked from commit b08cff9e77)
# Conflicts:
# accounts-cluster-bench/src/main.rs
# core/src/rpc.rs
# runtime/src/accounts_hash.rs
# runtime/src/message_processor.rs
* Fix conflicts
Co-authored-by: François Garillot <4142+huitseeker@users.noreply.github.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
* Fix block-with-limit when not finalized blocks found
* Enable confirmed commitment in getInflationReward
* Use get_inflation_rewards in cli
* Line up rewards output
* Add range validator
* Change cli epoch arg -> num epochs
* Add solana inflation rewards subcommand
* Consolidate epoch rewards meta
(cherry picked from commit bb9d2fd07a)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Rpc: introduce get_inflation_reward rpc call (#16278)
* feat: introduce get_inflation_reward rpc call
* fix: style suggestions
* fix: more style changes and match how other rpc functions are defined
* feat: get reward for a single epoch
* feat: default to the most recent epoch
* fix: don't factor out get_confirmed_block
* style: introduce from impl for RpcEncodingConfigWrapper
* style: bring commitment into variable
* feat: support multiple pubkeys for get_inflation_reward
* feat: add get_inflation_reward to rpc client
* feat: return rewards in order
* fix: rename pubkeys to addresses
* docs: introduce jsonrpc docs for get_inflation_reward
* style: early return in map (not sure which is more idiomatic)
* fix: call the rpc client function args addresses as well
* fix: style
* fix: filter out only addresses we care about
* style: make this more idiomatic
* fix: change rpc client epoch to optional and include some docs edits
* feat: filter out rent rewards in get_inflation_reward
* feat: add option epoch config param to get_inflation_reward
* feat: rpc client get_inflation_reward takes epoch instead of config and some filter staking and voting rewards
(cherry picked from commit e501fa5f0b)
# Conflicts:
# client/src/rpc_client.rs
# core/src/rpc.rs
* fix: resolve cherry-pick conflicts
* fix: change bool_to_option filter_map to filter + map
* style: use filter_map in place of filter + map
Co-authored-by: Josh <josh.hundley@gmail.com>
* Update blockstore method to allow return of unfinalized signature
* Support confirmed sigs in getConfirmedSignaturesForAddress2
* Add deprecated comments
* Update docs
* Enable confirmed transaction-history in cli
* Return real confirmation_status; fill in not-yet-finalized block time if possible
(cherry picked from commit da27acabcc)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Cli: better estimate of epoch time elapsed/remaining (#15893)
* Add rpc_client api for getRecentPerformanceSamples
* Prep fn for variable avg slot time
* Use recent-perf-samples to more-accurately estimate epoch completed times
* Spell out average
(cherry picked from commit 3726358f51)
# Conflicts:
# cli-output/src/cli_output.rs
* Fix conflict
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
* Rpc: support extended config for getConfirmedBlock (#15827)
* Add rpc confirmed-block config wrapper to support struct of extended config
* Update docs
* Make config wrapper generic and use in getConfirmedTransaction as well
* Update/clean confirmed-tx docs
(cherry picked from commit 5b2da19c93)
# Conflicts:
# core/src/rpc.rs
* Fix conflicts
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
* Limit getProgramAccounts memcpy filter string to 128 bytes
(cherry picked from commit 65f1afe5e1)
* Limit the number of getProgramAccounts filters
(cherry picked from commit 4b0114b991)
Co-authored-by: Michael Vines <mvines@gmail.com>
* introduce get largest accounts cache
* remove cache size and change hash key
* remove eq and hash derivation from commitment config
* add slot to the cache
(cherry picked from commit 4013f91dbe)
Co-authored-by: Josh <josh.hundley@gmail.com>
* Deprecate commitment variants (#14797)
* Deprecate commitment variants
* Add new CommitmentConfig builders
* Add helpers to avoid allowing deprecated variants
* Remove deprecated transaction-status code
* Include new commitment variants in runtime commitment; allow deprecated as long as old variants persist
* Remove deprecated banks code
* Remove deprecated variants in core; allow deprecated in rpc/rpc-subscriptions for now
* Heavier hand with rpc/rpc-subscription commitment
* Remove deprecated variants from local-cluster
* Remove deprecated variants from various tools
* Remove deprecated variants from validator
* Update docs
* Remove deprecated client code
* Add new variants to cli; remove deprecated variants as possible
* Don't send new commitment variants to old clusters
* Retain deprecated method in test_validator_saves_tower
* Fix clippy matches! suggestion for BPF solana-sdk legacy compile test
* Refactor node version check to handle commitment variants and transaction encoding
* Hide deprecated variants from cli help
* Add cli App comments
(cherry picked from commit ffa5c7dcc8)
* Fix 1.5 stake-o-matic
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
* Upgrade to Rust v1.49.0
(cherry picked from commit cbffab7850)
# Conflicts:
# core/src/crds_value.rs
* rebase
Co-authored-by: Michael Vines <mvines@gmail.com>
* Expose not-found bigtable error
* Add custom rpc error for bigtable data not found
* Return custom rpc error when bigtable block is not found
* Generalize long-term storage
(cherry picked from commit 71e9958e06)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Add block_time to getConfirmedSignaturesForAddress2 and getConfirmedTransaction (#14572)
* add block_time to get_confirmed_signatures_for_address2 and protobuf implementation for tx_by_addr
* add tests for convert
* update cargo lock
* run cargo format after rebase
* introduce legacy TransactionByAddrInfo
* move LegacyTransactionByAddrInfo back to storage-bigtable
(cherry picked from commit 1de6d28eaf)
* fix local sanity script
* add missing block_time field
Co-authored-by: Josh <josh.hundley@gmail.com>
* Add optimistically_confirmed field to TransactionStatus
* Update docs
* Convert new field to confirmation_status
* Update docs to confirmationStatus
* Update variants
* Update docs
* Just Confirmed
(cherry picked from commit 9a89689ad3)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>