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,961 changes: 1,492 additions & 1,469 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 = "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" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sc-client = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sc-service = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }

# Polkadot dependencies
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" }
polkadot-collator = { git = "https://github.com/paritytech/polkadot", branch = "cecton-cumulus-branch" }
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "cecton-cumulus-branch" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "cecton-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 = "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" }
substrate-test-client = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }

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

# Other dependencies
env_logger = "0.7.1"
24 changes: 3 additions & 21 deletions collator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,14 @@ use sp_consensus::{
};
use sp_inherents::InherentDataProviders;
use sp_runtime::traits::{Block as BlockT, Header as HeaderT};
use sc_cli;

use polkadot_collator::{
BuildParachainContext, InvalidHead, Network as CollatorNetwork, ParachainContext,
PolkadotClient,
};
use polkadot_primitives::{
parachain::{
self, BlockData, CollatorPair, Id as ParaId, Message, OutgoingMessages,
self, BlockData, Id as ParaId, Message, OutgoingMessages,
Status as ParachainStatus,
},
Block as PBlock, Hash as PHash,
Expand Down Expand Up @@ -256,14 +255,14 @@ where
}

/// Implements `BuildParachainContext` to build a collator instance.
struct CollatorBuilder<Block, SP> {
pub struct CollatorBuilder<Block, SP> {
setup_parachain: SP,
_marker: PhantomData<Block>,
}

impl<Block, SP> CollatorBuilder<Block, SP> {
/// Create a new instance of self.
fn new(setup_parachain: SP) -> Self {
pub fn new(setup_parachain: SP) -> Self {
Self {
setup_parachain,
_marker: PhantomData,
Expand Down Expand Up @@ -345,23 +344,6 @@ pub trait SetupParachain<Block: BlockT>: Send {
SP: Spawn + Clone + Send + Sync + 'static;
}

/// Run a collator with the given proposer factory.
pub fn run_collator<Block, SP>(
setup_parachain: SP,
para_id: ParaId,
key: Arc<CollatorPair>,
configuration: polkadot_collator::Configuration,
) -> Result<(), sc_cli::error::Error>
where
Block: BlockT,
SP: SetupParachain<Block> + Send + 'static,
<<SP as SetupParachain<Block>>::ProposerFactory as Environment<Block>>::Proposer: Send,
{
let builder = CollatorBuilder::new(setup_parachain);
let exit = future::pending(); // TODO to delete
polkadot_collator::run_collator(builder, para_id, exit, key, configuration)
}

#[cfg(test)]
mod tests {
use super::*;
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 = "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" }
sc-client = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }

# polkadot deps
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "cumulus-branch" }
polkadot-runtime = { git = "https://github.com/paritytech/polkadot", branch = "cumulus-branch" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "cecton-cumulus-branch" }
polkadot-runtime = { git = "https://github.com/paritytech/polkadot", branch = "cecton-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 = "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" }
sc-client = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }

# polkadot deps
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" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "cecton-cumulus-branch" }
polkadot-statement-table = { git = "https://github.com/paritytech/polkadot", branch = "cecton-cumulus-branch" }
polkadot-validation = { git = "https://github.com/paritytech/polkadot", branch = "cecton-cumulus-branch" }
polkadot-network = { git = "https://github.com/paritytech/polkadot", branch = "cecton-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.19.2", default-features = false }
hashbrown = "0.6.1"

# Substrate dependencies
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" }
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "cecton-cumulus-branch" }
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "cecton-cumulus-branch" }
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "cecton-cumulus-branch" }
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "cecton-cumulus-branch" }
frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "cecton-cumulus-branch" }
sp-trie = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "cecton-cumulus-branch" }

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

[dev-dependencies]
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" }
sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
test-client = { package = "cumulus-test-client", path = "../test/client" }

[features]
Expand Down
10 changes: 5 additions & 5 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 = "cumulus-branch" }
test-client = { package = "substrate-test-client", git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
runtime = { package = "cumulus-test-runtime", path = "../runtime" }
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" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
codec = { package = "parity-scale-codec", version = "1.0.5", default-features = false, features = [ "derive" ] }
sp-test-primitives = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-test-primitives = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
43 changes: 21 additions & 22 deletions test/parachain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,43 +15,42 @@ exit-future = '0.1.4'
futures = { version = "0.3.1", features = ["compat"] }
log = '0.4.8'
parking_lot = '0.9.0'
tokio = '0.1.22'
trie-root = '0.15.2'
codec = { package = 'parity-scale-codec', version = '1.0.0' }
structopt = "0.3.3"
ctrlc = { version = "3.1.3", features = ["termination"] }
itertools = { version = "0.8.2" }

# Parachain dependencies
parachain-runtime = { package = "cumulus-test-parachain-runtime", path = "runtime" }

# Substrate dependencies
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-authorship = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch" }
sp-runtime = { git = "https://github.com/paritytech/substrate", default_features = false, branch = "cecton-cumulus-branch" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sc-service = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sc-client = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "cecton-cumulus-branch" }

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

# Polkadot dependencies
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" }
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "cumulus-branch" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "cecton-cumulus-branch" }
polkadot-collator = { git = "https://github.com/paritytech/polkadot", branch = "cecton-cumulus-branch" }
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "cecton-cumulus-branch" }
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "cecton-cumulus-branch" }

[build-dependencies]
vergen = '3.0.4'


[dev-dependencies]
assert_cmd = "0.12"
nix = "0.17"
Loading