Skip to content
Merged
2,727 changes: 1,429 additions & 1,298 deletions Cargo.lock

Large diffs are not rendered by default.

212 changes: 107 additions & 105 deletions Cargo.toml

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions nodes/parachain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ spiritnet-runtime = {workspace = true, features = ["std"]}
# Substrate dependencies
sc-basic-authorship.workspace = true
sc-chain-spec.workspace = true
sc-cli = {workspace = true, features = ["wasmtime"]}
sc-cli = {workspace = true}
sc-client-api.workspace = true
sc-consensus.workspace = true
sc-executor = {workspace = true, features = ["wasmtime"]}
sc-executor = {workspace = true}
sc-network.workspace = true
sc-service = {workspace = true, features = ["wasmtime"]}
sc-service = {workspace = true}
sc-sysinfo.workspace = true
sc-telemetry.workspace = true
sc-tracing.workspace = true
Expand All @@ -54,6 +54,7 @@ sp-blockchain.workspace = true
sp-consensus.workspace = true
sp-consensus-aura = {workspace = true, features = ["std"]}
sp-core = {workspace = true, features = ["std"]}
sp-io = {workspace = true, features = ["std"]}
sp-keystore = {workspace = true, features = ["std"]}
sp-offchain = {workspace = true, features = ["std"]}
sp-runtime = {workspace = true, features = ["std"]}
Expand Down
28 changes: 22 additions & 6 deletions nodes/parachain/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,7 @@ pub fn run() -> Result<()> {
"Compile with --features=runtime-benchmarks \
to enable storage benchmarks."
.into(),
)
.into()),
)),
#[cfg(feature = "runtime-benchmarks")]
(BenchmarkCmd::Storage(cmd), "spiritnet") => runner.sync_run(|config| {
let partials = new_partial::<spiritnet_runtime::RuntimeApi, SpiritnetRuntimeExecutor, _>(
Expand Down Expand Up @@ -392,15 +391,32 @@ pub fn run() -> Result<()> {
}
#[cfg(feature = "try-runtime")]
Some(Subcommand::TryRuntime(cmd)) => {
use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch};
let runner = cli.create_runner(cmd)?;
let registry = &runner.config().prometheus_config.as_ref().map(|cfg| &cfg.registry);
let task_manager = TaskManager::new(runner.config().tokio_handle.clone(), *registry)
.map_err(|e| format!("Error: {:?}", e))?;

if runner.config().chain_spec.is_peregrine() {
runner.async_run(|config| Ok((cmd.run::<Block, PeregrineRuntimeExecutor>(config), task_manager)))
runner.async_run(|_| {
Ok((
cmd.run::<Block, ExtendedHostFunctions<
sp_io::SubstrateHostFunctions,
<PeregrineRuntimeExecutor as NativeExecutionDispatch>::ExtendHostFunctions,
>>(),
task_manager,
))
})
} else if runner.config().chain_spec.is_spiritnet() {
runner.async_run(|config| Ok((cmd.run::<Block, SpiritnetRuntimeExecutor>(config), task_manager)))
runner.async_run(|_| {
Ok((
cmd.run::<Block, ExtendedHostFunctions<
sp_io::SubstrateHostFunctions,
<SpiritnetRuntimeExecutor as NativeExecutionDispatch>::ExtendHostFunctions,
>>(),
task_manager,
))
})
} else {
Err("Chain doesn't support try-runtime".into())
}
Expand Down Expand Up @@ -456,8 +472,8 @@ pub fn run() -> Result<()> {
if config.role.is_authority() { "yes" } else { "no" }
);

if collator_options.relay_chain_rpc_url.is_some() && !cli.relay_chain_args.len().is_zero() {
warn!("Detected relay chain node arguments together with --relay-chain-rpc-url. This command starts a minimal Polkadot node that only uses a network-related subset of all relay chain CLI options.");
if !collator_options.relay_chain_rpc_urls.len().is_zero() && !cli.relay_chain_args.len().is_zero() {
warn!("Detected relay chain node arguments together with --relay-chain-rpc-urls. This command starts a minimal Polkadot node that only uses a network-related subset of all relay chain CLI options.");
}

if config.chain_spec.is_peregrine() {
Expand Down
Loading