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
This commit is contained in:
Tyera Eulberg
2021-01-26 12:23:07 -07:00
committed by GitHub
parent e08d2e6fcc
commit ffa5c7dcc8
37 changed files with 540 additions and 322 deletions

View File

@@ -418,7 +418,7 @@ mod test {
.unwrap();
rpc_client
.poll_for_signature_with_commitment(&stake1_signature, CommitmentConfig::recent())
.poll_for_signature_with_commitment(&stake1_signature, CommitmentConfig::processed())
.unwrap();
// A balance increase by system transfer is ignored
@@ -473,7 +473,7 @@ mod test {
rpc_client
.poll_for_signature_with_commitment(
&stake3_initialize_signature,
CommitmentConfig::recent(),
CommitmentConfig::processed(),
)
.unwrap();
@@ -504,7 +504,7 @@ mod test {
rpc_client
.poll_for_signature_with_commitment(
&stake3_withdraw_signature,
CommitmentConfig::recent(),
CommitmentConfig::processed(),
)
.unwrap();
@@ -529,7 +529,7 @@ mod test {
rpc_client
.poll_for_signature_with_commitment(
&stake4_initialize_signature,
CommitmentConfig::recent(),
CommitmentConfig::processed(),
)
.unwrap();
@@ -560,7 +560,7 @@ mod test {
rpc_client
.poll_for_signature_with_commitment(
&stake45_split_signature,
CommitmentConfig::recent(),
CommitmentConfig::processed(),
)
.unwrap();
@@ -577,12 +577,15 @@ mod test {
))
.unwrap();
rpc_client
.poll_for_signature_with_commitment(&fund_system1_signature, CommitmentConfig::recent())
.poll_for_signature_with_commitment(
&fund_system1_signature,
CommitmentConfig::processed(),
)
.unwrap();
accounts_info.enroll_system_account(
&system1_keypair.pubkey(),
rpc_client
.get_slot_with_commitment(CommitmentConfig::recent())
.get_slot_with_commitment(CommitmentConfig::processed())
.unwrap(),
2 * one_sol,
);
@@ -616,12 +619,15 @@ mod test {
))
.unwrap();
rpc_client
.poll_for_signature_with_commitment(&fund_system2_signature, CommitmentConfig::recent())
.poll_for_signature_with_commitment(
&fund_system2_signature,
CommitmentConfig::processed(),
)
.unwrap();
accounts_info.enroll_system_account(
&system2_keypair.pubkey(),
rpc_client
.get_slot_with_commitment(CommitmentConfig::recent())
.get_slot_with_commitment(CommitmentConfig::processed())
.unwrap(),
2 * one_sol,
);
@@ -644,7 +650,7 @@ mod test {
// Process all the transactions
let current_slot = rpc_client
.get_slot_with_commitment(CommitmentConfig::recent())
.get_slot_with_commitment(CommitmentConfig::processed())
.unwrap();
process_slots(&rpc_client, &mut accounts_info, current_slot + 1);