From 1a692a505e84531b273ff4a9891e03fdced0c896 Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Thu, 16 Mar 2023 10:30:25 +0100 Subject: [PATCH 1/8] Remove not required async calls --- node/core/backing/src/lib.rs | 33 ++++--- node/core/backing/src/tests.rs | 75 +++++----------- node/core/bitfield-signing/src/lib.rs | 12 +-- .../dispute-coordinator/src/initialized.rs | 3 +- node/core/dispute-coordinator/src/tests.rs | 22 ++--- node/core/provisioner/src/tests.rs | 45 +++++----- node/core/pvf-checker/src/lib.rs | 33 +++---- node/core/pvf-checker/src/tests.rs | 10 +-- .../availability-distribution/src/lib.rs | 8 +- .../src/tests/mod.rs | 4 +- .../src/tests/state.rs | 4 +- .../bitfield-distribution/src/tests.rs | 56 ++++++------ node/network/collator-protocol/src/lib.rs | 4 +- .../src/validator_side/mod.rs | 13 ++- .../src/validator_side/tests.rs | 4 +- node/network/dispute-distribution/src/lib.rs | 4 +- .../dispute-distribution/src/tests/mock.rs | 6 +- node/network/gossip-support/src/lib.rs | 26 +++--- .../network/statement-distribution/src/lib.rs | 6 +- .../statement-distribution/src/tests.rs | 85 +++++++++---------- node/primitives/src/disputes/mod.rs | 11 ++- node/subsystem-test-helpers/src/mock.rs | 10 +-- node/subsystem-util/src/lib.rs | 38 ++++----- node/subsystem-util/src/runtime/mod.rs | 18 ++-- primitives/src/v2/signed.rs | 15 ++-- .../src/node/approval/approval-voting.md | 2 +- rpc/src/lib.rs | 4 +- runtime/common/src/crowdloan/mod.rs | 4 +- runtime/common/src/integration_tests.rs | 4 +- runtime/parachains/src/inclusion/tests.rs | 30 +++---- runtime/parachains/src/mock.rs | 4 +- runtime/parachains/src/paras/tests.rs | 6 +- .../parachains/src/paras_inherent/tests.rs | 10 +-- 33 files changed, 266 insertions(+), 343 deletions(-) diff --git a/node/core/backing/src/lib.rs b/node/core/backing/src/lib.rs index 520c466af6f8..09e7f045f410 100644 --- a/node/core/backing/src/lib.rs +++ b/node/core/backing/src/lib.rs @@ -52,7 +52,7 @@ use polkadot_primitives::{ CommittedCandidateReceipt, CoreIndex, CoreState, Hash, Id as ParaId, PvfExecTimeoutKind, SigningContext, ValidatorId, ValidatorIndex, ValidatorSignature, ValidityAttestation, }; -use sp_keystore::SyncCryptoStorePtr; +use sp_keystore::KeystorePtr; use statement_table::{ generic::AttestedCandidate as TableAttestedCandidate, v2::{ @@ -118,13 +118,13 @@ impl ValidatedCandidateCommand { /// The candidate backing subsystem. pub struct CandidateBackingSubsystem { - keystore: SyncCryptoStorePtr, + keystore: KeystorePtr, metrics: Metrics, } impl CandidateBackingSubsystem { /// Create a new instance of the `CandidateBackingSubsystem`. - pub fn new(keystore: SyncCryptoStorePtr, metrics: Metrics) -> Self { + pub fn new(keystore: KeystorePtr, metrics: Metrics) -> Self { Self { keystore, metrics } } } @@ -149,7 +149,7 @@ where #[overseer::contextbounds(CandidateBacking, prefix = self::overseer)] async fn run( mut ctx: Context, - keystore: SyncCryptoStorePtr, + keystore: KeystorePtr, metrics: Metrics, ) -> FatalResult<()> { let (background_validation_tx, mut background_validation_rx) = mpsc::channel(16); @@ -178,7 +178,7 @@ async fn run( #[overseer::contextbounds(CandidateBacking, prefix = self::overseer)] async fn run_iteration( ctx: &mut Context, - keystore: SyncCryptoStorePtr, + keystore: KeystorePtr, metrics: &Metrics, jobs: &mut HashMap>, background_validation_tx: mpsc::Sender<(Hash, ValidatedCandidateCommand)>, @@ -265,7 +265,7 @@ async fn handle_active_leaves_update( ctx: &mut Context, update: ActiveLeavesUpdate, jobs: &mut HashMap>, - keystore: &SyncCryptoStorePtr, + keystore: &KeystorePtr, background_validation_tx: &mpsc::Sender<(Hash, ValidatedCandidateCommand)>, metrics: &Metrics, ) -> Result<(), Error> { @@ -426,7 +426,7 @@ struct CandidateBackingJob { /// The candidates that are includable, by hash. Each entry here indicates /// that we've sent the provisioner the backed candidate. backed: HashSet, - keystore: SyncCryptoStorePtr, + keystore: KeystorePtr, table: Table, table_context: TableContext, background_validation_tx: mpsc::Sender<(Hash, ValidatedCandidateCommand)>, @@ -814,8 +814,7 @@ impl CandidateBackingJob { commitments, }); if let Some(stmt) = self - .sign_import_and_distribute_statement(ctx, statement, root_span) - .await? + .sign_import_and_distribute_statement(ctx, statement, root_span)? { // Break cycle - bounded as there is only one candidate to // second per block. @@ -843,8 +842,7 @@ impl CandidateBackingJob { if !self.issued_statements.contains(&candidate_hash) { if res.is_ok() { let statement = Statement::Valid(candidate_hash); - self.sign_import_and_distribute_statement(ctx, statement, &root_span) - .await?; + self.sign_import_and_distribute_statement(ctx, statement, &root_span)?; } self.issued_statements.insert(candidate_hash); } @@ -966,14 +964,14 @@ impl CandidateBackingJob { Ok(()) } - async fn sign_import_and_distribute_statement( + fn sign_import_and_distribute_statement( &mut self, ctx: &mut Context, statement: Statement, root_span: &jaeger::Span, ) -> Result, Error> { - if let Some(signed_statement) = self.sign_statement(statement).await { - self.import_statement(ctx, &signed_statement, root_span).await?; + if let Some(signed_statement) = self.sign_statement(statement) { + self.import_statement(ctx, &signed_statement, root_span)?; let smsg = StatementDistributionMessage::Share(self.parent, signed_statement.clone()); ctx.send_unbounded_message(smsg); @@ -1001,7 +999,7 @@ impl CandidateBackingJob { } /// Import a statement into the statement table and return the summary of the import. - async fn import_statement( + fn import_statement( &mut self, ctx: &mut Context, statement: &SignedFullStatement, @@ -1222,7 +1220,7 @@ impl CandidateBackingJob { ctx: &mut Context, statement: SignedFullStatement, ) -> Result<(), Error> { - if let Some(summary) = self.import_statement(ctx, &statement, root_span).await? { + if let Some(summary) = self.import_statement(ctx, &statement, root_span)? { if Some(summary.group_id) != self.assignment { return Ok(()) } @@ -1277,13 +1275,12 @@ impl CandidateBackingJob { Ok(()) } - async fn sign_statement(&mut self, statement: Statement) -> Option { + fn sign_statement(&mut self, statement: Statement) -> Option { let signed = self .table_context .validator .as_ref()? .sign(self.keystore.clone(), statement) - .await .ok() .flatten()?; self.metrics.on_statement_signed(); diff --git a/node/core/backing/src/tests.rs b/node/core/backing/src/tests.rs index 96e8c809ec6c..631d66e3d776 100644 --- a/node/core/backing/src/tests.rs +++ b/node/core/backing/src/tests.rs @@ -36,7 +36,7 @@ use polkadot_primitives::{ }; use sp_application_crypto::AppKey; use sp_keyring::Sr25519Keyring; -use sp_keystore::{CryptoStore, SyncCryptoStore}; +use sp_keystore::Keystore; use sp_tracing as _; use statement_table::v2::Misbehavior; use std::collections::HashMap; @@ -55,7 +55,7 @@ fn table_statement_to_primitive(statement: TableStatement) -> Statement { struct TestState { chain_ids: Vec, - keystore: SyncCryptoStorePtr, + keystore: KeystorePtr, validators: Vec, validator_public: Vec, validation_data: PersistedValidationData, @@ -85,12 +85,8 @@ impl Default for TestState { let keystore = Arc::new(sc_keystore::LocalKeystore::in_memory()); // Make sure `Alice` key is in the keystore, so this mocked node will be a parachain validator. - SyncCryptoStore::sr25519_generate_new( - &*keystore, - ValidatorId::ID, - Some(&validators[0].to_seed()), - ) - .expect("Insert key into keystore"); + Keystore::sr25519_generate_new(&*keystore, ValidatorId::ID, Some(&validators[0].to_seed())) + .expect("Insert key into keystore"); let validator_public = validator_pubkeys(&validators); @@ -143,7 +139,7 @@ impl Default for TestState { type VirtualOverseer = test_helpers::TestSubsystemContextHandle; fn test_harness>( - keystore: SyncCryptoStorePtr, + keystore: KeystorePtr, test: impl FnOnce(VirtualOverseer) -> T, ) { let pool = sp_core::testing::TaskExecutor::new(); @@ -383,19 +379,17 @@ fn backing_works() { let candidate_a_hash = candidate_a.hash(); let candidate_a_commitments_hash = candidate_a.commitments.hash(); - let public1 = CryptoStore::sr25519_generate_new( + let public1 = Keystore::sr25519_generate_new( &*test_state.keystore, ValidatorId::ID, Some(&test_state.validators[5].to_seed()), ) - .await .expect("Insert key into keystore"); - let public2 = CryptoStore::sr25519_generate_new( + let public2 = Keystore::sr25519_generate_new( &*test_state.keystore, ValidatorId::ID, Some(&test_state.validators[2].to_seed()), ) - .await .expect("Insert key into keystore"); let signed_a = SignedFullStatement::sign( @@ -405,7 +399,6 @@ fn backing_works() { ValidatorIndex(2), &public2.into(), ) - .await .ok() .flatten() .expect("should be signed"); @@ -417,7 +410,6 @@ fn backing_works() { ValidatorIndex(5), &public1.into(), ) - .await .ok() .flatten() .expect("should be signed"); @@ -536,26 +528,23 @@ fn backing_works_while_validation_ongoing() { let candidate_a_hash = candidate_a.hash(); let candidate_a_commitments_hash = candidate_a.commitments.hash(); - let public1 = CryptoStore::sr25519_generate_new( + let public1 = Keystore::sr25519_generate_new( &*test_state.keystore, ValidatorId::ID, Some(&test_state.validators[5].to_seed()), ) - .await .expect("Insert key into keystore"); - let public2 = CryptoStore::sr25519_generate_new( + let public2 = Keystore::sr25519_generate_new( &*test_state.keystore, ValidatorId::ID, Some(&test_state.validators[2].to_seed()), ) - .await .expect("Insert key into keystore"); - let public3 = CryptoStore::sr25519_generate_new( + let public3 = Keystore::sr25519_generate_new( &*test_state.keystore, ValidatorId::ID, Some(&test_state.validators[3].to_seed()), ) - .await .expect("Insert key into keystore"); let signed_a = SignedFullStatement::sign( @@ -565,7 +554,6 @@ fn backing_works_while_validation_ongoing() { ValidatorIndex(2), &public2.into(), ) - .await .ok() .flatten() .expect("should be signed"); @@ -577,7 +565,6 @@ fn backing_works_while_validation_ongoing() { ValidatorIndex(5), &public1.into(), ) - .await .ok() .flatten() .expect("should be signed"); @@ -589,7 +576,6 @@ fn backing_works_while_validation_ongoing() { ValidatorIndex(3), &public3.into(), ) - .await .ok() .flatten() .expect("should be signed"); @@ -719,12 +705,11 @@ fn backing_misbehavior_works() { let candidate_a_hash = candidate_a.hash(); let candidate_a_commitments_hash = candidate_a.commitments.hash(); - let public2 = CryptoStore::sr25519_generate_new( + let public2 = Keystore::sr25519_generate_new( &*test_state.keystore, ValidatorId::ID, Some(&test_state.validators[2].to_seed()), ) - .await .expect("Insert key into keystore"); let seconded_2 = SignedFullStatement::sign( &test_state.keystore, @@ -733,7 +718,6 @@ fn backing_misbehavior_works() { ValidatorIndex(2), &public2.into(), ) - .await .ok() .flatten() .expect("should be signed"); @@ -745,7 +729,6 @@ fn backing_misbehavior_works() { ValidatorIndex(2), &public2.into(), ) - .await .ok() .flatten() .expect("should be signed"); @@ -1015,12 +998,11 @@ fn backing_second_after_first_fails_works() { } .build(); - let validator2 = CryptoStore::sr25519_generate_new( + let validator2 = Keystore::sr25519_generate_new( &*test_state.keystore, ValidatorId::ID, Some(&test_state.validators[2].to_seed()), ) - .await .expect("Insert key into keystore"); let signed_a = SignedFullStatement::sign( @@ -1030,7 +1012,6 @@ fn backing_second_after_first_fails_works() { ValidatorIndex(2), &validator2.into(), ) - .await .ok() .flatten() .expect("should be signed"); @@ -1142,12 +1123,11 @@ fn backing_works_after_failed_validation() { } .build(); - let public2 = CryptoStore::sr25519_generate_new( + let public2 = Keystore::sr25519_generate_new( &*test_state.keystore, ValidatorId::ID, Some(&test_state.validators[2].to_seed()), ) - .await .expect("Insert key into keystore"); let signed_a = SignedFullStatement::sign( &test_state.keystore, @@ -1156,7 +1136,6 @@ fn backing_works_after_failed_validation() { ValidatorIndex(2), &public2.into(), ) - .await .ok() .flatten() .expect("should be signed"); @@ -1291,12 +1270,11 @@ fn validation_work_ignores_wrong_collator() { } .build(); - let public2 = CryptoStore::sr25519_generate_new( + let public2 = Keystore::sr25519_generate_new( &*test_state.keystore, ValidatorId::ID, Some(&test_state.validators[2].to_seed()), ) - .await .expect("Insert key into keystore"); let seconding = SignedFullStatement::sign( &test_state.keystore, @@ -1305,7 +1283,6 @@ fn validation_work_ignores_wrong_collator() { ValidatorIndex(2), &public2.into(), ) - .await .ok() .flatten() .expect("should be signed"); @@ -1417,26 +1394,23 @@ fn retry_works() { } .build(); - let public2 = CryptoStore::sr25519_generate_new( + let public2 = Keystore::sr25519_generate_new( &*test_state.keystore, ValidatorId::ID, Some(&test_state.validators[2].to_seed()), ) - .await .expect("Insert key into keystore"); - let public3 = CryptoStore::sr25519_generate_new( + let public3 = Keystore::sr25519_generate_new( &*test_state.keystore, ValidatorId::ID, Some(&test_state.validators[3].to_seed()), ) - .await .expect("Insert key into keystore"); - let public5 = CryptoStore::sr25519_generate_new( + let public5 = Keystore::sr25519_generate_new( &*test_state.keystore, ValidatorId::ID, Some(&test_state.validators[5].to_seed()), ) - .await .expect("Insert key into keystore"); let signed_a = SignedFullStatement::sign( &test_state.keystore, @@ -1445,7 +1419,6 @@ fn retry_works() { ValidatorIndex(2), &public2.into(), ) - .await .ok() .flatten() .expect("should be signed"); @@ -1456,7 +1429,6 @@ fn retry_works() { ValidatorIndex(3), &public3.into(), ) - .await .ok() .flatten() .expect("should be signed"); @@ -1467,7 +1439,6 @@ fn retry_works() { ValidatorIndex(5), &public5.into(), ) - .await .ok() .flatten() .expect("should be signed"); @@ -1574,26 +1545,23 @@ fn observes_backing_even_if_not_validator() { .build(); let candidate_a_hash = candidate_a.hash(); - let public0 = CryptoStore::sr25519_generate_new( + let public0 = Keystore::sr25519_generate_new( &*test_state.keystore, ValidatorId::ID, Some(&test_state.validators[0].to_seed()), ) - .await .expect("Insert key into keystore"); - let public1 = CryptoStore::sr25519_generate_new( + let public1 = Keystore::sr25519_generate_new( &*test_state.keystore, ValidatorId::ID, Some(&test_state.validators[5].to_seed()), ) - .await .expect("Insert key into keystore"); - let public2 = CryptoStore::sr25519_generate_new( + let public2 = Keystore::sr25519_generate_new( &*test_state.keystore, ValidatorId::ID, Some(&test_state.validators[2].to_seed()), ) - .await .expect("Insert key into keystore"); // Produce a 3-of-5 quorum on the candidate. @@ -1605,7 +1573,6 @@ fn observes_backing_even_if_not_validator() { ValidatorIndex(0), &public0.into(), ) - .await .ok() .flatten() .expect("should be signed"); @@ -1617,7 +1584,6 @@ fn observes_backing_even_if_not_validator() { ValidatorIndex(5), &public1.into(), ) - .await .ok() .flatten() .expect("should be signed"); @@ -1629,7 +1595,6 @@ fn observes_backing_even_if_not_validator() { ValidatorIndex(2), &public2.into(), ) - .await .ok() .flatten() .expect("should be signed"); diff --git a/node/core/bitfield-signing/src/lib.rs b/node/core/bitfield-signing/src/lib.rs index 5de75cadf12e..8ea847a4143f 100644 --- a/node/core/bitfield-signing/src/lib.rs +++ b/node/core/bitfield-signing/src/lib.rs @@ -37,7 +37,7 @@ use polkadot_node_subsystem::{ }; use polkadot_node_subsystem_util::{self as util, Validator}; use polkadot_primitives::{AvailabilityBitfield, CoreState, Hash, ValidatorIndex}; -use sp_keystore::{Error as KeystoreError, SyncCryptoStorePtr}; +use sp_keystore::{Error as KeystoreError, KeystorePtr}; use std::{collections::HashMap, iter::FromIterator, time::Duration}; use wasm_timer::{Delay, Instant}; @@ -181,13 +181,13 @@ async fn construct_availability_bitfield( /// The bitfield signing subsystem. pub struct BitfieldSigningSubsystem { - keystore: SyncCryptoStorePtr, + keystore: KeystorePtr, metrics: Metrics, } impl BitfieldSigningSubsystem { /// Create a new instance of the `BitfieldSigningSubsystem`. - pub fn new(keystore: SyncCryptoStorePtr, metrics: Metrics) -> Self { + pub fn new(keystore: KeystorePtr, metrics: Metrics) -> Self { Self { keystore, metrics } } } @@ -209,7 +209,7 @@ impl BitfieldSigningSubsystem { #[overseer::contextbounds(BitfieldSigning, prefix = self::overseer)] async fn run( mut ctx: Context, - keystore: SyncCryptoStorePtr, + keystore: KeystorePtr, metrics: Metrics, ) -> SubsystemResult<()> { // Track spawned jobs per active leaf. @@ -251,7 +251,7 @@ async fn run( async fn handle_active_leaves_update( mut sender: Sender, leaf: ActivatedLeaf, - keystore: SyncCryptoStorePtr, + keystore: KeystorePtr, metrics: Metrics, ) -> Result<(), Error> where @@ -310,7 +310,7 @@ where let span_signing = span.child("signing"); let signed_bitfield = - match validator.sign(keystore, bitfield).await.map_err(|e| Error::Keystore(e))? { + match validator.sign(keystore, bitfield).map_err(|e| Error::Keystore(e))? { Some(b) => b, None => { gum::error!( diff --git a/node/core/dispute-coordinator/src/initialized.rs b/node/core/dispute-coordinator/src/initialized.rs index 620c58fbb7e6..cba1f2625e61 100644 --- a/node/core/dispute-coordinator/src/initialized.rs +++ b/node/core/dispute-coordinator/src/initialized.rs @@ -1159,8 +1159,7 @@ impl Initialized { .get(*index) .expect("`controlled_indices` are derived from `validators`; qed") .clone(), - ) - .await; + ); match res { Ok(Some(signed_dispute_statement)) => { diff --git a/node/core/dispute-coordinator/src/tests.rs b/node/core/dispute-coordinator/src/tests.rs index 7d7243243ddf..00dcfe37aaa8 100644 --- a/node/core/dispute-coordinator/src/tests.rs +++ b/node/core/dispute-coordinator/src/tests.rs @@ -48,7 +48,7 @@ use sc_keystore::LocalKeystore; use sp_application_crypto::AppKey; use sp_core::{sr25519::Pair, testing::TaskExecutor, Pair as PairT}; use sp_keyring::Sr25519Keyring; -use sp_keystore::{SyncCryptoStore, SyncCryptoStorePtr}; +use sp_keystore::{Keystore, KeystorePtr}; use ::test_helpers::{dummy_candidate_receipt_bad_sig, dummy_digest, dummy_hash}; use polkadot_node_primitives::{Timestamp, ACTIVE_DURATION_SECS}; @@ -520,7 +520,7 @@ impl TestState { ) -> SignedDisputeStatement { let public = self.validator_public.get(index).unwrap().clone(); - let keystore = self.master_keystore.clone() as SyncCryptoStorePtr; + let keystore = self.master_keystore.clone() as KeystorePtr; SignedDisputeStatement::sign_explicit(&keystore, valid, candidate_hash, session, public) .await @@ -534,7 +534,7 @@ impl TestState { candidate_hash: CandidateHash, session: SessionIndex, ) -> SignedDisputeStatement { - let keystore = self.master_keystore.clone() as SyncCryptoStorePtr; + let keystore = self.master_keystore.clone() as KeystorePtr; let validator_id = self.validators[index.0 as usize].public().into(); let context = SigningContext { session_index: session, parent_hash: Hash::repeat_byte(0xac) }; @@ -560,19 +560,15 @@ impl TestState { candidate_hash: CandidateHash, session: SessionIndex, ) -> SignedDisputeStatement { - let keystore = self.master_keystore.clone() as SyncCryptoStorePtr; + let keystore = self.master_keystore.clone() as KeystorePtr; let validator_id = self.validators[index.0 as usize].public(); let payload = ApprovalVote(candidate_hash).signing_payload(session); - let signature = SyncCryptoStore::sign_with( - &*keystore, - ValidatorId::ID, - &validator_id.into(), - &payload[..], - ) - .ok() - .flatten() - .unwrap(); + let signature = + Keystore::sign_with(&*keystore, ValidatorId::ID, &validator_id.into(), &payload[..]) + .ok() + .flatten() + .unwrap(); SignedDisputeStatement::new_unchecked_from_trusted_source( DisputeStatement::Valid(ValidDisputeStatementKind::ApprovalChecking), diff --git a/node/core/provisioner/src/tests.rs b/node/core/provisioner/src/tests.rs index fb25129ca924..96502b027789 100644 --- a/node/core/provisioner/src/tests.rs +++ b/node/core/provisioner/src/tests.rs @@ -56,19 +56,17 @@ pub fn scheduled_core(id: u32) -> ScheduledCore { mod select_availability_bitfields { use super::{super::*, default_bitvec, occupied_core}; - use futures::executor::block_on; use polkadot_primitives::{ScheduledCore, SigningContext, ValidatorId, ValidatorIndex}; use sp_application_crypto::AppKey; - use sp_keystore::{testing::KeyStore, CryptoStore, SyncCryptoStorePtr}; + use sp_keystore::{testing::MemoryKeystore, Keystore, KeystorePtr}; use std::sync::Arc; - async fn signed_bitfield( - keystore: &SyncCryptoStorePtr, + fn signed_bitfield( + keystore: &KeystorePtr, field: CoreAvailability, validator_idx: ValidatorIndex, ) -> SignedAvailabilityBitfield { - let public = CryptoStore::sr25519_generate_new(&**keystore, ValidatorId::ID, None) - .await + let public = Keystore::sr25519_generate_new(&**keystore, ValidatorId::ID, None) .expect("generated sr25519 key"); SignedAvailabilityBitfield::sign( &keystore, @@ -77,7 +75,6 @@ mod select_availability_bitfields { validator_idx, &public.into(), ) - .await .ok() .flatten() .expect("Should be signed") @@ -85,7 +82,7 @@ mod select_availability_bitfields { #[test] fn not_more_than_one_per_validator() { - let keystore: SyncCryptoStorePtr = Arc::new(KeyStore::new()); + let keystore: KeystorePtr = Arc::new(MemoryKeystore::new()); let mut bitvec = default_bitvec(2); bitvec.set(0, true); bitvec.set(1, true); @@ -95,9 +92,9 @@ mod select_availability_bitfields { // we pass in three bitfields with two validators // this helps us check the postcondition that we get two bitfields back, for which the validators differ let bitfields = vec![ - block_on(signed_bitfield(&keystore, bitvec.clone(), ValidatorIndex(0))), - block_on(signed_bitfield(&keystore, bitvec.clone(), ValidatorIndex(1))), - block_on(signed_bitfield(&keystore, bitvec, ValidatorIndex(1))), + signed_bitfield(&keystore, bitvec.clone(), ValidatorIndex(0)), + signed_bitfield(&keystore, bitvec.clone(), ValidatorIndex(1)), + signed_bitfield(&keystore, bitvec, ValidatorIndex(1)), ]; let mut selected_bitfields = @@ -112,7 +109,7 @@ mod select_availability_bitfields { #[test] fn each_corresponds_to_an_occupied_core() { - let keystore: SyncCryptoStorePtr = Arc::new(KeyStore::new()); + let keystore: KeystorePtr = Arc::new(MemoryKeystore::new()); let bitvec = default_bitvec(3); // invalid: bit on free core @@ -134,9 +131,9 @@ mod select_availability_bitfields { ]; let bitfields = vec![ - block_on(signed_bitfield(&keystore, bitvec0, ValidatorIndex(0))), - block_on(signed_bitfield(&keystore, bitvec1, ValidatorIndex(1))), - block_on(signed_bitfield(&keystore, bitvec2.clone(), ValidatorIndex(2))), + signed_bitfield(&keystore, bitvec0, ValidatorIndex(0)), + signed_bitfield(&keystore, bitvec1, ValidatorIndex(1)), + signed_bitfield(&keystore, bitvec2.clone(), ValidatorIndex(2)), ]; let selected_bitfields = @@ -149,7 +146,7 @@ mod select_availability_bitfields { #[test] fn more_set_bits_win_conflicts() { - let keystore: SyncCryptoStorePtr = Arc::new(KeyStore::new()); + let keystore: KeystorePtr = Arc::new(MemoryKeystore::new()); let mut bitvec = default_bitvec(2); bitvec.set(0, true); @@ -159,8 +156,8 @@ mod select_availability_bitfields { let cores = vec![occupied_core(0), occupied_core(1)]; let bitfields = vec![ - block_on(signed_bitfield(&keystore, bitvec, ValidatorIndex(1))), - block_on(signed_bitfield(&keystore, bitvec1.clone(), ValidatorIndex(1))), + signed_bitfield(&keystore, bitvec, ValidatorIndex(1)), + signed_bitfield(&keystore, bitvec1.clone(), ValidatorIndex(1)), ]; let selected_bitfields = @@ -171,7 +168,7 @@ mod select_availability_bitfields { #[test] fn more_complex_bitfields() { - let keystore: SyncCryptoStorePtr = Arc::new(KeyStore::new()); + let keystore: KeystorePtr = Arc::new(MemoryKeystore::new()); let cores = vec![occupied_core(0), occupied_core(1), occupied_core(2), occupied_core(3)]; @@ -194,11 +191,11 @@ mod select_availability_bitfields { // these are out of order but will be selected in order. The better // bitfield for 3 will be selected. let bitfields = vec![ - block_on(signed_bitfield(&keystore, bitvec2.clone(), ValidatorIndex(3))), - block_on(signed_bitfield(&keystore, bitvec3.clone(), ValidatorIndex(3))), - block_on(signed_bitfield(&keystore, bitvec0.clone(), ValidatorIndex(0))), - block_on(signed_bitfield(&keystore, bitvec2.clone(), ValidatorIndex(2))), - block_on(signed_bitfield(&keystore, bitvec1.clone(), ValidatorIndex(1))), + signed_bitfield(&keystore, bitvec2.clone(), ValidatorIndex(3)), + signed_bitfield(&keystore, bitvec3.clone(), ValidatorIndex(3)), + signed_bitfield(&keystore, bitvec0.clone(), ValidatorIndex(0)), + signed_bitfield(&keystore, bitvec2.clone(), ValidatorIndex(2)), + signed_bitfield(&keystore, bitvec1.clone(), ValidatorIndex(1)), ]; let selected_bitfields = diff --git a/node/core/pvf-checker/src/lib.rs b/node/core/pvf-checker/src/lib.rs index 4278b74e0b15..60b886426b59 100644 --- a/node/core/pvf-checker/src/lib.rs +++ b/node/core/pvf-checker/src/lib.rs @@ -30,7 +30,7 @@ use polkadot_primitives::{ BlockNumber, Hash, PvfCheckStatement, SessionIndex, ValidationCodeHash, ValidatorId, ValidatorIndex, }; -use sp_keystore::SyncCryptoStorePtr; +use sp_keystore::KeystorePtr; use std::collections::HashSet; const LOG_TARGET: &str = "parachain::pvf-checker"; @@ -50,12 +50,12 @@ use self::{ /// PVF pre-checking subsystem. pub struct PvfCheckerSubsystem { enabled: bool, - keystore: SyncCryptoStorePtr, + keystore: KeystorePtr, metrics: Metrics, } impl PvfCheckerSubsystem { - pub fn new(enabled: bool, keystore: SyncCryptoStorePtr, metrics: Metrics) -> Self { + pub fn new(enabled: bool, keystore: KeystorePtr, metrics: Metrics) -> Self { PvfCheckerSubsystem { enabled, keystore, metrics } } } @@ -123,7 +123,7 @@ struct State { #[overseer::contextbounds(PvfChecker, prefix = self::overseer)] async fn run( mut ctx: Context, - keystore: SyncCryptoStorePtr, + keystore: KeystorePtr, metrics: Metrics, ) -> SubsystemResult<()> { let mut state = State { @@ -174,7 +174,7 @@ async fn run( async fn handle_pvf_check( state: &mut State, sender: &mut impl overseer::PvfCheckerSenderTrait, - keystore: &SyncCryptoStorePtr, + keystore: &KeystorePtr, metrics: &Metrics, outcome: PreCheckOutcome, validation_code_hash: ValidationCodeHash, @@ -244,7 +244,7 @@ struct Conclude; async fn handle_from_overseer( state: &mut State, sender: &mut impl overseer::PvfCheckerSenderTrait, - keystore: &SyncCryptoStorePtr, + keystore: &KeystorePtr, metrics: &Metrics, from_overseer: FromOrchestra, ) -> Option { @@ -270,7 +270,7 @@ async fn handle_from_overseer( async fn handle_leaves_update( state: &mut State, sender: &mut impl overseer::PvfCheckerSenderTrait, - keystore: &SyncCryptoStorePtr, + keystore: &KeystorePtr, metrics: &Metrics, update: ActiveLeavesUpdate, ) { @@ -352,7 +352,7 @@ struct ActivationEffect { async fn examine_activation( state: &mut State, sender: &mut impl overseer::PvfCheckerSenderTrait, - keystore: &SyncCryptoStorePtr, + keystore: &KeystorePtr, leaf_hash: Hash, leaf_number: BlockNumber, ) -> Option { @@ -411,7 +411,7 @@ async fn examine_activation( /// returns the [`SigningCredentials`]. async fn check_signing_credentials( sender: &mut impl SubsystemSender, - keystore: &SyncCryptoStorePtr, + keystore: &KeystorePtr, leaf: Hash, ) -> Option { let validators = match runtime_api::validators(sender, leaf).await { @@ -427,12 +427,9 @@ async fn check_signing_credentials( }, }; - polkadot_node_subsystem_util::signing_key_and_index(&validators, keystore) - .await - .map(|(validator_key, validator_index)| SigningCredentials { - validator_key, - validator_index, - }) + polkadot_node_subsystem_util::signing_key_and_index(&validators, keystore).map( + |(validator_key, validator_index)| SigningCredentials { validator_key, validator_index }, + ) } /// Signs and submits a vote for or against a given validation code. @@ -440,7 +437,7 @@ async fn check_signing_credentials( /// If the validator already voted for the given code, this function does nothing. async fn sign_and_submit_pvf_check_statement( sender: &mut impl overseer::PvfCheckerSenderTrait, - keystore: &SyncCryptoStorePtr, + keystore: &KeystorePtr, voted: &mut HashSet, credentials: &SigningCredentials, metrics: &Metrics, @@ -482,9 +479,7 @@ async fn sign_and_submit_pvf_check_statement( keystore, &credentials.validator_key, &stmt.signing_payload(), - ) - .await - { + ) { Ok(Some(signature)) => signature, Ok(None) => { gum::warn!( diff --git a/node/core/pvf-checker/src/tests.rs b/node/core/pvf-checker/src/tests.rs index e1b9b8a5b0db..38c5e35026db 100644 --- a/node/core/pvf-checker/src/tests.rs +++ b/node/core/pvf-checker/src/tests.rs @@ -32,7 +32,7 @@ use polkadot_primitives::{ use sp_application_crypto::AppKey; use sp_core::testing::TaskExecutor; use sp_keyring::Sr25519Keyring; -use sp_keystore::SyncCryptoStore; +use sp_keystore::Keystore; use sp_runtime::traits::AppVerify; use std::{collections::HashMap, sync::Arc, time::Duration}; @@ -363,12 +363,8 @@ fn test_harness(test: impl FnOnce(TestState, VirtualOverseer) -> BoxFuture<'stat let keystore = Arc::new(sc_keystore::LocalKeystore::in_memory()); // Add OUR_VALIDATOR (which is Alice) to the keystore. - SyncCryptoStore::sr25519_generate_new( - &*keystore, - ValidatorId::ID, - Some(&OUR_VALIDATOR.to_seed()), - ) - .expect("Generating keys for our node failed"); + Keystore::sr25519_generate_new(&*keystore, ValidatorId::ID, Some(&OUR_VALIDATOR.to_seed())) + .expect("Generating keys for our node failed"); let subsystem_task = crate::run(ctx, keystore, crate::Metrics::default()).map(|x| x.unwrap()); diff --git a/node/network/availability-distribution/src/lib.rs b/node/network/availability-distribution/src/lib.rs index 7dceb5f80e6c..41702cd7a874 100644 --- a/node/network/availability-distribution/src/lib.rs +++ b/node/network/availability-distribution/src/lib.rs @@ -16,7 +16,7 @@ use futures::{future::Either, FutureExt, StreamExt, TryFutureExt}; -use sp_keystore::SyncCryptoStorePtr; +use sp_keystore::KeystorePtr; use polkadot_node_network_protocol::request_response::{v1, IncomingRequestReceiver}; use polkadot_node_subsystem::{ @@ -83,11 +83,7 @@ impl AvailabilityDistributionSubsystem { #[overseer::contextbounds(AvailabilityDistribution, prefix = self::overseer)] impl AvailabilityDistributionSubsystem { /// Create a new instance of the availability distribution. - pub fn new( - keystore: SyncCryptoStorePtr, - recvs: IncomingRequestReceivers, - metrics: Metrics, - ) -> Self { + pub fn new(keystore: KeystorePtr, recvs: IncomingRequestReceivers, metrics: Metrics) -> Self { let runtime = RuntimeInfo::new(Some(keystore)); Self { runtime, recvs, metrics } } diff --git a/node/network/availability-distribution/src/tests/mod.rs b/node/network/availability-distribution/src/tests/mod.rs index 39f8287e840a..93e8df62683d 100644 --- a/node/network/availability-distribution/src/tests/mod.rs +++ b/node/network/availability-distribution/src/tests/mod.rs @@ -20,7 +20,7 @@ use futures::{executor, future, Future}; use polkadot_node_network_protocol::request_response::{IncomingRequest, ReqProtocolNames}; use polkadot_primitives::{CoreState, Hash}; -use sp_keystore::SyncCryptoStorePtr; +use sp_keystore::KeystorePtr; use polkadot_node_subsystem_test_helpers as test_helpers; @@ -34,7 +34,7 @@ use state::{TestHarness, TestState}; pub(crate) mod mock; fn test_harness>( - keystore: SyncCryptoStorePtr, + keystore: KeystorePtr, test_fx: impl FnOnce(TestHarness) -> T, ) { sp_tracing::try_init_simple(); diff --git a/node/network/availability-distribution/src/tests/state.rs b/node/network/availability-distribution/src/tests/state.rs index 6dc035d4849d..50a7ea271f49 100644 --- a/node/network/availability-distribution/src/tests/state.rs +++ b/node/network/availability-distribution/src/tests/state.rs @@ -32,7 +32,7 @@ use futures_timer::Delay; use sc_network as network; use sc_network::{config as netconfig, config::RequestResponseConfig, IfDisconnected}; use sp_core::{testing::TaskExecutor, traits::SpawnNamed}; -use sp_keystore::SyncCryptoStorePtr; +use sp_keystore::KeystorePtr; use polkadot_node_network_protocol::{ jaeger, @@ -83,7 +83,7 @@ pub struct TestState { pub session_info: SessionInfo, /// Cores per relay chain block. pub cores: HashMap>, - pub keystore: SyncCryptoStorePtr, + pub keystore: KeystorePtr, } impl Default for TestState { diff --git a/node/network/bitfield-distribution/src/tests.rs b/node/network/bitfield-distribution/src/tests.rs index 67acc5a65592..95ffe197357b 100644 --- a/node/network/bitfield-distribution/src/tests.rs +++ b/node/network/bitfield-distribution/src/tests.rs @@ -37,7 +37,7 @@ use sp_application_crypto::AppKey; use sp_authority_discovery::AuthorityPair as AuthorityDiscoveryPair; use sp_core::Pair as PairT; use sp_keyring::Sr25519Keyring; -use sp_keystore::{testing::KeyStore, SyncCryptoStore, SyncCryptoStorePtr}; +use sp_keystore::{testing::MemoryKeystore, Keystore, KeystorePtr}; use std::{iter::FromIterator as _, sync::Arc, time::Duration}; @@ -92,13 +92,13 @@ fn prewarmed_state( fn state_with_view( view: OurView, relay_parent: Hash, -) -> (ProtocolState, SigningContext, SyncCryptoStorePtr, ValidatorId) { +) -> (ProtocolState, SigningContext, KeystorePtr, ValidatorId) { let mut state = ProtocolState::default(); let signing_context = SigningContext { session_index: 1, parent_hash: relay_parent.clone() }; - let keystore: SyncCryptoStorePtr = Arc::new(KeyStore::new()); - let validator = SyncCryptoStore::sr25519_generate_new(&*keystore, ValidatorId::ID, None) + let keystore: KeystorePtr = Arc::new(MemoryKeystore::new()); + let validator = Keystore::sr25519_generate_new(&*keystore, ValidatorId::ID, None) .expect("generating sr25519 key not to fail"); state.per_relay_parent = view @@ -139,43 +139,43 @@ fn receive_invalid_signature() { let signing_context = SigningContext { session_index: 1, parent_hash: hash_a.clone() }; // another validator not part of the validatorset - let keystore: SyncCryptoStorePtr = Arc::new(KeyStore::new()); - let malicious = SyncCryptoStore::sr25519_generate_new(&*keystore, ValidatorId::ID, None) + let keystore: KeystorePtr = Arc::new(MemoryKeystore::new()); + let malicious = Keystore::sr25519_generate_new(&*keystore, ValidatorId::ID, None) .expect("Malicious key created"); - let validator_0 = SyncCryptoStore::sr25519_generate_new(&*keystore, ValidatorId::ID, None) - .expect("key created"); - let validator_1 = SyncCryptoStore::sr25519_generate_new(&*keystore, ValidatorId::ID, None) - .expect("key created"); + let validator_0 = + Keystore::sr25519_generate_new(&*keystore, ValidatorId::ID, None).expect("key created"); + let validator_1 = + Keystore::sr25519_generate_new(&*keystore, ValidatorId::ID, None).expect("key created"); let payload = AvailabilityBitfield(bitvec![u8, bitvec::order::Lsb0; 1u8; 32]); - let invalid_signed = executor::block_on(Signed::::sign( + let invalid_signed = Signed::::sign( &keystore, payload.clone(), &signing_context, ValidatorIndex(0), &malicious.into(), - )) + ) .ok() .flatten() .expect("should be signed"); - let invalid_signed_2 = executor::block_on(Signed::::sign( + let invalid_signed_2 = Signed::::sign( &keystore, payload.clone(), &signing_context, ValidatorIndex(1), &malicious.into(), - )) + ) .ok() .flatten() .expect("should be signed"); - let valid_signed = executor::block_on(Signed::::sign( + let valid_signed = Signed::::sign( &keystore, payload, &signing_context, ValidatorIndex(0), &validator_0.into(), - )) + ) .ok() .flatten() .expect("should be signed"); @@ -263,13 +263,13 @@ fn receive_invalid_validator_index() { state.peer_views.insert(peer_b.clone(), view![hash_a]); let payload = AvailabilityBitfield(bitvec![u8, bitvec::order::Lsb0; 1u8; 32]); - let signed = executor::block_on(Signed::::sign( + let signed = Signed::::sign( &keystore, payload, &signing_context, ValidatorIndex(42), &validator, - )) + ) .ok() .flatten() .expect("should be signed"); @@ -323,13 +323,13 @@ fn receive_duplicate_messages() { // create a signed message by validator 0 let payload = AvailabilityBitfield(bitvec![u8, bitvec::order::Lsb0; 1u8; 32]); - let signed_bitfield = executor::block_on(Signed::::sign( + let signed_bitfield = Signed::::sign( &keystore, payload, &signing_context, ValidatorIndex(0), &validator, - )) + ) .ok() .flatten() .expect("should be signed"); @@ -436,13 +436,13 @@ fn do_not_relay_message_twice() { // create a signed message by validator 0 let payload = AvailabilityBitfield(bitvec![u8, bitvec::order::Lsb0; 1u8; 32]); - let signed_bitfield = executor::block_on(Signed::::sign( + let signed_bitfield = Signed::::sign( &keystore, payload, &signing_context, ValidatorIndex(0), &validator, - )) + ) .ok() .flatten() .expect("should be signed"); @@ -547,13 +547,13 @@ fn changing_view() { // create a signed message by validator 0 let payload = AvailabilityBitfield(bitvec![u8, bitvec::order::Lsb0; 1u8; 32]); - let signed_bitfield = executor::block_on(Signed::::sign( + let signed_bitfield = Signed::::sign( &keystore, payload, &signing_context, ValidatorIndex(0), &validator, - )) + ) .ok() .flatten() .expect("should be signed"); @@ -708,13 +708,13 @@ fn do_not_send_message_back_to_origin() { // create a signed message by validator 0 let payload = AvailabilityBitfield(bitvec![u8, bitvec::order::Lsb0; 1u8; 32]); - let signed_bitfield = executor::block_on(Signed::::sign( + let signed_bitfield = Signed::::sign( &keystore, payload, &signing_context, ValidatorIndex(0), &validator, - )) + ) .ok() .flatten() .expect("should be signed"); @@ -823,13 +823,13 @@ fn topology_test() { // create a signed message by validator 0 let payload = AvailabilityBitfield(bitvec![u8, bitvec::order::Lsb0; 1u8; 32]); - let signed_bitfield = executor::block_on(Signed::::sign( + let signed_bitfield = Signed::::sign( &keystore, payload, &signing_context, ValidatorIndex(0), &validator, - )) + ) .ok() .flatten() .expect("should be signed"); diff --git a/node/network/collator-protocol/src/lib.rs b/node/network/collator-protocol/src/lib.rs index 388121cfc049..ab8718ee3be6 100644 --- a/node/network/collator-protocol/src/lib.rs +++ b/node/network/collator-protocol/src/lib.rs @@ -28,7 +28,7 @@ use futures::{ FutureExt, TryFutureExt, }; -use sp_keystore::SyncCryptoStorePtr; +use sp_keystore::KeystorePtr; use polkadot_node_network_protocol::{ request_response::{v1 as request_v1, IncomingRequestReceiver}, @@ -70,7 +70,7 @@ pub enum ProtocolSide { /// Validators operate on the relay chain. Validator { /// The keystore holding validator keys. - keystore: SyncCryptoStorePtr, + keystore: KeystorePtr, /// An eviction policy for inactive peers or validators. eviction_policy: CollatorEvictionPolicy, /// Prometheus metrics for validators. diff --git a/node/network/collator-protocol/src/validator_side/mod.rs b/node/network/collator-protocol/src/validator_side/mod.rs index 5d5417fb3001..8ed4fd4492c0 100644 --- a/node/network/collator-protocol/src/validator_side/mod.rs +++ b/node/network/collator-protocol/src/validator_side/mod.rs @@ -30,7 +30,7 @@ use std::{ time::{Duration, Instant}, }; -use sp_keystore::SyncCryptoStorePtr; +use sp_keystore::KeystorePtr; use polkadot_node_network_protocol::{ self as net_protocol, @@ -367,7 +367,7 @@ impl ActiveParas { async fn assign_incoming( &mut self, sender: &mut impl SubsystemSender, - keystore: &SyncCryptoStorePtr, + keystore: &KeystorePtr, new_relay_parents: impl IntoIterator, ) { for relay_parent in new_relay_parents { @@ -404,7 +404,6 @@ impl ActiveParas { let para_now = match polkadot_node_subsystem_util::signing_key_and_index(&validators, keystore) - .await .and_then(|(_, index)| { polkadot_node_subsystem_util::find_validator_group(&groups, index) }) { @@ -993,7 +992,7 @@ async fn remove_relay_parent(state: &mut State, relay_parent: Hash) -> Result<() async fn handle_our_view_change( ctx: &mut Context, state: &mut State, - keystore: &SyncCryptoStorePtr, + keystore: &KeystorePtr, view: OurView, ) -> Result<()> { let old_view = std::mem::replace(&mut state.view, view); @@ -1049,7 +1048,7 @@ async fn handle_our_view_change( async fn handle_network_msg( ctx: &mut Context, state: &mut State, - keystore: &SyncCryptoStorePtr, + keystore: &KeystorePtr, bridge_message: NetworkBridgeEvent, ) -> Result<()> { use NetworkBridgeEvent::*; @@ -1084,7 +1083,7 @@ async fn handle_network_msg( #[overseer::contextbounds(CollatorProtocol, prefix = self::overseer)] async fn process_msg( ctx: &mut Context, - keystore: &SyncCryptoStorePtr, + keystore: &KeystorePtr, msg: CollatorProtocolMessage, state: &mut State, ) { @@ -1165,7 +1164,7 @@ async fn process_msg( #[overseer::contextbounds(CollatorProtocol, prefix = self::overseer)] pub(crate) async fn run( mut ctx: Context, - keystore: SyncCryptoStorePtr, + keystore: KeystorePtr, eviction_policy: crate::CollatorEvictionPolicy, metrics: Metrics, ) -> std::result::Result<(), crate::error::FatalError> { diff --git a/node/network/collator-protocol/src/validator_side/tests.rs b/node/network/collator-protocol/src/validator_side/tests.rs index 7b25ff7be616..66a5dd5e0372 100644 --- a/node/network/collator-protocol/src/validator_side/tests.rs +++ b/node/network/collator-protocol/src/validator_side/tests.rs @@ -19,7 +19,7 @@ use assert_matches::assert_matches; use futures::{executor, future, Future}; use sp_core::{crypto::Pair, Encode}; use sp_keyring::Sr25519Keyring; -use sp_keystore::{testing::KeyStore as TestKeyStore, SyncCryptoStore}; +use sp_keystore::{testing::MemoryKeystore, Keystore}; use std::{iter, sync::Arc, task::Poll, time::Duration}; use polkadot_node_network_protocol::{ @@ -130,7 +130,7 @@ fn test_harness>(test: impl FnOnce(TestHarne let (context, virtual_overseer) = test_helpers::make_subsystem_context(pool.clone()); - let keystore = TestKeyStore::new(); + let keystore = MemoryKeystore::new(); keystore .sr25519_generate_new( polkadot_primitives::PARACHAIN_KEY_TYPE_ID, diff --git a/node/network/dispute-distribution/src/lib.rs b/node/network/dispute-distribution/src/lib.rs index f3325a11a659..1ac54c6219d4 100644 --- a/node/network/dispute-distribution/src/lib.rs +++ b/node/network/dispute-distribution/src/lib.rs @@ -30,7 +30,7 @@ use futures::{channel::mpsc, FutureExt, StreamExt, TryFutureExt}; use polkadot_node_network_protocol::authority_discovery::AuthorityDiscovery; use polkadot_node_subsystem_util::nesting_sender::NestingSender; -use sp_keystore::SyncCryptoStorePtr; +use sp_keystore::KeystorePtr; use polkadot_node_network_protocol::request_response::{incoming::IncomingRequestReceiver, v1}; use polkadot_node_primitives::DISPUTE_WINDOW; @@ -158,7 +158,7 @@ where { /// Create a new instance of the dispute distribution. pub fn new( - keystore: SyncCryptoStorePtr, + keystore: KeystorePtr, req_receiver: IncomingRequestReceiver, authority_discovery: AD, metrics: Metrics, diff --git a/node/network/dispute-distribution/src/tests/mock.rs b/node/network/dispute-distribution/src/tests/mock.rs index 6478940c9024..08b5a28acaa7 100644 --- a/node/network/dispute-distribution/src/tests/mock.rs +++ b/node/network/dispute-distribution/src/tests/mock.rs @@ -30,7 +30,7 @@ use polkadot_node_network_protocol::{authority_discovery::AuthorityDiscovery, Pe use sc_keystore::LocalKeystore; use sp_application_crypto::AppKey; use sp_keyring::Sr25519Keyring; -use sp_keystore::{SyncCryptoStore, SyncCryptoStorePtr}; +use sp_keystore::{Keystore, KeystorePtr}; use polkadot_node_primitives::{DisputeMessage, SignedDisputeStatement}; use polkadot_primitives::{ @@ -131,8 +131,8 @@ pub async fn make_explicit_signed( candidate_hash: CandidateHash, valid: bool, ) -> SignedDisputeStatement { - let keystore: SyncCryptoStorePtr = Arc::new(LocalKeystore::in_memory()); - SyncCryptoStore::sr25519_generate_new(&*keystore, ValidatorId::ID, Some(&validator.to_seed())) + let keystore: KeystorePtr = Arc::new(LocalKeystore::in_memory()); + Keystore::sr25519_generate_new(&*keystore, ValidatorId::ID, Some(&validator.to_seed())) .expect("Insert key into keystore"); SignedDisputeStatement::sign_explicit( diff --git a/node/network/gossip-support/src/lib.rs b/node/network/gossip-support/src/lib.rs index 03d0e2150892..5224730c14ec 100644 --- a/node/network/gossip-support/src/lib.rs +++ b/node/network/gossip-support/src/lib.rs @@ -37,7 +37,7 @@ use rand_chacha::ChaCha20Rng; use sc_network::Multiaddr; use sp_application_crypto::{AppKey, ByteArray}; -use sp_keystore::{CryptoStore, SyncCryptoStorePtr}; +use sp_keystore::{Keystore, KeystorePtr}; use polkadot_node_network_protocol::{ authority_discovery::AuthorityDiscovery, peer_set::PeerSet, GossipSupportNetworkMessage, @@ -79,7 +79,7 @@ const LOW_CONNECTIVITY_WARN_THRESHOLD: usize = 90; /// The Gossip Support subsystem. pub struct GossipSupport { - keystore: SyncCryptoStorePtr, + keystore: KeystorePtr, last_session_index: Option, // Some(timestamp) if we failed to resolve @@ -118,7 +118,7 @@ where AD: AuthorityDiscovery, { /// Create a new instance of the [`GossipSupport`] subsystem. - pub fn new(keystore: SyncCryptoStorePtr, authority_discovery: AD, metrics: Metrics) -> Self { + pub fn new(keystore: KeystorePtr, authority_discovery: AD, metrics: Metrics) -> Self { // Initialize metrics to `0`. metrics.on_is_not_authority(); metrics.on_is_not_parachain_validator(); @@ -248,7 +248,7 @@ where // Remove all of our locally controlled validator indices so we don't connect to ourself. let connections = - if remove_all_controlled(&self.keystore, &mut connections).await != 0 { + if remove_all_controlled(&self.keystore, &mut connections) != 0 { connections } else { // If we control none of them, issue an empty connection request @@ -260,7 +260,7 @@ where if is_new_session { // Gossip topology is only relevant for authorities in the current session. - let our_index = self.get_key_index_and_update_metrics(&session_info).await?; + let our_index = self.get_key_index_and_update_metrics(&session_info)?; update_gossip_topology( sender, @@ -279,12 +279,12 @@ where // Checks if the node is an authority and also updates `polkadot_node_is_authority` and // `polkadot_node_is_parachain_validator` metrics accordingly. // On success, returns the index of our keys in `session_info.discovery_keys`. - async fn get_key_index_and_update_metrics( + fn get_key_index_and_update_metrics( &mut self, session_info: &SessionInfo, ) -> Result { let authority_check_result = - ensure_i_am_an_authority(&self.keystore, &session_info.discovery_keys).await; + ensure_i_am_an_authority(&self.keystore, &session_info.discovery_keys); match authority_check_result.as_ref() { Ok(index) => { @@ -457,12 +457,12 @@ async fn authorities_past_present_future( /// Return an error if we're not a validator in the given set (do not have keys). /// Otherwise, returns the index of our keys in `authorities`. -async fn ensure_i_am_an_authority( - keystore: &SyncCryptoStorePtr, +fn ensure_i_am_an_authority( + keystore: &KeystorePtr, authorities: &[AuthorityDiscoveryId], ) -> Result { for (i, v) in authorities.iter().enumerate() { - if CryptoStore::has_keys(&**keystore, &[(v.to_raw_vec(), AuthorityDiscoveryId::ID)]).await { + if Keystore::has_keys(&**keystore, &[(v.to_raw_vec(), AuthorityDiscoveryId::ID)]) { return Ok(i) } } @@ -470,13 +470,13 @@ async fn ensure_i_am_an_authority( } /// Filter out all controlled keys in the given set. Returns the number of keys removed. -async fn remove_all_controlled( - keystore: &SyncCryptoStorePtr, +fn remove_all_controlled( + keystore: &KeystorePtr, authorities: &mut Vec, ) -> usize { let mut to_remove = Vec::new(); for (i, v) in authorities.iter().enumerate() { - if CryptoStore::has_keys(&**keystore, &[(v.to_raw_vec(), AuthorityDiscoveryId::ID)]).await { + if Keystore::has_keys(&**keystore, &[(v.to_raw_vec(), AuthorityDiscoveryId::ID)]) { to_remove.push(i); } } diff --git a/node/network/statement-distribution/src/lib.rs b/node/network/statement-distribution/src/lib.rs index 769c50322061..3677ac21565a 100644 --- a/node/network/statement-distribution/src/lib.rs +++ b/node/network/statement-distribution/src/lib.rs @@ -57,7 +57,7 @@ use futures::{ prelude::*, }; use indexmap::{map::Entry as IEntry, IndexMap}; -use sp_keystore::SyncCryptoStorePtr; +use sp_keystore::KeystorePtr; use util::runtime::RuntimeInfo; use std::collections::{hash_map::Entry, HashMap, HashSet, VecDeque}; @@ -119,7 +119,7 @@ const MAX_LARGE_STATEMENTS_PER_SENDER: usize = 20; /// The statement distribution subsystem. pub struct StatementDistributionSubsystem { /// Pointer to a keystore, which is required for determining this node's validator index. - keystore: SyncCryptoStorePtr, + keystore: KeystorePtr, /// Receiver for incoming large statement requests. req_receiver: Option>, /// Prometheus metrics @@ -1745,7 +1745,7 @@ async fn handle_network_update( impl StatementDistributionSubsystem { /// Create a new Statement Distribution Subsystem pub fn new( - keystore: SyncCryptoStorePtr, + keystore: KeystorePtr, req_receiver: IncomingRequestReceiver, metrics: Metrics, rng: R, diff --git a/node/network/statement-distribution/src/tests.rs b/node/network/statement-distribution/src/tests.rs index 87a7cd7a35fe..5945aca1358f 100644 --- a/node/network/statement-distribution/src/tests.rs +++ b/node/network/statement-distribution/src/tests.rs @@ -16,7 +16,7 @@ use super::{metrics::Metrics, *}; use assert_matches::assert_matches; -use futures::executor::{self, block_on}; +use futures::executor; use futures_timer::Delay; use parity_scale_codec::{Decode, Encode}; use polkadot_node_network_protocol::{ @@ -45,7 +45,7 @@ use sc_keystore::LocalKeystore; use sp_application_crypto::{sr25519::Pair, AppKey, Pair as TraitPair}; use sp_authority_discovery::AuthorityPair; use sp_keyring::Sr25519Keyring; -use sp_keystore::{CryptoStore, SyncCryptoStore, SyncCryptoStorePtr}; +use sp_keystore::{Keystore, KeystorePtr}; use std::{iter::FromIterator as _, sync::Arc, time::Duration}; // Some deterministic genesis hash for protocol names @@ -90,14 +90,14 @@ fn active_head_accepts_only_2_seconded_per_validator() { PerLeafSpan::new(Arc::new(jaeger::Span::Disabled), "test"), ); - let keystore: SyncCryptoStorePtr = Arc::new(LocalKeystore::in_memory()); - let alice_public = SyncCryptoStore::sr25519_generate_new( + let keystore: KeystorePtr = Arc::new(LocalKeystore::in_memory()); + let alice_public = Keystore::sr25519_generate_new( &*keystore, ValidatorId::ID, Some(&Sr25519Keyring::Alice.to_seed()), ) .unwrap(); - let bob_public = SyncCryptoStore::sr25519_generate_new( + let bob_public = Keystore::sr25519_generate_new( &*keystore, ValidatorId::ID, Some(&Sr25519Keyring::Bob.to_seed()), @@ -105,13 +105,13 @@ fn active_head_accepts_only_2_seconded_per_validator() { .unwrap(); // note A - let a_seconded_val_0 = block_on(SignedFullStatement::sign( + let a_seconded_val_0 = SignedFullStatement::sign( &keystore, Statement::Seconded(candidate_a.clone()), &signing_context, ValidatorIndex(0), &alice_public.into(), - )) + ) .ok() .flatten() .expect("should be signed"); @@ -132,13 +132,13 @@ fn active_head_accepts_only_2_seconded_per_validator() { assert_matches!(noted, NotedStatement::UsefulButKnown); // note B - let statement = block_on(SignedFullStatement::sign( + let statement = SignedFullStatement::sign( &keystore, Statement::Seconded(candidate_b.clone()), &signing_context, ValidatorIndex(0), &alice_public.into(), - )) + ) .ok() .flatten() .expect("should be signed"); @@ -149,13 +149,13 @@ fn active_head_accepts_only_2_seconded_per_validator() { assert_matches!(noted, NotedStatement::Fresh(_)); // note C (beyond 2 - ignored) - let statement = block_on(SignedFullStatement::sign( + let statement = SignedFullStatement::sign( &keystore, Statement::Seconded(candidate_c.clone()), &signing_context, ValidatorIndex(0), &alice_public.into(), - )) + ) .ok() .flatten() .expect("should be signed"); @@ -167,13 +167,13 @@ fn active_head_accepts_only_2_seconded_per_validator() { assert_matches!(noted, NotedStatement::NotUseful); // note B (new validator) - let statement = block_on(SignedFullStatement::sign( + let statement = SignedFullStatement::sign( &keystore, Statement::Seconded(candidate_b.clone()), &signing_context, ValidatorIndex(1), &bob_public.into(), - )) + ) .ok() .flatten() .expect("should be signed"); @@ -184,13 +184,13 @@ fn active_head_accepts_only_2_seconded_per_validator() { assert_matches!(noted, NotedStatement::Fresh(_)); // note C (new validator) - let statement = block_on(SignedFullStatement::sign( + let statement = SignedFullStatement::sign( &keystore, Statement::Seconded(candidate_c.clone()), &signing_context, ValidatorIndex(1), &bob_public.into(), - )) + ) .ok() .flatten() .expect("should be signed"); @@ -408,21 +408,21 @@ fn peer_view_update_sends_messages() { let session_index = 1; let signing_context = SigningContext { parent_hash: hash_c, session_index }; - let keystore: SyncCryptoStorePtr = Arc::new(LocalKeystore::in_memory()); + let keystore: KeystorePtr = Arc::new(LocalKeystore::in_memory()); - let alice_public = SyncCryptoStore::sr25519_generate_new( + let alice_public = Keystore::sr25519_generate_new( &*keystore, ValidatorId::ID, Some(&Sr25519Keyring::Alice.to_seed()), ) .unwrap(); - let bob_public = SyncCryptoStore::sr25519_generate_new( + let bob_public = Keystore::sr25519_generate_new( &*keystore, ValidatorId::ID, Some(&Sr25519Keyring::Bob.to_seed()), ) .unwrap(); - let charlie_public = SyncCryptoStore::sr25519_generate_new( + let charlie_public = Keystore::sr25519_generate_new( &*keystore, ValidatorId::ID, Some(&Sr25519Keyring::Charlie.to_seed()), @@ -436,13 +436,13 @@ fn peer_view_update_sends_messages() { PerLeafSpan::new(Arc::new(jaeger::Span::Disabled), "test"), ); - let statement = block_on(SignedFullStatement::sign( + let statement = SignedFullStatement::sign( &keystore, Statement::Seconded(candidate.clone()), &signing_context, ValidatorIndex(0), &alice_public.into(), - )) + ) .ok() .flatten() .expect("should be signed"); @@ -453,13 +453,13 @@ fn peer_view_update_sends_messages() { assert_matches!(noted, NotedStatement::Fresh(_)); - let statement = block_on(SignedFullStatement::sign( + let statement = SignedFullStatement::sign( &keystore, Statement::Valid(candidate_hash), &signing_context, ValidatorIndex(1), &bob_public.into(), - )) + ) .ok() .flatten() .expect("should be signed"); @@ -470,13 +470,13 @@ fn peer_view_update_sends_messages() { assert_matches!(noted, NotedStatement::Fresh(_)); - let statement = block_on(SignedFullStatement::sign( + let statement = SignedFullStatement::sign( &keystore, Statement::Valid(candidate_hash), &signing_context, ValidatorIndex(2), &charlie_public.into(), - )) + ) .ok() .flatten() .expect("should be signed"); @@ -614,13 +614,12 @@ fn circulated_statement_goes_to_all_peers_with_view() { executor::block_on(async move { let signing_context = SigningContext { parent_hash: hash_b, session_index }; - let keystore: SyncCryptoStorePtr = Arc::new(LocalKeystore::in_memory()); - let alice_public = CryptoStore::sr25519_generate_new( + let keystore: KeystorePtr = Arc::new(LocalKeystore::in_memory()); + let alice_public = Keystore::sr25519_generate_new( &*keystore, ValidatorId::ID, Some(&Sr25519Keyring::Alice.to_seed()), ) - .await .unwrap(); let statement = SignedFullStatement::sign( @@ -630,7 +629,6 @@ fn circulated_statement_goes_to_all_peers_with_view() { ValidatorIndex(0), &alice_public.into(), ) - .await .ok() .flatten() .expect("should be signed"); @@ -827,13 +825,12 @@ fn receiving_from_one_sends_to_another_and_to_candidate_backing() { let statement = { let signing_context = SigningContext { parent_hash: hash_a, session_index }; - let keystore: SyncCryptoStorePtr = Arc::new(LocalKeystore::in_memory()); - let alice_public = CryptoStore::sr25519_generate_new( + let keystore: KeystorePtr = Arc::new(LocalKeystore::in_memory()); + let alice_public = Keystore::sr25519_generate_new( &*keystore, ValidatorId::ID, Some(&Sr25519Keyring::Alice.to_seed()), ) - .await .unwrap(); SignedFullStatement::sign( @@ -843,7 +840,6 @@ fn receiving_from_one_sends_to_another_and_to_candidate_backing() { ValidatorIndex(0), &alice_public.into(), ) - .await .ok() .flatten() .expect("should be signed") @@ -1071,13 +1067,12 @@ fn receiving_large_statement_from_one_sends_to_another_and_to_candidate_backing( let statement = { let signing_context = SigningContext { parent_hash: hash_a, session_index }; - let keystore: SyncCryptoStorePtr = Arc::new(LocalKeystore::in_memory()); - let alice_public = CryptoStore::sr25519_generate_new( + let keystore: KeystorePtr = Arc::new(LocalKeystore::in_memory()); + let alice_public = Keystore::sr25519_generate_new( &*keystore, ValidatorId::ID, Some(&Sr25519Keyring::Alice.to_seed()), ) - .await .unwrap(); SignedFullStatement::sign( @@ -1087,7 +1082,6 @@ fn receiving_large_statement_from_one_sends_to_another_and_to_candidate_backing( ValidatorIndex(0), &alice_public.into(), ) - .await .ok() .flatten() .expect("should be signed") @@ -1627,13 +1621,12 @@ fn share_prioritizes_backing_group() { let statement = { let signing_context = SigningContext { parent_hash: hash_a, session_index }; - let keystore: SyncCryptoStorePtr = Arc::new(LocalKeystore::in_memory()); - let ferdie_public = CryptoStore::sr25519_generate_new( + let keystore: KeystorePtr = Arc::new(LocalKeystore::in_memory()); + let ferdie_public = Keystore::sr25519_generate_new( &*keystore, ValidatorId::ID, Some(&Sr25519Keyring::Ferdie.to_seed()), ) - .await .unwrap(); SignedFullStatement::sign( @@ -1819,8 +1812,8 @@ fn peer_cant_flood_with_large_statements() { let statement = { let signing_context = SigningContext { parent_hash: hash_a, session_index }; - let keystore: SyncCryptoStorePtr = Arc::new(LocalKeystore::in_memory()); - let alice_public = CryptoStore::sr25519_generate_new( + let keystore: KeystorePtr = Arc::new(LocalKeystore::in_memory()); + let alice_public = Keystore::sr25519_generate_new( &*keystore, ValidatorId::ID, Some(&Sr25519Keyring::Alice.to_seed()), @@ -2108,8 +2101,8 @@ fn handle_multiple_seconded_statements() { let statement = { let signing_context = SigningContext { parent_hash: relay_parent_hash, session_index }; - let keystore: SyncCryptoStorePtr = Arc::new(LocalKeystore::in_memory()); - let alice_public = CryptoStore::sr25519_generate_new( + let keystore: KeystorePtr = Arc::new(LocalKeystore::in_memory()); + let alice_public = Keystore::sr25519_generate_new( &*keystore, ValidatorId::ID, Some(&Sr25519Keyring::Alice.to_seed()), @@ -2211,8 +2204,8 @@ fn handle_multiple_seconded_statements() { let statement = { let signing_context = SigningContext { parent_hash: relay_parent_hash, session_index }; - let keystore: SyncCryptoStorePtr = Arc::new(LocalKeystore::in_memory()); - let alice_public = CryptoStore::sr25519_generate_new( + let keystore: KeystorePtr = Arc::new(LocalKeystore::in_memory()); + let alice_public = Keystore::sr25519_generate_new( &*keystore, ValidatorId::ID, Some(&Sr25519Keyring::Alice.to_seed()), diff --git a/node/primitives/src/disputes/mod.rs b/node/primitives/src/disputes/mod.rs index ebda150a3387..c47d1f561119 100644 --- a/node/primitives/src/disputes/mod.rs +++ b/node/primitives/src/disputes/mod.rs @@ -22,7 +22,7 @@ use std::collections::{ use parity_scale_codec::{Decode, Encode}; use sp_application_crypto::AppKey; -use sp_keystore::{CryptoStore, Error as KeystoreError, SyncCryptoStorePtr}; +use sp_keystore::{Error as KeystoreError, Keystore, KeystorePtr}; use super::{Statement, UncheckedSignedFullStatement}; use polkadot_primitives::{ @@ -207,8 +207,8 @@ impl SignedDisputeStatement { /// Sign this statement with the given keystore and key. Pass `valid = true` to /// indicate validity of the candidate, and `valid = false` to indicate invalidity. - pub async fn sign_explicit( - keystore: &SyncCryptoStorePtr, + pub fn sign_explicit( + keystore: &KeystorePtr, valid: bool, candidate_hash: CandidateHash, session_index: SessionIndex, @@ -221,13 +221,12 @@ impl SignedDisputeStatement { }; let data = dispute_statement.payload_data(candidate_hash, session_index); - let signature = CryptoStore::sign_with( + let signature = Keystore::sign_with( &**keystore, ValidatorId::ID, &validator_public.clone().into(), &data, - ) - .await?; + )?; let signature = match signature { Some(sig) => diff --git a/node/subsystem-test-helpers/src/mock.rs b/node/subsystem-test-helpers/src/mock.rs index dffc65b75695..96efe63b16d2 100644 --- a/node/subsystem-test-helpers/src/mock.rs +++ b/node/subsystem-test-helpers/src/mock.rs @@ -19,20 +19,20 @@ use std::sync::Arc; use sc_keystore::LocalKeystore; use sp_application_crypto::AppKey; use sp_keyring::Sr25519Keyring; -use sp_keystore::{SyncCryptoStore, SyncCryptoStorePtr}; +use sp_keystore::{Keystore, KeystorePtr}; use polkadot_primitives::{AuthorityDiscoveryId, ValidatorId}; /// Get mock keystore with `Ferdie` key. -pub fn make_ferdie_keystore() -> SyncCryptoStorePtr { - let keystore: SyncCryptoStorePtr = Arc::new(LocalKeystore::in_memory()); - SyncCryptoStore::sr25519_generate_new( +pub fn make_ferdie_keystore() -> KeystorePtr { + let keystore: KeystorePtr = Arc::new(LocalKeystore::in_memory()); + Keystore::sr25519_generate_new( &*keystore, ValidatorId::ID, Some(&Sr25519Keyring::Ferdie.to_seed()), ) .expect("Insert key into keystore"); - SyncCryptoStore::sr25519_generate_new( + Keystore::sr25519_generate_new( &*keystore, AuthorityDiscoveryId::ID, Some(&Sr25519Keyring::Ferdie.to_seed()), diff --git a/node/subsystem-util/src/lib.rs b/node/subsystem-util/src/lib.rs index 3aafc14a7878..13dce3060014 100644 --- a/node/subsystem-util/src/lib.rs +++ b/node/subsystem-util/src/lib.rs @@ -51,7 +51,7 @@ use polkadot_primitives::{ pub use rand; use sp_application_crypto::AppKey; use sp_core::ByteArray; -use sp_keystore::{CryptoStore, Error as KeystoreError, SyncCryptoStorePtr}; +use sp_keystore::{Error as KeystoreError, Keystore, KeystorePtr}; use std::time::Duration; use thiserror::Error; @@ -265,21 +265,18 @@ pub async fn executor_params_at_relay_parent( } /// From the given set of validators, find the first key we can sign with, if any. -pub async fn signing_key( - validators: &[ValidatorId], - keystore: &SyncCryptoStorePtr, -) -> Option { - signing_key_and_index(validators, keystore).await.map(|(k, _)| k) +pub fn signing_key(validators: &[ValidatorId], keystore: &KeystorePtr) -> Option { + signing_key_and_index(validators, keystore).map(|(k, _)| k) } /// From the given set of validators, find the first key we can sign with, if any, and return it /// along with the validator index. -pub async fn signing_key_and_index( +pub fn signing_key_and_index( validators: &[ValidatorId], - keystore: &SyncCryptoStorePtr, + keystore: &KeystorePtr, ) -> Option<(ValidatorId, ValidatorIndex)> { for (i, v) in validators.iter().enumerate() { - if CryptoStore::has_keys(&**keystore, &[(v.to_raw_vec(), ValidatorId::ID)]).await { + if Keystore::has_keys(&**keystore, &[(v.to_raw_vec(), ValidatorId::ID)]) { return Some((v.clone(), ValidatorIndex(i as _))) } } @@ -290,13 +287,12 @@ pub async fn signing_key_and_index( /// /// Returns `Ok(None)` if the private key that correponds to that validator ID is not found in the /// given keystore. Returns an error if the key could not be used for signing. -pub async fn sign( - keystore: &SyncCryptoStorePtr, +pub fn sign( + keystore: &KeystorePtr, key: &ValidatorId, data: &[u8], ) -> Result, KeystoreError> { - let signature = - CryptoStore::sign_with(&**keystore, ValidatorId::ID, &key.into(), &data).await?; + let signature = Keystore::sign_with(&**keystore, ValidatorId::ID, &key.into(), &data)?; match signature { Some(sig) => @@ -372,11 +368,7 @@ pub struct Validator { impl Validator { /// Get a struct representing this node's validator if this node is in fact a validator in the context of the given block. - pub async fn new( - parent: Hash, - keystore: SyncCryptoStorePtr, - sender: &mut S, - ) -> Result + pub async fn new(parent: Hash, keystore: KeystorePtr, sender: &mut S) -> Result where S: SubsystemSender, { @@ -401,10 +393,10 @@ impl Validator { pub async fn construct( validators: &[ValidatorId], signing_context: SigningContext, - keystore: SyncCryptoStorePtr, + keystore: KeystorePtr, ) -> Result { let (key, index) = - signing_key_and_index(validators, &keystore).await.ok_or(Error::NotAValidator)?; + signing_key_and_index(validators, &keystore).ok_or(Error::NotAValidator)?; Ok(Validator { signing_context, key, index }) } @@ -425,11 +417,11 @@ impl Validator { } /// Sign a payload with this validator - pub async fn sign, RealPayload: Encode>( + pub fn sign, RealPayload: Encode>( &self, - keystore: SyncCryptoStorePtr, + keystore: KeystorePtr, payload: Payload, ) -> Result>, KeystoreError> { - Signed::sign(&keystore, payload, &self.signing_context, self.index, &self.key).await + Signed::sign(&keystore, payload, &self.signing_context, self.index, &self.key) } } diff --git a/node/subsystem-util/src/runtime/mod.rs b/node/subsystem-util/src/runtime/mod.rs index 0d3132ec1fda..b0642d6551cc 100644 --- a/node/subsystem-util/src/runtime/mod.rs +++ b/node/subsystem-util/src/runtime/mod.rs @@ -23,7 +23,7 @@ use lru::LruCache; use parity_scale_codec::Encode; use sp_application_crypto::AppKey; use sp_core::crypto::ByteArray; -use sp_keystore::{CryptoStore, SyncCryptoStorePtr}; +use sp_keystore::{Keystore, KeystorePtr}; use polkadot_node_subsystem::{messages::RuntimeApiMessage, overseer, SubsystemSender}; use polkadot_primitives::{ @@ -49,7 +49,7 @@ pub struct Config { /// Needed for retrieval of `ValidatorInfo` /// /// Pass `None` if you are not interested. - pub keystore: Option, + pub keystore: Option, /// How many sessions should we keep in the cache? pub session_cache_lru_size: NonZeroUsize, @@ -69,7 +69,7 @@ pub struct RuntimeInfo { session_info_cache: LruCache, /// Key store for determining whether we are a validator and what `ValidatorIndex` we have. - keystore: Option, + keystore: Option, } /// `SessionInfo` with additional useful data for validator nodes. @@ -102,7 +102,7 @@ impl Default for Config { impl RuntimeInfo { /// Create a new `RuntimeInfo` for convenient runtime fetches. - pub fn new(keystore: Option) -> Self { + pub fn new(keystore: Option) -> Self { Self::new_with_config(Config { keystore, ..Default::default() }) } @@ -171,7 +171,7 @@ impl RuntimeInfo { recv_runtime(request_session_info(parent, session_index, sender).await) .await? .ok_or(JfyiError::NoSuchSession(session_index))?; - let validator_info = self.get_validator_info(&session_info).await?; + let validator_info = self.get_validator_info(&session_info)?; let full_info = ExtendedSessionInfo { session_info, validator_info }; @@ -206,8 +206,8 @@ impl RuntimeInfo { /// /// /// Returns: `None` if not a parachain validator. - async fn get_validator_info(&self, session_info: &SessionInfo) -> Result { - if let Some(our_index) = self.get_our_index(&session_info.validators).await { + fn get_validator_info(&self, session_info: &SessionInfo) -> Result { + if let Some(our_index) = self.get_our_index(&session_info.validators) { // Get our group index: let our_group = session_info.validator_groups.iter().enumerate().find_map(|(i, g)| { @@ -228,13 +228,13 @@ impl RuntimeInfo { /// Get our `ValidatorIndex`. /// /// Returns: None if we are not a validator. - async fn get_our_index( + fn get_our_index( &self, validators: &IndexedVec, ) -> Option { let keystore = self.keystore.as_ref()?; for (i, v) in validators.iter().enumerate() { - if CryptoStore::has_keys(&**keystore, &[(v.to_raw_vec(), ValidatorId::ID)]).await { + if Keystore::has_keys(&**keystore, &[(v.to_raw_vec(), ValidatorId::ID)]) { return Some(ValidatorIndex(i as u32)) } } diff --git a/primitives/src/v2/signed.rs b/primitives/src/v2/signed.rs index 28c3b790039f..c57abb2e0173 100644 --- a/primitives/src/v2/signed.rs +++ b/primitives/src/v2/signed.rs @@ -20,7 +20,7 @@ use scale_info::TypeInfo; #[cfg(feature = "std")] use application_crypto::AppKey; #[cfg(feature = "std")] -use sp_keystore::{CryptoStore, Error as KeystoreError, SyncCryptoStorePtr}; +use sp_keystore::{Error as KeystoreError, Keystore, KeystorePtr}; use sp_std::prelude::Vec; use primitives::RuntimeDebug; @@ -86,14 +86,14 @@ impl, RealPayload: Encode> Signed( - keystore: &SyncCryptoStorePtr, + pub fn sign( + keystore: &KeystorePtr, payload: Payload, context: &SigningContext, validator_index: ValidatorIndex, key: &ValidatorId, ) -> Result, KeystoreError> { - let r = UncheckedSigned::sign(keystore, payload, context, validator_index, key).await?; + let r = UncheckedSigned::sign(keystore, payload, context, validator_index, key)?; Ok(r.map(Self)) } @@ -244,16 +244,15 @@ impl, RealPayload: Encode> UncheckedSigned( - keystore: &SyncCryptoStorePtr, + fn sign( + keystore: &KeystorePtr, payload: Payload, context: &SigningContext, validator_index: ValidatorIndex, key: &ValidatorId, ) -> Result, KeystoreError> { let data = Self::payload_data(&payload, context); - let signature = - CryptoStore::sign_with(&**keystore, ValidatorId::ID, &key.into(), &data).await?; + let signature = Keystore::sign_with(&**keystore, ValidatorId::ID, &key.into(), &data)?; let signature = match signature { Some(sig) => diff --git a/roadmap/implementers-guide/src/node/approval/approval-voting.md b/roadmap/implementers-guide/src/node/approval/approval-voting.md index 2761f21b1c2c..88744e50cf79 100644 --- a/roadmap/implementers-guide/src/node/approval/approval-voting.md +++ b/roadmap/implementers-guide/src/node/approval/approval-voting.md @@ -138,7 +138,7 @@ struct State { earliest_session: SessionIndex, session_info: Vec, babe_epoch: Option, // information about a cached BABE epoch. - keystore: KeyStore, + keystore: Keystore, // A scheduler which keeps at most one wakeup per hash, candidate hash pair and // maps such pairs to `Tick`s. diff --git a/rpc/src/lib.rs b/rpc/src/lib.rs index bcd8adabe933..14462f659032 100644 --- a/rpc/src/lib.rs +++ b/rpc/src/lib.rs @@ -34,7 +34,7 @@ use sp_block_builder::BlockBuilder; use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; use sp_consensus::SelectChain; use sp_consensus_babe::BabeApi; -use sp_keystore::SyncCryptoStorePtr; +use sp_keystore::KeystorePtr; use txpool_api::TransactionPool; /// A type representing all RPC extensions. @@ -47,7 +47,7 @@ pub struct BabeDeps { /// BABE pending epoch changes. pub shared_epoch_changes: sc_consensus_epochs::SharedEpochChanges, /// The keystore that manages the keys of the node. - pub keystore: SyncCryptoStorePtr, + pub keystore: KeystorePtr, } /// Dependencies for GRANDPA diff --git a/runtime/common/src/crowdloan/mod.rs b/runtime/common/src/crowdloan/mod.rs index 9f70ac3dd895..e8a2654044a2 100644 --- a/runtime/common/src/crowdloan/mod.rs +++ b/runtime/common/src/crowdloan/mod.rs @@ -874,7 +874,7 @@ mod tests { traits::{AuctionStatus, OnSwap}, }; use ::test_helpers::{dummy_head_data, dummy_validation_code}; - use sp_keystore::{testing::KeyStore, KeystoreExt}; + use sp_keystore::{testing::MemoryKeystore, KeystoreExt}; use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup, TrailingZeroInput}, @@ -1109,7 +1109,7 @@ mod tests { } .assimilate_storage(&mut t) .unwrap(); - let keystore = KeyStore::new(); + let keystore = MemoryKeystore::new(); let mut t: sp_io::TestExternalities = t.into(); t.register_extension(KeystoreExt(Arc::new(keystore))); t diff --git a/runtime/common/src/integration_tests.rs b/runtime/common/src/integration_tests.rs index 84efd48b3849..1a1971e6ae4e 100644 --- a/runtime/common/src/integration_tests.rs +++ b/runtime/common/src/integration_tests.rs @@ -37,7 +37,7 @@ use runtime_parachains::{ }; use sp_core::H256; use sp_io::TestExternalities; -use sp_keystore::{testing::KeyStore, KeystoreExt}; +use sp_keystore::{testing::MemoryKeystore, KeystoreExt}; use sp_runtime::{ traits::{BlakeTwo256, IdentityLookup, One}, transaction_validity::TransactionPriority, @@ -279,7 +279,7 @@ pub fn new_test_ext() -> TestExternalities { &mut t, ) .unwrap(); - let keystore = KeyStore::new(); + let keystore = MemoryKeystore::new(); let mut ext: sp_io::TestExternalities = t.into(); ext.register_extension(KeystoreExt(Arc::new(keystore))); ext.execute_with(|| System::set_block_number(1)); diff --git a/runtime/parachains/src/inclusion/tests.rs b/runtime/parachains/src/inclusion/tests.rs index 818058d460f8..423efc245e82 100644 --- a/runtime/parachains/src/inclusion/tests.rs +++ b/runtime/parachains/src/inclusion/tests.rs @@ -37,7 +37,7 @@ use primitives::{ PARACHAIN_KEY_TYPE_ID, }; use sc_keystore::LocalKeystore; -use sp_keystore::{SyncCryptoStore, SyncCryptoStorePtr}; +use sp_keystore::{Keystore, KeystorePtr}; use std::sync::Arc; use test_helpers::{ dummy_candidate_receipt, dummy_collator, dummy_collator_signature, dummy_hash, @@ -107,7 +107,7 @@ pub(crate) async fn back_candidate( candidate: CommittedCandidateReceipt, validators: &[Sr25519Keyring], group: &[ValidatorIndex], - keystore: &SyncCryptoStorePtr, + keystore: &KeystorePtr, signing_context: &SigningContext, kind: BackingKind, ) -> BackedCandidate { @@ -223,7 +223,7 @@ pub(crate) fn validator_pubkeys(val_ids: &[Sr25519Keyring]) -> Vec } pub(crate) async fn sign_bitfield( - keystore: &SyncCryptoStorePtr, + keystore: &KeystorePtr, key: &Sr25519Keyring, validator_index: ValidatorIndex, bitfield: AvailabilityBitfield, @@ -384,9 +384,9 @@ fn bitfield_checks() { Sr25519Keyring::Dave, Sr25519Keyring::Ferdie, ]; - let keystore: SyncCryptoStorePtr = Arc::new(LocalKeystore::in_memory()); + let keystore: KeystorePtr = Arc::new(LocalKeystore::in_memory()); for validator in validators.iter() { - SyncCryptoStore::sr25519_generate_new( + Keystore::sr25519_generate_new( &*keystore, PARACHAIN_KEY_TYPE_ID, Some(&validator.to_seed()), @@ -731,9 +731,9 @@ fn supermajority_bitfields_trigger_availability() { Sr25519Keyring::Dave, Sr25519Keyring::Ferdie, ]; - let keystore: SyncCryptoStorePtr = Arc::new(LocalKeystore::in_memory()); + let keystore: KeystorePtr = Arc::new(LocalKeystore::in_memory()); for validator in validators.iter() { - SyncCryptoStore::sr25519_generate_new( + Keystore::sr25519_generate_new( &*keystore, PARACHAIN_KEY_TYPE_ID, Some(&validator.to_seed()), @@ -923,9 +923,9 @@ fn candidate_checks() { Sr25519Keyring::Dave, Sr25519Keyring::Ferdie, ]; - let keystore: SyncCryptoStorePtr = Arc::new(LocalKeystore::in_memory()); + let keystore: KeystorePtr = Arc::new(LocalKeystore::in_memory()); for validator in validators.iter() { - SyncCryptoStore::sr25519_generate_new( + Keystore::sr25519_generate_new( &*keystore, PARACHAIN_KEY_TYPE_ID, Some(&validator.to_seed()), @@ -1470,9 +1470,9 @@ fn backing_works() { Sr25519Keyring::Dave, Sr25519Keyring::Ferdie, ]; - let keystore: SyncCryptoStorePtr = Arc::new(LocalKeystore::in_memory()); + let keystore: KeystorePtr = Arc::new(LocalKeystore::in_memory()); for validator in validators.iter() { - SyncCryptoStore::sr25519_generate_new( + Keystore::sr25519_generate_new( &*keystore, PARACHAIN_KEY_TYPE_ID, Some(&validator.to_seed()), @@ -1750,9 +1750,9 @@ fn can_include_candidate_with_ok_code_upgrade() { Sr25519Keyring::Dave, Sr25519Keyring::Ferdie, ]; - let keystore: SyncCryptoStorePtr = Arc::new(LocalKeystore::in_memory()); + let keystore: KeystorePtr = Arc::new(LocalKeystore::in_memory()); for validator in validators.iter() { - SyncCryptoStore::sr25519_generate_new( + Keystore::sr25519_generate_new( &*keystore, PARACHAIN_KEY_TYPE_ID, Some(&validator.to_seed()), @@ -1859,9 +1859,9 @@ fn session_change_wipes() { Sr25519Keyring::Dave, Sr25519Keyring::Ferdie, ]; - let keystore: SyncCryptoStorePtr = Arc::new(LocalKeystore::in_memory()); + let keystore: KeystorePtr = Arc::new(LocalKeystore::in_memory()); for validator in validators.iter() { - SyncCryptoStore::sr25519_generate_new( + Keystore::sr25519_generate_new( &*keystore, PARACHAIN_KEY_TYPE_ID, Some(&validator.to_seed()), diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index 501e8b1a3079..ee7a79c17d27 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -427,7 +427,7 @@ impl inclusion::RewardValidators for TestRewardValidators { /// Create a new set of test externalities. pub fn new_test_ext(state: MockGenesisConfig) -> TestExternalities { - use sp_keystore::{testing::KeyStore, KeystoreExt, SyncCryptoStorePtr}; + use sp_keystore::{testing::MemoryKeystore, KeystoreExt, KeystorePtr}; use sp_std::sync::Arc; sp_tracing::try_init_simple(); @@ -440,7 +440,7 @@ pub fn new_test_ext(state: MockGenesisConfig) -> TestExternalities { GenesisBuild::::assimilate_storage(&state.paras, &mut t).unwrap(); let mut ext: TestExternalities = t.into(); - ext.register_extension(KeystoreExt(Arc::new(KeyStore::new()) as SyncCryptoStorePtr)); + ext.register_extension(KeystoreExt(Arc::new(MemoryKeystore::new()) as KeystorePtr)); ext } diff --git a/runtime/parachains/src/paras/tests.rs b/runtime/parachains/src/paras/tests.rs index 89acfc9bc9b9..567829b9aeff 100644 --- a/runtime/parachains/src/paras/tests.rs +++ b/runtime/parachains/src/paras/tests.rs @@ -19,7 +19,7 @@ use frame_support::{assert_err, assert_ok, assert_storage_noop}; use keyring::Sr25519Keyring; use primitives::{BlockNumber, ValidatorId, PARACHAIN_KEY_TYPE_ID}; use sc_keystore::LocalKeystore; -use sp_keystore::{SyncCryptoStore, SyncCryptoStorePtr}; +use sp_keystore::{Keystore, KeystorePtr}; use std::sync::Arc; use test_helpers::{dummy_head_data, dummy_validation_code}; @@ -56,9 +56,9 @@ fn sign_and_include_pvf_check_statement(stmt: PvfCheckStatement) { } fn run_to_block(to: BlockNumber, new_session: Option>) { - let keystore: SyncCryptoStorePtr = Arc::new(LocalKeystore::in_memory()); + let keystore: KeystorePtr = Arc::new(LocalKeystore::in_memory()); for validator in VALIDATORS.iter() { - SyncCryptoStore::sr25519_generate_new( + Keystore::sr25519_generate_new( &*keystore, PARACHAIN_KEY_TYPE_ID, Some(&validator.to_seed()), diff --git a/runtime/parachains/src/paras_inherent/tests.rs b/runtime/parachains/src/paras_inherent/tests.rs index fb7fd571b004..a641e600ff02 100644 --- a/runtime/parachains/src/paras_inherent/tests.rs +++ b/runtime/parachains/src/paras_inherent/tests.rs @@ -887,7 +887,7 @@ mod sanitizers { use keyring::Sr25519Keyring; use primitives::PARACHAIN_KEY_TYPE_ID; use sc_keystore::LocalKeystore; - use sp_keystore::{SyncCryptoStore, SyncCryptoStorePtr}; + use sp_keystore::{Keystore, KeystorePtr}; use std::sync::Arc; fn validator_pubkeys(val_ids: &[keyring::Sr25519Keyring]) -> Vec { @@ -903,7 +903,7 @@ mod sanitizers { let session_index = SessionIndex::from(0_u32); let crypto_store = LocalKeystore::in_memory(); - let crypto_store = Arc::new(crypto_store) as SyncCryptoStorePtr; + let crypto_store = Arc::new(crypto_store) as KeystorePtr; let signing_context = SigningContext { parent_hash, session_index }; let validators = vec![ @@ -913,7 +913,7 @@ mod sanitizers { keyring::Sr25519Keyring::Dave, ]; for validator in validators.iter() { - SyncCryptoStore::sr25519_generate_new( + Keystore::sr25519_generate_new( &*crypto_store, PARACHAIN_KEY_TYPE_ID, Some(&validator.to_seed()), @@ -1142,7 +1142,7 @@ mod sanitizers { let session_index = SessionIndex::from(0_u32); let keystore = LocalKeystore::in_memory(); - let keystore = Arc::new(keystore) as SyncCryptoStorePtr; + let keystore = Arc::new(keystore) as KeystorePtr; let signing_context = SigningContext { parent_hash: relay_parent, session_index }; let validators = vec![ @@ -1152,7 +1152,7 @@ mod sanitizers { keyring::Sr25519Keyring::Dave, ]; for validator in validators.iter() { - SyncCryptoStore::sr25519_generate_new( + Keystore::sr25519_generate_new( &*keystore, PARACHAIN_KEY_TYPE_ID, Some(&validator.to_seed()), From 75ba17d20540ab3a5b6effb9d2db1995141e56ce Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Thu, 16 Mar 2023 11:10:38 +0100 Subject: [PATCH 2/8] Fixed missing renaming --- node/core/approval-voting/src/criteria.rs | 7 ++----- node/core/approval-voting/src/tests.rs | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/node/core/approval-voting/src/criteria.rs b/node/core/approval-voting/src/criteria.rs index 6707fc5672aa..4dcdabf8b6af 100644 --- a/node/core/approval-voting/src/criteria.rs +++ b/node/core/approval-voting/src/criteria.rs @@ -557,17 +557,14 @@ mod tests { use sp_application_crypto::sr25519; use sp_core::crypto::Pair as PairT; use sp_keyring::sr25519::Keyring as Sr25519Keyring; - use sp_keystore::CryptoStore; + use sp_keystore::Keystore; // sets up a keystore with the given keyring accounts. async fn make_keystore(accounts: &[Sr25519Keyring]) -> LocalKeystore { let store = LocalKeystore::in_memory(); for s in accounts.iter().copied().map(|k| k.to_seed()) { - store - .sr25519_generate_new(ASSIGNMENT_KEY_TYPE_ID, Some(s.as_str())) - .await - .unwrap(); + store.sr25519_generate_new(ASSIGNMENT_KEY_TYPE_ID, Some(s.as_str())).unwrap(); } store diff --git a/node/core/approval-voting/src/tests.rs b/node/core/approval-voting/src/tests.rs index 396d945de6b2..8aaaecc8362d 100644 --- a/node/core/approval-voting/src/tests.rs +++ b/node/core/approval-voting/src/tests.rs @@ -43,7 +43,7 @@ use assert_matches::assert_matches; use async_trait::async_trait; use parking_lot::Mutex; use sp_keyring::sr25519::Keyring as Sr25519Keyring; -use sp_keystore::CryptoStore; +use sp_keystore::Keystore; use std::{ pin::Pin, sync::{ From 3ab8bd84808893b6405ec7db32857c94a397ffb2 Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Thu, 16 Mar 2023 11:32:10 +0100 Subject: [PATCH 3/8] make_keystore can be sync --- node/core/approval-voting/src/criteria.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/node/core/approval-voting/src/criteria.rs b/node/core/approval-voting/src/criteria.rs index 4dcdabf8b6af..3b76941fde40 100644 --- a/node/core/approval-voting/src/criteria.rs +++ b/node/core/approval-voting/src/criteria.rs @@ -560,7 +560,7 @@ mod tests { use sp_keystore::Keystore; // sets up a keystore with the given keyring accounts. - async fn make_keystore(accounts: &[Sr25519Keyring]) -> LocalKeystore { + fn make_keystore(accounts: &[Sr25519Keyring]) -> LocalKeystore { let store = LocalKeystore::in_memory(); for s in accounts.iter().copied().map(|k| k.to_seed()) { @@ -617,7 +617,7 @@ mod tests { #[test] fn assignments_produced_for_non_backing() { - let keystore = futures::executor::block_on(make_keystore(&[Sr25519Keyring::Alice])); + let keystore = make_keystore(&[Sr25519Keyring::Alice]); let c_a = CandidateHash(Hash::repeat_byte(0)); let c_b = CandidateHash(Hash::repeat_byte(1)); @@ -652,7 +652,7 @@ mod tests { #[test] fn assign_to_nonzero_core() { - let keystore = futures::executor::block_on(make_keystore(&[Sr25519Keyring::Alice])); + let keystore = make_keystore(&[Sr25519Keyring::Alice]); let c_a = CandidateHash(Hash::repeat_byte(0)); let c_b = CandidateHash(Hash::repeat_byte(1)); @@ -685,7 +685,7 @@ mod tests { #[test] fn succeeds_empty_for_0_cores() { - let keystore = futures::executor::block_on(make_keystore(&[Sr25519Keyring::Alice])); + let keystore = make_keystore(&[Sr25519Keyring::Alice]); let relay_vrf_story = RelayVRFStory([42u8; 32]); let assignments = compute_assignments( @@ -725,7 +725,7 @@ mod tests { rotation_offset: usize, f: impl Fn(&mut MutatedAssignment) -> Option, // None = skip ) { - let keystore = futures::executor::block_on(make_keystore(&[Sr25519Keyring::Alice])); + let keystore = make_keystore(&[Sr25519Keyring::Alice]); let group_for_core = |i| GroupIndex(((i + rotation_offset) % n_cores) as _); From 4c5b190df3babd99b79c4a81f186aee2267507b8 Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Thu, 16 Mar 2023 13:32:39 +0100 Subject: [PATCH 4/8] More fixes --- node/core/dispute-coordinator/src/tests.rs | 2 -- .../dispute-distribution/src/tests/mock.rs | 11 +++---- .../dispute-distribution/src/tests/mod.rs | 30 +++++++++---------- .../statement-distribution/src/tests.rs | 7 ----- node/subsystem-util/src/lib.rs | 4 +-- 5 files changed, 21 insertions(+), 33 deletions(-) diff --git a/node/core/dispute-coordinator/src/tests.rs b/node/core/dispute-coordinator/src/tests.rs index 00dcfe37aaa8..5504fc7228f1 100644 --- a/node/core/dispute-coordinator/src/tests.rs +++ b/node/core/dispute-coordinator/src/tests.rs @@ -523,7 +523,6 @@ impl TestState { let keystore = self.master_keystore.clone() as KeystorePtr; SignedDisputeStatement::sign_explicit(&keystore, valid, candidate_hash, session, public) - .await .unwrap() .unwrap() } @@ -546,7 +545,6 @@ impl TestState { index, &validator_id, ) - .await .unwrap() .unwrap() .into_unchecked(); diff --git a/node/network/dispute-distribution/src/tests/mock.rs b/node/network/dispute-distribution/src/tests/mock.rs index 08b5a28acaa7..52d3e213ac05 100644 --- a/node/network/dispute-distribution/src/tests/mock.rs +++ b/node/network/dispute-distribution/src/tests/mock.rs @@ -126,7 +126,7 @@ pub fn make_candidate_receipt(relay_parent: Hash) -> CandidateReceipt { } } -pub async fn make_explicit_signed( +pub fn make_explicit_signed( validator: Sr25519Keyring, candidate_hash: CandidateHash, valid: bool, @@ -142,12 +142,11 @@ pub async fn make_explicit_signed( MOCK_SESSION_INDEX, validator.public().into(), ) - .await .expect("Keystore should be fine.") .expect("Signing should work.") } -pub async fn make_dispute_message( +pub fn make_dispute_message( candidate: CandidateReceipt, valid_validator: ValidatorIndex, invalid_validator: ValidatorIndex, @@ -155,16 +154,14 @@ pub async fn make_dispute_message( let candidate_hash = candidate.hash(); let before_request = Instant::now(); let valid_vote = - make_explicit_signed(MOCK_VALIDATORS[valid_validator.0 as usize], candidate_hash, true) - .await; + make_explicit_signed(MOCK_VALIDATORS[valid_validator.0 as usize], candidate_hash, true); gum::trace!( "Passed time for valid vote: {:#?}", Instant::now().saturating_duration_since(before_request) ); let before_request = Instant::now(); let invalid_vote = - make_explicit_signed(MOCK_VALIDATORS[invalid_validator.0 as usize], candidate_hash, false) - .await; + make_explicit_signed(MOCK_VALIDATORS[invalid_validator.0 as usize], candidate_hash, false); gum::trace!( "Passed time for invald vote: {:#?}", Instant::now().saturating_duration_since(before_request) diff --git a/node/network/dispute-distribution/src/tests/mod.rs b/node/network/dispute-distribution/src/tests/mod.rs index ca5f49f4a394..0b14afea2a30 100644 --- a/node/network/dispute-distribution/src/tests/mod.rs +++ b/node/network/dispute-distribution/src/tests/mod.rs @@ -123,7 +123,7 @@ async fn send_dispute( needs_session_info: bool, ) { let before_request = Instant::now(); - let message = make_dispute_message(candidate.clone(), ALICE_INDEX, FERDIE_INDEX).await; + let message = make_dispute_message(candidate.clone(), ALICE_INDEX, FERDIE_INDEX); gum::trace!( "Passed time for making message: {:#?}", Instant::now().saturating_duration_since(before_request) @@ -190,7 +190,7 @@ fn received_non_authorities_are_dropped() { let relay_parent = Hash::random(); let candidate = make_candidate_receipt(relay_parent); - let message = make_dispute_message(candidate.clone(), ALICE_INDEX, FERDIE_INDEX).await; + let message = make_dispute_message(candidate.clone(), ALICE_INDEX, FERDIE_INDEX); // Non validator request should get dropped: let rx_response = @@ -222,7 +222,7 @@ fn received_request_triggers_import() { let relay_parent = Hash::random(); let candidate = make_candidate_receipt(relay_parent); - let message = make_dispute_message(candidate.clone(), ALICE_INDEX, FERDIE_INDEX).await; + let message = make_dispute_message(candidate.clone(), ALICE_INDEX, FERDIE_INDEX); nested_network_dispute_request( &mut handle, @@ -250,7 +250,7 @@ fn batching_works() { let relay_parent = Hash::random(); let candidate = make_candidate_receipt(relay_parent); - let message = make_dispute_message(candidate.clone(), ALICE_INDEX, FERDIE_INDEX).await; + let message = make_dispute_message(candidate.clone(), ALICE_INDEX, FERDIE_INDEX); // Initial request should get forwarded immediately: nested_network_dispute_request( @@ -266,27 +266,27 @@ fn batching_works() { let mut rx_responses = Vec::new(); - let message = make_dispute_message(candidate.clone(), BOB_INDEX, FERDIE_INDEX).await; + let message = make_dispute_message(candidate.clone(), BOB_INDEX, FERDIE_INDEX); let peer = MOCK_AUTHORITY_DISCOVERY.get_peer_id_by_authority(Sr25519Keyring::Bob); rx_responses.push(send_network_dispute_request(req_tx, peer, message.clone().into()).await); - let message = make_dispute_message(candidate.clone(), CHARLIE_INDEX, FERDIE_INDEX).await; + let message = make_dispute_message(candidate.clone(), CHARLIE_INDEX, FERDIE_INDEX); let peer = MOCK_AUTHORITY_DISCOVERY.get_peer_id_by_authority(Sr25519Keyring::Charlie); rx_responses.push(send_network_dispute_request(req_tx, peer, message.clone().into()).await); gum::trace!("Imported 3 votes into batch"); - Delay::new(BATCH_COLLECTING_INTERVAL).await; + Delay::new(BATCH_COLLECTING_INTERVAL); gum::trace!("Batch should still be alive"); // Batch should still be alive (2 new votes): // Let's import two more votes, but fully duplicates - should not extend batch live. gum::trace!("Importing duplicate votes"); let mut rx_responses_duplicate = Vec::new(); - let message = make_dispute_message(candidate.clone(), BOB_INDEX, FERDIE_INDEX).await; + let message = make_dispute_message(candidate.clone(), BOB_INDEX, FERDIE_INDEX); let peer = MOCK_AUTHORITY_DISCOVERY.get_peer_id_by_authority(Sr25519Keyring::Bob); rx_responses_duplicate .push(send_network_dispute_request(req_tx, peer, message.clone().into()).await); - let message = make_dispute_message(candidate.clone(), CHARLIE_INDEX, FERDIE_INDEX).await; + let message = make_dispute_message(candidate.clone(), CHARLIE_INDEX, FERDIE_INDEX); let peer = MOCK_AUTHORITY_DISCOVERY.get_peer_id_by_authority(Sr25519Keyring::Charlie); rx_responses_duplicate .push(send_network_dispute_request(req_tx, peer, message.clone().into()).await); @@ -375,7 +375,7 @@ fn receive_rate_limit_is_enforced() { let relay_parent = Hash::random(); let candidate = make_candidate_receipt(relay_parent); - let message = make_dispute_message(candidate.clone(), ALICE_INDEX, FERDIE_INDEX).await; + let message = make_dispute_message(candidate.clone(), ALICE_INDEX, FERDIE_INDEX); // Initial request should get forwarded immediately: nested_network_dispute_request( @@ -393,15 +393,15 @@ fn receive_rate_limit_is_enforced() { let peer = MOCK_AUTHORITY_DISCOVERY.get_peer_id_by_authority(Sr25519Keyring::Bob); - let message = make_dispute_message(candidate.clone(), BOB_INDEX, FERDIE_INDEX).await; + let message = make_dispute_message(candidate.clone(), BOB_INDEX, FERDIE_INDEX); rx_responses.push(send_network_dispute_request(req_tx, peer, message.clone().into()).await); - let message = make_dispute_message(candidate.clone(), CHARLIE_INDEX, FERDIE_INDEX).await; + let message = make_dispute_message(candidate.clone(), CHARLIE_INDEX, FERDIE_INDEX); rx_responses.push(send_network_dispute_request(req_tx, peer, message.clone().into()).await); gum::trace!("Import one too much:"); - let message = make_dispute_message(candidate.clone(), CHARLIE_INDEX, ALICE_INDEX).await; + let message = make_dispute_message(candidate.clone(), CHARLIE_INDEX, ALICE_INDEX); let rx_response_flood = send_network_dispute_request(req_tx, peer, message.clone().into()).await; @@ -486,7 +486,7 @@ fn send_dispute_gets_cleaned_up() { let relay_parent = Hash::random(); let candidate = make_candidate_receipt(relay_parent); - let message = make_dispute_message(candidate.clone(), ALICE_INDEX, FERDIE_INDEX).await; + let message = make_dispute_message(candidate.clone(), ALICE_INDEX, FERDIE_INDEX); handle .send(FromOrchestra::Communication { msg: DisputeDistributionMessage::SendDispute(message.clone()), @@ -552,7 +552,7 @@ fn dispute_retries_and_works_across_session_boundaries() { let relay_parent = Hash::random(); let candidate = make_candidate_receipt(relay_parent); - let message = make_dispute_message(candidate.clone(), ALICE_INDEX, FERDIE_INDEX).await; + let message = make_dispute_message(candidate.clone(), ALICE_INDEX, FERDIE_INDEX); handle .send(FromOrchestra::Communication { msg: DisputeDistributionMessage::SendDispute(message.clone()), diff --git a/node/network/statement-distribution/src/tests.rs b/node/network/statement-distribution/src/tests.rs index 5945aca1358f..107d59d6582d 100644 --- a/node/network/statement-distribution/src/tests.rs +++ b/node/network/statement-distribution/src/tests.rs @@ -1636,7 +1636,6 @@ fn share_prioritizes_backing_group() { ValidatorIndex(4), &ferdie_public.into(), ) - .await .ok() .flatten() .expect("should be signed") @@ -1818,7 +1817,6 @@ fn peer_cant_flood_with_large_statements() { ValidatorId::ID, Some(&Sr25519Keyring::Alice.to_seed()), ) - .await .unwrap(); SignedFullStatement::sign( @@ -1828,7 +1826,6 @@ fn peer_cant_flood_with_large_statements() { ValidatorIndex(0), &alice_public.into(), ) - .await .ok() .flatten() .expect("should be signed") @@ -2107,7 +2104,6 @@ fn handle_multiple_seconded_statements() { ValidatorId::ID, Some(&Sr25519Keyring::Alice.to_seed()), ) - .await .unwrap(); SignedFullStatement::sign( @@ -2117,7 +2113,6 @@ fn handle_multiple_seconded_statements() { ValidatorIndex(0), &alice_public.into(), ) - .await .ok() .flatten() .expect("should be signed") @@ -2210,7 +2205,6 @@ fn handle_multiple_seconded_statements() { ValidatorId::ID, Some(&Sr25519Keyring::Alice.to_seed()), ) - .await .unwrap(); SignedFullStatement::sign( @@ -2220,7 +2214,6 @@ fn handle_multiple_seconded_statements() { ValidatorIndex(0), &alice_public.into(), ) - .await .ok() .flatten() .expect("should be signed") diff --git a/node/subsystem-util/src/lib.rs b/node/subsystem-util/src/lib.rs index 13dce3060014..d58dbfea822d 100644 --- a/node/subsystem-util/src/lib.rs +++ b/node/subsystem-util/src/lib.rs @@ -384,13 +384,13 @@ impl Validator { let validators = validators?; - Self::construct(&validators, signing_context, keystore).await + Self::construct(&validators, signing_context, keystore) } /// Construct a validator instance without performing runtime fetches. /// /// This can be useful if external code also needs the same data. - pub async fn construct( + pub fn construct( validators: &[ValidatorId], signing_context: SigningContext, keystore: KeystorePtr, From 509e6abed781155c05bcc9b327779b765cc01c88 Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Thu, 16 Mar 2023 17:28:21 +0100 Subject: [PATCH 5/8] Trivial nitpicks --- node/core/approval-voting/src/tests.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/node/core/approval-voting/src/tests.rs b/node/core/approval-voting/src/tests.rs index 8aaaecc8362d..0ca306ad835a 100644 --- a/node/core/approval-voting/src/tests.rs +++ b/node/core/approval-voting/src/tests.rs @@ -2311,12 +2311,8 @@ fn subsystem_validate_approvals_cache() { let store = config.backend(); test_harness(config, |test_harness| async move { - let TestHarness { - mut virtual_overseer, - clock, - sync_oracle_handle: _sync_oracle_handle, - .. - } = test_harness; + let TestHarness { mut virtual_overseer, clock, sync_oracle_handle: _sync_oracle_handle } = + test_harness; assert_matches!( overseer_recv(&mut virtual_overseer).await, @@ -2398,7 +2394,7 @@ fn subsystem_validate_approvals_cache() { } /// Ensure that when two assignments are imported, only one triggers the Approval Checking work -pub async fn handle_double_assignment_import( +async fn handle_double_assignment_import( virtual_overseer: &mut VirtualOverseer, candidate_index: CandidateIndex, ) { From f663d6c64edf9b968cfa7d71c2e49261f65ecae0 Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Fri, 17 Mar 2023 08:33:50 +0100 Subject: [PATCH 6/8] Cherry pick test fix from master --- node/core/approval-voting/src/tests.rs | 45 +++++++++++++++----------- 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/node/core/approval-voting/src/tests.rs b/node/core/approval-voting/src/tests.rs index 0ca306ad835a..3f5297e602cf 100644 --- a/node/core/approval-voting/src/tests.rs +++ b/node/core/approval-voting/src/tests.rs @@ -65,6 +65,8 @@ use ::test_helpers::{dummy_candidate_receipt, dummy_candidate_receipt_bad_sig}; const SLOT_DURATION_MILLIS: u64 = 5000; +const TIMEOUT: Duration = Duration::from_millis(2000); + #[derive(Clone)] struct TestSyncOracle { flag: Arc, @@ -546,7 +548,6 @@ async fn overseer_recv_with_timeout( overseer.recv().timeout(timeout).await } -const TIMEOUT: Duration = Duration::from_millis(2000); async fn overseer_signal(overseer: &mut VirtualOverseer, signal: OverseerSignal) { overseer .send(FromOrchestra::Signal(signal)) @@ -2411,25 +2412,33 @@ async fn handle_double_assignment_import( recover_available_data(virtual_overseer).await; fetch_validation_code(virtual_overseer).await; - let first_message = virtual_overseer.recv().await; - let second_message = virtual_overseer.recv().await; + assert_matches!( + overseer_recv(virtual_overseer).await, + AllMessages::ApprovalDistribution(ApprovalDistributionMessage::DistributeAssignment( + _, + c_index + )) => { + assert_eq!(candidate_index, c_index); + } + ); - for msg in vec![first_message, second_message].into_iter() { - match msg { - AllMessages::ApprovalDistribution( - ApprovalDistributionMessage::DistributeAssignment(_, c_index), - ) => { - assert_eq!(candidate_index, c_index); - }, - AllMessages::CandidateValidation( - CandidateValidationMessage::ValidateFromExhaustive(_, _, _, _, timeout, tx), - ) if timeout == PvfExecTimeoutKind::Approval => { - tx.send(Ok(ValidationResult::Valid(Default::default(), Default::default()))) - .unwrap(); - }, - _ => panic! {}, + assert_matches!( + overseer_recv(virtual_overseer).await, + AllMessages::CandidateValidation(CandidateValidationMessage::ValidateFromExhaustive(_, _, _, _, timeout, tx)) if timeout == PvfExecTimeoutKind::Approval => { + tx.send(Ok(ValidationResult::Valid(Default::default(), Default::default()))) + .unwrap(); } - } + ); + + assert_matches!( + overseer_recv(virtual_overseer).await, + AllMessages::ApprovalDistribution(ApprovalDistributionMessage::DistributeApproval(_)) + ); + + assert_matches!( + overseer_recv(virtual_overseer).await, + AllMessages::ApprovalDistribution(ApprovalDistributionMessage::DistributeApproval(_)) + ); // Assert that there are no more messages being sent by the subsystem assert!(overseer_recv(virtual_overseer).timeout(TIMEOUT / 2).await.is_none()); From 055511beccee68628f4033c04ec943aa696ad465 Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Fri, 17 Mar 2023 09:47:12 +0100 Subject: [PATCH 7/8] Fixes after master merge --- node/core/backing/src/lib.rs | 2 +- node/service/src/lib.rs | 9 +- runtime/parachains/src/inclusion/tests.rs | 115 +++++++++--------- .../parachains/src/paras_inherent/tests.rs | 9 +- 4 files changed, 65 insertions(+), 70 deletions(-) diff --git a/node/core/backing/src/lib.rs b/node/core/backing/src/lib.rs index 09e7f045f410..32a6bb79037b 100644 --- a/node/core/backing/src/lib.rs +++ b/node/core/backing/src/lib.rs @@ -323,7 +323,7 @@ async fn handle_active_leaves_update( let signing_context = SigningContext { parent_hash: parent, session_index }; let validator = - match Validator::construct(&validators, signing_context.clone(), keystore.clone()).await { + match Validator::construct(&validators, signing_context.clone(), keystore.clone()) { Ok(v) => Some(v), Err(util::Error::NotAValidator) => None, Err(e) => { diff --git a/node/service/src/lib.rs b/node/service/src/lib.rs index 14f3c6ba1197..28284031234c 100644 --- a/node/service/src/lib.rs +++ b/node/service/src/lib.rs @@ -560,7 +560,7 @@ where let rpc_extensions_builder = { let client = client.clone(); - let keystore = keystore_container.sync_keystore(); + let keystore = keystore_container.keystore(); let transaction_pool = transaction_pool.clone(); let select_chain = select_chain.clone(); let chain_spec = config.chain_spec.cloned_box(); @@ -924,7 +924,7 @@ where config, backend: backend.clone(), client: client.clone(), - keystore: keystore_container.sync_keystore(), + keystore: keystore_container.keystore(), network: network.clone(), sync_service: sync_service.clone(), rpc_builder: Box::new(rpc_extensions_builder), @@ -1091,7 +1091,7 @@ where overseer_handle.as_ref().ok_or(Error::AuthoritiesRequireRealOverseer)?.clone(); let slot_duration = babe_link.config().slot_duration(); let babe_config = babe::BabeParams { - keystore: keystore_container.sync_keystore(), + keystore: keystore_container.keystore(), client: client.clone(), select_chain, block_import, @@ -1135,8 +1135,7 @@ where // if the node isn't actively participating in consensus then it doesn't // need a keystore, regardless of which protocol we use below. - let keystore_opt = - if role.is_authority() { Some(keystore_container.sync_keystore()) } else { None }; + let keystore_opt = if role.is_authority() { Some(keystore_container.keystore()) } else { None }; if enable_beefy { let justifications_protocol_name = beefy_on_demand_justifications_handler.protocol_name(); diff --git a/runtime/parachains/src/inclusion/tests.rs b/runtime/parachains/src/inclusion/tests.rs index 423efc245e82..17ef7f7beac7 100644 --- a/runtime/parachains/src/inclusion/tests.rs +++ b/runtime/parachains/src/inclusion/tests.rs @@ -28,7 +28,6 @@ use crate::{ }; use assert_matches::assert_matches; use frame_support::assert_noop; -use futures::executor::block_on; use keyring::Sr25519Keyring; use primitives::{ BlockNumber, CandidateCommitments, CandidateDescriptor, CollatorId, @@ -103,7 +102,7 @@ pub(crate) fn collator_sign_candidate( assert!(candidate.descriptor().check_collator_signature().is_ok()); } -pub(crate) async fn back_candidate( +pub(crate) fn back_candidate( candidate: CommittedCandidateReceipt, validators: &[Sr25519Keyring], group: &[ValidatorIndex], @@ -134,7 +133,6 @@ pub(crate) async fn back_candidate( *val_idx, &key.public().into(), ) - .await .unwrap() .unwrap() .signature() @@ -222,7 +220,7 @@ pub(crate) fn validator_pubkeys(val_ids: &[Sr25519Keyring]) -> Vec val_ids.iter().map(|v| v.public().into()).collect() } -pub(crate) async fn sign_bitfield( +pub(crate) fn sign_bitfield( keystore: &KeystorePtr, key: &Sr25519Keyring, validator_index: ValidatorIndex, @@ -236,7 +234,6 @@ pub(crate) async fn sign_bitfield( validator_index, &key.public().into(), ) - .await .unwrap() .unwrap() } @@ -434,13 +431,13 @@ fn bitfield_checks() { { let mut bare_bitfield = default_bitfield(); bare_bitfield.0.push(false); - let signed = block_on(sign_bitfield( + let signed = sign_bitfield( &keystore, &validators[0], ValidatorIndex(0), bare_bitfield, &signing_context, - )); + ); assert_matches!( ParaInclusion::process_bitfields( @@ -457,13 +454,13 @@ fn bitfield_checks() { // not enough bits { let bare_bitfield = default_bitfield(); - let signed = block_on(sign_bitfield( + let signed = sign_bitfield( &keystore, &validators[0], ValidatorIndex(0), bare_bitfield, &signing_context, - )); + ); assert_matches!( ParaInclusion::process_bitfields( @@ -485,13 +482,13 @@ fn bitfield_checks() { b.0.set(0, true); b }; - let signed: UncheckedSignedAvailabilityBitfield = block_on(sign_bitfield( + let signed: UncheckedSignedAvailabilityBitfield = sign_bitfield( &keystore, &validators[0], ValidatorIndex(0), back_core_0_bitfield, &signing_context, - )) + ) .into(); assert_eq!( @@ -536,22 +533,22 @@ fn bitfield_checks() { b.0.set(0, true); b }; - let signed_0 = block_on(sign_bitfield( + let signed_0 = sign_bitfield( &keystore, &validators[0], ValidatorIndex(0), back_core_0_bitfield.clone(), &signing_context, - )) + ) .into(); - let signed_1 = block_on(sign_bitfield( + let signed_1 = sign_bitfield( &keystore, &validators[1], ValidatorIndex(1), back_core_0_bitfield, &signing_context, - )) + ) .into(); assert_eq!( @@ -591,13 +588,13 @@ fn bitfield_checks() { { let mut bare_bitfield = default_bitfield(); *bare_bitfield.0.get_mut(0).unwrap() = true; - let signed = block_on(sign_bitfield( + let signed = sign_bitfield( &keystore, &validators[0], ValidatorIndex(0), bare_bitfield, &signing_context, - )); + ); assert_matches!(ParaInclusion::process_bitfields( expected_bits(), @@ -611,13 +608,13 @@ fn bitfield_checks() { // empty bitfield signed: always ok, but kind of useless. { let bare_bitfield = default_bitfield(); - let signed = block_on(sign_bitfield( + let signed = sign_bitfield( &keystore, &validators[0], ValidatorIndex(0), bare_bitfield, &signing_context, - )); + ); assert_matches!(ParaInclusion::process_bitfields( expected_bits(), @@ -651,13 +648,13 @@ fn bitfield_checks() { PendingAvailabilityCommitments::::insert(chain_a, default_candidate.commitments); *bare_bitfield.0.get_mut(0).unwrap() = true; - let signed = block_on(sign_bitfield( + let signed = sign_bitfield( &keystore, &validators[0], ValidatorIndex(0), bare_bitfield, &signing_context, - )); + ); assert_matches!(ParaInclusion::process_bitfields( expected_bits(), @@ -693,13 +690,13 @@ fn bitfield_checks() { ); *bare_bitfield.0.get_mut(0).unwrap() = true; - let signed = block_on(sign_bitfield( + let signed = sign_bitfield( &keystore, &validators[0], ValidatorIndex(0), bare_bitfield, &signing_context, - )); + ); // no core is freed assert_matches!(ParaInclusion::process_bitfields( @@ -836,13 +833,13 @@ fn supermajority_bitfields_trigger_availability() { }; Some( - block_on(sign_bitfield( + sign_bitfield( &keystore, key, ValidatorIndex(i as _), to_sign, &signing_context, - )) + ) .into(), ) }) @@ -989,14 +986,14 @@ fn candidate_checks() { .build(); collator_sign_candidate(Sr25519Keyring::One, &mut candidate); - let backed = block_on(back_candidate( + let backed = back_candidate( candidate, &validators, group_validators(GroupIndex::from(0)).unwrap().as_ref(), &keystore, &signing_context, BackingKind::Threshold, - )); + ); assert_noop!( ParaInclusion::process_candidates( @@ -1034,23 +1031,23 @@ fn candidate_checks() { collator_sign_candidate(Sr25519Keyring::Two, &mut candidate_b); - let backed_a = block_on(back_candidate( + let backed_a = back_candidate( candidate_a, &validators, group_validators(GroupIndex::from(0)).unwrap().as_ref(), &keystore, &signing_context, BackingKind::Threshold, - )); + ); - let backed_b = block_on(back_candidate( + let backed_b = back_candidate( candidate_b, &validators, group_validators(GroupIndex::from(1)).unwrap().as_ref(), &keystore, &signing_context, BackingKind::Threshold, - )); + ); // out-of-order manifests as unscheduled. assert_noop!( @@ -1077,14 +1074,14 @@ fn candidate_checks() { .build(); collator_sign_candidate(Sr25519Keyring::One, &mut candidate); - let backed = block_on(back_candidate( + let backed = back_candidate( candidate, &validators, group_validators(GroupIndex::from(0)).unwrap().as_ref(), &keystore, &signing_context, BackingKind::Lacking, - )); + ); assert_noop!( ParaInclusion::process_candidates( @@ -1112,14 +1109,14 @@ fn candidate_checks() { .build(); collator_sign_candidate(Sr25519Keyring::One, &mut candidate); - let backed = block_on(back_candidate( + let backed = back_candidate( candidate, &validators, group_validators(GroupIndex::from(0)).unwrap().as_ref(), &keystore, &signing_context, BackingKind::Threshold, - )); + ); assert_noop!( ParaInclusion::process_candidates( @@ -1147,14 +1144,14 @@ fn candidate_checks() { assert!(CollatorId::from(Sr25519Keyring::One.public()) != thread_collator); collator_sign_candidate(Sr25519Keyring::One, &mut candidate); - let backed = block_on(back_candidate( + let backed = back_candidate( candidate, &validators, group_validators(GroupIndex::from(2)).unwrap().as_ref(), &keystore, &signing_context, BackingKind::Threshold, - )); + ); assert_noop!( ParaInclusion::process_candidates( @@ -1189,14 +1186,14 @@ fn candidate_checks() { // change the candidate after signing. candidate.descriptor.pov_hash = Hash::repeat_byte(2); - let backed = block_on(back_candidate( + let backed = back_candidate( candidate, &validators, group_validators(GroupIndex::from(2)).unwrap().as_ref(), &keystore, &signing_context, BackingKind::Threshold, - )); + ); assert_noop!( ParaInclusion::process_candidates( @@ -1223,14 +1220,14 @@ fn candidate_checks() { collator_sign_candidate(Sr25519Keyring::One, &mut candidate); - let backed = block_on(back_candidate( + let backed = back_candidate( candidate, &validators, group_validators(GroupIndex::from(0)).unwrap().as_ref(), &keystore, &signing_context, BackingKind::Threshold, - )); + ); let candidate = TestCandidateBuilder::default().build(); >::insert( @@ -1279,14 +1276,14 @@ fn candidate_checks() { // this is not supposed to happen >::insert(&chain_a, candidate.commitments.clone()); - let backed = block_on(back_candidate( + let backed = back_candidate( candidate, &validators, group_validators(GroupIndex::from(0)).unwrap().as_ref(), &keystore, &signing_context, BackingKind::Threshold, - )); + ); assert_noop!( ParaInclusion::process_candidates( @@ -1316,14 +1313,14 @@ fn candidate_checks() { collator_sign_candidate(Sr25519Keyring::One, &mut candidate); - let backed = block_on(back_candidate( + let backed = back_candidate( candidate, &validators, group_validators(GroupIndex::from(0)).unwrap().as_ref(), &keystore, &signing_context, BackingKind::Threshold, - )); + ); { let cfg = Configuration::config(); @@ -1357,14 +1354,14 @@ fn candidate_checks() { collator_sign_candidate(Sr25519Keyring::One, &mut candidate); - let backed = block_on(back_candidate( + let backed = back_candidate( candidate, &validators, group_validators(GroupIndex::from(0)).unwrap().as_ref(), &keystore, &signing_context, BackingKind::Threshold, - )); + ); assert_eq!( ParaInclusion::process_candidates( @@ -1392,14 +1389,14 @@ fn candidate_checks() { collator_sign_candidate(Sr25519Keyring::One, &mut candidate); - let backed = block_on(back_candidate( + let backed = back_candidate( candidate, &validators, group_validators(GroupIndex::from(0)).unwrap().as_ref(), &keystore, &signing_context, BackingKind::Threshold, - )); + ); assert_noop!( ParaInclusion::process_candidates( @@ -1427,14 +1424,14 @@ fn candidate_checks() { collator_sign_candidate(Sr25519Keyring::One, &mut candidate); - let backed = block_on(back_candidate( + let backed = back_candidate( candidate, &validators, group_validators(GroupIndex::from(0)).unwrap().as_ref(), &keystore, &signing_context, BackingKind::Threshold, - )); + ); assert_noop!( ParaInclusion::process_candidates( @@ -1556,32 +1553,32 @@ fn backing_works() { .build(); collator_sign_candidate(Sr25519Keyring::Two, &mut candidate_c); - let backed_a = block_on(back_candidate( + let backed_a = back_candidate( candidate_a.clone(), &validators, group_validators(GroupIndex::from(0)).unwrap().as_ref(), &keystore, &signing_context, BackingKind::Threshold, - )); + ); - let backed_b = block_on(back_candidate( + let backed_b = back_candidate( candidate_b.clone(), &validators, group_validators(GroupIndex::from(1)).unwrap().as_ref(), &keystore, &signing_context, BackingKind::Threshold, - )); + ); - let backed_c = block_on(back_candidate( + let backed_c = back_candidate( candidate_c.clone(), &validators, group_validators(GroupIndex::from(2)).unwrap().as_ref(), &keystore, &signing_context, BackingKind::Threshold, - )); + ); let backed_candidates = vec![backed_a, backed_b, backed_c]; let get_backing_group_idx = { @@ -1797,14 +1794,14 @@ fn can_include_candidate_with_ok_code_upgrade() { .build(); collator_sign_candidate(Sr25519Keyring::One, &mut candidate_a); - let backed_a = block_on(back_candidate( + let backed_a = back_candidate( candidate_a.clone(), &validators, group_validators(GroupIndex::from(0)).unwrap().as_ref(), &keystore, &signing_context, BackingKind::Threshold, - )); + ); let ProcessedCandidates { core_indices: occupied_cores, .. } = ParaInclusion::process_candidates( diff --git a/runtime/parachains/src/paras_inherent/tests.rs b/runtime/parachains/src/paras_inherent/tests.rs index a641e600ff02..73c5ce7b0b3f 100644 --- a/runtime/parachains/src/paras_inherent/tests.rs +++ b/runtime/parachains/src/paras_inherent/tests.rs @@ -883,7 +883,6 @@ mod sanitizers { use sp_core::crypto::UncheckedFrom; use crate::mock::Test; - use futures::executor::block_on; use keyring::Sr25519Keyring; use primitives::PARACHAIN_KEY_TYPE_ID; use sc_keystore::LocalKeystore; @@ -935,13 +934,13 @@ mod sanitizers { .enumerate() .map(|(vi, ab)| { let validator_index = ValidatorIndex::from(vi as u32); - block_on(SignedAvailabilityBitfield::sign( + SignedAvailabilityBitfield::sign( &crypto_store, AvailabilityBitfield::from(ab.clone()), &signing_context, validator_index, &validator_public[vi], - )) + ) .unwrap() .unwrap() .into_unchecked() @@ -1202,14 +1201,14 @@ mod sanitizers { collator_sign_candidate(Sr25519Keyring::One, &mut candidate); - let backed = block_on(back_candidate( + let backed = back_candidate( candidate, &validators, group_validators(GroupIndex::from(idx0 as u32)).unwrap().as_ref(), &keystore, &signing_context, BackingKind::Threshold, - )); + ); backed }) .collect::>(); From 7b0e30d2c9f0dc65f414a37d743d8a61734f1df9 Mon Sep 17 00:00:00 2001 From: parity-processbot <> Date: Fri, 17 Mar 2023 11:24:33 +0000 Subject: [PATCH 8/8] update lockfile for {"substrate"} --- Cargo.lock | 367 ++++++++++++++++++++++++++--------------------------- 1 file changed, 183 insertions(+), 184 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5fa40a3e8c75..2e8855b7f025 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -466,7 +466,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "hash-db", "log", @@ -2295,7 +2295,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "parity-scale-codec", ] @@ -2318,7 +2318,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-support", "frame-support-procedural", @@ -2343,7 +2343,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "Inflector", "array-bytes", @@ -2390,7 +2390,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2401,7 +2401,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2418,7 +2418,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-support", "frame-system", @@ -2447,7 +2447,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "futures", "log", @@ -2463,7 +2463,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "bitflags", "environmental", @@ -2496,7 +2496,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "Inflector", "cfg-expr", @@ -2511,7 +2511,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2523,7 +2523,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "proc-macro2", "quote", @@ -2533,7 +2533,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -2557,7 +2557,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-support", "frame-system", @@ -2568,7 +2568,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-support", "log", @@ -2586,7 +2586,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -2601,7 +2601,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "parity-scale-codec", "sp-api", @@ -2610,7 +2610,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-support", "parity-scale-codec", @@ -2792,7 +2792,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "chrono", "frame-election-provider-support", @@ -4571,7 +4571,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "futures", "log", @@ -4590,7 +4590,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "anyhow", "jsonrpsee", @@ -5152,7 +5152,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -5167,7 +5167,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-support", "frame-system", @@ -5183,7 +5183,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-support", "frame-system", @@ -5197,7 +5197,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -5221,7 +5221,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5241,7 +5241,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-election-provider-support", "frame-remote-externalities", @@ -5260,7 +5260,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -5275,7 +5275,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-support", "frame-system", @@ -5294,7 +5294,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "array-bytes", "binary-merkle-tree", @@ -5318,7 +5318,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -5336,7 +5336,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -5355,7 +5355,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -5372,7 +5372,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5389,7 +5389,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -5407,7 +5407,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5430,7 +5430,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5443,7 +5443,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -5461,7 +5461,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5479,7 +5479,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -5502,7 +5502,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5518,7 +5518,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -5538,7 +5538,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -5555,7 +5555,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -5572,7 +5572,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -5589,7 +5589,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -5605,7 +5605,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -5621,7 +5621,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-support", "frame-system", @@ -5638,7 +5638,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5658,7 +5658,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -5669,7 +5669,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-support", "frame-system", @@ -5686,7 +5686,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5710,7 +5710,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -5727,7 +5727,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -5742,7 +5742,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -5760,7 +5760,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -5775,7 +5775,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5794,7 +5794,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -5811,7 +5811,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-support", "frame-system", @@ -5832,7 +5832,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -5848,7 +5848,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-support", "frame-system", @@ -5862,7 +5862,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5885,7 +5885,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5896,7 +5896,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "log", "sp-arithmetic", @@ -5905,7 +5905,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "parity-scale-codec", "sp-api", @@ -5914,7 +5914,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -5931,7 +5931,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-support", "frame-system", @@ -5945,7 +5945,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -5963,7 +5963,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -5982,7 +5982,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-support", "frame-system", @@ -5998,7 +5998,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6014,7 +6014,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6026,7 +6026,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -6043,7 +6043,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -6058,7 +6058,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -6074,7 +6074,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -6089,7 +6089,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-benchmarking", "frame-support", @@ -9014,7 +9014,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "log", "sp-core", @@ -9025,7 +9025,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "async-trait", "futures", @@ -9053,7 +9053,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "futures", "futures-timer", @@ -9076,7 +9076,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9091,7 +9091,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -9110,7 +9110,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9121,7 +9121,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "array-bytes", "chrono", @@ -9161,7 +9161,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "fnv", "futures", @@ -9187,7 +9187,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "hash-db", "kvdb", @@ -9213,7 +9213,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "async-trait", "futures", @@ -9238,7 +9238,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "async-trait", "fork-tree", @@ -9277,7 +9277,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "futures", "jsonrpsee", @@ -9299,7 +9299,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "array-bytes", "async-trait", @@ -9334,7 +9334,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "futures", "jsonrpsee", @@ -9353,7 +9353,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9366,7 +9366,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "ahash 0.8.2", "array-bytes", @@ -9406,7 +9406,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "finality-grandpa", "futures", @@ -9426,7 +9426,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "async-trait", "futures", @@ -9449,7 +9449,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "lru 0.8.1", "parity-scale-codec", @@ -9473,7 +9473,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -9486,7 +9486,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "log", "sc-allocator", @@ -9499,7 +9499,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "anyhow", "cfg-if", @@ -9517,7 +9517,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "ansi_term", "futures", @@ -9533,7 +9533,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "array-bytes", "async-trait", @@ -9548,7 +9548,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "array-bytes", "async-channel", @@ -9592,7 +9592,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "cid", "futures", @@ -9612,7 +9612,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "array-bytes", "async-trait", @@ -9640,7 +9640,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "ahash 0.8.2", "futures", @@ -9659,7 +9659,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "array-bytes", "futures", @@ -9681,7 +9681,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "array-bytes", "async-trait", @@ -9715,7 +9715,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "array-bytes", "futures", @@ -9735,7 +9735,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "array-bytes", "bytes", @@ -9766,7 +9766,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "futures", "libp2p", @@ -9779,7 +9779,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9788,7 +9788,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "futures", "jsonrpsee", @@ -9818,7 +9818,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9837,7 +9837,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "http", "jsonrpsee", @@ -9852,7 +9852,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "array-bytes", "futures", @@ -9878,7 +9878,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "async-trait", "directories", @@ -9944,7 +9944,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "log", "parity-scale-codec", @@ -9955,7 +9955,7 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "clap 4.0.15", "fs4", @@ -9971,7 +9971,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9990,7 +9990,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "futures", "libc", @@ -10009,7 +10009,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "chrono", "futures", @@ -10028,7 +10028,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "ansi_term", "atty", @@ -10059,7 +10059,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10070,7 +10070,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "async-trait", "futures", @@ -10097,7 +10097,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "async-trait", "futures", @@ -10111,7 +10111,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "async-channel", "futures", @@ -10626,7 +10626,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "hash-db", "log", @@ -10644,7 +10644,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "Inflector", "blake2", @@ -10658,7 +10658,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "parity-scale-codec", "scale-info", @@ -10671,7 +10671,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "integer-sqrt", "num-traits", @@ -10685,7 +10685,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "parity-scale-codec", "scale-info", @@ -10698,7 +10698,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "parity-scale-codec", "sp-api", @@ -10710,7 +10710,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "futures", "log", @@ -10728,7 +10728,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "async-trait", "futures", @@ -10743,7 +10743,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "async-trait", "parity-scale-codec", @@ -10761,7 +10761,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "async-trait", "merlin", @@ -10784,7 +10784,7 @@ dependencies = [ [[package]] name = "sp-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "lazy_static", "parity-scale-codec", @@ -10803,7 +10803,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "finality-grandpa", "log", @@ -10821,7 +10821,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "parity-scale-codec", "scale-info", @@ -10833,7 +10833,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "parity-scale-codec", "scale-info", @@ -10846,7 +10846,7 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "array-bytes", "base58", @@ -10889,7 +10889,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "blake2b_simd", "byteorder", @@ -10903,7 +10903,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "proc-macro2", "quote", @@ -10914,7 +10914,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10923,7 +10923,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "proc-macro2", "quote", @@ -10933,7 +10933,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "environmental", "parity-scale-codec", @@ -10944,7 +10944,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10959,7 +10959,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "bytes", "ed25519", @@ -10984,7 +10984,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "lazy_static", "sp-core", @@ -10995,9 +10995,8 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ - "async-trait", "futures", "merlin", "parity-scale-codec", @@ -11012,7 +11011,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "thiserror", "zstd", @@ -11021,7 +11020,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -11039,7 +11038,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "parity-scale-codec", "scale-info", @@ -11053,7 +11052,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "sp-api", "sp-core", @@ -11063,7 +11062,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "backtrace", "lazy_static", @@ -11073,7 +11072,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "rustc-hash", "serde", @@ -11083,7 +11082,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "either", "hash256-std-hasher", @@ -11105,7 +11104,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -11123,7 +11122,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "Inflector", "proc-macro-crate", @@ -11135,7 +11134,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "parity-scale-codec", "scale-info", @@ -11149,7 +11148,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "parity-scale-codec", "scale-info", @@ -11161,7 +11160,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "hash-db", "log", @@ -11181,12 +11180,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11199,7 +11198,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "async-trait", "futures-timer", @@ -11214,7 +11213,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "parity-scale-codec", "sp-std", @@ -11226,7 +11225,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "sp-api", "sp-runtime", @@ -11235,7 +11234,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "async-trait", "log", @@ -11251,7 +11250,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "ahash 0.8.2", "hash-db", @@ -11274,7 +11273,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11291,7 +11290,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -11302,7 +11301,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -11316,7 +11315,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "parity-scale-codec", "scale-info", @@ -11536,7 +11535,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "platforms", ] @@ -11544,7 +11543,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -11563,7 +11562,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "hyper", "log", @@ -11575,7 +11574,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "async-trait", "jsonrpsee", @@ -11588,7 +11587,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "jsonrpsee", "log", @@ -11607,7 +11606,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "array-bytes", "async-trait", @@ -11633,7 +11632,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "futures", "substrate-test-utils-derive", @@ -11643,7 +11642,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11654,7 +11653,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "ansi_term", "build-helper", @@ -12455,7 +12454,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#bd52212085051561aee5784ff48b295894b6509d" +source = "git+https://github.com/paritytech/substrate?branch=master#a2d4f7dfa97c1496f964c6fe833d5128f8319c77" dependencies = [ "async-trait", "clap 4.0.15",