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
184 changes: 81 additions & 103 deletions Cargo.lock

Large diffs are not rendered by default.

15 changes: 7 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
[workspace]
members = [
"consensus",
"network",
"parachain-system",
"primitives",
"client/consensus",
"client/network",
"client/service",
"pallets/parachain-system",
"pallets/xcm-handler",
"primitives/core",
"rococo-parachains/",
"rococo-parachains/pallets/parachain-info",
"rococo-parachains/primitives",
"rococo-parachains/runtime",
"runtime",
"service",
"test/runtime",
"test/client",
"test/service",
"test/relay-sproof-builder",
"xcm-handler",
]

[profile.release]
panic = 'unwind'
panic = "unwind"
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ follow,
[finalize](https://wiki.polkadot.network/docs/en/learn-consensus#probabilistic-vs-provable-finality),
and treat as best.

## Runtime

The [`cumulus-runtime`](runtime) is wrapper around Substrate runtimes that provides parachain
validation capabilities and proof-generation routines.

## Collator

A Polkadot [collator](https://wiki.polkadot.network/docs/en/learn-collator) for the parachain is
Expand Down
11 changes: 5 additions & 6 deletions collator/Cargo.toml → client/collator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "cumulus-collator"
name = "cumulus-client-collator"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
Expand All @@ -25,9 +25,8 @@ polkadot-overseer = { git = "https://github.com/paritytech/polkadot", branch = "
polkadot-node-subsystem = { git = "https://github.com/paritytech/polkadot", branch = "master" }

# Cumulus dependencies
cumulus-network = { path = "../network" }
cumulus-primitives = { path = "../primitives" }
cumulus-runtime = { path = "../runtime" }
cumulus-client-network = { path = "../network" }
cumulus-primitives-core = { path = "../../primitives/core" }

# Other dependencies
log = "0.4.8"
Expand All @@ -37,8 +36,8 @@ parking_lot = "0.9"

[dev-dependencies]
# Cumulus dependencies
cumulus-test-runtime = { path = "../test/runtime" }
cumulus-test-client = { path = "../test/client" }
cumulus-test-runtime = { path = "../../test/runtime" }
cumulus-test-client = { path = "../../test/client" }

# Substrate dependencies
sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" }
Expand Down
7 changes: 3 additions & 4 deletions collator/src/lib.rs → client/collator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@

//! Cumulus Collator implementation for Substrate.

use cumulus_network::WaitToAnnounce;
use cumulus_primitives::{
inherents,
use cumulus_client_network::WaitToAnnounce;
use cumulus_primitives_core::{
inherents, ParachainBlockData,
well_known_keys, InboundDownwardMessage, InboundHrmpMessage, OutboundHrmpMessage,
PersistedValidationData, relay_chain,
};
use cumulus_runtime::ParachainBlockData;

use sc_client_api::{BlockBackend, StateBackend};
use sp_consensus::{
Expand Down
6 changes: 3 additions & 3 deletions consensus/Cargo.toml → client/consensus/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "cumulus-consensus"
name = "cumulus-client-consensus"
description = "Proxy Polkadot's consensus as a consensus engine for Substrate"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
Expand Down Expand Up @@ -32,8 +32,8 @@ tracing = "0.1.22"
sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" }

# Cumulus dependencies
cumulus-test-runtime = { path = "../test/runtime" }
cumulus-test-client = { path = "../test/client" }
cumulus-test-runtime = { path = "../../test/runtime" }
cumulus-test-client = { path = "../../test/client" }

# Other deps
futures-timer = "3.0.2"
File renamed without changes.
7 changes: 2 additions & 5 deletions network/Cargo.toml → client/network/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "cumulus-network"
name = "cumulus-client-network"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Cumulus-specific networking protocol"
Expand All @@ -23,9 +23,6 @@ polkadot-node-subsystem = { git = "https://github.com/paritytech/polkadot", bran
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "master" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "master" }

# Cumulus deps
cumulus-primitives = { path = "../primitives" }

# other deps
codec = { package = "parity-scale-codec", version = "2.0.0", features = [ "derive" ] }
futures = { version = "0.3.1", features = ["compat"] }
Expand All @@ -36,7 +33,7 @@ derive_more = "0.99.2"

[dev-dependencies]
# Cumulus deps
cumulus-test-service = { path = "../test/service" }
cumulus-test-service = { path = "../../test/service" }

# Polkadot deps
polkadot-test-client = { git = "https://github.com/paritytech/polkadot", branch = "master" }
Expand Down
File renamed without changes.
File renamed without changes.
12 changes: 7 additions & 5 deletions service/Cargo.toml → client/service/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
[package]
name = "cumulus-service"
name = "cumulus-client-service"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"

[dependencies]
# Cumulus dependencies
cumulus-consensus = { path = "../consensus" }
cumulus-collator = { path = "../collator" }
cumulus-primitives = { path = "../primitives" }
cumulus-client-consensus = { path = "../consensus" }
cumulus-client-collator = { path = "../collator" }
cumulus-primitives-core = { path = "../../primitives/core" }

# Substrate dependencies
sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" }
Expand All @@ -29,3 +30,4 @@ polkadot-overseer = { git = "https://github.com/paritytech/polkadot", branch = "
# Other deps
futures = "0.3.6"
tracing = "0.1.22"
codec = { package = "parity-scale-codec", version = "2.0.0" }
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use codec::Encode;
use sc_chain_spec::ChainSpec;
use sp_runtime::traits::{Block as BlockT, Hash as HashT, Header as HeaderT, Zero};

/// Generate the genesis state for a given ChainSpec.
/// Generate the genesis block from a given ChainSpec.
pub fn generate_genesis_block<Block: BlockT>(
chain_spec: &Box<dyn ChainSpec>,
) -> Result<Block, String> {
Expand Down
8 changes: 5 additions & 3 deletions service/src/lib.rs → client/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
//!
//! Provides functions for starting a collator node or a normal full node.

use cumulus_primitives::ParaId;
use cumulus_primitives_core::ParaId;
use futures::{Future, FutureExt};
use polkadot_overseer::OverseerHandler;
use polkadot_primitives::v1::{Block as PBlock, CollatorId, CollatorPair};
Expand All @@ -34,6 +34,8 @@ use sp_inherents::InherentDataProviders;
use sp_runtime::traits::{BlakeTwo256, Block as BlockT};
use std::{marker::PhantomData, sync::Arc};

pub mod genesis;

/// Polkadot full node handles.
type PFullNode<C> = polkadot_service::NewFull<C>;

Expand Down Expand Up @@ -188,7 +190,7 @@ where
PClient: AbstractClient<PBlock, PBackend, Api = Api> + 'static,
{
async move {
cumulus_collator::start_collator(cumulus_collator::StartCollatorParams {
cumulus_client_collator::start_collator(cumulus_client_collator::StartCollatorParams {
proposer_factory: self.proposer_factory,
inherent_data_providers: self.inherent_data_providers,
backend: self.backend,
Expand Down Expand Up @@ -289,7 +291,7 @@ where
Api: RuntimeApiCollection<StateBackend = PBackend::State>,
PClient: AbstractClient<PBlock, PBackend, Api = Api> + 'static,
{
let consensus = cumulus_consensus::run_parachain_consensus(
let consensus = cumulus_client_consensus::run_parachain_consensus(
self.para_id,
self.client,
client,
Expand Down
2 changes: 1 addition & 1 deletion docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ messages of other Parachains.
To convert a Substrate runtime into a Parachain runtime, the following code needs to be added to the
runtime:
```rust
cumulus_runtime::register_validate_block!(Block, Executive);
cumulus_pallet_parachain_system::register_validate_block!(Block, Executive);
```

This macro call expects the `Block` and `Executive` type. It generates the `validate_block` function
Expand Down
56 changes: 34 additions & 22 deletions parachain-system/Cargo.toml → pallets/parachain-system/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
[package]
name = "cumulus-parachain-system"
name = "cumulus-pallet-parachain-system"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
description = "pallet to manage parachain upgrades"
description = "Base pallet for cumulus-based parachains"

[dependencies]
# Cumulus dependencies
cumulus-primitives = { path = "../primitives", default-features = false }
cumulus-runtime = { path = "../runtime", default-features = false }
cumulus-primitives-core = { path = "../../primitives/core", default-features = false }

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

# Substrate dependencies
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
Expand All @@ -23,37 +22,50 @@ sp-std = { git = "https://github.com/paritytech/substrate", default-features = f
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
sp-state-machine = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
sp-trie = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
sp-externalities = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }

# Other Dependencies
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"]}
serde = { version = "1.0.101", optional = true, features = ["derive"] }
hash-db = { version = "0.15.2", default-features = false }
memory-db = { version = "0.26.0", default-features = false }
trie-db = { version = "0.22.0", default-features = false }

[dev-dependencies]
sp-externalities = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
substrate-test-runtime-client = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
cumulus-test-relay-sproof-builder = { path = "../test/relay-sproof-builder" }
cumulus-test-relay-sproof-builder = { path = "../../test/relay-sproof-builder" }
hex-literal = "0.2.1"
lazy_static = "1.4"
sc-client-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" }
cumulus-test-client = { path = "../../test/client" }
env_logger = "0.7.1"

[features]
default = ['std']
default = [ "std" ]
std = [
'serde',
'codec/std',
'frame-support/std',
'pallet-balances/std',
'cumulus-runtime/std',
'sp-core/std',
'sp-runtime/std',
'sp-io/std',
'sp-std/std',
'hash-db/std',
'sp-state-machine/std',
'sp-trie/std',
'frame-system/std',
'cumulus-primitives/std',
"serde",
"codec/std",
"frame-support/std",
"pallet-balances/std",
"sp-core/std",
"sp-runtime/std",
"sp-io/std",
"sp-std/std",
"hash-db/std",
"memory-db/std",
"trie-db/std",
"sp-state-machine/std",
"sp-trie/std",
"sp-externalities/std",
"frame-system/std",
"frame-executive/std",
"cumulus-primitives-core/std",
]
Loading