Skip to content

Commit

Permalink
Test deployments fixes (paritytech#2057)
Browse files Browse the repository at this point in the history
* Fix node_impl_version error

```
error: unexpected argument '--node-impl-version' found

  tip: to pass '--node-impl-version' as a value, use '-- --node-impl-version'

Usage: rialto-bridge-node prepare-worker <SOCKET_PATH> <NODE_IMPL_VERSION>

For more information, try '--help'.

```

* Fix rialto-parachain not producing blocks

We must have at least 2 validators for each collator
  • Loading branch information
serban300 committed Apr 8, 2024
1 parent e2d889a commit 0ffd50e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
10 changes: 7 additions & 3 deletions bridges/bin/rialto/node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,25 @@ pub enum Subcommand {
Inspect(node_inspect::cli::InspectCmd),

/// Benchmark runtime pallets.
#[clap(subcommand)]
#[command(subcommand)]
Benchmark(frame_benchmarking_cli::BenchmarkCmd),

/// FOR INTERNAL USE: analog of the "prepare-worker" command of the polkadot binary.
#[clap(name = "prepare-worker", hide = true)]
#[command(name = "prepare-worker", hide = true)]
PvfPrepareWorker(ValidationWorkerCommand),

/// FOR INTERNAL USE: analog of the "execute-worker" command of the polkadot binary.
#[clap(name = "execute-worker", hide = true)]
#[command(name = "execute-worker", hide = true)]
PvfExecuteWorker(ValidationWorkerCommand),
}

/// Validation worker command.
#[derive(Debug, Parser)]
pub struct ValidationWorkerCommand {
/// The path to the validation host's socket.
#[arg(long)]
pub socket_path: String,
/// Calling node implementation version
#[arg(long)]
pub node_impl_version: String,
}
10 changes: 8 additions & 2 deletions bridges/bin/rialto/node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,21 @@ pub fn run() -> sc_cli::Result<()> {
builder.with_colors(false);
let _ = builder.init();

polkadot_node_core_pvf::prepare_worker_entrypoint(&cmd.socket_path, None);
polkadot_node_core_pvf::prepare_worker_entrypoint(
&cmd.socket_path,
Some(&cmd.node_impl_version),
);
Ok(())
},
Some(crate::cli::Subcommand::PvfExecuteWorker(cmd)) => {
let mut builder = sc_cli::LoggerBuilder::new("");
builder.with_colors(false);
let _ = builder.init();

polkadot_node_core_pvf::execute_worker_entrypoint(&cmd.socket_path, None);
polkadot_node_core_pvf::execute_worker_entrypoint(
&cmd.socket_path,
Some(&cmd.node_impl_version),
);
Ok(())
},
None => {
Expand Down

0 comments on commit 0ffd50e

Please sign in to comment.