From 8dbeae7f8e13916d229da7a387ee6de02aeb0222 Mon Sep 17 00:00:00 2001 From: Andronik Date: Wed, 1 Feb 2023 18:11:22 -0300 Subject: [PATCH 01/43] runtime/vstaging: unapplied_slashes runtime API --- node/core/runtime-api/src/cache.rs | 29 +++++-- node/core/runtime-api/src/lib.rs | 10 +++ node/subsystem-types/src/messages.rs | 10 ++- node/subsystem-types/src/runtime_client.rs | 26 +++++-- primitives/src/runtime_api.rs | 6 +- primitives/src/vstaging/mod.rs | 2 + primitives/src/vstaging/slashing.rs | 76 +++++++++++++++++++ runtime/parachains/src/disputes/slashing.rs | 68 +++-------------- .../src/runtime_api_impl/vstaging.rs | 8 +- 9 files changed, 166 insertions(+), 69 deletions(-) create mode 100644 primitives/src/vstaging/slashing.rs diff --git a/node/core/runtime-api/src/cache.rs b/node/core/runtime-api/src/cache.rs index 9efc31328692..acf6bb604a44 100644 --- a/node/core/runtime-api/src/cache.rs +++ b/node/core/runtime-api/src/cache.rs @@ -20,11 +20,11 @@ use lru::LruCache; use sp_consensus_babe::Epoch; use polkadot_primitives::{ - AuthorityDiscoveryId, BlockNumber, CandidateCommitments, CandidateEvent, CandidateHash, - CommittedCandidateReceipt, CoreState, DisputeState, GroupRotationInfo, Hash, Id as ParaId, - InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, PersistedValidationData, - PvfCheckStatement, ScrapedOnChainVotes, SessionIndex, SessionInfo, ValidationCode, - ValidationCodeHash, ValidatorId, ValidatorIndex, ValidatorSignature, + vstaging, AuthorityDiscoveryId, BlockNumber, CandidateCommitments, CandidateEvent, + CandidateHash, CommittedCandidateReceipt, CoreState, DisputeState, GroupRotationInfo, Hash, + Id as ParaId, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, + PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionIndex, SessionInfo, + ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex, ValidatorSignature, }; /// For consistency we have the same capacity for all caches. We use 128 as we'll only need that @@ -62,6 +62,8 @@ pub(crate) struct RequestResultCache { LruCache<(Hash, ParaId, OccupiedCoreAssumption), Option>, version: LruCache, disputes: LruCache)>>, + unapplied_slashes: + LruCache>, } impl Default for RequestResultCache { @@ -88,6 +90,7 @@ impl Default for RequestResultCache { validation_code_hash: LruCache::new(DEFAULT_CACHE_CAP), version: LruCache::new(DEFAULT_CACHE_CAP), disputes: LruCache::new(DEFAULT_CACHE_CAP), + unapplied_slashes: LruCache::new(DEFAULT_CACHE_CAP), } } } @@ -368,6 +371,21 @@ impl RequestResultCache { ) { self.disputes.put(relay_parent, value); } + + pub(crate) fn unapplied_slashes( + &mut self, + relay_parent: &Hash, + ) -> Option<&Vec<(SessionIndex, CandidateHash, vstaging::slashing::PendingSlashes)>> { + self.unapplied_slashes.get(relay_parent) + } + + pub(crate) fn cache_unapplied_slashes( + &mut self, + relay_parent: Hash, + value: Vec<(SessionIndex, CandidateHash, vstaging::slashing::PendingSlashes)>, + ) { + self.unapplied_slashes.put(relay_parent, value); + } } pub(crate) enum RequestResult { @@ -404,4 +422,5 @@ pub(crate) enum RequestResult { ValidationCodeHash(Hash, ParaId, OccupiedCoreAssumption, Option), Version(Hash, u32), Disputes(Hash, Vec<(SessionIndex, CandidateHash, DisputeState)>), + UnappliedSlashes(Hash, Vec<(SessionIndex, CandidateHash, vstaging::slashing::PendingSlashes)>), } diff --git a/node/core/runtime-api/src/lib.rs b/node/core/runtime-api/src/lib.rs index 3d016305bc64..88ae79a73b9f 100644 --- a/node/core/runtime-api/src/lib.rs +++ b/node/core/runtime-api/src/lib.rs @@ -155,6 +155,8 @@ where self.requests_cache.cache_version(relay_parent, version), Disputes(relay_parent, disputes) => self.requests_cache.cache_disputes(relay_parent, disputes), + UnappliedSlashes(relay_parent, unapplied_slashes) => + self.requests_cache.cache_unapplied_slashes(relay_parent, unapplied_slashes), } } @@ -258,6 +260,8 @@ where .map(|sender| Request::ValidationCodeHash(para, assumption, sender)), Request::Disputes(sender) => query!(disputes(), sender).map(|sender| Request::Disputes(sender)), + Request::UnappliedSlashes(sender) => + query!(unapplied_slashes(), sender).map(|sender| Request::UnappliedSlashes(sender)), } } @@ -502,5 +506,11 @@ where query!(ValidationCodeHash, validation_code_hash(para, assumption), ver = 2, sender), Request::Disputes(sender) => query!(Disputes, disputes(), ver = Request::DISPUTES_RUNTIME_REQUIREMENT, sender), + Request::UnappliedSlashes(sender) => query!( + UnappliedSlashes, + unapplied_slashes(), + ver = Request::UNAPPLIED_SLASHES_RUNTIME_REQUIREMENT, + sender + ), } } diff --git a/node/subsystem-types/src/messages.rs b/node/subsystem-types/src/messages.rs index 506e37d2cc92..3ba39d8f9288 100644 --- a/node/subsystem-types/src/messages.rs +++ b/node/subsystem-types/src/messages.rs @@ -39,7 +39,7 @@ use polkadot_node_primitives::{ SignedDisputeStatement, SignedFullStatement, ValidationResult, }; use polkadot_primitives::{ - AuthorityDiscoveryId, BackedCandidate, BlockNumber, CandidateEvent, CandidateHash, + vstaging, AuthorityDiscoveryId, BackedCandidate, BlockNumber, CandidateEvent, CandidateHash, CandidateIndex, CandidateReceipt, CollatorId, CommittedCandidateReceipt, CoreState, DisputeState, GroupIndex, GroupRotationInfo, Hash, Header as BlockHeader, Id as ParaId, InboundDownwardMessage, InboundHrmpMessage, MultiDisputeStatementSet, OccupiedCoreAssumption, @@ -601,6 +601,11 @@ pub enum RuntimeApiRequest { ), /// Returns all on-chain disputes at given block number. Available in `v3`. Disputes(RuntimeApiSender)>>), + /// Returns a list of validators that lost a past session dispute and need to be slashed. + /// `VStaging` + UnappliedSlashes( + RuntimeApiSender>, + ), } impl RuntimeApiRequest { @@ -608,6 +613,9 @@ impl RuntimeApiRequest { /// `Disputes` pub const DISPUTES_RUNTIME_REQUIREMENT: u32 = 3; + + /// `UnappliedSlashes` + pub const UNAPPLIED_SLASHES_RUNTIME_REQUIREMENT: u32 = 1000; } /// A message to the Runtime API subsystem. diff --git a/node/subsystem-types/src/runtime_client.rs b/node/subsystem-types/src/runtime_client.rs index 9a55462b8852..400576cbb7ea 100644 --- a/node/subsystem-types/src/runtime_client.rs +++ b/node/subsystem-types/src/runtime_client.rs @@ -16,11 +16,12 @@ use async_trait::async_trait; use polkadot_primitives::{ - runtime_api::ParachainHost, Block, BlockId, BlockNumber, CandidateCommitments, CandidateEvent, - CandidateHash, CommittedCandidateReceipt, CoreState, DisputeState, GroupRotationInfo, Hash, Id, - InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, PersistedValidationData, - PvfCheckStatement, ScrapedOnChainVotes, SessionIndex, SessionInfo, ValidationCode, - ValidationCodeHash, ValidatorId, ValidatorIndex, ValidatorSignature, + runtime_api::ParachainHost, vstaging, Block, BlockId, BlockNumber, CandidateCommitments, + CandidateEvent, CandidateHash, CommittedCandidateReceipt, CoreState, DisputeState, + GroupRotationInfo, Hash, Id, InboundDownwardMessage, InboundHrmpMessage, + OccupiedCoreAssumption, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, + SessionIndex, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex, + ValidatorSignature, }; use sp_api::{ApiError, ApiExt, ProvideRuntimeApi}; use sp_authority_discovery::AuthorityDiscoveryApi; @@ -188,6 +189,14 @@ pub trait RuntimeApiSubsystemClient { at: Hash, ) -> Result)>, ApiError>; + /// Returns a list of validators that lost a past session dispute and need to be slashed. + /// + /// WARNING: This is a staging method! Do not use on production runtimes! + async fn unapplied_slashes( + &self, + at: Hash, + ) -> Result, ApiError>; + // === BABE API === /// Returns information regarding the current epoch. @@ -378,4 +387,11 @@ where ) -> Result)>, ApiError> { self.runtime_api().disputes(&BlockId::Hash(at)) } + + async fn unapplied_slashes( + &self, + at: Hash, + ) -> Result, ApiError> { + self.runtime_api().unapplied_slashes(&BlockId::Hash(at)) + } } diff --git a/primitives/src/runtime_api.rs b/primitives/src/runtime_api.rs index 2f6793d22032..4fb705d428be 100644 --- a/primitives/src/runtime_api.rs +++ b/primitives/src/runtime_api.rs @@ -110,7 +110,7 @@ //! All staging API functions should use primitives from `vstaging`. They should be clearly separated //! from the stable primitives. -use crate::v2; +use crate::{v2, vstaging}; use parity_scale_codec::{Decode, Encode}; use polkadot_core_primitives as pcp; use polkadot_parachain::primitives as ppp; @@ -221,5 +221,9 @@ sp_api::decl_runtime_apis! { /// Returns all onchain disputes. #[api_version(3)] fn disputes() -> Vec<(v2::SessionIndex, v2::CandidateHash, v2::DisputeState)>; + + /// Returns a list of validators that lost a past session dispute and need to be slashed. + #[api_version(1000)] + fn unapplied_slashes() -> Vec<(v2::SessionIndex, v2::CandidateHash, vstaging::slashing::PendingSlashes)>; } } diff --git a/primitives/src/vstaging/mod.rs b/primitives/src/vstaging/mod.rs index 64671bd48a60..a0c262bafff6 100644 --- a/primitives/src/vstaging/mod.rs +++ b/primitives/src/vstaging/mod.rs @@ -17,3 +17,5 @@ //! Staging Primitives. // Put any primitives used by staging APIs functions here + +pub mod slashing; diff --git a/primitives/src/vstaging/slashing.rs b/primitives/src/vstaging/slashing.rs new file mode 100644 index 000000000000..dfddf64aa008 --- /dev/null +++ b/primitives/src/vstaging/slashing.rs @@ -0,0 +1,76 @@ +// Copyright 2017-2021 Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! Primitives types used for dispute slashing. + +use crate::v2::{CandidateHash, SessionIndex, ValidatorId, ValidatorIndex}; +use parity_scale_codec::{Decode, Encode}; +use scale_info::TypeInfo; +use sp_std::collections::btree_map::BTreeMap; + +/// The kind of the dispute offence. +#[derive(PartialEq, Eq, Clone, Copy, Encode, Decode, TypeInfo, Debug)] +pub enum SlashingOffenceKind { + /// A severe offence when a validator backed an invalid block. + #[codec(index = 0)] + ForInvalid, + /// A minor offence when a validator disputed a valid block. + #[codec(index = 1)] + AgainstValid, +} + +/// Timeslots should uniquely identify offences and are used for the offence +/// deduplication. +#[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Encode, Decode, TypeInfo, Debug)] +pub struct DisputesTimeSlot { + // The order of the fields matters for `derive(Ord)`. + /// Session index when the candidate was backed/included. + pub session_index: SessionIndex, + /// Candidate hash of the disputed candidate. + pub candidate_hash: CandidateHash, +} + +impl DisputesTimeSlot { + /// Create a new instance of `Self`. + pub fn new(session_index: SessionIndex, candidate_hash: CandidateHash) -> Self { + Self { session_index, candidate_hash } + } +} + +/// We store most of the information about a lost dispute on chain. This struct +/// is required to identify and verify it. +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, Debug)] +pub struct DisputeProof { + /// Time slot when the dispute occured. + pub time_slot: DisputesTimeSlot, + /// The dispute outcome. + pub kind: SlashingOffenceKind, + /// The index of the validator who lost a dispute. + pub validator_index: ValidatorIndex, + /// The parachain session key of the validator. + pub validator_id: ValidatorId, +} + +/// Slashes that are waiting to be applied once we have validator key +/// identification. +#[derive(Encode, Decode, TypeInfo, Debug, Clone)] +pub struct PendingSlashes { + /// Indices and keys of the validators who lost a dispute and are pending + /// slashes. + pub keys: BTreeMap, + /// The dispute outcome. + pub kind: SlashingOffenceKind, +} diff --git a/runtime/parachains/src/disputes/slashing.rs b/runtime/parachains/src/disputes/slashing.rs index fd127d7f0789..29a887557c01 100644 --- a/runtime/parachains/src/disputes/slashing.rs +++ b/runtime/parachains/src/disputes/slashing.rs @@ -49,8 +49,11 @@ use frame_support::{ weights::Weight, }; -use parity_scale_codec::{Decode, Encode}; -use primitives::{CandidateHash, SessionIndex, ValidatorId, ValidatorIndex}; +use parity_scale_codec::Decode; +use primitives::{ + vstaging::slashing::{DisputeProof, DisputesTimeSlot, PendingSlashes, SlashingOffenceKind}, + CandidateHash, SessionIndex, ValidatorId, ValidatorIndex, +}; use scale_info::TypeInfo; use sp_runtime::{ traits::Convert, @@ -58,15 +61,12 @@ use sp_runtime::{ InvalidTransaction, TransactionPriority, TransactionSource, TransactionValidity, TransactionValidityError, ValidTransaction, }, - DispatchResult, KeyTypeId, Perbill, RuntimeDebug, + DispatchResult, KeyTypeId, Perbill, }; use sp_session::{GetSessionNumber, GetValidatorCount}; use sp_staking::offence::{DisableStrategy, Kind, Offence, OffenceError, ReportOffence}; use sp_std::{ - collections::{ - btree_map::{BTreeMap, Entry}, - btree_set::BTreeSet, - }, + collections::{btree_map::Entry, btree_set::BTreeSet}, prelude::*, }; @@ -92,23 +92,8 @@ impl BenchmarkingConfiguration for BenchConfig { const MAX_VALIDATORS: u32 = M; } -/// Timeslots should uniquely identify offences and are used for the offence -/// deduplication. -#[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Encode, Decode, TypeInfo, RuntimeDebug)] -pub struct DisputesTimeSlot { - // The order of these matters for `derive(Ord)`. - session_index: SessionIndex, - candidate_hash: CandidateHash, -} - -impl DisputesTimeSlot { - pub fn new(session_index: SessionIndex, candidate_hash: CandidateHash) -> Self { - Self { session_index, candidate_hash } - } -} - /// An offence that is filed when a series of validators lost a dispute. -#[derive(RuntimeDebug, TypeInfo)] +#[derive(TypeInfo)] #[cfg_attr(feature = "std", derive(Clone, PartialEq, Eq))] pub struct SlashingOffence { /// The size of the validator set in that session. @@ -323,39 +308,6 @@ where } } -#[derive(PartialEq, Eq, Clone, Copy, Encode, Decode, RuntimeDebug, TypeInfo)] -pub enum SlashingOffenceKind { - #[codec(index = 0)] - ForInvalid, - #[codec(index = 1)] - AgainstValid, -} - -/// We store most of the information about a lost dispute on chain. This struct -/// is required to identify and verify it. -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] -pub struct DisputeProof { - /// Time slot when the dispute occured. - pub time_slot: DisputesTimeSlot, - /// The dispute outcome. - pub kind: SlashingOffenceKind, - /// The index of the validator who lost a dispute. - pub validator_index: ValidatorIndex, - /// The parachain session key of the validator. - pub validator_id: ValidatorId, -} - -/// Slashes that are waiting to be applied once we have validator key -/// identification. -#[derive(Encode, Decode, RuntimeDebug, TypeInfo)] -pub struct PendingSlashes { - /// Indices and keys of the validators who lost a dispute and are pending - /// slashes. - pub keys: BTreeMap, - /// The dispute outcome. - pub kind: SlashingOffenceKind, -} - /// A trait that defines methods to report an offence (after the slashing report /// has been validated) and for submitting a transaction to report a slash (from /// an offchain context). @@ -603,6 +555,10 @@ impl Pallet { let old_session = session_index - config.dispute_period - 1; let _ = >::clear_prefix(old_session, REMOVE_LIMIT, None); } + + pub(crate) fn unapplied_slashes() -> Vec<(SessionIndex, CandidateHash, PendingSlashes)> { + >::iter().collect() + } } /// Methods for the `ValidateUnsigned` implementation: diff --git a/runtime/parachains/src/runtime_api_impl/vstaging.rs b/runtime/parachains/src/runtime_api_impl/vstaging.rs index 2191fb304e1c..cc0a8d0eb23e 100644 --- a/runtime/parachains/src/runtime_api_impl/vstaging.rs +++ b/runtime/parachains/src/runtime_api_impl/vstaging.rs @@ -17,7 +17,7 @@ //! Put implementations of functions from staging APIs here. use crate::disputes; -use primitives::{CandidateHash, DisputeState, SessionIndex}; +use primitives::{vstaging, CandidateHash, DisputeState, SessionIndex}; use sp_std::prelude::*; /// Implementation for `get_session_disputes` function from the runtime API @@ -25,3 +25,9 @@ pub fn get_session_disputes( ) -> Vec<(SessionIndex, CandidateHash, DisputeState)> { >::disputes() } + +/// Implementation of `unapplied_slashes` runtime API +pub fn unapplied_slashes( +) -> Vec<(SessionIndex, CandidateHash, vstaging::slashing::PendingSlashes)> { + >::unapplied_slashes() +} From d3273d72a0376b6b63a293a6973b05145e8c65ec Mon Sep 17 00:00:00 2001 From: Andronik Date: Thu, 2 Feb 2023 16:08:22 -0300 Subject: [PATCH 02/43] runtime/vstaging: key_ownership_proof runtime API --- node/core/runtime-api/src/cache.rs | 19 ++++++++++++++ node/core/runtime-api/src/lib.rs | 14 +++++++++++ node/subsystem-types/src/messages.rs | 10 ++++++++ node/subsystem-types/src/runtime_client.rs | 20 +++++++++++++++ primitives/src/runtime_api.rs | 7 ++++++ primitives/src/vstaging/slashing.rs | 25 ++++++++++++++++++- runtime/parachains/src/disputes/slashing.rs | 1 - .../src/disputes/slashing/benchmarking.rs | 1 + 8 files changed, 95 insertions(+), 2 deletions(-) diff --git a/node/core/runtime-api/src/cache.rs b/node/core/runtime-api/src/cache.rs index acf6bb604a44..840102f67e92 100644 --- a/node/core/runtime-api/src/cache.rs +++ b/node/core/runtime-api/src/cache.rs @@ -64,6 +64,8 @@ pub(crate) struct RequestResultCache { disputes: LruCache)>>, unapplied_slashes: LruCache>, + key_ownership_proof: + LruCache<(Hash, SessionIndex, ValidatorId), vstaging::slashing::OpaqueKeyOwnershipProof>, } impl Default for RequestResultCache { @@ -91,6 +93,7 @@ impl Default for RequestResultCache { version: LruCache::new(DEFAULT_CACHE_CAP), disputes: LruCache::new(DEFAULT_CACHE_CAP), unapplied_slashes: LruCache::new(DEFAULT_CACHE_CAP), + key_ownership_proof: LruCache::new(DEFAULT_CACHE_CAP), } } } @@ -386,6 +389,21 @@ impl RequestResultCache { ) { self.unapplied_slashes.put(relay_parent, value); } + + pub(crate) fn key_ownership_proof( + &mut self, + key: (Hash, SessionIndex, ValidatorId), + ) -> Option<&vstaging::slashing::OpaqueKeyOwnershipProof> { + self.key_ownership_proof.get(&key) + } + + pub(crate) fn cache_key_ownership_proof( + &mut self, + key: (Hash, SessionIndex, ValidatorId), + value: vstaging::slashing::OpaqueKeyOwnershipProof, + ) { + self.key_ownership_proof.put(key, value); + } } pub(crate) enum RequestResult { @@ -423,4 +441,5 @@ pub(crate) enum RequestResult { Version(Hash, u32), Disputes(Hash, Vec<(SessionIndex, CandidateHash, DisputeState)>), UnappliedSlashes(Hash, Vec<(SessionIndex, CandidateHash, vstaging::slashing::PendingSlashes)>), + KeyOwnershipProof(Hash, SessionIndex, ValidatorId, vstaging::slashing::OpaqueKeyOwnershipProof), } diff --git a/node/core/runtime-api/src/lib.rs b/node/core/runtime-api/src/lib.rs index 88ae79a73b9f..64acc1492c27 100644 --- a/node/core/runtime-api/src/lib.rs +++ b/node/core/runtime-api/src/lib.rs @@ -157,6 +157,11 @@ where self.requests_cache.cache_disputes(relay_parent, disputes), UnappliedSlashes(relay_parent, unapplied_slashes) => self.requests_cache.cache_unapplied_slashes(relay_parent, unapplied_slashes), + KeyOwnershipProof(relay_parent, session_index, validator_id, key_ownership_proof) => + self.requests_cache.cache_key_ownership_proof( + (relay_parent, session_index, validator_id), + key_ownership_proof, + ), } } @@ -262,6 +267,9 @@ where query!(disputes(), sender).map(|sender| Request::Disputes(sender)), Request::UnappliedSlashes(sender) => query!(unapplied_slashes(), sender).map(|sender| Request::UnappliedSlashes(sender)), + Request::KeyOwnershipProof(session_index, validator_id, sender) => + query!(key_ownership_proof(session_index, validator_id), sender) + .map(|sender| Request::KeyOwnershipProof(session_index, validator_id, sender)), } } @@ -512,5 +520,11 @@ where ver = Request::UNAPPLIED_SLASHES_RUNTIME_REQUIREMENT, sender ), + Request::KeyOwnershipProof(session_index, validator_id, sender) => query!( + KeyOwnershipProof, + key_ownership_proof(session_index, validator_id), + ver = Request::KEY_OWNERSHIP_PROOF_RUNTIME_REQUIREMENT, + sender + ), } } diff --git a/node/subsystem-types/src/messages.rs b/node/subsystem-types/src/messages.rs index 3ba39d8f9288..b28d292a51db 100644 --- a/node/subsystem-types/src/messages.rs +++ b/node/subsystem-types/src/messages.rs @@ -606,6 +606,13 @@ pub enum RuntimeApiRequest { UnappliedSlashes( RuntimeApiSender>, ), + /// Returns a merkle proof of a validator session key in a past session. + /// `VStaging` + KeyOwnershipProof( + SessionIndex, + ValidatorId, + RuntimeApiSender, + ), } impl RuntimeApiRequest { @@ -616,6 +623,9 @@ impl RuntimeApiRequest { /// `UnappliedSlashes` pub const UNAPPLIED_SLASHES_RUNTIME_REQUIREMENT: u32 = 1000; + + /// `KeyOwnershipProof` + pub const KEY_OWNERSHIP_PROOF_RUNTIME_REQUIREMENT: u32 = 1000; } /// A message to the Runtime API subsystem. diff --git a/node/subsystem-types/src/runtime_client.rs b/node/subsystem-types/src/runtime_client.rs index 400576cbb7ea..6a29c3264f75 100644 --- a/node/subsystem-types/src/runtime_client.rs +++ b/node/subsystem-types/src/runtime_client.rs @@ -197,6 +197,16 @@ pub trait RuntimeApiSubsystemClient { at: Hash, ) -> Result, ApiError>; + /// Returns a merkle proof of a validator session key in a past session. + /// + /// WARNING: This is a staging method! Do not use on production runtimes! + async fn key_ownership_proof( + &self, + at: Hash, + session_index: SessionIndex, + validator_id: ValidatorId, + ) -> Result; + // === BABE API === /// Returns information regarding the current epoch. @@ -394,4 +404,14 @@ where ) -> Result, ApiError> { self.runtime_api().unapplied_slashes(&BlockId::Hash(at)) } + + async fn key_ownership_proof( + &self, + at: Hash, + session_index: SessionIndex, + validator_id: ValidatorId, + ) -> Result { + self.runtime_api() + .key_ownership_proof(&BlockId::Hash(at), session_index, validator_id) + } } diff --git a/primitives/src/runtime_api.rs b/primitives/src/runtime_api.rs index 4fb705d428be..63b27881d5a4 100644 --- a/primitives/src/runtime_api.rs +++ b/primitives/src/runtime_api.rs @@ -225,5 +225,12 @@ sp_api::decl_runtime_apis! { /// Returns a list of validators that lost a past session dispute and need to be slashed. #[api_version(1000)] fn unapplied_slashes() -> Vec<(v2::SessionIndex, v2::CandidateHash, vstaging::slashing::PendingSlashes)>; + + /// Returns a list of validators that lost a past session dispute and need to be slashed. + #[api_version(1000)] + fn key_ownership_proof( + session_index: v2::SessionIndex, + validator_id: v2::ValidatorId, + ) -> vstaging::slashing::OpaqueKeyOwnershipProof; } } diff --git a/primitives/src/vstaging/slashing.rs b/primitives/src/vstaging/slashing.rs index dfddf64aa008..8edcc202feea 100644 --- a/primitives/src/vstaging/slashing.rs +++ b/primitives/src/vstaging/slashing.rs @@ -19,7 +19,7 @@ use crate::v2::{CandidateHash, SessionIndex, ValidatorId, ValidatorIndex}; use parity_scale_codec::{Decode, Encode}; use scale_info::TypeInfo; -use sp_std::collections::btree_map::BTreeMap; +use sp_std::{collections::btree_map::BTreeMap, vec::Vec}; /// The kind of the dispute offence. #[derive(PartialEq, Eq, Clone, Copy, Encode, Decode, TypeInfo, Debug)] @@ -74,3 +74,26 @@ pub struct PendingSlashes { /// The dispute outcome. pub kind: SlashingOffenceKind, } + +// TODO: can we reuse this type between BABE, GRANDPA and disputes? +/// An opaque type used to represent the key ownership proof at the runtime API +/// boundary. The inner value is an encoded representation of the actual key +/// ownership proof which will be parameterized when defining the runtime. At +/// the runtime API boundary this type is unknown and as such we keep this +/// opaque representation, implementors of the runtime API will have to make +/// sure that all usages of `OpaqueKeyOwnershipProof` refer to the same type. +#[derive(Decode, Encode, PartialEq, Eq, Debug, Clone)] +pub struct OpaqueKeyOwnershipProof(Vec); +impl OpaqueKeyOwnershipProof { + /// Create a new `OpaqueKeyOwnershipProof` using the given encoded + /// representation. + pub fn new(inner: Vec) -> OpaqueKeyOwnershipProof { + OpaqueKeyOwnershipProof(inner) + } + + /// Try to decode this `OpaqueKeyOwnershipProof` into the given concrete key + /// ownership proof type. + pub fn decode(self) -> Option { + Decode::decode(&mut &self.0[..]).ok() + } +} diff --git a/runtime/parachains/src/disputes/slashing.rs b/runtime/parachains/src/disputes/slashing.rs index 29a887557c01..71abfa5b7688 100644 --- a/runtime/parachains/src/disputes/slashing.rs +++ b/runtime/parachains/src/disputes/slashing.rs @@ -49,7 +49,6 @@ use frame_support::{ weights::Weight, }; -use parity_scale_codec::Decode; use primitives::{ vstaging::slashing::{DisputeProof, DisputesTimeSlot, PendingSlashes, SlashingOffenceKind}, CandidateHash, SessionIndex, ValidatorId, ValidatorIndex, diff --git a/runtime/parachains/src/disputes/slashing/benchmarking.rs b/runtime/parachains/src/disputes/slashing/benchmarking.rs index 0b328e3e5797..91f2fefa77e0 100644 --- a/runtime/parachains/src/disputes/slashing/benchmarking.rs +++ b/runtime/parachains/src/disputes/slashing/benchmarking.rs @@ -21,6 +21,7 @@ use frame_benchmarking::{benchmarks, whitelist_account}; use frame_support::traits::{OnFinalize, OnInitialize}; use frame_system::RawOrigin; use pallet_staking::testing_utils::create_validators; +use parity_scale_codec::Decode; use primitives::{Hash, PARACHAIN_KEY_TYPE_ID}; use sp_runtime::traits::{One, StaticLookup}; use sp_session::MembershipProof; From 8394592eac9d6a301b8b542af4358d66d721ebc5 Mon Sep 17 00:00:00 2001 From: Andronik Date: Thu, 2 Feb 2023 16:28:51 -0300 Subject: [PATCH 03/43] runtime/ParachainHost: submit_report_dispute_lost --- primitives/src/runtime_api.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/primitives/src/runtime_api.rs b/primitives/src/runtime_api.rs index 63b27881d5a4..3c07e909c15e 100644 --- a/primitives/src/runtime_api.rs +++ b/primitives/src/runtime_api.rs @@ -232,5 +232,13 @@ sp_api::decl_runtime_apis! { session_index: v2::SessionIndex, validator_id: v2::ValidatorId, ) -> vstaging::slashing::OpaqueKeyOwnershipProof; + + /// Submit an unsigned extrinsic to slash validators who lost a dispute about + /// a candidate of a past session. + #[api_version(1000)] + fn submit_report_dispute_lost( + dispute_prool: vstaging::slashing::DisputeProof, + key_owner_proof: vstaging::slashing::OpaqueKeyOwnershipProof, + ) -> Option<()>; } } From d31edbb94283e6f10fa9879f55d609a1e6863748 Mon Sep 17 00:00:00 2001 From: Andronik Date: Thu, 2 Feb 2023 17:08:03 -0300 Subject: [PATCH 04/43] fix key_ownership_proof API --- node/core/runtime-api/src/cache.rs | 12 ++++---- node/core/runtime-api/src/lib.rs | 18 +++++------ node/subsystem-types/src/messages.rs | 9 +++--- node/subsystem-types/src/runtime_client.rs | 9 ++---- primitives/src/runtime_api.rs | 13 ++++---- runtime/parachains/src/disputes/slashing.rs | 7 +++++ runtime/rococo/src/lib.rs | 33 +++++++++++++++++++-- 7 files changed, 64 insertions(+), 37 deletions(-) diff --git a/node/core/runtime-api/src/cache.rs b/node/core/runtime-api/src/cache.rs index 840102f67e92..c2cd5e571be1 100644 --- a/node/core/runtime-api/src/cache.rs +++ b/node/core/runtime-api/src/cache.rs @@ -65,7 +65,7 @@ pub(crate) struct RequestResultCache { unapplied_slashes: LruCache>, key_ownership_proof: - LruCache<(Hash, SessionIndex, ValidatorId), vstaging::slashing::OpaqueKeyOwnershipProof>, + LruCache<(Hash, ValidatorId), Option>, } impl Default for RequestResultCache { @@ -392,15 +392,15 @@ impl RequestResultCache { pub(crate) fn key_ownership_proof( &mut self, - key: (Hash, SessionIndex, ValidatorId), - ) -> Option<&vstaging::slashing::OpaqueKeyOwnershipProof> { + key: (Hash, ValidatorId), + ) -> Option<&Option> { self.key_ownership_proof.get(&key) } pub(crate) fn cache_key_ownership_proof( &mut self, - key: (Hash, SessionIndex, ValidatorId), - value: vstaging::slashing::OpaqueKeyOwnershipProof, + key: (Hash, ValidatorId), + value: Option, ) { self.key_ownership_proof.put(key, value); } @@ -441,5 +441,5 @@ pub(crate) enum RequestResult { Version(Hash, u32), Disputes(Hash, Vec<(SessionIndex, CandidateHash, DisputeState)>), UnappliedSlashes(Hash, Vec<(SessionIndex, CandidateHash, vstaging::slashing::PendingSlashes)>), - KeyOwnershipProof(Hash, SessionIndex, ValidatorId, vstaging::slashing::OpaqueKeyOwnershipProof), + KeyOwnershipProof(Hash, ValidatorId, Option), } diff --git a/node/core/runtime-api/src/lib.rs b/node/core/runtime-api/src/lib.rs index 64acc1492c27..c084a1f791fa 100644 --- a/node/core/runtime-api/src/lib.rs +++ b/node/core/runtime-api/src/lib.rs @@ -157,11 +157,9 @@ where self.requests_cache.cache_disputes(relay_parent, disputes), UnappliedSlashes(relay_parent, unapplied_slashes) => self.requests_cache.cache_unapplied_slashes(relay_parent, unapplied_slashes), - KeyOwnershipProof(relay_parent, session_index, validator_id, key_ownership_proof) => - self.requests_cache.cache_key_ownership_proof( - (relay_parent, session_index, validator_id), - key_ownership_proof, - ), + KeyOwnershipProof(relay_parent, validator_id, key_ownership_proof) => self + .requests_cache + .cache_key_ownership_proof((relay_parent, validator_id), key_ownership_proof), } } @@ -267,9 +265,9 @@ where query!(disputes(), sender).map(|sender| Request::Disputes(sender)), Request::UnappliedSlashes(sender) => query!(unapplied_slashes(), sender).map(|sender| Request::UnappliedSlashes(sender)), - Request::KeyOwnershipProof(session_index, validator_id, sender) => - query!(key_ownership_proof(session_index, validator_id), sender) - .map(|sender| Request::KeyOwnershipProof(session_index, validator_id, sender)), + Request::KeyOwnershipProof(validator_id, sender) => + query!(key_ownership_proof(validator_id), sender) + .map(|sender| Request::KeyOwnershipProof(validator_id, sender)), } } @@ -520,9 +518,9 @@ where ver = Request::UNAPPLIED_SLASHES_RUNTIME_REQUIREMENT, sender ), - Request::KeyOwnershipProof(session_index, validator_id, sender) => query!( + Request::KeyOwnershipProof(validator_id, sender) => query!( KeyOwnershipProof, - key_ownership_proof(session_index, validator_id), + key_ownership_proof(validator_id), ver = Request::KEY_OWNERSHIP_PROOF_RUNTIME_REQUIREMENT, sender ), diff --git a/node/subsystem-types/src/messages.rs b/node/subsystem-types/src/messages.rs index b28d292a51db..b556324fd752 100644 --- a/node/subsystem-types/src/messages.rs +++ b/node/subsystem-types/src/messages.rs @@ -606,12 +606,11 @@ pub enum RuntimeApiRequest { UnappliedSlashes( RuntimeApiSender>, ), - /// Returns a merkle proof of a validator session key in a past session. + /// Returns a merkle proof of a validator session key. /// `VStaging` KeyOwnershipProof( - SessionIndex, ValidatorId, - RuntimeApiSender, + RuntimeApiSender>, ), } @@ -622,10 +621,10 @@ impl RuntimeApiRequest { pub const DISPUTES_RUNTIME_REQUIREMENT: u32 = 3; /// `UnappliedSlashes` - pub const UNAPPLIED_SLASHES_RUNTIME_REQUIREMENT: u32 = 1000; + pub const UNAPPLIED_SLASHES_RUNTIME_REQUIREMENT: u32 = 4; /// `KeyOwnershipProof` - pub const KEY_OWNERSHIP_PROOF_RUNTIME_REQUIREMENT: u32 = 1000; + pub const KEY_OWNERSHIP_PROOF_RUNTIME_REQUIREMENT: u32 = 4; } /// A message to the Runtime API subsystem. diff --git a/node/subsystem-types/src/runtime_client.rs b/node/subsystem-types/src/runtime_client.rs index 6a29c3264f75..6718ccb2e50f 100644 --- a/node/subsystem-types/src/runtime_client.rs +++ b/node/subsystem-types/src/runtime_client.rs @@ -203,9 +203,8 @@ pub trait RuntimeApiSubsystemClient { async fn key_ownership_proof( &self, at: Hash, - session_index: SessionIndex, validator_id: ValidatorId, - ) -> Result; + ) -> Result, ApiError>; // === BABE API === @@ -408,10 +407,8 @@ where async fn key_ownership_proof( &self, at: Hash, - session_index: SessionIndex, validator_id: ValidatorId, - ) -> Result { - self.runtime_api() - .key_ownership_proof(&BlockId::Hash(at), session_index, validator_id) + ) -> Result, ApiError> { + self.runtime_api().key_ownership_proof(&BlockId::Hash(at), validator_id) } } diff --git a/primitives/src/runtime_api.rs b/primitives/src/runtime_api.rs index 3c07e909c15e..d2e5feaaf6ab 100644 --- a/primitives/src/runtime_api.rs +++ b/primitives/src/runtime_api.rs @@ -223,21 +223,20 @@ sp_api::decl_runtime_apis! { fn disputes() -> Vec<(v2::SessionIndex, v2::CandidateHash, v2::DisputeState)>; /// Returns a list of validators that lost a past session dispute and need to be slashed. - #[api_version(1000)] + #[api_version(4)] fn unapplied_slashes() -> Vec<(v2::SessionIndex, v2::CandidateHash, vstaging::slashing::PendingSlashes)>; - /// Returns a list of validators that lost a past session dispute and need to be slashed. - #[api_version(1000)] + /// Returns a merkle proof of a validator session key. + #[api_version(4)] fn key_ownership_proof( - session_index: v2::SessionIndex, validator_id: v2::ValidatorId, - ) -> vstaging::slashing::OpaqueKeyOwnershipProof; + ) -> Option; /// Submit an unsigned extrinsic to slash validators who lost a dispute about /// a candidate of a past session. - #[api_version(1000)] + #[api_version(4)] fn submit_report_dispute_lost( - dispute_prool: vstaging::slashing::DisputeProof, + dispute_proof: vstaging::slashing::DisputeProof, key_owner_proof: vstaging::slashing::OpaqueKeyOwnershipProof, ) -> Option<()>; } diff --git a/runtime/parachains/src/disputes/slashing.rs b/runtime/parachains/src/disputes/slashing.rs index 71abfa5b7688..50bf330f0443 100644 --- a/runtime/parachains/src/disputes/slashing.rs +++ b/runtime/parachains/src/disputes/slashing.rs @@ -558,6 +558,13 @@ impl Pallet { pub(crate) fn unapplied_slashes() -> Vec<(SessionIndex, CandidateHash, PendingSlashes)> { >::iter().collect() } + + pub fn submit_unsigned_slashing_report( + dispute_proof: DisputeProof, + key_ownership_proof: ::KeyOwnerProof, + ) -> Option<()> { + T::HandleReports::submit_unsigned_slashing_report(dispute_proof, key_ownership_proof).ok() + } } /// Methods for the `ValidateUnsigned` implementation: diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 36af2a251520..94f22f703aba 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -23,11 +23,11 @@ use pallet_nis::WithMaximumOf; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use primitives::{ - AccountId, AccountIndex, Balance, BlockNumber, CandidateEvent, CandidateHash, + vstaging, AccountId, AccountIndex, Balance, BlockNumber, CandidateEvent, CandidateHash, CommittedCandidateReceipt, CoreState, DisputeState, GroupRotationInfo, Hash, Id as ParaId, InboundDownwardMessage, InboundHrmpMessage, Moment, Nonce, OccupiedCoreAssumption, PersistedValidationData, ScrapedOnChainVotes, SessionInfo, Signature, ValidationCode, - ValidationCodeHash, ValidatorId, ValidatorIndex, + ValidationCodeHash, ValidatorId, ValidatorIndex, PARACHAIN_KEY_TYPE_ID, }; use runtime_common::{ assigned_slots, auctions, claims, crowdloan, impl_runtime_weights, impls::ToAuthor, @@ -1645,7 +1645,7 @@ sp_api::impl_runtime_apis! { } } - #[api_version(3)] + #[api_version(4)] impl primitives::runtime_api::ParachainHost for Runtime { fn validators() -> Vec { parachains_runtime_api_impl::validators::() @@ -1747,6 +1747,33 @@ sp_api::impl_runtime_apis! { fn disputes() -> Vec<(SessionIndex, CandidateHash, DisputeState)> { runtime_parachains::runtime_api_impl::vstaging::get_session_disputes::() } + + fn unapplied_slashes( + ) -> Vec<(SessionIndex, CandidateHash, vstaging::slashing::PendingSlashes)> { + runtime_parachains::runtime_api_impl::vstaging::unapplied_slashes::() + } + + fn key_ownership_proof( + validator_id: ValidatorId, + ) -> Option { + use parity_scale_codec::Encode; + + Historical::prove((PARACHAIN_KEY_TYPE_ID, validator_id)) + .map(|p| p.encode()) + .map(vstaging::slashing::OpaqueKeyOwnershipProof::new) + } + + fn submit_report_dispute_lost( + dispute_proof: vstaging::slashing::DisputeProof, + key_owner_proof: vstaging::slashing::OpaqueKeyOwnershipProof, + ) -> Option<()> { + let key_owner_proof = key_owner_proof.decode()?; + + ParasSlashing::submit_unsigned_slashing_report( + dispute_proof, + key_owner_proof, + ) + } } impl beefy_primitives::BeefyApi for Runtime { From 5808d0b9bd81bf3256944ce80c7f9b28d5165d1b Mon Sep 17 00:00:00 2001 From: Andronik Date: Fri, 3 Feb 2023 10:17:31 -0300 Subject: [PATCH 05/43] runtime: submit_report_dispute_lost runtime API --- node/core/runtime-api/src/cache.rs | 15 ++++++++++++++ node/core/runtime-api/src/lib.rs | 13 ++++++++++++ node/subsystem-types/src/messages.rs | 10 +++++++++ node/subsystem-types/src/runtime_client.rs | 24 ++++++++++++++++++++++ 4 files changed, 62 insertions(+) diff --git a/node/core/runtime-api/src/cache.rs b/node/core/runtime-api/src/cache.rs index c2cd5e571be1..ac8cbabbfe3f 100644 --- a/node/core/runtime-api/src/cache.rs +++ b/node/core/runtime-api/src/cache.rs @@ -404,6 +404,14 @@ impl RequestResultCache { ) { self.key_ownership_proof.put(key, value); } + + // This request is never cached, hence always returns `None`. + pub(crate) fn submit_report_dispute_lost( + &mut self, + _key: (Hash, vstaging::slashing::DisputeProof, vstaging::slashing::OpaqueKeyOwnershipProof), + ) -> Option<&Option<()>> { + None + } } pub(crate) enum RequestResult { @@ -442,4 +450,11 @@ pub(crate) enum RequestResult { Disputes(Hash, Vec<(SessionIndex, CandidateHash, DisputeState)>), UnappliedSlashes(Hash, Vec<(SessionIndex, CandidateHash, vstaging::slashing::PendingSlashes)>), KeyOwnershipProof(Hash, ValidatorId, Option), + // This is a request with side-effects. + SubmitReportDisputeLost( + Hash, + vstaging::slashing::DisputeProof, + vstaging::slashing::OpaqueKeyOwnershipProof, + Option<()>, + ), } diff --git a/node/core/runtime-api/src/lib.rs b/node/core/runtime-api/src/lib.rs index c084a1f791fa..692598f7fd93 100644 --- a/node/core/runtime-api/src/lib.rs +++ b/node/core/runtime-api/src/lib.rs @@ -160,6 +160,7 @@ where KeyOwnershipProof(relay_parent, validator_id, key_ownership_proof) => self .requests_cache .cache_key_ownership_proof((relay_parent, validator_id), key_ownership_proof), + SubmitReportDisputeLost(_, _, _, _) => {}, } } @@ -268,6 +269,12 @@ where Request::KeyOwnershipProof(validator_id, sender) => query!(key_ownership_proof(validator_id), sender) .map(|sender| Request::KeyOwnershipProof(validator_id, sender)), + Request::SubmitReportDisputeLost(dispute_proof, key_ownership_proof, sender) => + query!(submit_report_dispute_lost(dispute_proof, key_ownership_proof), sender).map( + |sender| { + Request::SubmitReportDisputeLost(dispute_proof, key_ownership_proof, sender) + }, + ), } } @@ -524,5 +531,11 @@ where ver = Request::KEY_OWNERSHIP_PROOF_RUNTIME_REQUIREMENT, sender ), + Request::SubmitReportDisputeLost(dispute_proof, key_ownership_proof, sender) => query!( + SubmitReportDisputeLost, + submit_report_dispute_lost(dispute_proof, key_ownership_proof), + ver = Request::SUBMIT_REPORT_DISPUTE_LOST_RUNTIME_REQUIREMENT, + sender + ), } } diff --git a/node/subsystem-types/src/messages.rs b/node/subsystem-types/src/messages.rs index b556324fd752..5ab6dc6c06bf 100644 --- a/node/subsystem-types/src/messages.rs +++ b/node/subsystem-types/src/messages.rs @@ -612,6 +612,13 @@ pub enum RuntimeApiRequest { ValidatorId, RuntimeApiSender>, ), + /// Submits an unsigned extrinsic to slash validator who lost a past session dispute. + /// `VStaging`` + SubmitReportDisputeLost( + vstaging::slashing::DisputeProof, + vstaging::slashing::OpaqueKeyOwnershipProof, + RuntimeApiSender>, + ), } impl RuntimeApiRequest { @@ -625,6 +632,9 @@ impl RuntimeApiRequest { /// `KeyOwnershipProof` pub const KEY_OWNERSHIP_PROOF_RUNTIME_REQUIREMENT: u32 = 4; + + /// `SubmitReportDisputeLost` + pub const SUBMIT_REPORT_DISPUTE_LOST_RUNTIME_REQUIREMENT: u32 = 4; } /// A message to the Runtime API subsystem. diff --git a/node/subsystem-types/src/runtime_client.rs b/node/subsystem-types/src/runtime_client.rs index 6718ccb2e50f..1ffb53c9832f 100644 --- a/node/subsystem-types/src/runtime_client.rs +++ b/node/subsystem-types/src/runtime_client.rs @@ -206,6 +206,17 @@ pub trait RuntimeApiSubsystemClient { validator_id: ValidatorId, ) -> Result, ApiError>; + /// Submits an unsigned extrinsic to slash validators who lost a dispute about + /// a candidate of a past session. + /// + /// WARNING: This is a staging method! Do not use on production runtimes! + async fn submit_report_dispute_lost( + &self, + at: Hash, + dispute_proof: vstaging::slashing::DisputeProof, + key_ownership_proof: vstaging::slashing::OpaqueKeyOwnershipProof, + ) -> Result, ApiError>; + // === BABE API === /// Returns information regarding the current epoch. @@ -411,4 +422,17 @@ where ) -> Result, ApiError> { self.runtime_api().key_ownership_proof(&BlockId::Hash(at), validator_id) } + + async fn submit_report_dispute_lost( + &self, + at: Hash, + dispute_proof: vstaging::slashing::DisputeProof, + key_ownership_proof: vstaging::slashing::OpaqueKeyOwnershipProof, + ) -> Result, ApiError> { + self.runtime_api().submit_report_dispute_lost( + &BlockId::Hash(at), + dispute_proof, + key_ownership_proof, + ) + } } From 78d9da04b7516b7350d344199f919ba4790f4efd Mon Sep 17 00:00:00 2001 From: Andronik Date: Fri, 3 Feb 2023 13:36:26 -0300 Subject: [PATCH 06/43] nits --- primitives/src/runtime_api.rs | 2 +- primitives/src/vstaging/slashing.rs | 2 +- runtime/parachains/src/disputes/slashing.rs | 2 +- .../parachains/src/runtime_api_impl/vstaging.rs | 15 ++++++++++++++- runtime/rococo/src/lib.rs | 8 +++----- 5 files changed, 20 insertions(+), 9 deletions(-) diff --git a/primitives/src/runtime_api.rs b/primitives/src/runtime_api.rs index d2e5feaaf6ab..bb10c7d81618 100644 --- a/primitives/src/runtime_api.rs +++ b/primitives/src/runtime_api.rs @@ -237,7 +237,7 @@ sp_api::decl_runtime_apis! { #[api_version(4)] fn submit_report_dispute_lost( dispute_proof: vstaging::slashing::DisputeProof, - key_owner_proof: vstaging::slashing::OpaqueKeyOwnershipProof, + key_ownership_proof: vstaging::slashing::OpaqueKeyOwnershipProof, ) -> Option<()>; } } diff --git a/primitives/src/vstaging/slashing.rs b/primitives/src/vstaging/slashing.rs index 8edcc202feea..3efaf213f059 100644 --- a/primitives/src/vstaging/slashing.rs +++ b/primitives/src/vstaging/slashing.rs @@ -1,4 +1,4 @@ -// Copyright 2017-2021 Parity Technologies (UK) Ltd. +// Copyright 2017-2023 Parity Technologies (UK) Ltd. // This file is part of Polkadot. // Polkadot is free software: you can redistribute it and/or modify diff --git a/runtime/parachains/src/disputes/slashing.rs b/runtime/parachains/src/disputes/slashing.rs index 50bf330f0443..23e31a826254 100644 --- a/runtime/parachains/src/disputes/slashing.rs +++ b/runtime/parachains/src/disputes/slashing.rs @@ -559,7 +559,7 @@ impl Pallet { >::iter().collect() } - pub fn submit_unsigned_slashing_report( + pub(crate) fn submit_unsigned_slashing_report( dispute_proof: DisputeProof, key_ownership_proof: ::KeyOwnerProof, ) -> Option<()> { diff --git a/runtime/parachains/src/runtime_api_impl/vstaging.rs b/runtime/parachains/src/runtime_api_impl/vstaging.rs index cc0a8d0eb23e..7c7c77d591ad 100644 --- a/runtime/parachains/src/runtime_api_impl/vstaging.rs +++ b/runtime/parachains/src/runtime_api_impl/vstaging.rs @@ -1,4 +1,4 @@ -// Copyright 2017-2022 Parity Technologies (UK) Ltd. +// Copyright 2017-2023 Parity Technologies (UK) Ltd. // This file is part of Polkadot. // Polkadot is free software: you can redistribute it and/or modify @@ -31,3 +31,16 @@ pub fn unapplied_slashes( ) -> Vec<(SessionIndex, CandidateHash, vstaging::slashing::PendingSlashes)> { >::unapplied_slashes() } + +/// Implementation of `submit_report_dispute_lost` runtime API +pub fn submit_unsigned_slashing_report( + dispute_proof: vstaging::slashing::DisputeProof, + key_ownership_proof: vstaging::slashing::OpaqueKeyOwnershipProof, +) -> Option<()> { + let key_ownership_proof = key_ownership_proof.decode()?; + + >::submit_unsigned_slashing_report( + dispute_proof, + key_ownership_proof, + ) +} diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 94f22f703aba..afa12431c606 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1765,13 +1765,11 @@ sp_api::impl_runtime_apis! { fn submit_report_dispute_lost( dispute_proof: vstaging::slashing::DisputeProof, - key_owner_proof: vstaging::slashing::OpaqueKeyOwnershipProof, + key_ownership_proof: vstaging::slashing::OpaqueKeyOwnershipProof, ) -> Option<()> { - let key_owner_proof = key_owner_proof.decode()?; - - ParasSlashing::submit_unsigned_slashing_report( + runtime_parachains::runtime_api_impl::vstaging::submit_unsigned_slashing_report::( dispute_proof, - key_owner_proof, + key_ownership_proof, ) } } From 7caf6514a158f6d99418d3d2148886c86a9dfc03 Mon Sep 17 00:00:00 2001 From: ordian Date: Sun, 5 Feb 2023 10:11:33 -0300 Subject: [PATCH 07/43] Update node/subsystem-types/src/messages.rs Co-authored-by: Marcin S. --- node/subsystem-types/src/messages.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/subsystem-types/src/messages.rs b/node/subsystem-types/src/messages.rs index 5ab6dc6c06bf..bc162dc2d068 100644 --- a/node/subsystem-types/src/messages.rs +++ b/node/subsystem-types/src/messages.rs @@ -613,7 +613,7 @@ pub enum RuntimeApiRequest { RuntimeApiSender>, ), /// Submits an unsigned extrinsic to slash validator who lost a past session dispute. - /// `VStaging`` + /// `VStaging` SubmitReportDisputeLost( vstaging::slashing::DisputeProof, vstaging::slashing::OpaqueKeyOwnershipProof, From 62e3831673a8a55a670e508a08428b68db6caed3 Mon Sep 17 00:00:00 2001 From: Andronik Date: Mon, 27 Feb 2023 14:53:11 +0100 Subject: [PATCH 08/43] revert unrelated fmt changes --- node/core/candidate-validation/src/lib.rs | 5 ++--- node/core/chain-selection/src/db_backend/v1.rs | 5 ++--- node/network/bridge/src/network.rs | 5 ++--- node/network/collator-protocol/src/validator_side/mod.rs | 5 ++--- node/network/statement-distribution/src/error.rs | 5 ++--- node/service/src/lib.rs | 5 ++--- 6 files changed, 12 insertions(+), 18 deletions(-) diff --git a/node/core/candidate-validation/src/lib.rs b/node/core/candidate-validation/src/lib.rs index 93e2563266c6..cf84486f322a 100644 --- a/node/core/candidate-validation/src/lib.rs +++ b/node/core/candidate-validation/src/lib.rs @@ -633,7 +633,7 @@ where // reasonably sure that this is some local problem on the current node. Err(ValidationFailed(e)) }, - Ok(res) => { + Ok(res) => if res.head_data.hash() != candidate_receipt.descriptor.para_head { gum::info!(target: LOG_TARGET, ?para_id, "Invalid candidate (para_head)"); Ok(ValidationResult::Invalid(InvalidCandidate::ParaHeadHashMismatch)) @@ -658,8 +658,7 @@ where } else { Ok(ValidationResult::Valid(outputs, persisted_validation_data)) } - } - }, + }, } } diff --git a/node/core/chain-selection/src/db_backend/v1.rs b/node/core/chain-selection/src/db_backend/v1.rs index 6d173527f357..64c4e37b1502 100644 --- a/node/core/chain-selection/src/db_backend/v1.rs +++ b/node/core/chain-selection/src/db_backend/v1.rs @@ -236,13 +236,12 @@ impl Backend for DbBackend { let val = stagnant_at_iter .filter_map(|r| match r { - Ok((k, v)) => { + Ok((k, v)) => match (decode_stagnant_at_key(&mut &k[..]), >::decode(&mut &v[..]).ok()) { (Some(at), Some(stagnant_at)) => Some(Ok((at, stagnant_at))), _ => None, - } - }, + }, Err(e) => Some(Err(e)), }) .enumerate() diff --git a/node/network/bridge/src/network.rs b/node/network/bridge/src/network.rs index 2947c0dd3fc1..28a84a19b321 100644 --- a/node/network/bridge/src/network.rs +++ b/node/network/bridge/src/network.rs @@ -193,9 +193,8 @@ impl Network for Arc> { match pending_response .send(Err(RequestFailure::Network(OutboundFailure::DialFailure))) { - Err(_) => { - gum::debug!(target: LOG_TARGET, "Sending failed request response failed.") - }, + Err(_) => + gum::debug!(target: LOG_TARGET, "Sending failed request response failed."), Ok(_) => {}, } return diff --git a/node/network/collator-protocol/src/validator_side/mod.rs b/node/network/collator-protocol/src/validator_side/mod.rs index 28c727ae0d27..5d5417fb3001 100644 --- a/node/network/collator-protocol/src/validator_side/mod.rs +++ b/node/network/collator-protocol/src/validator_side/mod.rs @@ -567,9 +567,8 @@ impl CollationsPerRelayParent { self.waiting_collation = next.as_ref().map(|(_, collator_id)| collator_id.clone()); next }, - CollationStatus::WaitingOnValidation | CollationStatus::Fetching => { - unreachable!("We have reset the status above!") - }, + CollationStatus::WaitingOnValidation | CollationStatus::Fetching => + unreachable!("We have reset the status above!"), } } } diff --git a/node/network/statement-distribution/src/error.rs b/node/network/statement-distribution/src/error.rs index d417a1fc45b7..86cbbc8a9877 100644 --- a/node/network/statement-distribution/src/error.rs +++ b/node/network/statement-distribution/src/error.rs @@ -86,9 +86,8 @@ pub fn log_error(result: Result<()>, ctx: &'static str) -> std::result::Result<( match result.into_nested()? { Err(jfyi) => { match jfyi { - JfyiError::RequestedUnannouncedCandidate(_, _) => { - gum::warn!(target: LOG_TARGET, error = %jfyi, ctx) - }, + JfyiError::RequestedUnannouncedCandidate(_, _) => + gum::warn!(target: LOG_TARGET, error = %jfyi, ctx), _ => gum::debug!(target: LOG_TARGET, error = %jfyi, ctx), } Ok(()) diff --git a/node/service/src/lib.rs b/node/service/src/lib.rs index ae9f499df4f2..97b78aaf2aee 100644 --- a/node/service/src/lib.rs +++ b/node/service/src/lib.rs @@ -301,7 +301,7 @@ pub fn open_database(db_source: &DatabaseSource) -> Result, Er path.parent().ok_or(Error::DatabasePathRequired)?.into(), parachains_db::CacheSizes::default(), )?, - DatabaseSource::Auto { paritydb_path, rocksdb_path, .. } => { + DatabaseSource::Auto { paritydb_path, rocksdb_path, .. } => if paritydb_path.is_dir() && paritydb_path.exists() { parachains_db::open_creating_paritydb( paritydb_path.parent().ok_or(Error::DatabasePathRequired)?.into(), @@ -312,8 +312,7 @@ pub fn open_database(db_source: &DatabaseSource) -> Result, Er rocksdb_path.clone(), parachains_db::CacheSizes::default(), )? - } - }, + }, DatabaseSource::Custom { .. } => { unimplemented!("No polkadot subsystem db for custom source."); }, From 5223ef38a00f7061b8233fb5bc6fb3cd30e05e87 Mon Sep 17 00:00:00 2001 From: Andronik Date: Thu, 2 Mar 2023 15:57:41 +0100 Subject: [PATCH 09/43] dispute-coordinator: past session dispute slashing --- .../dispute-coordinator/src/initialized.rs | 110 +++++++++++++++++- .../dispute-coordinator/src/scraping/mod.rs | 23 +++- node/subsystem-util/src/lib.rs | 8 +- node/subsystem-util/src/runtime/mod.rs | 39 ++++++- 4 files changed, 160 insertions(+), 20 deletions(-) diff --git a/node/core/dispute-coordinator/src/initialized.rs b/node/core/dispute-coordinator/src/initialized.rs index daab2838d7ee..b508739388f2 100644 --- a/node/core/dispute-coordinator/src/initialized.rs +++ b/node/core/dispute-coordinator/src/initialized.rs @@ -25,21 +25,23 @@ use futures::{ use sc_keystore::LocalKeystore; +use parity_scale_codec::Encode; use polkadot_node_primitives::{ disputes::ValidCandidateVotes, CandidateVotes, DisputeStatus, SignedDisputeStatement, Timestamp, }; use polkadot_node_subsystem::{ messages::{ ApprovalVotingMessage, BlockDescription, ChainSelectionMessage, DisputeCoordinatorMessage, - DisputeDistributionMessage, ImportStatementsResult, + DisputeDistributionMessage, ImportStatementsResult, RuntimeApiMessage, RuntimeApiRequest, }, - overseer, ActivatedLeaf, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, + overseer, ActivatedLeaf, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, SubsystemSender, }; -use polkadot_node_subsystem_util::rolling_session_window::{ - RollingSessionWindow, SessionWindowUpdate, SessionsUnavailable, +use polkadot_node_subsystem_util::{ + rolling_session_window::{RollingSessionWindow, SessionWindowUpdate, SessionsUnavailable}, + runtime::key_ownership_proof, }; use polkadot_primitives::{ - BlockNumber, CandidateHash, CandidateReceipt, CompactStatement, DisputeStatement, + vstaging, BlockNumber, CandidateHash, CandidateReceipt, CompactStatement, DisputeStatement, DisputeStatementSet, Hash, ScrapedOnChainVotes, SessionIndex, SessionInfo, ValidDisputeStatementKind, ValidatorId, ValidatorIndex, }; @@ -49,6 +51,7 @@ use crate::{ import::{CandidateEnvironment, CandidateVoteState}, is_potential_spam, metrics::Metrics, + scraping::ScrapedUpdates, status::{get_active_with_status, Clock}, DisputeCoordinatorSubsystem, LOG_TARGET, }; @@ -314,9 +317,104 @@ impl Initialized { Ok(SessionWindowUpdate::Unchanged) => {}, }; + let ScrapedUpdates { unapplied_slashes, on_chain_votes, .. } = scraped_updates; + + for (session_index, candidate_hash, pending) in unapplied_slashes { + gum::info!( + target: LOG_TARGET, + ?session_index, + ?candidate_hash, + n_slashes = pending.keys.len(), + "Processing unapplied validator slashes", + ); + + let inclusions = self.scraper.get_blocks_including_candidate(&candidate_hash); + debug_assert!( + !inclusions.is_empty(), + "Couldn't find inclusion parent for an unapplied slash", + ); + + // Find the first inclusion parent that we can use + // to generate key ownership proof on. + // We use inclusion parents because of the proper session index. + let mut key_ownership_proofs = Vec::new(); + let mut dispute_proofs = Vec::new(); + + for (_height, inclusion_parent) in inclusions { + for (validator_index, validator_id) in pending.keys.iter() { + if let Ok(Some(key_ownership_proof)) = key_ownership_proof( + ctx.sender(), + inclusion_parent, + validator_id.clone(), + ) + .await + { + key_ownership_proofs.push(key_ownership_proof); + let time_slot = vstaging::slashing::DisputesTimeSlot::new( + session_index, + candidate_hash.clone(), + ); + let dispute_proof = vstaging::slashing::DisputeProof { + time_slot, + kind: pending.kind, + validator_index: *validator_index, + validator_id: validator_id.clone(), + }; + dispute_proofs.push(dispute_proof); + } + } + + if !key_ownership_proofs.is_empty() { + debug_assert_eq!(key_ownership_proofs.len(), pending.keys.len()); + break + } + } + + debug_assert_eq!(key_ownership_proofs.len(), dispute_proofs.len()); + + for (key_ownership_proof, dispute_proof) in + key_ownership_proofs.into_iter().zip(dispute_proofs.into_iter()) + { + let validator_id = dispute_proof.validator_id.clone(); + let opaque_key_ownership_proof = + vstaging::slashing::OpaqueKeyOwnershipProof::new( + key_ownership_proof.encode(), + ); + // TODO encapsulate runtime api calls better + let (tx, rx) = oneshot::channel(); + ctx.sender() + .send_message(RuntimeApiMessage::Request( + new_leaf.hash, + RuntimeApiRequest::SubmitReportDisputeLost( + dispute_proof, + opaque_key_ownership_proof, + tx, + ), + )) + .await; + if let Err(error) = rx.await? { + gum::warn!( + target: LOG_TARGET, + ?error, + ?session_index, + ?candidate_hash, + "Error reporting pending slash", + ); + } else { + gum::info!( + target: LOG_TARGET, + ?session_index, + ?candidate_hash, + ?validator_id, + "Successfully reported pending slash", + ); + } + } + } + // The `runtime-api` subsystem has an internal queue which serializes the execution, // so there is no point in running these in parallel. - for votes in scraped_updates.on_chain_votes { + for votes in on_chain_votes { let _ = self.process_on_chain_votes(ctx, overlay_db, votes, now).await.map_err( |error| { gum::warn!( diff --git a/node/core/dispute-coordinator/src/scraping/mod.rs b/node/core/dispute-coordinator/src/scraping/mod.rs index 0feff1753d83..90119d3c1f11 100644 --- a/node/core/dispute-coordinator/src/scraping/mod.rs +++ b/node/core/dispute-coordinator/src/scraping/mod.rs @@ -27,9 +27,12 @@ use polkadot_node_subsystem::{ messages::ChainApiMessage, overseer, ActivatedLeaf, ActiveLeavesUpdate, ChainApiError, SubsystemSender, }; -use polkadot_node_subsystem_util::runtime::{get_candidate_events, get_on_chain_votes}; +use polkadot_node_subsystem_util::runtime::{ + get_candidate_events, get_on_chain_votes, get_unapplied_slashes, +}; use polkadot_primitives::{ - BlockNumber, CandidateEvent, CandidateHash, CandidateReceipt, Hash, ScrapedOnChainVotes, + vstaging, BlockNumber, CandidateEvent, CandidateHash, CandidateReceipt, Hash, + ScrapedOnChainVotes, SessionIndex, }; use crate::{ @@ -64,11 +67,16 @@ const LRU_OBSERVED_BLOCKS_CAPACITY: NonZeroUsize = match NonZeroUsize::new(20) { pub struct ScrapedUpdates { pub on_chain_votes: Vec, pub included_receipts: Vec, + pub unapplied_slashes: Vec<(SessionIndex, CandidateHash, vstaging::slashing::PendingSlashes)>, } impl ScrapedUpdates { pub fn new() -> Self { - Self { on_chain_votes: Vec::new(), included_receipts: Vec::new() } + Self { + on_chain_votes: Vec::new(), + included_receipts: Vec::new(), + unapplied_slashes: Vec::new(), + } } } @@ -120,7 +128,7 @@ impl Inclusions { .retain(|_, blocks_including| blocks_including.keys().len() > 0); } - pub fn get(&mut self, candidate: &CandidateHash) -> Vec<(BlockNumber, Hash)> { + pub fn get(&self, candidate: &CandidateHash) -> Vec<(BlockNumber, Hash)> { let mut inclusions_as_vec: Vec<(BlockNumber, Hash)> = Vec::new(); if let Some(blocks_including) = self.inclusions_inner.get(candidate) { for (height, blocks_at_height) in blocks_including.iter() { @@ -252,6 +260,11 @@ impl ChainScraper { } } + // for unapplied slashes, we only look at the latest activated hash, + // it should accumulate them all + let unapplied_slashes = get_unapplied_slashes(sender, activated.hash).await?; + scraped_updates.unapplied_slashes = unapplied_slashes; + self.last_observed_blocks.put(activated.hash, ()); Ok(scraped_updates) @@ -396,7 +409,7 @@ impl ChainScraper { } pub fn get_blocks_including_candidate( - &mut self, + &self, candidate: &CandidateHash, ) -> Vec<(BlockNumber, Hash)> { self.inclusions.get(candidate) diff --git a/node/subsystem-util/src/lib.rs b/node/subsystem-util/src/lib.rs index 3aafc14a7878..a2fc049f3ecc 100644 --- a/node/subsystem-util/src/lib.rs +++ b/node/subsystem-util/src/lib.rs @@ -42,8 +42,8 @@ use futures::channel::{mpsc, oneshot}; use parity_scale_codec::Encode; use polkadot_primitives::{ - AuthorityDiscoveryId, CandidateEvent, CommittedCandidateReceipt, CoreState, EncodeAs, - GroupIndex, GroupRotationInfo, Hash, Id as ParaId, OccupiedCoreAssumption, + vstaging, AuthorityDiscoveryId, CandidateEvent, CandidateHash, CommittedCandidateReceipt, + CoreState, EncodeAs, GroupIndex, GroupRotationInfo, Hash, Id as ParaId, OccupiedCoreAssumption, PersistedValidationData, ScrapedOnChainVotes, SessionIndex, SessionInfo, Signed, SigningContext, ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex, ValidatorSignature, @@ -213,7 +213,9 @@ specialize_requests! { fn request_validation_code_hash(para_id: ParaId, assumption: OccupiedCoreAssumption) -> Option; ValidationCodeHash; fn request_on_chain_votes() -> Option; FetchOnChainVotes; - fn request_session_executor_params(session_index: SessionIndex) -> Option; SessionExecutorParams; + fn request_session_executor_params(session_index: SessionIndex) -> Option;SessionExecutorParams; + fn request_unapplied_slashes() -> Vec<(SessionIndex, CandidateHash, vstaging::slashing::PendingSlashes)>; UnappliedSlashes; + fn request_key_ownership_proof(validator_id: ValidatorId) -> Option; KeyOwnershipProof; } /// Requests executor parameters from the runtime effective at given relay-parent. First obtains diff --git a/node/subsystem-util/src/runtime/mod.rs b/node/subsystem-util/src/runtime/mod.rs index 0d3132ec1fda..889d49edc265 100644 --- a/node/subsystem-util/src/runtime/mod.rs +++ b/node/subsystem-util/src/runtime/mod.rs @@ -27,15 +27,16 @@ use sp_keystore::{CryptoStore, SyncCryptoStorePtr}; use polkadot_node_subsystem::{messages::RuntimeApiMessage, overseer, SubsystemSender}; use polkadot_primitives::{ - CandidateEvent, CoreState, EncodeAs, GroupIndex, GroupRotationInfo, Hash, IndexedVec, - OccupiedCore, ScrapedOnChainVotes, SessionIndex, SessionInfo, Signed, SigningContext, - UncheckedSigned, ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex, + vstaging, CandidateEvent, CandidateHash, CoreState, EncodeAs, GroupIndex, GroupRotationInfo, + Hash, IndexedVec, OccupiedCore, ScrapedOnChainVotes, SessionIndex, SessionInfo, Signed, + SigningContext, UncheckedSigned, ValidationCode, ValidationCodeHash, ValidatorId, + ValidatorIndex, }; use crate::{ - request_availability_cores, request_candidate_events, request_on_chain_votes, - request_session_index_for_child, request_session_info, request_validation_code_by_hash, - request_validator_groups, + request_availability_cores, request_candidate_events, request_key_ownership_proof, + request_on_chain_votes, request_session_index_for_child, request_session_info, + request_unapplied_slashes, request_validation_code_by_hash, request_validator_groups, }; /// Errors that can happen on runtime fetches. @@ -343,3 +344,29 @@ where recv_runtime(request_validation_code_by_hash(relay_parent, validation_code_hash, sender).await) .await } + +/// Fetch a list of `PendingSlashes` from the runtime. +pub async fn get_unapplied_slashes( + sender: &mut Sender, + relay_parent: Hash, +) -> Result> +where + Sender: SubsystemSender, +{ + recv_runtime(request_unapplied_slashes(relay_parent, sender).await).await +} + +/// Generate validator key ownership proof. +/// +/// Note: The choice of `relay_parent` is important here, it needs to match +/// the desired session index of the validator set in question. +pub async fn key_ownership_proof( + sender: &mut Sender, + relay_parent: Hash, + validator_id: ValidatorId, +) -> Result> +where + Sender: SubsystemSender, +{ + recv_runtime(request_key_ownership_proof(relay_parent, validator_id, sender).await).await +} From af6921d851a69b989a4a46be21148280825cc6ee Mon Sep 17 00:00:00 2001 From: Andronik Date: Sun, 5 Mar 2023 19:32:23 +0100 Subject: [PATCH 10/43] encapsule runtime api call for submitting report --- .../dispute-coordinator/src/initialized.rs | 71 +++++++++++-------- node/subsystem-util/src/lib.rs | 1 + node/subsystem-util/src/runtime/mod.rs | 25 ++++++- 3 files changed, 65 insertions(+), 32 deletions(-) diff --git a/node/core/dispute-coordinator/src/initialized.rs b/node/core/dispute-coordinator/src/initialized.rs index b508739388f2..486fc7cbcf65 100644 --- a/node/core/dispute-coordinator/src/initialized.rs +++ b/node/core/dispute-coordinator/src/initialized.rs @@ -32,13 +32,13 @@ use polkadot_node_primitives::{ use polkadot_node_subsystem::{ messages::{ ApprovalVotingMessage, BlockDescription, ChainSelectionMessage, DisputeCoordinatorMessage, - DisputeDistributionMessage, ImportStatementsResult, RuntimeApiMessage, RuntimeApiRequest, + DisputeDistributionMessage, ImportStatementsResult, }, - overseer, ActivatedLeaf, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, SubsystemSender, + overseer, ActivatedLeaf, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, }; use polkadot_node_subsystem_util::{ rolling_session_window::{RollingSessionWindow, SessionWindowUpdate, SessionsUnavailable}, - runtime::key_ownership_proof, + runtime::{key_ownership_proof, submit_report_dispute_lost}, }; use polkadot_primitives::{ vstaging, BlockNumber, CandidateHash, CandidateReceipt, CompactStatement, DisputeStatement, @@ -380,34 +380,43 @@ impl Initialized { vstaging::slashing::OpaqueKeyOwnershipProof::new( key_ownership_proof.encode(), ); - // TODO encapsulate runtime api calls better - let (tx, rx) = oneshot::channel(); - ctx.sender() - .send_message(RuntimeApiMessage::Request( - new_leaf.hash, - RuntimeApiRequest::SubmitReportDisputeLost( - dispute_proof, - opaque_key_ownership_proof, - tx, - ), - )) - .await; - if let Err(error) = rx.await? { - gum::warn!( - target: LOG_TARGET, - ?error, - ?session_index, - ?candidate_hash, - "Error reporting pending slash", - ); - } else { - gum::info!( - target: LOG_TARGET, - ?session_index, - ?candidate_hash, - ?validator_id, - "Successfully reported pending slash", - ); + + let res = submit_report_dispute_lost( + ctx.sender(), + new_leaf.hash, + dispute_proof, + opaque_key_ownership_proof, + ) + .await; + + match res { + Err(error) => { + gum::warn!( + target: LOG_TARGET, + ?error, + ?session_index, + ?candidate_hash, + "Error reporting pending slash", + ); + }, + Ok(Some(())) => { + gum::info!( + target: LOG_TARGET, + ?session_index, + ?candidate_hash, + ?validator_id, + "Successfully reported pending slash", + ); + }, + Ok(None) => { + gum::debug!( + target: LOG_TARGET, + ?session_index, + ?candidate_hash, + ?validator_id, + "Duplicate pending slash report", + ); + }, } } } diff --git a/node/subsystem-util/src/lib.rs b/node/subsystem-util/src/lib.rs index a2fc049f3ecc..45e20209aeaf 100644 --- a/node/subsystem-util/src/lib.rs +++ b/node/subsystem-util/src/lib.rs @@ -216,6 +216,7 @@ specialize_requests! { fn request_session_executor_params(session_index: SessionIndex) -> Option;SessionExecutorParams; fn request_unapplied_slashes() -> Vec<(SessionIndex, CandidateHash, vstaging::slashing::PendingSlashes)>; UnappliedSlashes; fn request_key_ownership_proof(validator_id: ValidatorId) -> Option; KeyOwnershipProof; + fn request_submit_report_dispute_lost(dp: vstaging::slashing::DisputeProof, okop: vstaging::slashing::OpaqueKeyOwnershipProof) -> Option<()>; SubmitReportDisputeLost; } /// Requests executor parameters from the runtime effective at given relay-parent. First obtains diff --git a/node/subsystem-util/src/runtime/mod.rs b/node/subsystem-util/src/runtime/mod.rs index 889d49edc265..b990fe47615c 100644 --- a/node/subsystem-util/src/runtime/mod.rs +++ b/node/subsystem-util/src/runtime/mod.rs @@ -36,7 +36,8 @@ use polkadot_primitives::{ use crate::{ request_availability_cores, request_candidate_events, request_key_ownership_proof, request_on_chain_votes, request_session_index_for_child, request_session_info, - request_unapplied_slashes, request_validation_code_by_hash, request_validator_groups, + request_submit_report_dispute_lost, request_unapplied_slashes, request_validation_code_by_hash, + request_validator_groups, }; /// Errors that can happen on runtime fetches. @@ -370,3 +371,25 @@ where { recv_runtime(request_key_ownership_proof(relay_parent, validator_id, sender).await).await } + +/// Submit a past-session dispute slashing report. +pub async fn submit_report_dispute_lost( + sender: &mut Sender, + relay_parent: Hash, + dispute_proof: vstaging::slashing::DisputeProof, + key_ownership_proof: vstaging::slashing::OpaqueKeyOwnershipProof, +) -> Result> +where + Sender: SubsystemSender, +{ + recv_runtime( + request_submit_report_dispute_lost( + relay_parent, + dispute_proof, + key_ownership_proof, + sender, + ) + .await, + ) + .await +} From 9d4e21f13d2e2aeb93eb057aebd7b2d9347daba0 Mon Sep 17 00:00:00 2001 From: Andronik Date: Sun, 5 Mar 2023 19:54:09 +0100 Subject: [PATCH 11/43] prettify: extract into a function --- .../dispute-coordinator/src/initialized.rs | 198 ++++++++++-------- 1 file changed, 114 insertions(+), 84 deletions(-) diff --git a/node/core/dispute-coordinator/src/initialized.rs b/node/core/dispute-coordinator/src/initialized.rs index 486fc7cbcf65..bbe78a78d058 100644 --- a/node/core/dispute-coordinator/src/initialized.rs +++ b/node/core/dispute-coordinator/src/initialized.rs @@ -319,36 +319,62 @@ impl Initialized { let ScrapedUpdates { unapplied_slashes, on_chain_votes, .. } = scraped_updates; - for (session_index, candidate_hash, pending) in unapplied_slashes { - gum::info!( - target: LOG_TARGET, - ?session_index, - ?candidate_hash, - n_slashes = pending.keys.len(), - "Processing unapplied validator slashes", + self.process_unapplied_slashes(ctx, new_leaf.hash, unapplied_slashes).await; + // The `runtime-api` subsystem has an internal queue which serializes the execution, + // so there is no point in running these in parallel. + for votes in on_chain_votes { + let _ = self.process_on_chain_votes(ctx, overlay_db, votes, now).await.map_err( + |error| { + gum::warn!( + target: LOG_TARGET, + ?error, + "Skipping scraping block due to error", + ); + }, ); + } + } - let inclusions = self.scraper.get_blocks_including_candidate(&candidate_hash); - debug_assert!( - !inclusions.is_empty(), - "Couldn't find inclusion parent for an unapplied slash", - ); + Ok(()) + } - // Find the first inclusion parent that we can use - // to generate key ownership proof on. - // We use inclusion parents because of the proper session index. - let mut key_ownership_proofs = Vec::new(); - let mut dispute_proofs = Vec::new(); - - for (_height, inclusion_parent) in inclusions { - for (validator_index, validator_id) in pending.keys.iter() { - if let Ok(Some(key_ownership_proof)) = key_ownership_proof( - ctx.sender(), - inclusion_parent, - validator_id.clone(), - ) - .await - { + /// For each unapplied (past-session) slash, report an unsigned extrinsic + /// to the runtime. + async fn process_unapplied_slashes( + &mut self, + ctx: &mut Context, + relay_parent: Hash, + unapplied_slashes: Vec<(SessionIndex, CandidateHash, vstaging::slashing::PendingSlashes)>, + ) { + for (session_index, candidate_hash, pending) in unapplied_slashes { + gum::info!( + target: LOG_TARGET, + ?session_index, + ?candidate_hash, + n_slashes = pending.keys.len(), + "Processing unapplied validator slashes", + ); + + let inclusions = self.scraper.get_blocks_including_candidate(&candidate_hash); + debug_assert!( + !inclusions.is_empty(), + "Couldn't find inclusion parent for an unapplied slash", + ); + + // Find the first inclusion parent that we can use + // to generate key ownership proof on. + // We use inclusion parents because of the proper session index. + let mut key_ownership_proofs = Vec::new(); + let mut dispute_proofs = Vec::new(); + + for (_height, inclusion_parent) in inclusions { + for (validator_index, validator_id) in pending.keys.iter() { + let res = + key_ownership_proof(ctx.sender(), inclusion_parent, validator_id.clone()) + .await; + + match res { + Ok(Some(key_ownership_proof)) => { key_ownership_proofs.push(key_ownership_proof); let time_slot = vstaging::slashing::DisputesTimeSlot::new( session_index, @@ -361,82 +387,86 @@ impl Initialized { validator_id: validator_id.clone(), }; dispute_proofs.push(dispute_proof); - } - } - - if !key_ownership_proofs.is_empty() { - debug_assert_eq!(key_ownership_proofs.len(), pending.keys.len()); - break - } - } - - debug_assert_eq!(key_ownership_proofs.len(), dispute_proofs.len()); - - for (key_ownership_proof, dispute_proof) in - key_ownership_proofs.into_iter().zip(dispute_proofs.into_iter()) - { - let validator_id = dispute_proof.validator_id.clone(); - let opaque_key_ownership_proof = - vstaging::slashing::OpaqueKeyOwnershipProof::new( - key_ownership_proof.encode(), - ); - - let res = submit_report_dispute_lost( - ctx.sender(), - new_leaf.hash, - dispute_proof, - opaque_key_ownership_proof, - ) - .await; - - match res { - Err(error) => { - gum::warn!( - target: LOG_TARGET, - ?error, - ?session_index, - ?candidate_hash, - "Error reporting pending slash", - ); - }, - Ok(Some(())) => { - gum::info!( - target: LOG_TARGET, - ?session_index, - ?candidate_hash, - ?validator_id, - "Successfully reported pending slash", - ); }, - Ok(None) => { + Ok(None) => {}, + Err(error) => { gum::debug!( target: LOG_TARGET, + ?error, ?session_index, ?candidate_hash, ?validator_id, - "Duplicate pending slash report", + "Could not generate key ownership proof", ); }, } } + + if !key_ownership_proofs.is_empty() { + debug_assert_eq!(key_ownership_proofs.len(), pending.keys.len()); + break + } } - // The `runtime-api` subsystem has an internal queue which serializes the execution, - // so there is no point in running these in parallel. - for votes in on_chain_votes { - let _ = self.process_on_chain_votes(ctx, overlay_db, votes, now).await.map_err( - |error| { + let expected_keys = pending.keys.len(); + let resolved_keys = key_ownership_proofs.len(); + if resolved_keys < expected_keys { + gum::warn!( + target: LOG_TARGET, + ?session_index, + ?candidate_hash, + "Could not generate key ownership proofs for {} keys", + expected_keys - resolved_keys, + ); + } + debug_assert_eq!(resolved_keys, dispute_proofs.len()); + + for (key_ownership_proof, dispute_proof) in + key_ownership_proofs.into_iter().zip(dispute_proofs.into_iter()) + { + let validator_id = dispute_proof.validator_id.clone(); + let opaque_key_ownership_proof = + vstaging::slashing::OpaqueKeyOwnershipProof::new(key_ownership_proof.encode()); + + let res = submit_report_dispute_lost( + ctx.sender(), + relay_parent, + dispute_proof, + opaque_key_ownership_proof, + ) + .await; + + match res { + Err(error) => { gum::warn!( target: LOG_TARGET, ?error, - "Skipping scraping block due to error", + ?session_index, + ?candidate_hash, + "Error reporting pending slash", ); }, - ); + Ok(Some(())) => { + gum::info!( + target: LOG_TARGET, + ?session_index, + ?candidate_hash, + ?validator_id, + "Successfully reported pending slash", + ); + }, + Ok(None) => { + gum::debug!( + target: LOG_TARGET, + ?session_index, + ?candidate_hash, + ?validator_id, + "Duplicate pending slash report", + ); + }, + } } } - - Ok(()) } /// Scrapes on-chain votes (backing votes and concluded disputes) for a active leaf of the From 39def6acc66dd62fc51124ead0fcd2a4c7568e5e Mon Sep 17 00:00:00 2001 From: Andronik Date: Mon, 6 Mar 2023 14:07:21 +0100 Subject: [PATCH 12/43] do not exit on runtime api error --- node/core/dispute-coordinator/src/scraping/mod.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/node/core/dispute-coordinator/src/scraping/mod.rs b/node/core/dispute-coordinator/src/scraping/mod.rs index 90119d3c1f11..8678e123dca9 100644 --- a/node/core/dispute-coordinator/src/scraping/mod.rs +++ b/node/core/dispute-coordinator/src/scraping/mod.rs @@ -262,8 +262,19 @@ impl ChainScraper { // for unapplied slashes, we only look at the latest activated hash, // it should accumulate them all - let unapplied_slashes = get_unapplied_slashes(sender, activated.hash).await?; - scraped_updates.unapplied_slashes = unapplied_slashes; + match get_unapplied_slashes(sender, activated.hash).await { + Ok(unapplied_slashes) => { + scraped_updates.unapplied_slashes = unapplied_slashes; + }, + Err(error) => { + gum::debug!( + target: LOG_TARGET, + block_hash = ?activated.hash, + ?error, + "Error fetching unapplied slashes.", + ); + }, + } self.last_observed_blocks.put(activated.hash, ()); From 1495b47462edbf705604a5d886359bc9fa246603 Mon Sep 17 00:00:00 2001 From: Andronik Date: Tue, 7 Mar 2023 12:51:00 +0100 Subject: [PATCH 13/43] fix tests --- .../core/dispute-coordinator/src/scraping/tests.rs | 14 ++++++++++++++ node/core/dispute-coordinator/src/tests.rs | 6 ++++++ 2 files changed, 20 insertions(+) diff --git a/node/core/dispute-coordinator/src/scraping/tests.rs b/node/core/dispute-coordinator/src/scraping/tests.rs index b7183739d8f8..12902beaae0b 100644 --- a/node/core/dispute-coordinator/src/scraping/tests.rs +++ b/node/core/dispute-coordinator/src/scraping/tests.rs @@ -81,6 +81,7 @@ impl TestState { ) .await; assert_chain_vote_request(&mut ctx_handle, &chain).await; + assert_unapplied_slashes_request(&mut ctx_handle, &chain).await; }; let (scraper, _) = join(ChainScraper::new(ctx.sender(), leaf.clone()), overseer_fut) @@ -242,6 +243,18 @@ async fn assert_chain_vote_request(virtual_overseer: &mut VirtualOverseer, _chai ); } +async fn assert_unapplied_slashes_request(virtual_overseer: &mut VirtualOverseer, _chain: &[Hash]) { + assert_matches!( + overseer_recv(virtual_overseer).await, + AllMessages::RuntimeApi(RuntimeApiMessage::Request( + _hash, + RuntimeApiRequest::UnappliedSlashes(tx), + )) => { + tx.send(Ok(Vec::new())).unwrap(); + } + ); +} + async fn assert_finalized_block_number_request( virtual_overseer: &mut VirtualOverseer, response: BlockNumber, @@ -287,6 +300,7 @@ async fn overseer_process_active_leaves_update( assert_candidate_events_request(virtual_overseer, chain, event_generator.clone()).await; assert_chain_vote_request(virtual_overseer, chain).await; } + assert_unapplied_slashes_request(virtual_overseer, chain).await; } #[test] diff --git a/node/core/dispute-coordinator/src/tests.rs b/node/core/dispute-coordinator/src/tests.rs index 7d7243243ddf..aae2e5bdfb7b 100644 --- a/node/core/dispute-coordinator/src/tests.rs +++ b/node/core/dispute-coordinator/src/tests.rs @@ -423,6 +423,12 @@ impl TestState { }))) .unwrap(); }, + AllMessages::RuntimeApi(RuntimeApiMessage::Request( + _new_leaf, + RuntimeApiRequest::UnappliedSlashes(tx), + )) => { + tx.send(Ok(Vec::new())).unwrap(); + }, AllMessages::ChainApi(ChainApiMessage::Ancestors { hash, k, response_channel }) => { let target_header = self .headers From eca1786ffa206a444cce56a034ddf7faba3c53eb Mon Sep 17 00:00:00 2001 From: Andronik Date: Tue, 7 Mar 2023 13:36:09 +0100 Subject: [PATCH 14/43] try initial zombienet test --- scripts/ci/gitlab/pipeline/zombienet.yml | 32 ++++++++++++ ...0004-parachains-disputes-past-session.toml | 50 +++++++++++++++++++ ...004-parachains-disputes-past-session.zndsl | 32 ++++++++++++ 3 files changed, 114 insertions(+) create mode 100644 zombienet_tests/functional/0004-parachains-disputes-past-session.toml create mode 100644 zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl diff --git a/scripts/ci/gitlab/pipeline/zombienet.yml b/scripts/ci/gitlab/pipeline/zombienet.yml index be61502eb8a8..1f1c6704fdfb 100644 --- a/scripts/ci/gitlab/pipeline/zombienet.yml +++ b/scripts/ci/gitlab/pipeline/zombienet.yml @@ -124,6 +124,38 @@ zombienet-tests-parachains-disputes-garbage-candidate: tags: - zombienet-polkadot-integration-test +zombienet-tests-parachains-disputes-past-session: + stage: zombienet + image: "${ZOMBIENET_IMAGE}" + extends: + - .kubernetes-env + - .zombienet-refs + needs: + - job: publish-polkadot-debug-image + - job: publish-test-collators-image + - job: publish-malus-image + variables: + GH_DIR: "https://github.com/paritytech/polkadot/tree/${CI_COMMIT_SHORT_SHA}/zombienet_tests/functional" + before_script: + - echo "Zombie-net Tests Config" + - echo "${ZOMBIENET_IMAGE_NAME}" + - echo "${PARACHAINS_IMAGE_NAME} ${PARACHAINS_IMAGE_TAG}" + - echo "${MALUS_IMAGE_NAME} ${MALUS_IMAGE_TAG}" + - echo "${GH_DIR}" + - export DEBUG=zombie,zombie::network-node + - export ZOMBIENET_INTEGRATION_TEST_IMAGE=${PARACHAINS_IMAGE_NAME}:${PARACHAINS_IMAGE_TAG} + - export MALUS_IMAGE=${MALUS_IMAGE_NAME}:${MALUS_IMAGE_TAG} + - export COL_IMAGE=${COLLATOR_IMAGE_NAME}:${COLLATOR_IMAGE_TAG} + script: + - /home/nonroot/zombie-net/scripts/ci/run-test-env-manager.sh + --github-remote-dir="${GH_DIR}" + --test="0004-parachains-disputes-past-session.zndsl" + allow_failure: true + retry: 2 + tags: + - zombienet-polkadot-integration-test + + zombienet-test-parachains-upgrade-smoke-test: stage: zombienet image: "${ZOMBIENET_IMAGE}" diff --git a/zombienet_tests/functional/0004-parachains-disputes-past-session.toml b/zombienet_tests/functional/0004-parachains-disputes-past-session.toml new file mode 100644 index 000000000000..76a9144a0d4d --- /dev/null +++ b/zombienet_tests/functional/0004-parachains-disputes-past-session.toml @@ -0,0 +1,50 @@ +[settings] +timeout = 1000 +bootnode = true + +[relaychain.genesis.runtime.runtime_genesis_config.configuration.config] + max_validators_per_core = 1 + needed_approvals = 3 + +[relaychain] +default_image = "{{ZOMBIENET_INTEGRATION_TEST_IMAGE}}" +chain = "westend-local" # using westend-local to enable slashing +chain_spec_command = "polkadot build-spec --chain westend-local --disable-default-bootnode" +default_command = "polkadot" + +[relaychain.default_resources] +limits = { memory = "4G", cpu = "2" } +requests = { memory = "2G", cpu = "1" } + + [[relaychain.nodes]] + name = "alice" + invulnerable = true # it will go offline, we don't want to disable it + args = [ "--alice", "-lparachain=debug" ] + + [[relaychain.node_groups]] + name = "honest-validator" + count = 2 + args = ["-lparachain=debug,runtime=debug"] + + [[relaychain.node_groups]] + image = "{{MALUS_IMAGE}}" + name = "malus-validator" + command = "malus suggest-garbage-candidate" + args = ["-lparachain=debug,MALUS=trace"] + count = 1 + +[[parachains]] +id = 2000 +addToGenesis = true +genesis_state_generator = "undying-collator export-genesis-state --pov-size=100000 --pvf-complexity=1" + + [parachains.collator] + name = "collator01" + image = "{{COL_IMAGE}}" + command = "undying-collator" + args = ["-lparachain=debug", "--pov-size=100000", "--pvf-complexity=1", "--parachain-id=2000"] + +[types.Header] +number = "u64" +parent_hash = "Hash" +post_state = "Hash" diff --git a/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl b/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl new file mode 100644 index 000000000000..fb2dae5c87f2 --- /dev/null +++ b/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl @@ -0,0 +1,32 @@ +Description: Past-session dispute slashing +Network: ./0004-parachains-disputes-past-session.toml +Creds: config + +alice: reports node_roles is 4 + +# pause alice so that disputes don't conclude +alice: pause + +# Ensure parachain is registered. +honest-validator-0: parachain 2000 is registered within 30 seconds + +# Ensure parachain made progress. +honest-validator-0: parachain 2000 block height is at least 1 within 60 seconds + +# There should be disputes initiated +honest-validator-0: reports parachain_candidate_disputes_total is at least 1 within 60 seconds + +# But should not resolve +honest-validator-0: reports polkadot_parachain_disputes_finality_lag is higher than 20 within 200 seconds + +# Now resume alice +alice: resume + +# Disputes should start concluding now +honest-validator-0: reports parachain_candidate_dispute_concluded{validity="invalid"} is at least 1 within 60 seconds +# Disputes should always end as "invalid" +honest-validator-0: reports parachain_candidate_dispute_concluded{validity="valid"} is 0 + +# Check an unsigned extrinsic is submitted +# TODO: how to match on all honest validator logs? +alice: log line contains "Successfully reported pending slash" within 180 seconds From 13b62711f90bfdc8a9d371490a827c0ba2ba5157 Mon Sep 17 00:00:00 2001 From: Andronik Date: Tue, 7 Mar 2023 14:09:53 +0100 Subject: [PATCH 15/43] try something --- .../functional/0004-parachains-disputes-past-session.toml | 2 +- .../functional/0004-parachains-disputes-past-session.zndsl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/zombienet_tests/functional/0004-parachains-disputes-past-session.toml b/zombienet_tests/functional/0004-parachains-disputes-past-session.toml index 76a9144a0d4d..61f6ebd0dfd3 100644 --- a/zombienet_tests/functional/0004-parachains-disputes-past-session.toml +++ b/zombienet_tests/functional/0004-parachains-disputes-past-session.toml @@ -2,7 +2,7 @@ timeout = 1000 bootnode = true -[relaychain.genesis.runtime.runtime_genesis_config.configuration.config] +[relaychain.genesis.runtime.configuration.config] max_validators_per_core = 1 needed_approvals = 3 diff --git a/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl b/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl index fb2dae5c87f2..aa0b4c9b7992 100644 --- a/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl +++ b/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl @@ -17,7 +17,7 @@ honest-validator-0: parachain 2000 block height is at least 1 within 60 seconds honest-validator-0: reports parachain_candidate_disputes_total is at least 1 within 60 seconds # But should not resolve -honest-validator-0: reports polkadot_parachain_disputes_finality_lag is higher than 20 within 200 seconds +honest-validator-0: reports polkadot_parachain_disputes_finality_lag is at least than 20 within 200 seconds # Now resume alice alice: resume From 77ec15a6138a4076f6d8619677840ac67527070a Mon Sep 17 00:00:00 2001 From: Andronik Date: Tue, 7 Mar 2023 14:12:08 +0100 Subject: [PATCH 16/43] fix a typo --- .../functional/0004-parachains-disputes-past-session.zndsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl b/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl index aa0b4c9b7992..59fc7df1a739 100644 --- a/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl +++ b/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl @@ -17,7 +17,7 @@ honest-validator-0: parachain 2000 block height is at least 1 within 60 seconds honest-validator-0: reports parachain_candidate_disputes_total is at least 1 within 60 seconds # But should not resolve -honest-validator-0: reports polkadot_parachain_disputes_finality_lag is at least than 20 within 200 seconds +honest-validator-0: reports polkadot_parachain_disputes_finality_lag is at least 20 within 200 seconds # Now resume alice alice: resume From 49cb564912cc664106ca8eeb3f44df17a69557be Mon Sep 17 00:00:00 2001 From: Andronik Date: Tue, 7 Mar 2023 16:11:38 +0100 Subject: [PATCH 17/43] try cumulus-based collator --- .../0004-parachains-disputes-past-session.toml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/zombienet_tests/functional/0004-parachains-disputes-past-session.toml b/zombienet_tests/functional/0004-parachains-disputes-past-session.toml index 61f6ebd0dfd3..0549c43556de 100644 --- a/zombienet_tests/functional/0004-parachains-disputes-past-session.toml +++ b/zombienet_tests/functional/0004-parachains-disputes-past-session.toml @@ -35,16 +35,12 @@ requests = { memory = "2G", cpu = "1" } [[parachains]] id = 2000 -addToGenesis = true -genesis_state_generator = "undying-collator export-genesis-state --pov-size=100000 --pvf-complexity=1" +cumulus_based = true [parachains.collator] - name = "collator01" - image = "{{COL_IMAGE}}" - command = "undying-collator" - args = ["-lparachain=debug", "--pov-size=100000", "--pvf-complexity=1", "--parachain-id=2000"] - -[types.Header] -number = "u64" -parent_hash = "Hash" -post_state = "Hash" + name = "collator" + command = "polkadot-parachain" + image = "docker.io/parity/polkadot-parachain:latest" + # image = "{{COL_IMAGE}}" + args = ["-lparachain=debug"] + From 288696e6051e92678c79964962e5b5afb05fcdc3 Mon Sep 17 00:00:00 2001 From: Andronik Date: Thu, 9 Mar 2023 11:56:36 +0100 Subject: [PATCH 18/43] fix clippy --- node/core/dispute-coordinator/src/initialized.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/core/dispute-coordinator/src/initialized.rs b/node/core/dispute-coordinator/src/initialized.rs index 684daf7af6c9..7adc0ce5012d 100644 --- a/node/core/dispute-coordinator/src/initialized.rs +++ b/node/core/dispute-coordinator/src/initialized.rs @@ -388,7 +388,7 @@ impl Initialized { key_ownership_proofs.push(key_ownership_proof); let time_slot = vstaging::slashing::DisputesTimeSlot::new( session_index, - candidate_hash.clone(), + candidate_hash, ); let dispute_proof = vstaging::slashing::DisputeProof { time_slot, From 36d60d9a79cff1ed40ccc8b598728c795783c3a9 Mon Sep 17 00:00:00 2001 From: Andronik Date: Thu, 9 Mar 2023 12:12:03 +0100 Subject: [PATCH 19/43] build polkadot-debug images with fast-runtime enabled --- scripts/ci/gitlab/pipeline/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/gitlab/pipeline/build.yml b/scripts/ci/gitlab/pipeline/build.yml index 201b76afe79b..0357a5d09216 100644 --- a/scripts/ci/gitlab/pipeline/build.yml +++ b/scripts/ci/gitlab/pipeline/build.yml @@ -21,7 +21,7 @@ build-linux-stable: # Ensure we run the UI tests. RUN_UI_TESTS: 1 script: - - time cargo build --profile testnet --features pyroscope --verbose --bin polkadot + - time cargo build --profile testnet --features pyroscope,fast-runtime --verbose --bin polkadot # pack artifacts - mkdir -p ./artifacts - VERSION="${CI_COMMIT_REF_NAME}" # will be tag or branch name From 1494ff9d97b9585cb3eaac959437d01508607a94 Mon Sep 17 00:00:00 2001 From: Andronik Date: Tue, 21 Mar 2023 15:44:19 +0100 Subject: [PATCH 20/43] wip --- node/malus/Cargo.toml | 1 + ...0004-parachains-disputes-past-session.toml | 21 +++++++++++-------- ...004-parachains-disputes-past-session.zndsl | 16 +++++++------- 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/node/malus/Cargo.toml b/node/malus/Cargo.toml index c783693ca527..97752af8d71d 100644 --- a/node/malus/Cargo.toml +++ b/node/malus/Cargo.toml @@ -37,6 +37,7 @@ rand = "0.8.5" [features] default = [] +fast-runtime = ["polkadot-cli/fast-runtime"] [dev-dependencies] polkadot-node-subsystem-test-helpers = { path = "../subsystem-test-helpers" } diff --git a/zombienet_tests/functional/0004-parachains-disputes-past-session.toml b/zombienet_tests/functional/0004-parachains-disputes-past-session.toml index 0549c43556de..9287ccfb32d2 100644 --- a/zombienet_tests/functional/0004-parachains-disputes-past-session.toml +++ b/zombienet_tests/functional/0004-parachains-disputes-past-session.toml @@ -9,8 +9,7 @@ bootnode = true [relaychain] default_image = "{{ZOMBIENET_INTEGRATION_TEST_IMAGE}}" chain = "westend-local" # using westend-local to enable slashing -chain_spec_command = "polkadot build-spec --chain westend-local --disable-default-bootnode" -default_command = "polkadot" +default_command = "./bin/polkadot-fast-runtime" [relaychain.default_resources] limits = { memory = "4G", cpu = "2" } @@ -19,28 +18,32 @@ requests = { memory = "2G", cpu = "1" } [[relaychain.nodes]] name = "alice" invulnerable = true # it will go offline, we don't want to disable it - args = [ "--alice", "-lparachain=debug" ] + args = ["-lparachain=debug,runtime=debug"] + + [[relaychain.nodes]] + name = "bob" + invulnerable = true # it will go offline, we don't want to disable it + args = ["-lparachain=debug,runtime=debug"] [[relaychain.node_groups]] name = "honest-validator" - count = 2 + count = 4 args = ["-lparachain=debug,runtime=debug"] [[relaychain.node_groups]] image = "{{MALUS_IMAGE}}" name = "malus-validator" - command = "malus suggest-garbage-candidate" - args = ["-lparachain=debug,MALUS=trace"] + command = "./bin/malus suggest-garbage-candidate" + args = ["-lparachain=debug,runtime=debug"] count = 1 [[parachains]] -id = 2000 +id = 1000 cumulus_based = true [parachains.collator] name = "collator" - command = "polkadot-parachain" + command = "./bin/cumulus" image = "docker.io/parity/polkadot-parachain:latest" # image = "{{COL_IMAGE}}" args = ["-lparachain=debug"] - diff --git a/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl b/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl index 59fc7df1a739..4eb71919f209 100644 --- a/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl +++ b/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl @@ -4,29 +4,31 @@ Creds: config alice: reports node_roles is 4 -# pause alice so that disputes don't conclude +# pause alice and bob so that disputes don't conclude alice: pause +bob: pause # Ensure parachain is registered. -honest-validator-0: parachain 2000 is registered within 30 seconds +honest-validator-0: parachain 1000 is registered within 100 seconds # Ensure parachain made progress. -honest-validator-0: parachain 2000 block height is at least 1 within 60 seconds +honest-validator-0: parachain 1000 block height is at least 1 within 300 seconds # There should be disputes initiated -honest-validator-0: reports parachain_candidate_disputes_total is at least 1 within 60 seconds +honest-validator-0: reports parachain_candidate_disputes_total is at least 1 within 200 seconds # But should not resolve honest-validator-0: reports polkadot_parachain_disputes_finality_lag is at least 20 within 200 seconds -# Now resume alice +# Now resume alice and bob +bob: resume alice: resume # Disputes should start concluding now -honest-validator-0: reports parachain_candidate_dispute_concluded{validity="invalid"} is at least 1 within 60 seconds +honest-validator-0: reports parachain_candidate_dispute_concluded{validity="invalid"} is at least 1 within 200 seconds # Disputes should always end as "invalid" honest-validator-0: reports parachain_candidate_dispute_concluded{validity="valid"} is 0 # Check an unsigned extrinsic is submitted # TODO: how to match on all honest validator logs? -alice: log line contains "Successfully reported pending slash" within 180 seconds +honest-validator-0: log line contains "Successfully reported pending slash" within 180 seconds From aafc9b02a014f75fb52ca941cd1d8d86fbdd5d7b Mon Sep 17 00:00:00 2001 From: Andronik Date: Tue, 21 Mar 2023 15:56:54 +0100 Subject: [PATCH 21/43] runtime/inclusion: fix availability_threshold --- primitives/src/v4/mod.rs | 4 ++-- runtime/parachains/src/inclusion/mod.rs | 12 +++++------- runtime/parachains/src/inclusion/tests.rs | 7 +++++++ 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/primitives/src/v4/mod.rs b/primitives/src/v4/mod.rs index 82d7954b8090..35f8b1acd3fb 100644 --- a/primitives/src/v4/mod.rs +++ b/primitives/src/v4/mod.rs @@ -1592,13 +1592,13 @@ where /// The maximum number of validators `f` which may safely be faulty. /// /// The total number of validators is `n = 3f + e` where `e in { 1, 2, 3 }`. -pub fn byzantine_threshold(n: usize) -> usize { +pub const fn byzantine_threshold(n: usize) -> usize { n.saturating_sub(1) / 3 } /// The supermajority threshold of validators which represents a subset /// guaranteed to have at least f+1 honest validators. -pub fn supermajority_threshold(n: usize) -> usize { +pub const fn supermajority_threshold(n: usize) -> usize { n - byzantine_threshold(n) } diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index d73dac903128..f7979597d4bb 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -28,10 +28,10 @@ use bitvec::{order::Lsb0 as BitOrderLsb0, vec::BitVec}; use frame_support::pallet_prelude::*; use parity_scale_codec::{Decode, Encode}; use primitives::{ - AvailabilityBitfield, BackedCandidate, CandidateCommitments, CandidateDescriptor, - CandidateHash, CandidateReceipt, CommittedCandidateReceipt, CoreIndex, GroupIndex, Hash, - HeadData, Id as ParaId, SigningContext, UncheckedSignedAvailabilityBitfields, ValidatorId, - ValidatorIndex, ValidityAttestation, + supermajority_threshold, AvailabilityBitfield, BackedCandidate, CandidateCommitments, + CandidateDescriptor, CandidateHash, CandidateReceipt, CommittedCandidateReceipt, CoreIndex, + GroupIndex, Hash, HeadData, Id as ParaId, SigningContext, UncheckedSignedAvailabilityBitfields, + ValidatorId, ValidatorIndex, ValidityAttestation, }; use scale_info::TypeInfo; use sp_runtime::{traits::One, DispatchError}; @@ -899,9 +899,7 @@ impl Pallet { } const fn availability_threshold(n_validators: usize) -> usize { - let mut threshold = (n_validators * 2) / 3; - threshold += (n_validators * 2) % 3; - threshold + supermajority_threshold(n_validators) } #[derive(derive_more::From, Debug)] diff --git a/runtime/parachains/src/inclusion/tests.rs b/runtime/parachains/src/inclusion/tests.rs index 818058d460f8..a9d973ea85af 100644 --- a/runtime/parachains/src/inclusion/tests.rs +++ b/runtime/parachains/src/inclusion/tests.rs @@ -713,6 +713,13 @@ fn bitfield_checks() { }); } +#[test] +fn availability_threshold_is_supermajority() { + assert_eq!(3, availability_threshold(4)); + assert_eq!(5, availability_threshold(6)); + assert_eq!(7, availability_threshold(9)); +} + #[test] fn supermajority_bitfields_trigger_availability() { let chain_a = ParaId::from(1_u32); From dc6452e6a7428dcea96e05efec7c013b401bcfcd Mon Sep 17 00:00:00 2001 From: Andronik Date: Tue, 21 Mar 2023 16:04:00 +0100 Subject: [PATCH 22/43] fix wip --- .../functional/0004-parachains-disputes-past-session.toml | 7 +------ .../functional/0004-parachains-disputes-past-session.zndsl | 6 ++---- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/zombienet_tests/functional/0004-parachains-disputes-past-session.toml b/zombienet_tests/functional/0004-parachains-disputes-past-session.toml index 9287ccfb32d2..da62f3ab668a 100644 --- a/zombienet_tests/functional/0004-parachains-disputes-past-session.toml +++ b/zombienet_tests/functional/0004-parachains-disputes-past-session.toml @@ -20,14 +20,9 @@ requests = { memory = "2G", cpu = "1" } invulnerable = true # it will go offline, we don't want to disable it args = ["-lparachain=debug,runtime=debug"] - [[relaychain.nodes]] - name = "bob" - invulnerable = true # it will go offline, we don't want to disable it - args = ["-lparachain=debug,runtime=debug"] - [[relaychain.node_groups]] name = "honest-validator" - count = 4 + count = 2 args = ["-lparachain=debug,runtime=debug"] [[relaychain.node_groups]] diff --git a/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl b/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl index 4eb71919f209..50fec8e7b5f4 100644 --- a/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl +++ b/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl @@ -4,9 +4,8 @@ Creds: config alice: reports node_roles is 4 -# pause alice and bob so that disputes don't conclude +# pause alice so that disputes don't conclude alice: pause -bob: pause # Ensure parachain is registered. honest-validator-0: parachain 1000 is registered within 100 seconds @@ -20,8 +19,7 @@ honest-validator-0: reports parachain_candidate_disputes_total is at least 1 wit # But should not resolve honest-validator-0: reports polkadot_parachain_disputes_finality_lag is at least 20 within 200 seconds -# Now resume alice and bob -bob: resume +# Now resume alice alice: resume # Disputes should start concluding now From b8e8c24c9ba2103c2d56bed73d89a72dafaf91c7 Mon Sep 17 00:00:00 2001 From: Andronik Date: Tue, 21 Mar 2023 17:13:54 +0100 Subject: [PATCH 23/43] fix wip II --- .../functional/0004-parachains-disputes-past-session.toml | 3 ++- .../functional/0004-parachains-disputes-past-session.zndsl | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/zombienet_tests/functional/0004-parachains-disputes-past-session.toml b/zombienet_tests/functional/0004-parachains-disputes-past-session.toml index da62f3ab668a..07a610e65336 100644 --- a/zombienet_tests/functional/0004-parachains-disputes-past-session.toml +++ b/zombienet_tests/functional/0004-parachains-disputes-past-session.toml @@ -5,6 +5,7 @@ bootnode = true [relaychain.genesis.runtime.configuration.config] max_validators_per_core = 1 needed_approvals = 3 + group_rotation_frequency = 4 [relaychain] default_image = "{{ZOMBIENET_INTEGRATION_TEST_IMAGE}}" @@ -29,7 +30,7 @@ requests = { memory = "2G", cpu = "1" } image = "{{MALUS_IMAGE}}" name = "malus-validator" command = "./bin/malus suggest-garbage-candidate" - args = ["-lparachain=debug,runtime=debug"] + args = ["-lMALUS=trace"] count = 1 [[parachains]] diff --git a/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl b/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl index 50fec8e7b5f4..ca2b1cb39d83 100644 --- a/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl +++ b/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl @@ -17,7 +17,7 @@ honest-validator-0: parachain 1000 block height is at least 1 within 300 seconds honest-validator-0: reports parachain_candidate_disputes_total is at least 1 within 200 seconds # But should not resolve -honest-validator-0: reports polkadot_parachain_disputes_finality_lag is at least 20 within 200 seconds +honest-validator-0: reports polkadot_parachain_disputes_finality_lag is at least 15 within 200 seconds # Now resume alice alice: resume From 4dce060be6ddfe6f224d3f3f8c19c2a49cdde648 Mon Sep 17 00:00:00 2001 From: Andronik Date: Tue, 21 Mar 2023 17:17:03 +0100 Subject: [PATCH 24/43] revert native provider --- .../functional/0004-parachains-disputes-past-session.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zombienet_tests/functional/0004-parachains-disputes-past-session.toml b/zombienet_tests/functional/0004-parachains-disputes-past-session.toml index 07a610e65336..cfcba43684d6 100644 --- a/zombienet_tests/functional/0004-parachains-disputes-past-session.toml +++ b/zombienet_tests/functional/0004-parachains-disputes-past-session.toml @@ -10,7 +10,7 @@ bootnode = true [relaychain] default_image = "{{ZOMBIENET_INTEGRATION_TEST_IMAGE}}" chain = "westend-local" # using westend-local to enable slashing -default_command = "./bin/polkadot-fast-runtime" +default_command = "polkadot" [relaychain.default_resources] limits = { memory = "4G", cpu = "2" } @@ -29,7 +29,7 @@ requests = { memory = "2G", cpu = "1" } [[relaychain.node_groups]] image = "{{MALUS_IMAGE}}" name = "malus-validator" - command = "./bin/malus suggest-garbage-candidate" + command = "malus suggest-garbage-candidate" args = ["-lMALUS=trace"] count = 1 @@ -39,7 +39,7 @@ cumulus_based = true [parachains.collator] name = "collator" - command = "./bin/cumulus" + command = "polkadot-parachain" image = "docker.io/parity/polkadot-parachain:latest" # image = "{{COL_IMAGE}}" args = ["-lparachain=debug"] From 92fe5b45ec4de850f279add3a284a5bc2e727a2c Mon Sep 17 00:00:00 2001 From: Andronik Date: Thu, 23 Mar 2023 16:42:53 +0100 Subject: [PATCH 25/43] propagate tx submission error --- runtime/parachains/src/disputes/slashing.rs | 36 ++++++++++++--------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/runtime/parachains/src/disputes/slashing.rs b/runtime/parachains/src/disputes/slashing.rs index 23e31a826254..d93bfa499d7e 100644 --- a/runtime/parachains/src/disputes/slashing.rs +++ b/runtime/parachains/src/disputes/slashing.rs @@ -705,22 +705,26 @@ where }; match SubmitTransaction::>::submit_unsigned_transaction(call.into()) { - Ok(()) => log::info!( - target: LOG_TARGET, - "Submitted dispute slashing report, session({}), index({}), kind({:?})", - session_index, - validator_index, - kind, - ), - Err(()) => log::error!( - target: LOG_TARGET, - "Error submitting dispute slashing report, session({}), index({}), kind({:?})", - session_index, - validator_index, - kind, - ), + Ok(()) => { + log::info!( + target: LOG_TARGET, + "Submitted dispute slashing report, session({}), index({}), kind({:?})", + session_index, + validator_index, + kind, + ); + Ok(()) + }, + Err(()) => { + log::error!( + target: LOG_TARGET, + "Error submitting dispute slashing report, session({}), index({}), kind({:?})", + session_index, + validator_index, + kind, + ); + Err(sp_runtime::DispatchError::Other("")) + }, } - - Ok(()) } } From cc96d7f2103e3cdc7c5dfcb3c4bedd28518fdd39 Mon Sep 17 00:00:00 2001 From: Andronik Date: Fri, 24 Mar 2023 16:05:54 +0100 Subject: [PATCH 26/43] DEBUG: sync=trace --- .../functional/0004-parachains-disputes-past-session.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zombienet_tests/functional/0004-parachains-disputes-past-session.toml b/zombienet_tests/functional/0004-parachains-disputes-past-session.toml index cfcba43684d6..3b05c91e1343 100644 --- a/zombienet_tests/functional/0004-parachains-disputes-past-session.toml +++ b/zombienet_tests/functional/0004-parachains-disputes-past-session.toml @@ -24,7 +24,7 @@ requests = { memory = "2G", cpu = "1" } [[relaychain.node_groups]] name = "honest-validator" count = 2 - args = ["-lparachain=debug,runtime=debug"] + args = ["-lruntime=debug,sync=trace"] [[relaychain.node_groups]] image = "{{MALUS_IMAGE}}" From e9dc42b7b696839918153a515ba1c1c83a10d692 Mon Sep 17 00:00:00 2001 From: Andronik Date: Tue, 28 Mar 2023 13:17:32 +0200 Subject: [PATCH 27/43] print key ownership proof len --- Cargo.lock | 374 +++++++++--------- .../dispute-coordinator/src/initialized.rs | 12 +- 2 files changed, 198 insertions(+), 188 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 048a76afb9ff..7a3dd48db4ed 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -472,7 +472,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "hash-db", "log", @@ -2364,7 +2364,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "parity-scale-codec", ] @@ -2387,7 +2387,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-support", "frame-support-procedural", @@ -2412,7 +2412,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "Inflector", "array-bytes", @@ -2459,7 +2459,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2470,7 +2470,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2487,7 +2487,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-support", "frame-system", @@ -2516,7 +2516,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "futures", "log", @@ -2532,7 +2532,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "bitflags", "environmental", @@ -2565,7 +2565,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "Inflector", "cfg-expr", @@ -2580,7 +2580,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2592,7 +2592,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "proc-macro2", "quote", @@ -2602,7 +2602,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -2626,7 +2626,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-support", "frame-system", @@ -2637,7 +2637,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-support", "log", @@ -2655,7 +2655,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -2670,7 +2670,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "parity-scale-codec", "sp-api", @@ -2679,7 +2679,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-support", "parity-scale-codec", @@ -2861,7 +2861,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "chrono", "frame-election-provider-support", @@ -4653,7 +4653,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "futures", "log", @@ -4672,7 +4672,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "anyhow", "jsonrpsee", @@ -5149,9 +5149,9 @@ dependencies = [ [[package]] name = "orchestra" -version = "0.0.4" +version = "0.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17e7d5b6bb115db09390bed8842c94180893dd83df3dfce7354f2a2aa090a4ee" +checksum = "227585216d05ba65c7ab0a0450a3cf2cbd81a98862a54c4df8e14d5ac6adb015" dependencies = [ "async-trait", "dyn-clonable", @@ -5166,9 +5166,9 @@ dependencies = [ [[package]] name = "orchestra-proc-macro" -version = "0.0.4" +version = "0.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2af4dabb2286b0be0e9711d2d24e25f6217048b71210cffd3daddc3b5c84e1f" +checksum = "2871aadd82a2c216ee68a69837a526dfe788ecbe74c4c5038a6acdbff6653066" dependencies = [ "expander 0.0.6", "itertools", @@ -5234,7 +5234,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5249,7 +5249,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-support", "frame-system", @@ -5265,7 +5265,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-support", "frame-system", @@ -5279,7 +5279,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5303,7 +5303,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5323,7 +5323,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-election-provider-support", "frame-remote-externalities", @@ -5342,7 +5342,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5357,7 +5357,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-support", "frame-system", @@ -5376,7 +5376,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "array-bytes", "binary-merkle-tree", @@ -5400,7 +5400,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5418,7 +5418,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5437,7 +5437,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5454,7 +5454,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5471,7 +5471,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5489,7 +5489,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5512,7 +5512,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5525,7 +5525,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5543,7 +5543,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5561,7 +5561,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5584,7 +5584,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5600,7 +5600,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5620,7 +5620,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5637,7 +5637,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5654,7 +5654,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5671,7 +5671,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5687,7 +5687,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5703,7 +5703,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-support", "frame-system", @@ -5720,7 +5720,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5740,7 +5740,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -5751,7 +5751,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-support", "frame-system", @@ -5768,7 +5768,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5792,7 +5792,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5809,7 +5809,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5824,7 +5824,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5842,7 +5842,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5857,7 +5857,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5876,7 +5876,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5893,7 +5893,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-support", "frame-system", @@ -5914,7 +5914,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5930,7 +5930,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-support", "frame-system", @@ -5944,7 +5944,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5967,7 +5967,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5978,7 +5978,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "log", "sp-arithmetic", @@ -5987,7 +5987,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "parity-scale-codec", "sp-api", @@ -5996,7 +5996,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6013,7 +6013,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-support", "frame-system", @@ -6027,7 +6027,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6045,7 +6045,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6064,7 +6064,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-support", "frame-system", @@ -6080,7 +6080,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6096,7 +6096,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6108,7 +6108,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6125,7 +6125,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6140,7 +6140,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6156,7 +6156,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6171,7 +6171,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -9122,7 +9122,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "log", "sp-core", @@ -9133,7 +9133,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "async-trait", "futures", @@ -9161,7 +9161,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "futures", "futures-timer", @@ -9184,7 +9184,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9199,7 +9199,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -9218,7 +9218,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9229,7 +9229,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "array-bytes", "chrono", @@ -9269,7 +9269,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "fnv", "futures", @@ -9295,7 +9295,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "hash-db", "kvdb", @@ -9321,7 +9321,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "async-trait", "futures", @@ -9346,7 +9346,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "async-trait", "fork-tree", @@ -9385,7 +9385,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "futures", "jsonrpsee", @@ -9407,7 +9407,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "array-bytes", "async-trait", @@ -9442,7 +9442,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "futures", "jsonrpsee", @@ -9461,7 +9461,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9474,7 +9474,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "ahash 0.8.2", "array-bytes", @@ -9514,7 +9514,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "finality-grandpa", "futures", @@ -9534,7 +9534,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "async-trait", "futures", @@ -9557,7 +9557,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "lru 0.8.1", "parity-scale-codec", @@ -9581,7 +9581,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -9594,7 +9594,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "log", "sc-allocator", @@ -9607,7 +9607,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "anyhow", "cfg-if", @@ -9625,7 +9625,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "ansi_term", "futures", @@ -9641,7 +9641,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "array-bytes", "async-trait", @@ -9656,7 +9656,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "array-bytes", "async-channel", @@ -9700,7 +9700,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "cid", "futures", @@ -9720,7 +9720,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "array-bytes", "async-trait", @@ -9748,7 +9748,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "ahash 0.8.2", "futures", @@ -9767,7 +9767,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "array-bytes", "futures", @@ -9789,7 +9789,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "array-bytes", "async-trait", @@ -9823,7 +9823,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "array-bytes", "futures", @@ -9843,7 +9843,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "array-bytes", "bytes", @@ -9874,7 +9874,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "futures", "libp2p", @@ -9887,7 +9887,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9896,7 +9896,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "futures", "jsonrpsee", @@ -9926,7 +9926,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9945,7 +9945,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "http", "jsonrpsee", @@ -9960,7 +9960,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "array-bytes", "futures", @@ -9986,7 +9986,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "async-trait", "directories", @@ -10052,7 +10052,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "log", "parity-scale-codec", @@ -10063,7 +10063,7 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "clap 4.0.15", "fs4", @@ -10079,7 +10079,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10098,7 +10098,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "futures", "libc", @@ -10117,7 +10117,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "chrono", "futures", @@ -10136,7 +10136,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "ansi_term", "atty", @@ -10167,7 +10167,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10178,7 +10178,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "async-trait", "futures", @@ -10205,7 +10205,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "async-trait", "futures", @@ -10219,7 +10219,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "async-channel", "futures", @@ -10758,7 +10758,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "hash-db", "log", @@ -10776,7 +10776,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "Inflector", "blake2", @@ -10790,7 +10790,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "parity-scale-codec", "scale-info", @@ -10803,7 +10803,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "integer-sqrt", "num-traits", @@ -10817,7 +10817,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "parity-scale-codec", "scale-info", @@ -10830,7 +10830,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "parity-scale-codec", "sp-api", @@ -10842,7 +10842,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "futures", "log", @@ -10860,7 +10860,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "async-trait", "futures", @@ -10875,7 +10875,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "async-trait", "parity-scale-codec", @@ -10893,7 +10893,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "async-trait", "merlin", @@ -10916,7 +10916,7 @@ dependencies = [ [[package]] name = "sp-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "lazy_static", "parity-scale-codec", @@ -10935,7 +10935,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "finality-grandpa", "log", @@ -10953,7 +10953,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "parity-scale-codec", "scale-info", @@ -10965,7 +10965,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "parity-scale-codec", "scale-info", @@ -10978,7 +10978,7 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "array-bytes", "base58", @@ -11021,7 +11021,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "blake2b_simd", "byteorder", @@ -11035,7 +11035,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "proc-macro2", "quote", @@ -11046,7 +11046,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -11055,7 +11055,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "proc-macro2", "quote", @@ -11065,7 +11065,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "environmental", "parity-scale-codec", @@ -11076,7 +11076,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -11091,7 +11091,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "bytes", "ed25519", @@ -11116,7 +11116,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "lazy_static", "sp-core", @@ -11127,7 +11127,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "futures", "merlin", @@ -11143,7 +11143,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "thiserror", "zstd", @@ -11152,7 +11152,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -11170,7 +11170,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "parity-scale-codec", "scale-info", @@ -11184,7 +11184,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "sp-api", "sp-core", @@ -11194,7 +11194,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "backtrace", "lazy_static", @@ -11204,7 +11204,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "rustc-hash", "serde", @@ -11214,7 +11214,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "either", "hash256-std-hasher", @@ -11236,7 +11236,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -11254,7 +11254,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "Inflector", "proc-macro-crate", @@ -11266,7 +11266,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "parity-scale-codec", "scale-info", @@ -11280,7 +11280,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "parity-scale-codec", "scale-info", @@ -11292,7 +11292,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "hash-db", "log", @@ -11312,12 +11312,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11330,7 +11330,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "async-trait", "futures-timer", @@ -11345,7 +11345,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "parity-scale-codec", "sp-std", @@ -11357,7 +11357,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "sp-api", "sp-runtime", @@ -11366,7 +11366,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "async-trait", "log", @@ -11382,7 +11382,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "ahash 0.8.2", "hash-db", @@ -11405,7 +11405,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11422,7 +11422,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -11433,7 +11433,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -11447,7 +11447,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "parity-scale-codec", "scale-info", @@ -11677,7 +11677,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "platforms", ] @@ -11685,7 +11685,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -11704,7 +11704,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "hyper", "log", @@ -11716,7 +11716,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "async-trait", "jsonrpsee", @@ -11729,7 +11729,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "jsonrpsee", "log", @@ -11748,7 +11748,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "array-bytes", "async-trait", @@ -11774,7 +11774,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "futures", "substrate-test-utils-derive", @@ -11784,7 +11784,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11795,7 +11795,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "ansi_term", "build-helper", @@ -12624,7 +12624,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#988f6add941b57ceb2af00ab815b3727f03fc1fb" +source = "git+https://github.com/paritytech/substrate?branch=master#bf395c8308c481a9774373e0b0b14bd7a2e4b8d2" dependencies = [ "async-trait", "clap 4.0.15", diff --git a/node/core/dispute-coordinator/src/initialized.rs b/node/core/dispute-coordinator/src/initialized.rs index eba3e30b94be..24f3cd02fa56 100644 --- a/node/core/dispute-coordinator/src/initialized.rs +++ b/node/core/dispute-coordinator/src/initialized.rs @@ -435,8 +435,18 @@ impl Initialized { key_ownership_proofs.into_iter().zip(dispute_proofs.into_iter()) { let validator_id = dispute_proof.validator_id.clone(); + let encoded_key_ownership_proof = key_ownership_proof.encode(); + + gum::info!( + target: LOG_TARGET, + ?session_index, + ?candidate_hash, + key_ownership_proof_len = encoded_key_ownership_proof.len(), + "Trying to submit a slashing report", + ); + let opaque_key_ownership_proof = - vstaging::slashing::OpaqueKeyOwnershipProof::new(key_ownership_proof.encode()); + vstaging::slashing::OpaqueKeyOwnershipProof::new(encoded_key_ownership_proof); let res = submit_report_dispute_lost( ctx.sender(), From 92b13c43afd163f5f43df85360b04b1b669875ee Mon Sep 17 00:00:00 2001 From: Andronik Date: Wed, 29 Mar 2023 16:46:23 +0200 Subject: [PATCH 28/43] panic repro --- .../functional/0004-parachains-disputes-past-session.zndsl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl b/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl index ca2b1cb39d83..d6c0d38309ff 100644 --- a/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl +++ b/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl @@ -14,7 +14,10 @@ honest-validator-0: parachain 1000 is registered within 100 seconds honest-validator-0: parachain 1000 block height is at least 1 within 300 seconds # There should be disputes initiated -honest-validator-0: reports parachain_candidate_disputes_total is at least 1 within 200 seconds +honest-validator-0: reports parachain_candidate_disputes_total is at least 2 within 200 seconds + +# Stop issuing disputes +malus-validator-0: pause # But should not resolve honest-validator-0: reports polkadot_parachain_disputes_finality_lag is at least 15 within 200 seconds From 0f3a9649d728761536db26f458b76bc90359facd Mon Sep 17 00:00:00 2001 From: Andronik Date: Wed, 29 Mar 2023 16:46:50 +0200 Subject: [PATCH 29/43] log validator index in panic message --- node/core/dispute-coordinator/src/initialized.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/node/core/dispute-coordinator/src/initialized.rs b/node/core/dispute-coordinator/src/initialized.rs index 24f3cd02fa56..dacc2f43b07b 100644 --- a/node/core/dispute-coordinator/src/initialized.rs +++ b/node/core/dispute-coordinator/src/initialized.rs @@ -564,10 +564,11 @@ impl Initialized { validator_public.clone(), validator_signature.clone(), ).is_ok(), - "Scraped backing votes had invalid signature! candidate: {:?}, session: {:?}, validator_public: {:?}", + "Scraped backing votes had invalid signature! candidate: {:?}, session: {:?}, validator_public: {:?}, validator_index: {}", candidate_hash, session, validator_public, + validator_index.0, ); let signed_dispute_statement = SignedDisputeStatement::new_unchecked_from_trusted_source( From ef78e51a3e6482fd5e085ceaf6d9bbc6195845ae Mon Sep 17 00:00:00 2001 From: Andronik Date: Wed, 29 Mar 2023 16:56:58 +0200 Subject: [PATCH 30/43] post merge fixes --- primitives/src/vstaging/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/primitives/src/vstaging/mod.rs b/primitives/src/vstaging/mod.rs index 9f5a99852e37..bc62ec66eb6e 100644 --- a/primitives/src/vstaging/mod.rs +++ b/primitives/src/vstaging/mod.rs @@ -18,6 +18,7 @@ // Put any primitives used by staging APIs functions here pub use crate::v4::*; +pub mod slashing; use sp_std::prelude::*; use parity_scale_codec::{Decode, Encode}; From 3db92ba9c57f116a91ae9d10199ab5d98d650769 Mon Sep 17 00:00:00 2001 From: Andronik Date: Mon, 24 Apr 2023 12:16:09 +0200 Subject: [PATCH 31/43] replace debug assertion with a log --- node/core/dispute-coordinator/src/initialized.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/node/core/dispute-coordinator/src/initialized.rs b/node/core/dispute-coordinator/src/initialized.rs index 92ea9784e5c5..be9481711c5e 100644 --- a/node/core/dispute-coordinator/src/initialized.rs +++ b/node/core/dispute-coordinator/src/initialized.rs @@ -366,10 +366,13 @@ impl Initialized { ); let inclusions = self.scraper.get_blocks_including_candidate(&candidate_hash); - debug_assert!( - !inclusions.is_empty(), - "Couldn't find inclusion parent for an unapplied slash", - ); + if inclusions.is_empty() { + gum::info!( + target: LOG_TARGET, + "Couldn't find inclusion parent for an unapplied slash", + ); + return + } // Find the first inclusion parent that we can use // to generate key ownership proof on. From 2b57c83adcb943b85c535d8b5bb6a5ab33ef65b6 Mon Sep 17 00:00:00 2001 From: Andronik Date: Mon, 24 Apr 2023 16:23:08 +0200 Subject: [PATCH 32/43] fix compilation --- primitives/src/vstaging/slashing.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/src/vstaging/slashing.rs b/primitives/src/vstaging/slashing.rs index 0dd81c783e4d..c5782c7c2ab4 100644 --- a/primitives/src/vstaging/slashing.rs +++ b/primitives/src/vstaging/slashing.rs @@ -82,7 +82,7 @@ pub struct PendingSlashes { /// the runtime API boundary this type is unknown and as such we keep this /// opaque representation, implementors of the runtime API will have to make /// sure that all usages of `OpaqueKeyOwnershipProof` refer to the same type. -#[derive(Decode, Encode, PartialEq, Eq, Debug, Clone)] +#[derive(Decode, Encode, PartialEq, Eq, Debug, Clone, TypeInfo)] pub struct OpaqueKeyOwnershipProof(Vec); impl OpaqueKeyOwnershipProof { /// Create a new `OpaqueKeyOwnershipProof` using the given encoded From a70fbc51b464d7f4355dbada5e16cd83cf71eab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Wed, 26 Apr 2023 21:04:38 +0200 Subject: [PATCH 33/43] Let's log the dispatch info in validate block. --- runtime/westend/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index da7d82fa16c4..73ca0d24d13e 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -1353,6 +1353,9 @@ sp_api::impl_runtime_apis! { tx: ::Extrinsic, block_hash: ::Hash, ) -> TransactionValidity { + use frame_support::dispatch::GetDispatchInfo; + log::error!("DISPATCH INFO: {:?}", tx.function.get_dispatch_info()); + Executive::validate_transaction(source, tx, block_hash) } } From 63871ac6739f99dbade5d019099d63a730bbdf71 Mon Sep 17 00:00:00 2001 From: Andronik Date: Wed, 26 Apr 2023 23:34:57 +0200 Subject: [PATCH 34/43] fix double encoding --- node/core/dispute-coordinator/src/initialized.rs | 9 ++------- primitives/src/vstaging/slashing.rs | 5 +++++ runtime/parachains/src/disputes/slashing.rs | 5 +---- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/node/core/dispute-coordinator/src/initialized.rs b/node/core/dispute-coordinator/src/initialized.rs index be9481711c5e..86cc09a22dae 100644 --- a/node/core/dispute-coordinator/src/initialized.rs +++ b/node/core/dispute-coordinator/src/initialized.rs @@ -25,7 +25,6 @@ use futures::{ use sc_keystore::LocalKeystore; -use parity_scale_codec::Encode; use polkadot_node_primitives::{ disputes::ValidCandidateVotes, CandidateVotes, DisputeStatus, SignedDisputeStatement, Timestamp, }; @@ -438,24 +437,20 @@ impl Initialized { key_ownership_proofs.into_iter().zip(dispute_proofs.into_iter()) { let validator_id = dispute_proof.validator_id.clone(); - let encoded_key_ownership_proof = key_ownership_proof.encode(); gum::info!( target: LOG_TARGET, ?session_index, ?candidate_hash, - key_ownership_proof_len = encoded_key_ownership_proof.len(), + key_ownership_proof_len = key_ownership_proof.len(), "Trying to submit a slashing report", ); - let opaque_key_ownership_proof = - vstaging::slashing::OpaqueKeyOwnershipProof::new(encoded_key_ownership_proof); - let res = submit_report_dispute_lost( ctx.sender(), relay_parent, dispute_proof, - opaque_key_ownership_proof, + key_ownership_proof, ) .await; diff --git a/primitives/src/vstaging/slashing.rs b/primitives/src/vstaging/slashing.rs index c5782c7c2ab4..41bb0e22d659 100644 --- a/primitives/src/vstaging/slashing.rs +++ b/primitives/src/vstaging/slashing.rs @@ -96,4 +96,9 @@ impl OpaqueKeyOwnershipProof { pub fn decode(self) -> Option { Decode::decode(&mut &self.0[..]).ok() } + + /// Length of the encoded proof. + pub fn len(&self) -> usize { + self.0.len() + } } diff --git a/runtime/parachains/src/disputes/slashing.rs b/runtime/parachains/src/disputes/slashing.rs index 05e4e79c4617..894c75025f7c 100644 --- a/runtime/parachains/src/disputes/slashing.rs +++ b/runtime/parachains/src/disputes/slashing.rs @@ -462,16 +462,13 @@ pub mod pallet { ) -> DispatchResultWithPostInfo { ensure_none(origin)?; + let validator_set_count = key_owner_proof.validator_count() as ValidatorSetCount; // check the membership proof to extract the offender's id let key = (primitives::PARACHAIN_KEY_TYPE_ID, dispute_proof.validator_id.clone()); let offender = T::KeyOwnerProofSystem::check_proof(key, key_owner_proof) .ok_or(Error::::InvalidKeyOwnershipProof)?; let session_index = dispute_proof.time_slot.session_index; - let validator_set_count = crate::session_info::Pallet::::session_info(session_index) - .ok_or(Error::::InvalidSessionIndex)? - .discovery_keys - .len() as ValidatorSetCount; // check that there is a pending slash for the given // validator index and candidate hash From 6a4f7b38285f2aa2deac80e2bad6f60742d38c6c Mon Sep 17 00:00:00 2001 From: Andronik Date: Wed, 26 Apr 2023 23:36:09 +0200 Subject: [PATCH 35/43] Revert "Let's log the dispatch info in validate block." This reverts commit a70fbc51b464d7f4355dbada5e16cd83cf71eab4. --- runtime/westend/src/lib.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 3bb6883a516e..7d2220c2c0d3 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -1353,9 +1353,6 @@ sp_api::impl_runtime_apis! { tx: ::Extrinsic, block_hash: ::Hash, ) -> TransactionValidity { - use frame_support::dispatch::GetDispatchInfo; - log::error!("DISPATCH INFO: {:?}", tx.function.get_dispatch_info()); - Executive::validate_transaction(source, tx, block_hash) } } From 63e38852ffccd96828e51a0e6db8260ea1110d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Wed, 26 Apr 2023 23:41:11 +0200 Subject: [PATCH 36/43] Revert "Let's log the dispatch info in validate block." This reverts commit a70fbc51b464d7f4355dbada5e16cd83cf71eab4. --- runtime/westend/src/lib.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 73ca0d24d13e..da7d82fa16c4 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -1353,9 +1353,6 @@ sp_api::impl_runtime_apis! { tx: ::Extrinsic, block_hash: ::Hash, ) -> TransactionValidity { - use frame_support::dispatch::GetDispatchInfo; - log::error!("DISPATCH INFO: {:?}", tx.function.get_dispatch_info()); - Executive::validate_transaction(source, tx, block_hash) } } From bce03797a1126837fde8cf90c2cf571ee2f1a2fb Mon Sep 17 00:00:00 2001 From: Andronik Date: Mon, 24 Apr 2023 16:23:08 +0200 Subject: [PATCH 37/43] fix compilation --- primitives/src/vstaging/slashing.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/src/vstaging/slashing.rs b/primitives/src/vstaging/slashing.rs index 0dd81c783e4d..c5782c7c2ab4 100644 --- a/primitives/src/vstaging/slashing.rs +++ b/primitives/src/vstaging/slashing.rs @@ -82,7 +82,7 @@ pub struct PendingSlashes { /// the runtime API boundary this type is unknown and as such we keep this /// opaque representation, implementors of the runtime API will have to make /// sure that all usages of `OpaqueKeyOwnershipProof` refer to the same type. -#[derive(Decode, Encode, PartialEq, Eq, Debug, Clone)] +#[derive(Decode, Encode, PartialEq, Eq, Debug, Clone, TypeInfo)] pub struct OpaqueKeyOwnershipProof(Vec); impl OpaqueKeyOwnershipProof { /// Create a new `OpaqueKeyOwnershipProof` using the given encoded From aa3247ee8b5d9e1a28fa3fb079707808cabd3279 Mon Sep 17 00:00:00 2001 From: Andronik Date: Mon, 22 May 2023 11:36:11 +0200 Subject: [PATCH 38/43] update to latest zombienet and fix test --- .gitlab-ci.yml | 2 +- .../functional/0004-parachains-disputes-past-session.zndsl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4db0fcc90f38..0b3642c066cb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,7 +38,7 @@ variables: BUILDAH_COMMAND: "buildah --storage-driver overlay2" DOCKER_OS: "debian:stretch" ARCH: "x86_64" - ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.43" + ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.53" default: cache: {} diff --git a/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl b/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl index d6c0d38309ff..811705c10539 100644 --- a/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl +++ b/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl @@ -20,7 +20,7 @@ honest-validator-0: reports parachain_candidate_disputes_total is at least 2 wit malus-validator-0: pause # But should not resolve -honest-validator-0: reports polkadot_parachain_disputes_finality_lag is at least 15 within 200 seconds +honest-validator-0: reports block height minus finalised block is at least 20 within 200 seconds # Now resume alice alice: resume From d6a6f3427ed0a193bc22d0b92fe97485f780aea7 Mon Sep 17 00:00:00 2001 From: Andronik Date: Mon, 22 May 2023 14:36:35 +0200 Subject: [PATCH 39/43] lower finality lag to 11 --- .../functional/0004-parachains-disputes-past-session.zndsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl b/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl index 811705c10539..87d33b13edad 100644 --- a/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl +++ b/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl @@ -20,7 +20,7 @@ honest-validator-0: reports parachain_candidate_disputes_total is at least 2 wit malus-validator-0: pause # But should not resolve -honest-validator-0: reports block height minus finalised block is at least 20 within 200 seconds +honest-validator-0: reports block height minus finalised block is at least 11 within 200 seconds # Now resume alice alice: resume From c95ad77a15150e8d1fd49e190f7a1e15cbb6b41e Mon Sep 17 00:00:00 2001 From: Andronik Date: Mon, 22 May 2023 16:16:15 +0200 Subject: [PATCH 40/43] bump zombienet again --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0b3642c066cb..7b5061fdc824 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,7 +38,7 @@ variables: BUILDAH_COMMAND: "buildah --storage-driver overlay2" DOCKER_OS: "debian:stretch" ARCH: "x86_64" - ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.53" + ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.54" default: cache: {} From b39be9abcca8491e2558af7c54c2c40abf5f06d3 Mon Sep 17 00:00:00 2001 From: Andronik Date: Mon, 22 May 2023 18:17:57 +0200 Subject: [PATCH 41/43] add a workaround, but still does not work --- .../functional/0004-parachains-disputes-past-session.zndsl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl b/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl index 87d33b13edad..554295d641e8 100644 --- a/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl +++ b/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl @@ -19,8 +19,11 @@ honest-validator-0: reports parachain_candidate_disputes_total is at least 2 wit # Stop issuing disputes malus-validator-0: pause +# wait for the next session +sleep 120 seconds + # But should not resolve -honest-validator-0: reports block height minus finalised block is at least 11 within 200 seconds +honest-validator-0: reports block height minus finalised block is at least 10 within 100 seconds # Now resume alice alice: resume From a767717b1886b9b347163cb8a12c669e666bd658 Mon Sep 17 00:00:00 2001 From: Javier Viola Date: Tue, 23 May 2023 11:08:32 -0300 Subject: [PATCH 42/43] Update .gitlab-ci.yml bump zombienet. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7b5061fdc824..3cb34c8664da 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,7 +38,7 @@ variables: BUILDAH_COMMAND: "buildah --storage-driver overlay2" DOCKER_OS: "debian:stretch" ARCH: "x86_64" - ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.54" + ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.55" default: cache: {} From cfe4be4165c11279c24cd56e129e0810b9e02fe4 Mon Sep 17 00:00:00 2001 From: Andronik Date: Wed, 24 May 2023 11:00:19 +0200 Subject: [PATCH 43/43] add a comment and search logs on all nodes --- node/core/dispute-coordinator/src/initialized.rs | 2 ++ .../functional/0004-parachains-disputes-past-session.zndsl | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/node/core/dispute-coordinator/src/initialized.rs b/node/core/dispute-coordinator/src/initialized.rs index 7a0ffd1e6d03..2ae7f1b2062f 100644 --- a/node/core/dispute-coordinator/src/initialized.rs +++ b/node/core/dispute-coordinator/src/initialized.rs @@ -440,6 +440,8 @@ impl Initialized { } if !key_ownership_proofs.is_empty() { + // If we found a parent that we can use, stop searching. + // If one key ownership was resolved successfully, all of them should be. debug_assert_eq!(key_ownership_proofs.len(), pending.keys.len()); break } diff --git a/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl b/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl index 554295d641e8..e86cbb398357 100644 --- a/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl +++ b/zombienet_tests/functional/0004-parachains-disputes-past-session.zndsl @@ -34,5 +34,4 @@ honest-validator-0: reports parachain_candidate_dispute_concluded{validity="inva honest-validator-0: reports parachain_candidate_dispute_concluded{validity="valid"} is 0 # Check an unsigned extrinsic is submitted -# TODO: how to match on all honest validator logs? -honest-validator-0: log line contains "Successfully reported pending slash" within 180 seconds +honest-validator: log line contains "Successfully reported pending slash" within 180 seconds