Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to v0.9.28 #5

Open
wants to merge 1 commit into
base: manta-v0.3.5.0_polkadot-v0.9.28
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,668 changes: 1,365 additions & 1,303 deletions Cargo.lock

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions nimbus-consensus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@ edition = "2021"
version = "0.9.0"
[dependencies]
# Substrate deps
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
sc-consensus-manual-seal = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-consensus-manual-seal = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }

# Polkadot dependencies
polkadot-client = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.26", default-features = false }
polkadot-client = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28", default-features = false }

# Cumulus dependencies
cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.26" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.26" }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.26" }
cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }

# Nimbus Dependencies
nimbus-primitives = { path = "../nimbus-primitives" }
Expand Down
25 changes: 9 additions & 16 deletions nimbus-consensus/src/import_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,16 @@ pub struct Verifier<Client, Block, CIDP> {
_marker: PhantomData<Block>,
}

impl<Client, Block, CIDP> Verifier<Client, Block, CIDP>
{
/// Build a [`NimbusVerifier`] ( allows for composing nimbus with other consensus engines )
pub fn new(
client: Arc<Client>,
create_inherent_data_providers: CIDP,
) -> Self {
Self{
client,
create_inherent_data_providers,
_marker : PhantomData{},
impl<Client, Block, CIDP> Verifier<Client, Block, CIDP> {
/// Build a [`NimbusVerifier`] ( allows for composing nimbus with other consensus engines )
pub fn new(client: Arc<Client>, create_inherent_data_providers: CIDP) -> Self {
Self {
client,
create_inherent_data_providers,
_marker: PhantomData {},
}
}
}
}
#[async_trait::async_trait]
impl<Client, Block, CIDP> VerifierT<Block> for Verifier<Client, Block, CIDP>
where
Expand Down Expand Up @@ -215,10 +211,7 @@ where
<Client as ProvideRuntimeApi<Block>>::Api: BlockBuilderApi<Block>,
CIDP: CreateInherentDataProviders<Block, ()> + 'static,
{
let verifier = Verifier::new(
client,
create_inherent_data_providers,
);
let verifier = Verifier::new(client, create_inherent_data_providers);

Ok(BasicQueue::new(
verifier,
Expand Down
10 changes: 7 additions & 3 deletions nimbus-consensus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ use std::convert::TryInto;
use std::{marker::PhantomData, sync::Arc, time::Duration};
use tracing::error;
mod import_queue;
pub use import_queue::{import_queue, Verifier, NimbusBlockImport};
pub use import_queue::{import_queue, NimbusBlockImport, Verifier};
mod manual_seal;
pub use manual_seal::NimbusManualSealConsensusDataProvider;

Expand Down Expand Up @@ -320,8 +320,12 @@ where
relay_parent: PHash,
validation_data: &PersistedValidationData,
) -> Option<ParachainCandidate<B>> {
let block_id = BlockId::hash(parent.hash());
if !self.parachain_client.runtime_api().has_api::<dyn NimbusApi<B>>(&block_id).unwrap_or(false)
let block_id = BlockId::hash(parent.hash());
if !self
.parachain_client
.runtime_api()
.has_api::<dyn NimbusApi<B>>(&block_id)
.unwrap_or(false)
{
info!("Runtime does not have NimbusAPI, skipping block authoring");
return None;
Expand Down
11 changes: 8 additions & 3 deletions nimbus-consensus/src/manual_seal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ use sp_runtime::{
generic::{Digest, DigestItem},
traits::Block as BlockT,
};
use std::sync::Arc;
use std::{marker::PhantomData, sync::Arc};

/// Provides nimbus-compatible pre-runtime digests for use with manual seal consensus
pub struct NimbusManualSealConsensusDataProvider<C, DP = ()> {
pub struct NimbusManualSealConsensusDataProvider<C, DP = (), P = ()> {
/// Shared reference to keystore
pub keystore: SyncCryptoStorePtr,

Expand All @@ -42,17 +42,21 @@ pub struct NimbusManualSealConsensusDataProvider<C, DP = ()> {
// Could have a skip_prediction field here if it becomes desireable
/// Additional digests provider
pub additional_digests_provider: DP,

pub _phantom: PhantomData<P>,
}

impl<B, C, DP> ConsensusDataProvider<B> for NimbusManualSealConsensusDataProvider<C, DP>
impl<B, C, DP, P> ConsensusDataProvider<B> for NimbusManualSealConsensusDataProvider<C, DP, P>
where
B: BlockT,
C: ProvideRuntimeApi<B> + Send + Sync,
C::Api: NimbusApi<B>,
C::Api: AuthorFilterAPI<B, NimbusId>,
DP: DigestsProvider<NimbusId, <B as BlockT>::Hash> + Send + Sync,
P: Send + Sync,
{
type Transaction = TransactionFor<C, B>;
type Proof = P;

fn create_digest(&self, parent: &B::Header, inherents: &InherentData) -> Result<Digest, Error> {
// Retrieve the relay chain block number to use as the slot number from the parachain inherent
Expand Down Expand Up @@ -99,6 +103,7 @@ where
_parent: &B::Header,
params: &mut BlockImportParams<B, Self::Transaction>,
_inherents: &InherentData,
_proof: Self::Proof,
) -> Result<(), Error> {
// We have to reconstruct the type-public pair which is only communicated through the pre-runtime digest
let claimed_author = params
Expand Down
16 changes: 8 additions & 8 deletions nimbus-primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ version = "0.9.0"
async-trait = { version = "0.1", optional = true }
parity-scale-codec = { version = "3.0.0", default-features = false, features = [ "derive" ] }

frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false }
scale-info = { version = "2.0.0", default-features = false, features = [ "derive" ] }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", default-features = false }
sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", default-features = false }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", default-features = false }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false }
sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false }

frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", optional = true, default-features = false }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", optional = true, default-features = false }

[features]
default = [ "std" ]
Expand Down
10 changes: 5 additions & 5 deletions pallets/aura-style-filter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ edition = "2021"
version = "0.9.0"

[dependencies]
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false }
nimbus-primitives = { path = "../../nimbus-primitives", default-features = false }
parity-scale-codec = { version = "3.0.0", default-features = false, features = [ "derive" ] }
scale-info = { version = "2.0.0", default-features = false, features = [ "derive" ] }
serde = { version = "1.0.101", optional = true, features = [ "derive" ] }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false }

[features]
default = ["std"]
Expand Down
24 changes: 12 additions & 12 deletions pallets/author-inherent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@ license = "GPL-3.0-only"
version = "0.9.0"

[dependencies]
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false }
log = { version = "0.4.17", default-features = false }
nimbus-primitives = { path = "../../nimbus-primitives", default-features = false }
parity-scale-codec = { version = "3.0.0", default-features = false, features = [ "derive" ] }
scale-info = { version = "2.0.0", default-features = false, features = [ "derive" ] }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", default-features = false }
sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", default-features = false }
sp-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", default-features = false }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", default-features = false }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false }
sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false }
sp-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false }

# Benchmarks
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", optional = true, default-features = false }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", optional = true, default-features = false }

[dev-dependencies]
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", default-features = false }
frame-support-test = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false }
frame-support-test = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }

[features]
default = [ "std" ]
Expand Down
16 changes: 8 additions & 8 deletions pallets/author-slot-filter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ edition = "2021"
version = "0.9.0"

[dependencies]
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false }
log = { version = "0.4.17", default-features = false }
nimbus-primitives = { path = "../../nimbus-primitives", default-features = false }
parity-scale-codec = { version = "3.0.0", default-features = false, features = [ "derive" ] }
scale-info = { version = "2.0.0", default-features = false, features = [ "derive" ] }
serde = { version = "1.0.101", default-features = false, features = [ "derive" ] }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false }

# Benchmarks
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26", optional = true, default-features = false }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", optional = true, default-features = false }

[dev-dependencies]
frame-support-test = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26"}
frame-support-test = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28"}

[features]
default = [ "std" ]
Expand Down
Loading