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 39 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
03e9dde
import rococo into chain-spec
coriolinus Aug 24, 2020
71bffb8
Merge remote-tracking branch 'origin/master' into prgn-run-rococo
coriolinus Aug 24, 2020
4b8e65c
make a few stabs at moving forward
coriolinus Aug 25, 2020
141a5eb
wip: rococo readme
coriolinus Aug 26, 2020
420e67b
Merge remote-tracking branch 'origin/master' into prgn-run-rococo
coriolinus Sep 8, 2020
948efd6
remove /service crate
coriolinus Sep 8, 2020
b32ed40
wip: chase down some build errors in polkadot-cli
coriolinus Sep 8, 2020
61b584f
make more progress getting polkadot-cli to build
coriolinus Sep 9, 2020
a94a4f6
don't ignore polkadot.json within the res directory
coriolinus Sep 9, 2020
84de271
don't recreate pathbufs
coriolinus Sep 9, 2020
fe36c55
Prepare Polkadot to be used by Cumulus
bkchr Sep 10, 2020
b8b958f
Remove old test
bkchr Sep 10, 2020
bf58a14
Merge remote-tracking branch 'origin/bkchr-start-cumulus' into prgn-r…
coriolinus Sep 10, 2020
2e8fdab
Merge remote-tracking branch 'origin/bkchr-start-cumulus' into prgn-r…
coriolinus Sep 10, 2020
24e2e29
migrate new_chain_ops fix from /service
coriolinus Sep 10, 2020
7b8f9ba
partially remove node/test-service
coriolinus Sep 10, 2020
bb177a9
Reset some changes
bkchr Sep 10, 2020
a148e7d
Revert "partially remove node/test-service"
coriolinus Sep 11, 2020
39e140e
Merge remote-tracking branch 'origin/bkchr-start-cumulus' into prgn-r…
coriolinus Sep 11, 2020
2e69812
WIP: replace v0 ParachainHost impl with v1 for test runtime
coriolinus Sep 11, 2020
68fccb5
fix test runtime build
coriolinus Sep 11, 2020
93f8d4f
bump westend spec version
coriolinus Sep 11, 2020
2ae8cee
use service-new as service within cli
coriolinus Sep 11, 2020
68d2f38
to revert: demo that forwarding the test runtime to the real impl blo…
coriolinus Sep 11, 2020
04cb1cb
Revert "to revert: demo that forwarding the test runtime to the real …
coriolinus Sep 11, 2020
32fc3ab
Revert "Revert "to revert: demo that forwarding the test runtime to t…
coriolinus Sep 11, 2020
cfef23f
More reverts
bkchr Sep 11, 2020
5192634
MOARE
bkchr Sep 11, 2020
4b3b066
Merge remote-tracking branch 'origin/master' into bkchr-start-cumulus
bkchr Sep 11, 2020
4acd607
Merge remote-tracking branch 'origin/bkchr-start-cumulus' into prgn-r…
coriolinus Sep 11, 2020
fe6449e
plug in the runtime as the generic instantiation
coriolinus Sep 14, 2020
5a7918a
implement necessary traits to get the test runtime compiling
coriolinus Sep 15, 2020
73ded05
add inclusion::Event as variant into Event enum
coriolinus Sep 15, 2020
db56494
implement unimplemented bits in kusama
coriolinus Sep 15, 2020
1fa4a80
implement unimplemented bits in polkadot runtime
coriolinus Sep 15, 2020
3b4cc15
implement unimplemented bits in westend runtime
coriolinus Sep 15, 2020
5856a2b
Merge remote-tracking branch 'origin/master' into prgn-run-rococo
coriolinus Sep 15, 2020
0386374
migrate client upgrades from master
coriolinus Sep 15, 2020
00887ea
update test service with new node changes
coriolinus Sep 15, 2020
38c2a42
package metadata--that wasn't intended to be removed
coriolinus Sep 16, 2020
06e960d
add parachains v1 modules to each runtime
coriolinus Sep 16, 2020
c0e9e43
enable cli to opt out of full node features
coriolinus Sep 16, 2020
34e51e5
adjust rococo chainspec per example
coriolinus Sep 16, 2020
3060842
Merge remote-tracking branch 'origin/master' into prgn-run-rococo
coriolinus Sep 16, 2020
cf2062a
try to fix Cargo.lock
Sep 16, 2020
563555d
Merge branch 'master' into prgn-run-rococo
Sep 16, 2020
df7a758
Merge remote-tracking branch 'origin/master' into prgn-run-rococo
coriolinus Sep 17, 2020
731ebf4
Merge remote-tracking branch 'origin/master' into prgn-run-rococo
coriolinus Sep 17, 2020
65c388b
Merge remote-tracking branch 'origin/master' into prgn-run-rococo
coriolinus Sep 18, 2020
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
73 changes: 11 additions & 62 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 1 addition & 36 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ readme = "README.md"
[dependencies]
cli = { package = "polkadot-cli", path = "cli" }
futures = "0.3.4"
service = { package = "polkadot-service", path = "service" }
service = { package = "polkadot-service-new", path = "node/service" }
parity-util-mem = { version = "*", default-features = false, features = ["jemalloc-global"] }

[dev-dependencies]
Expand All @@ -36,9 +36,7 @@ members = [
"runtime/westend",
"runtime/test-runtime",
"runtime/test-runtime/client",
"service",
"statement-table",
"service",
"validation",

"node/collation-generation",
Expand Down Expand Up @@ -79,36 +77,3 @@ panic = "unwind"

[features]
runtime-benchmarks=["cli/runtime-benchmarks"]
service-rewr= [
"cli/service-rewr",
]

# Configuration for building a .deb package - for use with `cargo-deb`
[package.metadata.deb]
name = "polkadot"
extended-description = "Implementation of a https://polkadot.network node in Rust based on the Substrate framework."
section = "misc"
maintainer = "[email protected]"
license-file = ["LICENSE", "0"]
# https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html
maintainer-scripts = "scripts/packaging/deb-maintainer-scripts"
assets = [
["target/release/polkadot", "/usr/bin/", "755"],
["scripts/packaging/polkadot.service", "/lib/systemd/system/", "644"]
]
conf-files = [
"/etc/default/polkadot"
]

# Configuration for building an .rpm package - for use with `cargo-rpm`
[package.metadata.rpm]
package = "polkadot"

[package.metadata.rpm.cargo]
buildflags = ["--release"]

[package.metadata.rpm.targets]
polkadot = { path = "/usr/bin/polkadot" }

[package.metadata.rpm.files]
"../scripts/packaging/polkadot.service" = { path = "/usr/lib/systemd/system/polkadot.service", mode = "644" }
12 changes: 4 additions & 8 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-client-db = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" }
service = { package = "polkadot-service", path = "../service", default-features = false, optional = true }
service-new = { package = "polkadot-service-new", path = "../node/service", default-features = false, optional = true }
service = { package = "polkadot-service-new", path = "../node/service", default-features = false, features = [ "full-node" ] }

tokio = { version = "0.2.13", features = ["rt-threaded"], optional = true }
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true }
Expand All @@ -42,22 +41,19 @@ sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master",
substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "master" }

[features]
default = [ "wasmtime", "db", "cli", "service-old", "trie-memory-tracker" ]
default = [ "wasmtime", "db", "cli", "trie-memory-tracker" ]
wasmtime = [ "sc-cli/wasmtime" ]
db = [ "service/db" ]
db = []
cli = [
"tokio",
"sc-cli",
"sc-service",
"frame-benchmarking-cli",
]
service-old = [ "service/full-node" ]
browser = [
"wasm-bindgen",
"wasm-bindgen-futures",
"browser-utils",
"service",
]
runtime-benchmarks = [ "service/runtime-benchmarks" ]
service-rewr = [ "service-new/full-node" ]
runtime-benchmarks = []
trie-memory-tracker = [ "sp-trie/memory-tracker" ]
4 changes: 4 additions & 0 deletions cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ pub struct RunCmd {
#[structopt(long = "force-westend")]
pub force_westend: bool,

/// Force using Rococo native runtime.
#[structopt(long = "force-rococo")]
pub force_rococo: bool,

/// Enable the authority discovery module on validator or sentry nodes.
///
/// When enabled:
Expand Down
20 changes: 12 additions & 8 deletions cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.

use log::info;
#[cfg(not(feature = "service-rewr"))]
use service::{IdentifyVariant, self};
#[cfg(feature = "service-rewr")]
use service_new::{IdentifyVariant, self as service};
use sc_cli::{SubstrateCli, Result, RuntimeVersion, Role};
use crate::cli::{Cli, Subcommand};
use std::sync::Arc;
Expand Down Expand Up @@ -48,7 +45,7 @@ impl SubstrateCli for Cli {
fn load_spec(&self, id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
let id = if id == "" {
let n = get_exec_name().unwrap_or_default();
["polkadot", "kusama", "westend"].iter()
["polkadot", "kusama", "westend", "rococo"].iter()
.cloned()
.find(|&chain| n.starts_with(chain))
.unwrap_or("polkadot")
Expand All @@ -66,6 +63,9 @@ impl SubstrateCli for Cli {
"westend-dev" => Box::new(service::chain_spec::westend_development_config()?),
"westend-local" => Box::new(service::chain_spec::westend_local_testnet_config()?),
"westend-staging" => Box::new(service::chain_spec::westend_staging_testnet_config()?),
"rococo-staging" => Box::new(service::chain_spec::rococo_staging_testnet_config()?),
"rococo-local" => Box::new(service::chain_spec::rococo_local_testnet_config()?),
"rococo" => Box::new(service::chain_spec::rococo_config()?),
path => {
let path = std::path::PathBuf::from(path);

Expand All @@ -75,7 +75,9 @@ impl SubstrateCli for Cli {

// When `force_*` is given or the file name starts with the name of one of the known chains,
// we use the chain spec for the specific chain.
if self.run.force_kusama || starts_with("kusama") {
if self.run.force_rococo || starts_with("rococo") {
Box::new(service::RococoChainSpec::from_json_file(path)?)
} else if self.run.force_kusama || starts_with("kusama") {
Box::new(service::KusamaChainSpec::from_json_file(path)?)
} else if self.run.force_westend || starts_with("westend") {
Box::new(service::WestendChainSpec::from_json_file(path)?)
Expand All @@ -91,6 +93,8 @@ impl SubstrateCli for Cli {
&service::kusama_runtime::VERSION
} else if spec.is_westend() {
&service::westend_runtime::VERSION
} else if spec.is_rococo() {
&service::rococo_runtime::VERSION
} else {
&service::polkadot_runtime::VERSION
}
Expand Down Expand Up @@ -147,7 +151,7 @@ pub fn run() -> Result<()> {
None,
authority_discovery_enabled,
grandpa_pause,
).map(|r| r.0),
).map(|full| full.task_manager),
}
})
},
Expand Down Expand Up @@ -180,8 +184,8 @@ pub fn run() -> Result<()> {
let chain_spec = config.chain_spec.cloned_box();
let network_config = config.network.clone();
let service::NewFull { task_manager, client, network_status_sinks, .. }
= service::new_full_nongeneric(
config, None, authority_discovery_enabled, grandpa_pause, false,
= service::build_full(
config, None, authority_discovery_enabled, grandpa_pause,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

invalid formatting (though this PR makes it no worse).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK: 944b745.

)?;
let client = Arc::new(client);

Expand Down
13 changes: 3 additions & 10 deletions cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,10 @@ mod cli;
#[cfg(feature = "cli")]
mod command;

#[cfg(not(feature = "service-rewr"))]
pub use service::{
ProvideRuntimeApi, CoreApi, ParachainHost, IdentifyVariant,
Block, self, RuntimeApiCollection, TFullClient
};

#[cfg(feature = "service-rewr")]
pub use service_new::{
self as service,
ProvideRuntimeApi, CoreApi, ParachainHost, IdentifyVariant,
Block, self, RuntimeApiCollection, TFullClient
self,
ProvideRuntimeApi, CoreApi, IdentifyVariant,
Block, RuntimeApiCollection, TFullClient
};

#[cfg(feature = "cli")]
Expand Down
Loading