* 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>
This commit is contained in:
@@ -435,14 +435,16 @@ fn main() {
|
||||
rpc_client: &RpcClient,
|
||||
identity: &Pubkey,
|
||||
) -> client_error::Result<(Slot, Slot, Slot, u64, Sol, String)> {
|
||||
let processed_slot = rpc_client.get_slot_with_commitment(CommitmentConfig::recent())?;
|
||||
let processed_slot =
|
||||
rpc_client.get_slot_with_commitment(CommitmentConfig::processed())?;
|
||||
let confirmed_slot =
|
||||
rpc_client.get_slot_with_commitment(CommitmentConfig::single_gossip())?;
|
||||
let finalized_slot = rpc_client.get_slot_with_commitment(CommitmentConfig::max())?;
|
||||
rpc_client.get_slot_with_commitment(CommitmentConfig::confirmed())?;
|
||||
let finalized_slot =
|
||||
rpc_client.get_slot_with_commitment(CommitmentConfig::finalized())?;
|
||||
let transaction_count =
|
||||
rpc_client.get_transaction_count_with_commitment(CommitmentConfig::recent())?;
|
||||
rpc_client.get_transaction_count_with_commitment(CommitmentConfig::processed())?;
|
||||
let identity_balance = rpc_client
|
||||
.get_balance_with_commitment(identity, CommitmentConfig::single_gossip())?
|
||||
.get_balance_with_commitment(identity, CommitmentConfig::confirmed())?
|
||||
.value;
|
||||
|
||||
let health = match rpc_client.get_health() {
|
||||
|
@@ -323,7 +323,7 @@ fn check_vote_account(
|
||||
authorized_voter_pubkeys: &[Pubkey],
|
||||
) -> Result<(), String> {
|
||||
let vote_account = rpc_client
|
||||
.get_account_with_commitment(vote_account_address, CommitmentConfig::single_gossip())
|
||||
.get_account_with_commitment(vote_account_address, CommitmentConfig::confirmed())
|
||||
.map_err(|err| format!("failed to fetch vote account: {}", err.to_string()))?
|
||||
.value
|
||||
.ok_or_else(|| format!("vote account does not exist: {}", vote_account_address))?;
|
||||
@@ -336,7 +336,7 @@ fn check_vote_account(
|
||||
}
|
||||
|
||||
let identity_account = rpc_client
|
||||
.get_account_with_commitment(identity_pubkey, CommitmentConfig::single_gossip())
|
||||
.get_account_with_commitment(identity_pubkey, CommitmentConfig::confirmed())
|
||||
.map_err(|err| format!("failed to fetch identity account: {}", err.to_string()))?
|
||||
.value
|
||||
.ok_or_else(|| format!("identity account does not exist: {}", identity_pubkey))?;
|
||||
@@ -690,7 +690,7 @@ fn rpc_bootstrap(
|
||||
Ok(())
|
||||
} else {
|
||||
rpc_client
|
||||
.get_slot_with_commitment(CommitmentConfig::root())
|
||||
.get_slot_with_commitment(CommitmentConfig::finalized())
|
||||
.map_err(|err| format!("Failed to get RPC node slot: {}", err))
|
||||
.and_then(|slot| {
|
||||
info!("RPC node root slot: {}", slot);
|
||||
|
Reference in New Issue
Block a user