mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 01:57:56 +00:00
* remove try-runtime-cli
* fix ci pipeline
* fix link
* remove chain var
* build runtime with try-runtime feature
* use main branch
* pin to commit
* fix build
* update lockfile for {"substrate"}
---------
Co-authored-by: parity-processbot <>
This commit is contained in:
Generated
+184
-184
File diff suppressed because it is too large
Load Diff
@@ -55,12 +55,9 @@ pub enum Subcommand {
|
||||
/// capabilities of running a validator.
|
||||
HostPerfCheck,
|
||||
|
||||
/// Try some command against runtime state.
|
||||
#[cfg(feature = "try-runtime")]
|
||||
TryRuntime(try_runtime_cli::TryRuntimeCmd),
|
||||
|
||||
/// Try some command against runtime state. Note: `try-runtime` feature must be enabled.
|
||||
#[cfg(not(feature = "try-runtime"))]
|
||||
/// Try-runtime has migrated to a standalone CLI
|
||||
/// (<https://github.com/paritytech/try-runtime-cli>). The subcommand exists as a stub and
|
||||
/// deprecation notice. It will be removed entirely some time after Janurary 2024.
|
||||
TryRuntime,
|
||||
|
||||
/// Key management CLI utilities
|
||||
|
||||
@@ -531,68 +531,12 @@ pub fn run() -> Result<()> {
|
||||
},
|
||||
Some(Subcommand::Key(cmd)) => Ok(cmd.run(&cli)?),
|
||||
#[cfg(feature = "try-runtime")]
|
||||
Some(Subcommand::TryRuntime(cmd)) => {
|
||||
use sc_service::TaskManager;
|
||||
use try_runtime_cli::block_building_info::timestamp_with_babe_info;
|
||||
|
||||
let runner = cli.create_runner(cmd)?;
|
||||
let chain_spec = &runner.config().chain_spec;
|
||||
set_default_ss58_version(chain_spec);
|
||||
|
||||
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| Error::SubstrateService(sc_service::Error::Prometheus(e)))?;
|
||||
|
||||
ensure_dev(chain_spec).map_err(Error::Other)?;
|
||||
|
||||
#[cfg(feature = "kusama-native")]
|
||||
if chain_spec.is_kusama() {
|
||||
return runner.async_run(|_| {
|
||||
Ok((
|
||||
cmd.run::<service::kusama_runtime::Block, sp_io::SubstrateHostFunctions, _>(
|
||||
Some(timestamp_with_babe_info(service::kusama_runtime_constants::time::MILLISECS_PER_BLOCK))
|
||||
)
|
||||
.map_err(Error::SubstrateCli),
|
||||
task_manager,
|
||||
))
|
||||
})
|
||||
}
|
||||
|
||||
#[cfg(feature = "westend-native")]
|
||||
if chain_spec.is_westend() {
|
||||
return runner.async_run(|_| {
|
||||
Ok((
|
||||
cmd.run::<service::westend_runtime::Block, sp_io::SubstrateHostFunctions, _>(
|
||||
Some(timestamp_with_babe_info(service::westend_runtime_constants::time::MILLISECS_PER_BLOCK))
|
||||
)
|
||||
.map_err(Error::SubstrateCli),
|
||||
task_manager,
|
||||
))
|
||||
})
|
||||
}
|
||||
// else we assume it is polkadot.
|
||||
#[cfg(feature = "polkadot-native")]
|
||||
{
|
||||
return runner.async_run(|_| {
|
||||
Ok((
|
||||
cmd.run::<service::polkadot_runtime::Block, sp_io::SubstrateHostFunctions, _>(
|
||||
Some(timestamp_with_babe_info(service::polkadot_runtime_constants::time::MILLISECS_PER_BLOCK))
|
||||
)
|
||||
.map_err(Error::SubstrateCli),
|
||||
task_manager,
|
||||
))
|
||||
})
|
||||
}
|
||||
#[cfg(not(feature = "polkadot-native"))]
|
||||
panic!("No runtime feature (polkadot, kusama, westend, rococo) is enabled")
|
||||
},
|
||||
Some(Subcommand::TryRuntime) => Err(try_runtime_cli::DEPRECATION_NOTICE.to_owned().into()),
|
||||
#[cfg(not(feature = "try-runtime"))]
|
||||
Some(Subcommand::TryRuntime) => Err(Error::Other(
|
||||
"TryRuntime wasn't enabled when building the node. \
|
||||
Some(Subcommand::TryRuntime) => Err("TryRuntime wasn't enabled when building the node. \
|
||||
You can enable it with `--features try-runtime`."
|
||||
.into(),
|
||||
)
|
||||
.into()),
|
||||
.to_owned()
|
||||
.into()),
|
||||
Some(Subcommand::ChainInfo(cmd)) => {
|
||||
let runner = cli.create_runner(cmd)?;
|
||||
Ok(runner.sync_run(|config| cmd.run::<service::Block>(&config))?)
|
||||
|
||||
@@ -62,10 +62,10 @@ check-try-runtime:
|
||||
- |
|
||||
export RUST_LOG=remote-ext=debug,runtime=debug
|
||||
echo "---------- Running try-runtime for ${NETWORK} ----------"
|
||||
time cargo build --release --locked -p "$NETWORK"-runtime
|
||||
time cargo run --locked --release --features try-runtime try-runtime \
|
||||
time cargo install --locked --git https://github.com/paritytech/try-runtime-cli --rev a93c9b5abe5d31a4cf1936204f7e5c489184b521
|
||||
time cargo build --release --locked -p "$NETWORK"-runtime --features try-runtime
|
||||
time try-runtime \
|
||||
--runtime ./target/release/wbuild/"$NETWORK"-runtime/target/wasm32-unknown-unknown/release/"$NETWORK"_runtime.wasm \
|
||||
--chain=${NETWORK}-dev \
|
||||
on-runtime-upgrade --checks=pre-and-post live --uri wss://${NETWORK}-try-runtime-node.parity-chains.parity.io:443
|
||||
|
||||
check-runtime-migration-polkadot:
|
||||
|
||||
Reference in New Issue
Block a user