Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
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,550 changes: 1,275 additions & 1,275 deletions Cargo.lock

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions collator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ edition = "2018"

[dependencies]
# Substrate dependencies
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sc-client = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sc-service = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sc-client = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sc-service = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }

# Polkadot dependencies
polkadot-collator = { git = "https://github.com/paritytech/polkadot", branch = "bkchr-cumulus-branch" }
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "bkchr-cumulus-branch" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "bkchr-cumulus-branch" }
polkadot-collator = { git = "https://github.com/paritytech/polkadot", branch = "cumulus-branch" }
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "cumulus-branch" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "cumulus-branch" }

# Cumulus dependencies
cumulus-consensus = { path = "../consensus" }
Expand All @@ -37,13 +37,13 @@ test-runtime = { package = "cumulus-test-runtime", path = "../test/runtime" }
test-client = { package = "cumulus-test-client", path = "../test/client" }

# Substrate dependencies
substrate-test-client = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
substrate-test-client = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }

# Polkadot dependencies
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "bkchr-cumulus-branch" }
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "cumulus-branch" }

# Other dependencies
env_logger = "0.7.1"
30 changes: 19 additions & 11 deletions collator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ use codec::{Decode, Encode};

use log::{error, trace};

use futures::{task::Spawn, Future};
use futures::{task::Spawn, Future, future};

use std::{fmt::Debug, marker::PhantomData, sync::Arc, time::Duration, pin::Pin};

Expand Down Expand Up @@ -120,20 +120,25 @@ where
let inherent_providers = self.inherent_data_providers.clone();
let block_import = self.block_import.clone();

Box::pin(async move {
trace!(target: "cumulus-collator", "Producing candidate");
trace!(target: "cumulus-collator", "Producing candidate");

let last_head = HeadData::<Block>::decode(&mut &status.head_data.0[..]).map_err(|e| {
let last_head = match HeadData::<Block>::decode(&mut &status.head_data.0[..]) {
Ok(x) => x,
Err(e) => {
error!(target: "cumulus-collator", "Could not decode the head data: {:?}", e);
InvalidHead
})?;
return Box::pin(future::ready(Err(InvalidHead)));
}
};

let proposer_future = factory
.lock()
.init(&last_head.header);

Box::pin(async move {
let parent_state_root = *last_head.header.state_root();

let mut proposer = factory
.lock()
.init(&last_head.header)
let mut proposer = proposer_future
.await
.map_err(|e| {
error!(
target: "cumulus-collator",
Expand Down Expand Up @@ -393,9 +398,12 @@ mod tests {
impl Environment<Block> for DummyFactory {
type Proposer = DummyProposer;
type Error = Error;
type CreateProposer = Pin<Box<
dyn Future<Output = Result<Self::Proposer, Self::Error>> + Send + Unpin + 'static
>>;

fn init(&mut self, _: &Header) -> Result<Self::Proposer, Self::Error> {
Ok(DummyProposer)
fn init(&mut self, _: &Header) -> Self::CreateProposer {
Box::pin(future::ready(Ok(DummyProposer)))
}
}

Expand Down
22 changes: 11 additions & 11 deletions consensus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ edition = "2018"

[dependencies]
# substrate deps
sc-client = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sc-client = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }

# polkadot deps
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "bkchr-cumulus-branch" }
polkadot-runtime = { git = "https://github.com/paritytech/polkadot", branch = "bkchr-cumulus-branch" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "cumulus-branch" }
polkadot-runtime = { git = "https://github.com/paritytech/polkadot", branch = "cumulus-branch" }

# other deps
futures = { version = "0.3.1", features = ["compat"] }
Expand Down
16 changes: 8 additions & 8 deletions network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ edition = "2018"

[dependencies]
# substrate deps
sc-client = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sc-client = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }

# polkadot deps
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "bkchr-cumulus-branch" }
polkadot-statement-table = { git = "https://github.com/paritytech/polkadot", branch = "bkchr-cumulus-branch" }
polkadot-validation = { git = "https://github.com/paritytech/polkadot", branch = "bkchr-cumulus-branch" }
polkadot-network = { git = "https://github.com/paritytech/polkadot", branch = "bkchr-cumulus-branch" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "cumulus-branch" }
polkadot-statement-table = { git = "https://github.com/paritytech/polkadot", branch = "cumulus-branch" }
polkadot-validation = { git = "https://github.com/paritytech/polkadot", branch = "cumulus-branch" }
polkadot-network = { git = "https://github.com/paritytech/polkadot", branch = "cumulus-branch" }

# other deps
codec = { package = "parity-scale-codec", version = "1.0.5", features = [ "derive" ] }
22 changes: 11 additions & 11 deletions runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ trie-db = { version = "0.18.0", default-features = false }
hashbrown = "0.6.1"

# Substrate dependencies
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "bkchr-cumulus-branch" }
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "bkchr-cumulus-branch" }
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "bkchr-cumulus-branch" }
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "bkchr-cumulus-branch" }
frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "bkchr-cumulus-branch" }
sp-trie = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "bkchr-cumulus-branch" }
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "cumulus-branch" }
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "cumulus-branch" }
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "cumulus-branch" }
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "cumulus-branch" }
frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "cumulus-branch" }
sp-trie = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "cumulus-branch" }

# Polkadot dependencies
parachain = { package = "polkadot-parachain", git = "https://github.com/paritytech/polkadot", branch = "bkchr-cumulus-branch", default-features = false, features = [ "wasm-api" ] }
parachain = { package = "polkadot-parachain", git = "https://github.com/paritytech/polkadot", branch = "cumulus-branch", default-features = false, features = [ "wasm-api" ] }

[dev-dependencies]
sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
test-client = { package = "cumulus-test-client", path = "../test/client" }

[features]
Expand Down
8 changes: 4 additions & 4 deletions test/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ authors = ["Parity Technologies <[email protected]>"]
edition = "2018"

[dependencies]
test-client = { package = "substrate-test-client", git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
test-client = { package = "substrate-test-client", git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
runtime = { package = "cumulus-test-runtime", path = "../runtime" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
codec = { package = "parity-scale-codec", version = "1.0.5", default-features = false, features = [ "derive" ] }

34 changes: 17 additions & 17 deletions test/parachain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,29 @@ itertools = { version = "0.8.2" }
parachain-runtime = { package = "cumulus-test-parachain-runtime", path = "runtime" }

# Substrate dependencies
sp-runtime = { git = "https://github.com/paritytech/substrate", default_features = false, branch = "bkchr-cumulus-branch" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sc-service = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sc-client = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sc-basic-authority = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "bkchr-cumulus-branch" }
sp-runtime = { git = "https://github.com/paritytech/substrate", default_features = false, branch = "cumulus-branch" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sc-service = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sc-client = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sc-basic-authority = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }

# Cumulus dependencies
cumulus-consensus = { path = "../../consensus" }
cumulus-collator = { path = "../../collator" }

# Polkadot dependencies
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "bkchr-cumulus-branch" }
polkadot-collator = { git = "https://github.com/paritytech/polkadot", branch = "bkchr-cumulus-branch" }
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "bkchr-cumulus-branch" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "cumulus-branch" }
polkadot-collator = { git = "https://github.com/paritytech/polkadot", branch = "cumulus-branch" }
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "cumulus-branch" }

[build-dependencies]
vergen = '3.0.4'
Expand Down
Loading