Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

try-runtime-cli: path to being an independent CLI #12975

Closed
polkadot-developers/substrate-docs
#2043
@kianenigma

Description

@kianenigma

... and capable of interacting with any substrate-based chain, at any without needing to care about the block format.

As of #12537, the try-runtime-cli does not care about the local runtime anymore. It always uses the path to the wasm file.

If you look at the code now, there are only two reasons why try-runtime-cli is part of substrate/polkadot/cumulus now:

  1. Get the list of host functions from the native executor
  2. Get the block format

cmd.run::<Block, ExtendedHostFunctions<
sp_io::SubstrateHostFunctions,
<ExecutorDispatch as NativeExecutionDispatch>::ExtendHostFunctions,
>>(),

The former can be hardcoded and as far as I know we don't really change it. It should simple be SubstrateHostFunctions default set.

And the latter, should be provided by sub-xt. sub-xt is now capable of fetching the metadata of a remote node and generating types from it, including the block format, at compile-time, which is awesome and exactly what we need.

If done, there'd be one try-runtime-cli, capable of working with all substrate-based chains, with much faster compile-time, and capable of living outside of substrate repo even.

### Tasks
- [x] Standalone repo and docs https://github.com/paritytech/try-runtime-cli/pull/6
- [x] Link docs on https://paritytech.github.io/ https://github.com/paritytech/paritytech.github.io/pull/12
- [x] Deprecate node-cli `try-runtime` subcommand https://github.com/paritytech/substrate/pull/14731
- [x] Migrate `try-runtime` issues to new repo
- [x] Update substrate.io docs to point to standalone cli docs https://github.com/substrate-developer-hub/substrate-docs/pull/2043

Metadata

Metadata

Assignees

Labels

J0-enhancementAn additional feature request.T1-runtimeThis PR/Issue is related to the topic “runtime”.Z2-mediumCan be fixed by a coder with good Rust knowledge but little knowledge of the codebase.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions