diff --git a/Cargo.lock b/Cargo.lock index c1cd5b1..58fff00 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1287,7 +1287,7 @@ dependencies = [ [[package]] name = "ipfs-hasher" -version = "0.17.0" +version = "0.18.0" dependencies = [ "ipfs-unixfs", "wasm-loader", @@ -1348,8 +1348,8 @@ dependencies = [ [[package]] name = "jsonrpsee" -version = "0.13.1" -source = "git+https://github.com/paritytech/jsonrpsee#f2025ce16cc2de1a59941cc6dc59b811f4218147" +version = "0.14.0" +source = "git+https://github.com/paritytech/jsonrpsee#d974914fb07d24bfd783ae4b721e67c2c4d539ce" dependencies = [ "jsonrpsee-core", "jsonrpsee-http-client", @@ -1360,8 +1360,8 @@ dependencies = [ [[package]] name = "jsonrpsee-client-transport" -version = "0.13.1" -source = "git+https://github.com/paritytech/jsonrpsee#f2025ce16cc2de1a59941cc6dc59b811f4218147" +version = "0.14.0" +source = "git+https://github.com/paritytech/jsonrpsee#d974914fb07d24bfd783ae4b721e67c2c4d539ce" dependencies = [ "anyhow", "futures-channel", @@ -1384,8 +1384,8 @@ dependencies = [ [[package]] name = "jsonrpsee-core" -version = "0.13.1" -source = "git+https://github.com/paritytech/jsonrpsee#f2025ce16cc2de1a59941cc6dc59b811f4218147" +version = "0.14.0" +source = "git+https://github.com/paritytech/jsonrpsee#d974914fb07d24bfd783ae4b721e67c2c4d539ce" dependencies = [ "anyhow", "async-lock", @@ -1402,13 +1402,14 @@ dependencies = [ "thiserror", "tokio", "tracing", + "tracing-futures", "wasm-bindgen-futures", ] [[package]] name = "jsonrpsee-http-client" -version = "0.13.1" -source = "git+https://github.com/paritytech/jsonrpsee#f2025ce16cc2de1a59941cc6dc59b811f4218147" +version = "0.14.0" +source = "git+https://github.com/paritytech/jsonrpsee#d974914fb07d24bfd783ae4b721e67c2c4d539ce" dependencies = [ "async-trait", "hyper", @@ -1421,12 +1422,13 @@ dependencies = [ "thiserror", "tokio", "tracing", + "tracing-futures", ] [[package]] name = "jsonrpsee-types" -version = "0.13.1" -source = "git+https://github.com/paritytech/jsonrpsee#f2025ce16cc2de1a59941cc6dc59b811f4218147" +version = "0.14.0" +source = "git+https://github.com/paritytech/jsonrpsee#d974914fb07d24bfd783ae4b721e67c2c4d539ce" dependencies = [ "anyhow", "beef", @@ -1438,8 +1440,8 @@ dependencies = [ [[package]] name = "jsonrpsee-wasm-client" -version = "0.13.1" -source = "git+https://github.com/paritytech/jsonrpsee#f2025ce16cc2de1a59941cc6dc59b811f4218147" +version = "0.14.0" +source = "git+https://github.com/paritytech/jsonrpsee#d974914fb07d24bfd783ae4b721e67c2c4d539ce" dependencies = [ "jsonrpsee-client-transport", "jsonrpsee-core", @@ -1448,8 +1450,8 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-client" -version = "0.13.1" -source = "git+https://github.com/paritytech/jsonrpsee#f2025ce16cc2de1a59941cc6dc59b811f4218147" +version = "0.14.0" +source = "git+https://github.com/paritytech/jsonrpsee#d974914fb07d24bfd783ae4b721e67c2c4d539ce" dependencies = [ "jsonrpsee-client-transport", "jsonrpsee-core", @@ -2784,7 +2786,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate/#3a4f9659728e9ea9e3c9e1f6ccde418ec8dbb752" +source = "git+https://github.com/paritytech/substrate/#279593d87f103fa5e10c9751a97b1584f3ad79d6" dependencies = [ "thiserror", "zstd", @@ -3006,7 +3008,7 @@ dependencies = [ [[package]] name = "substrate-differ" -version = "0.17.1" +version = "0.18.0" dependencies = [ "frame-metadata", "log", @@ -3021,7 +3023,7 @@ dependencies = [ [[package]] name = "substrate-runtime-proposal-hash" -version = "0.17.0" +version = "0.18.0" dependencies = [ "blake2", "frame-metadata", @@ -3048,7 +3050,7 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "subwasm" -version = "0.17.1" +version = "0.18.0" dependencies = [ "assert_cmd", "clap", @@ -3063,7 +3065,7 @@ dependencies = [ [[package]] name = "subwasmlib" -version = "0.17.1" +version = "0.18.0" dependencies = [ "calm_io", "color-eyre", @@ -3075,6 +3077,7 @@ dependencies = [ "scale-info", "serde", "serde_json", + "sp-version", "substrate-differ", "wasm-loader", "wasm-testbed", @@ -3320,6 +3323,16 @@ dependencies = [ "tracing-subscriber 0.3.11", ] +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "pin-project", + "tracing", +] + [[package]] name = "tracing-log" version = "0.1.3" @@ -3419,7 +3432,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", - "rand 0.7.3", + "rand 0.8.5", "static_assertions", ] @@ -3620,7 +3633,7 @@ checksum = "d554b7f530dee5964d9a9468d95c1f8b8acae4f282807e7d27d4b03099a46744" [[package]] name = "wasm-loader" -version = "0.17.1" +version = "0.18.0" dependencies = [ "hex", "jsonrpsee", @@ -3634,7 +3647,7 @@ dependencies = [ [[package]] name = "wasm-testbed" -version = "0.17.0" +version = "0.18.0" dependencies = [ "frame-metadata", "hex", @@ -3646,6 +3659,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-state-machine", + "sp-version", "sp-wasm-interface", "substrate-runtime-proposal-hash", "wasm-loader", @@ -3806,18 +3820,18 @@ dependencies = [ [[package]] name = "zstd" -version = "0.10.2+zstd.1.5.2" +version = "0.11.2+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4a6bd64f22b5e3e94b4e238669ff9f10815c27a5180108b849d24174a83847" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "4.1.6+zstd.1.5.2" +version = "5.0.2+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b61c51bb270702d6167b8ce67340d2754b088d0c091b06e593aa772c3ee9bb" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" dependencies = [ "libc", "zstd-sys", @@ -3825,9 +3839,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "1.6.3+zstd.1.5.2" +version = "2.0.1+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc49afa5c8d634e75761feda8c592051e7eeb4683ba827211eb0d731d3402ea8" +checksum = "9fd07cbbc53846d9145dbffdf6dd09a7a0aa52be46741825f5c97bdd4f73f12b" dependencies = [ "cc", "libc", diff --git a/README.md b/README.md index f805370..4ec2bee 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ MacOS Homebrew users can use: ### Command: --help - subwasm 0.17.1 + subwasm 0.18.0 chevdor :Wilfried Kopp :Wilfried Kopp :Wilfried Kopp :Wilfried Kopp The wasm file to load. It can be a path on your local filesystem such as + /tmp/runtime.wasm or a node url such as http://localhost:9933 or + ws://localhost:9944 [default: runtime_000.wasm] + + OPTIONS: + -b, --block The optional block where to fetch the runtime. That allows fetching older + runtimes but you will need to connect to archive nodes. Currently, you + must pass a block hash. Passing the block numbers is not supported + --chain Provide the name of a chain and a random url amongst a list of known + nodes will be used. If you pass a valid --chain, --url will be ignored + --chain local = http://localhost:9933 + -h, --help Print help information + -j, --json Output as json + -V, --version Print version information + ### Command: meta - subwasm-metadata 0.17.1 + subwasm-metadata 0.18.0 chevdor :Wilfried Kopp :Wilfried Kopp :Wilfried Kopp :Wilfried Kopp color_eyre::Result<()> { env_logger::Builder::from_env(Env::default().default_filter_or("none")).init(); - let opts: Opts = Opts::parse(); + noquiet!(opts, println!("Running {} v{}", crate_name!(), crate_version!())); match opts.subcmd { SubCommand::Get(get_opts) => { - info!("Running {} v{}", crate_name!(), crate_version!()); let chain_name = get_opts.chain.map(|some| some.name); let url = &get_url(chain_name.as_deref(), &get_opts.url); @@ -31,8 +30,6 @@ fn main() -> color_eyre::Result<()> { } SubCommand::Info(info_opts) => { - info!("Running {} v{}", crate_name!(), crate_version!()); - let chain_name = info_opts.chain.map(|some| some.name); let source = get_source(chain_name.as_deref(), info_opts.source, info_opts.block); @@ -42,9 +39,17 @@ fn main() -> color_eyre::Result<()> { subwasm.runtime_info().print(opts.json); } - SubCommand::Metadata(meta_opts) => { - info!("Running {} v{}", crate_name!(), crate_version!()); + SubCommand::Version(version_opts) => { + let chain_name = version_opts.chain.map(|some| some.name); + let source = get_source(chain_name.as_deref(), version_opts.source, version_opts.block); + + info!("⏱️ Loading WASM from {:?}", &source); + let subwasm = Subwasm::new(&source); + subwasm.runtime_info().print_version(opts.json); + } + + SubCommand::Metadata(meta_opts) => { let chain_name = meta_opts.chain.map(|some| some.name); let source = get_source(chain_name.as_deref(), meta_opts.source, meta_opts.block); @@ -61,8 +66,6 @@ fn main() -> color_eyre::Result<()> { } SubCommand::Diff(diff_opts) => { - noquiet!(opts, println!("Running {} v{}", crate_name!(), crate_version!())); - let chain_a = diff_opts.chain_a.map(|some| some.name); let src_a = get_source(chain_a.as_deref(), diff_opts.src_a, None); @@ -73,13 +76,10 @@ fn main() -> color_eyre::Result<()> { } SubCommand::Compress(copts) => { - noquiet!(opts, println!("Running {} v{}", crate_name!(), crate_version!())); compress(copts.input, copts.output).unwrap(); } SubCommand::Decompress(dopts) => { - noquiet!(opts, println!("Running {} v{}", crate_name!(), crate_version!())); - decompress(dopts.input, dopts.output).unwrap(); } }; diff --git a/cli/src/opts.rs b/cli/src/opts.rs index 748f663..51799fc 100644 --- a/cli/src/opts.rs +++ b/cli/src/opts.rs @@ -28,6 +28,9 @@ pub enum SubCommand { #[clap(version = crate_version!(), author = crate_authors!())] Info(InfoOpts), + #[clap(version = crate_version!(), author = crate_authors!())] + Version(VersionOpts), + #[clap(version = crate_version!(), author = crate_authors!(), alias("meta"))] Metadata(MetaOpts), @@ -86,6 +89,26 @@ pub struct InfoOpts { pub block: Option, // TODO: can do better... } +/// The `version` command returns summarized information about the versions of a runtime. +#[derive(Parser)] +pub struct VersionOpts { + /// The wasm file to load. It can be a path on your local filesystem such as + /// /tmp/runtime.wasm or a node url such as http://localhost:9933 or ws://localhost:9944 + #[clap(alias("src"), default_value = "runtime_000.wasm", required_unless_present = "chain", index = 1)] + pub source: Source, + + /// Provide the name of a chain and a random url amongst a list of known nodes will be used. + /// If you pass a valid --chain, --url will be ignored + /// --chain local = http://localhost:9933 + #[clap(long, parse(from_str), conflicts_with = "source")] + pub chain: Option, + + /// The optional block where to fetch the runtime. That allows fetching older runtimes but you will need to connect to archive nodes. + /// Currently, you must pass a block hash. Passing the block numbers is not supported. + #[clap(short, long)] + pub block: Option, // TODO: can do better... +} + /// Returns the metadata as a json object. You may also use the "meta" alias. #[derive(Parser)] pub struct MetaOpts { diff --git a/doc/usage.adoc b/doc/usage.adoc index 4cc9318..5d05678 100644 --- a/doc/usage.adoc +++ b/doc/usage.adoc @@ -1,4 +1,4 @@ -subwasm 0.17.1 +subwasm 0.18.0 chevdor :Wilfried Kopp :Wilfried Kopp :Wilfried Kopp :Wilfried Kopp :Wilfried Kopp :Wilfried Kopp :Wilfried Kopp :Wilfried Kopp The wasm file to load. It can be a path on your local filesystem such as + /tmp/runtime.wasm or a node url such as http://localhost:9933 or + ws://localhost:9944 [default: runtime_000.wasm] + +OPTIONS: + -b, --block The optional block where to fetch the runtime. That allows fetching older + runtimes but you will need to connect to archive nodes. Currently, you + must pass a block hash. Passing the block numbers is not supported + --chain Provide the name of a chain and a random url amongst a list of known + nodes will be used. If you pass a valid --chain, --url will be ignored + --chain local = http://localhost:9933 + -h, --help Print help information + -j, --json Output as json + -V, --version Print version information diff --git a/justfile b/justfile index 58f538b..99b2a33 100644 --- a/justfile +++ b/justfile @@ -18,6 +18,7 @@ _usage: cargo run -q -- --help > doc/usage.adoc cargo run -q -- get --help > doc/usage_get.adoc cargo run -q -- info --help > doc/usage_info.adoc + cargo run -q -- version --help > doc/usage_version.adoc cargo run -q -- meta --help > doc/usage_meta.adoc cargo run -q -- diff --help > doc/usage_diff.adoc cargo run -q -- compress --help > doc/usage_compress.adoc diff --git a/lib/Cargo.toml b/lib/Cargo.toml index accde52..80f4fee 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -7,19 +7,20 @@ license = "MIT" name = "subwasmlib" readme = "README.md" repository = "https://github.com/chevdor/subwasm" -version = "0.17.1" +version = "0.18.0" [dependencies] calm_io = "0.1" color-eyre = "0.6" frame-metadata = {version = "14", package = "frame-metadata", features = ["v12", "v13", "v14", "std"]} -ipfs-hasher = {version = "0.17.0", path = "../libs/ipfs-hasher"} +ipfs-hasher = {version = "0.18.0", path = "../libs/ipfs-hasher"} log = "0.4" num-format = "0.4" rand = "0.8" scale-info = {version = "1.0", default-features = false, features = ["derive"]} serde = {version = "1.0", features = ["derive"]} serde_json = "1.0" -substrate-differ = {version = "0.17.0", path = "../libs/substrate-differ"} -wasm-loader = {version = "0.17.0", path = "../libs/wasm-loader"} -wasm-testbed = {version = "0.17.0", path = "../libs/wasm-testbed"} +substrate-differ = {version = "0.18.0", path = "../libs/substrate-differ"} +wasm-loader = {version = "0.18.0", path = "../libs/wasm-loader"} +wasm-testbed = {version = "0.18.0", path = "../libs/wasm-testbed"} +sp-version = "3.0" diff --git a/lib/src/runtime_info.rs b/lib/src/runtime_info.rs index aea706b..df8b523 100644 --- a/lib/src/runtime_info.rs +++ b/lib/src/runtime_info.rs @@ -1,6 +1,7 @@ use ipfs_hasher::IpfsHasher; use num_format::{Locale, ToFormattedString}; use serde::Serialize; +use sp_version::RuntimeVersion as SubstrateRuntimeVersion; use std::fmt::Display; use wasm_loader::Compression; use wasm_testbed::{ReservedMeta, WasmTestBed}; @@ -12,7 +13,7 @@ pub struct RuntimeInfo { reserved_meta: ReservedMeta, reserved_meta_valid: bool, metadata_version: u8, - core_version: String, + core_version: SubstrateRuntimeVersion, proposal_hash: String, parachain_authorize_upgrade_hash: String, ipfs_hash: String, @@ -21,10 +22,7 @@ pub struct RuntimeInfo { impl RuntimeInfo { pub fn new(testbed: &WasmTestBed) -> Self { - let core_version = match testbed.core_version() { - Some(v) => v.to_string(), - None => String::from("n/a"), - }; + let core_version = testbed.core_version(); let hasher = IpfsHasher::default(); @@ -52,6 +50,18 @@ impl RuntimeInfo { println!("{}", self); } } + + pub fn print_version(&self, json: bool) { + if json { + let serialized = serde_json::to_string_pretty(&self.core_version).unwrap(); + println!("{}", serialized); + } else { + println!("specifications : {} v{}", self.core_version.spec_name, self.core_version.spec_version); + println!("implementation : {} v{}", self.core_version.impl_name, self.core_version.impl_version); + println!("transaction : v{}", self.core_version.transaction_version); + println!("authoring : v{}", self.core_version.authoring_version); + } + } } impl Display for RuntimeInfo { diff --git a/libs/ipfs-hasher/Cargo.toml b/libs/ipfs-hasher/Cargo.toml index 8a6ddf9..f738381 100644 --- a/libs/ipfs-hasher/Cargo.toml +++ b/libs/ipfs-hasher/Cargo.toml @@ -3,7 +3,7 @@ authors = ["Wilfried Kopp "] edition = "2021" license = "MIT" name = "ipfs-hasher" -version = "0.17.0" +version = "0.18.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -11,4 +11,4 @@ version = "0.17.0" ipfs-unixfs = "0.2" [dev-dependencies] -wasm-loader = {version = "0.17", path = "../wasm-loader"} +wasm-loader = {version = "0.18", path = "../wasm-loader"} diff --git a/libs/substrate-differ/Cargo.toml b/libs/substrate-differ/Cargo.toml index 3d2711e..2417544 100644 --- a/libs/substrate-differ/Cargo.toml +++ b/libs/substrate-differ/Cargo.toml @@ -2,7 +2,7 @@ edition = "2021" license = "MIT" name = "substrate-differ" -version = "0.17.1" +version = "0.18.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -14,7 +14,7 @@ rustc-serialize = "0.3" serde = {version = "1.0", features = ["derive"]} serde_json = "1.0" treediff = {version = "4.0", features = ["with-serde-json", "with-rustc-serialize"]} -wasm-testbed = {version = "0.17.0", path = "../wasm-testbed"} +wasm-testbed = {version = "0.18.0", path = "../wasm-testbed"} [dev-dependencies] -wasm-loader = {version = "0.17", path = "../wasm-loader"} +wasm-loader = {version = "0.18", path = "../wasm-loader"} diff --git a/libs/substrate-differ/src/differs/summary_differ.rs b/libs/substrate-differ/src/differs/summary_differ.rs index 0800ece..0a937e3 100644 --- a/libs/substrate-differ/src/differs/summary_differ.rs +++ b/libs/substrate-differ/src/differs/summary_differ.rs @@ -45,8 +45,8 @@ impl<'a> RuntimeSummaryDiffer<'a> { // CORE VERSIONS println!("Checking core versions:"); - let version_a = self.r1.core_version().expect("Some version"); - let version_b = self.r2.core_version().expect("Some version"); + let version_a = self.r1.core_version(); + let version_b = self.r2.core_version(); if version_a == version_b { print!(" ✅ The 2 core versions are identical: "); diff --git a/libs/substrate-runtime-proposal-hash/Cargo.toml b/libs/substrate-runtime-proposal-hash/Cargo.toml index 1cbd275..f058b4a 100644 --- a/libs/substrate-runtime-proposal-hash/Cargo.toml +++ b/libs/substrate-runtime-proposal-hash/Cargo.toml @@ -7,7 +7,7 @@ license = "MIT" name = "substrate-runtime-proposal-hash" readme = "README.md" repository = "https://github.com/chevdor/subwasm" -version = "0.17.0" +version = "0.18.0" [dependencies] blake2 = "0.10" diff --git a/libs/wasm-loader/Cargo.toml b/libs/wasm-loader/Cargo.toml index 6fa27db..b04b150 100644 --- a/libs/wasm-loader/Cargo.toml +++ b/libs/wasm-loader/Cargo.toml @@ -2,19 +2,29 @@ authors = ["chevdor "] edition = "2021" homepage = "https://github.com/chevdor/subwasm" -keywords = ["wasm", "cli", "substrate", "blockchain", "runtime", "polkadot", "kusama"] +keywords = [ + "wasm", + "cli", + "substrate", + "blockchain", + "runtime", + "polkadot", + "kusama", +] license = "MIT" name = "wasm-loader" readme = "README.md" repository = "https://github.com/chevdor/subwasm" -version = "0.17.1" +version = "0.18.0" [dependencies] hex = "0.4" -jsonrpsee = {version = "0.13", git = "https://github.com/paritytech/jsonrpsee", features = ["client"]} +jsonrpsee = { version = "0.14", git = "https://github.com/paritytech/jsonrpsee", features = [ + "client", +] } log = "0.4" multibase = "0.9" multihash = "0.16" -serde = {version = "1.0", features = ["derive"]} -sp-maybe-compressed-blob = {version = "4.1.0-dev", git = "https://github.com/paritytech/substrate/"} -tokio = {version = "1.11", features = ["full"]} +serde = { version = "1.0", features = ["derive"] } +sp-maybe-compressed-blob = { version = "4.1.0-dev", git = "https://github.com/paritytech/substrate/" } +tokio = { version = "1.11", features = ["full"] } diff --git a/libs/wasm-testbed/Cargo.toml b/libs/wasm-testbed/Cargo.toml index e83f229..b73a49f 100644 --- a/libs/wasm-testbed/Cargo.toml +++ b/libs/wasm-testbed/Cargo.toml @@ -7,7 +7,7 @@ license = "MIT" name = "wasm-testbed" readme = "README.md" repository = "https://github.com/chevdor/subwasm" -version = "0.17.0" +version = "0.18.0" [dependencies] frame-metadata = {version = "14", package = "frame-metadata", features = ["v12", "v13", "v14", "std"]} @@ -17,9 +17,10 @@ sc-executor = "0.9" scale = {version = "2.3", package = "parity-scale-codec", default-features = false} scale-info = {version = "1.0", default-features = false, features = ["derive"]} sp-core = "3.0" +sp-version = "3.0" sp-io = "3.0" sp-runtime = "3.0" sp-state-machine = "0.9" sp-wasm-interface = "3.0" -substrate-runtime-proposal-hash = {version = "0.17.0", path = "../substrate-runtime-proposal-hash"} -wasm-loader = {version = "0.17.0", path = "../wasm-loader"} +substrate-runtime-proposal-hash = {version = "0.18.0", path = "../substrate-runtime-proposal-hash"} +wasm-loader = {version = "0.18.0", path = "../wasm-loader"} diff --git a/libs/wasm-testbed/src/lib.rs b/libs/wasm-testbed/src/lib.rs index f87579f..5695d63 100644 --- a/libs/wasm-testbed/src/lib.rs +++ b/libs/wasm-testbed/src/lib.rs @@ -3,10 +3,11 @@ mod logger_mock; pub use error::{Result, WasmTestbedError}; use frame_metadata::{RuntimeMetadata, RuntimeMetadataPrefixed}; -use sc_executor::{CallInWasm, RuntimeVersion, WasmExecutionMethod, WasmExecutor}; +use sc_executor::{CallInWasm, WasmExecutionMethod, WasmExecutor}; use scale::Decode; use sp_core::Hasher; use sp_runtime::traits::BlakeTwo256; +use sp_version::RuntimeVersion as SubstrateRuntimeVersion; use sp_wasm_interface::HostFunctions; use std::fmt; use substrate_runtime_proposal_hash::{get_parachainsystem_authorize_upgrade, get_result, SrhResult}; @@ -37,7 +38,7 @@ pub struct WasmTestBed { metadata_version: u8, /// Core version as reported by the runtime - core_version: Option, + core_version: SubstrateRuntimeVersion, } impl fmt::Debug for WasmTestBed { @@ -153,9 +154,9 @@ impl WasmTestBed { .map_err(|_| WasmTestbedError::Calling(method.to_string())) } - pub fn get_core_version(wasm: &[u8]) -> Option { + pub fn get_core_version(wasm: &[u8]) -> SubstrateRuntimeVersion { let encoded = Self::call(wasm, "Core_version", &[]).unwrap(); - ::decode(&mut &encoded[..]).ok() + ::decode(&mut &encoded[..]).expect("Failed decoding runtime version") } /// We probably don't need to maintain this as decoding the runtime will @@ -185,8 +186,8 @@ impl WasmTestBed { } /// Get a reference to the substrate wasm's core version. - pub fn core_version(&self) -> Option<&RuntimeVersion> { - self.core_version.as_ref() + pub fn core_version(&self) -> SubstrateRuntimeVersion { + self.core_version.clone() } /// Compute the proposal hash of the runtime @@ -246,7 +247,6 @@ mod tests { let runtime = WasmTestBed::new(&Source::File(PathBuf::from(RUNTIME_V12))).unwrap(); println!("{:#?}", runtime); assert!(runtime.metadata_version == 12); - assert!(runtime.core_version.is_some()); assert!(runtime.is_supported()); } @@ -256,7 +256,6 @@ mod tests { let runtime = WasmTestBed::new(&Source::File(PathBuf::from(RUNTIME_V13))).unwrap(); println!("{:#?}", runtime); assert!(runtime.metadata_version == 13); - assert!(runtime.core_version.is_some()); assert!(runtime.is_supported()); } @@ -286,7 +285,6 @@ mod tests { let runtime = WasmTestBed::new(&Source::File(PathBuf::from(KUSAMA_1050_VXX))).unwrap(); println!("{:#?}", runtime); assert!(runtime.metadata_version == 11); - assert!(runtime.core_version.is_none()); assert!(runtime.is_supported()); } @@ -299,7 +297,7 @@ mod tests { assert!(runtime.metadata_version == 11); assert!(runtime.is_supported()); - let v = &runtime.core_version.unwrap(); + let v = &runtime.core_version; assert!(v.spec_name == RuntimeString::from("kusama")); assert!(v.impl_name == RuntimeString::from("parity-kusama")); assert!(v.authoring_version == 2); @@ -325,7 +323,7 @@ mod tests { assert!(runtime.metadata_version == 12); assert!(runtime.is_supported()); - let v = &runtime.core_version.unwrap(); + let v = &runtime.core_version; assert!(v.spec_name == RuntimeString::from("kusama")); assert!(v.impl_name == RuntimeString::from("parity-kusama")); assert!(v.authoring_version == 2); diff --git a/scripts/demos/casts/demo-diff.cast b/scripts/demos/casts/demo-diff.cast index 5b704c6..52c7eb7 100644 --- a/scripts/demos/casts/demo-diff.cast +++ b/scripts/demos/casts/demo-diff.cast @@ -1,180 +1,210 @@ -{"version": 2, "width": 177, "height": 17, "timestamp": 1653311801, "env": {"SHELL": "/bin/zsh", "TERM": "xterm-256color"}} -[0.0191, "o", "Wou"] -[0.206086, "o", "ld t"] -[0.299356, "o", "hat"] -[0.391375, "o", " not"] -[0.483865, "o", " be"] -[0.57693, "o", " coo"] -[0.669956, "o", "l to"] -[0.761555, "o", " be"] -[0.854352, "o", " abl"] -[0.949016, "o", "e t"] -[1.042164, "o", "o di"] -[1.13287, "o", "ff 2"] -[1.226196, "o", " ru"] -[1.319503, "o", "ntim"] -[1.504592, "o", "es "] -[1.599033, "o", "? Th"] -[1.691516, "o", "is i"] -[1.78392, "o", "s p"] -[1.877943, "o", "reci"] -[1.972626, "o", "sel"] -[2.066396, "o", "y wh"] -[2.159362, "o", "at t"] -[2.253363, "o", "he "] -[2.345193, "o", "diff"] -[2.438751, "o", " co"] -[2.528797, "o", "mman"] -[2.623366, "o", "d do"] -[2.809444, "o", "es!"] -[2.903196, "o", "\r\n"] -[2.907421, "o", "We "] -[3.093993, "o", "firs"] -[3.186433, "o", "t u"] -[3.279856, "o", "se t"] -[3.374674, "o", "he "] -[3.468182, "o", "get "] -[3.561879, "o", "comm"] -[3.654832, "o", "and"] -[3.749609, "o", " to "] -[3.843829, "o", "fet"] -[3.936934, "o", "ch t"] -[4.028816, "o", "he l"] -[4.121799, "o", "ate"] -[4.216495, "o", "st a"] -[4.308976, "o", "nd "] -[4.490523, "o", "an o"] -[4.583866, "o", "lder"] -[4.674794, "o", " ve"] -[4.767167, "o", "rsio"] -[4.859694, "o", "n o"] -[4.952922, "o", "f th"] -[5.045695, "o", "e Po"] -[5.137414, "o", "lka"] -[5.229249, "o", "dot "] -[5.323907, "o", "run"] -[5.418859, "o", "time"] -[5.513852, "o", ":\r\n"] -[5.51843, "o", "sub"] -[5.701257, "o", "wasm"] -[5.79521, "o", " ge"] -[5.888367, "o", "t ws"] -[5.979128, "o", "s:/"] -[6.073852, "o", "/rpc"] -[6.166647, "o", ".pol"] -[6.260601, "o", "kad"] -[6.354254, "o", "ot.i"] -[6.448918, "o", "o -"] -[6.542697, "o", "-out"] -[6.63317, "o", "put "] -[6.725741, "o", "run"] -[6.908191, "o", "time"] -[7.000391, "o", "_ol"] -[7.092429, "o", "der."] -[7.186141, "o", "wasm"] -[7.276168, "o", " --"] -[7.369913, "o", "bloc"] -[7.463438, "o", "k 0"] -[7.557274, "o", "x825"] -[7.649024, "o", "e14c"] -[7.743253, "o", "b9f"] -[7.838206, "o", "1707"] -[7.929139, "o", "f97"] -[8.023814, "o", "6d78"] -[8.206386, "o", "73ff"] -[8.29963, "o", "47f"] -[8.392596, "o", "f89a"] -[8.486123, "o", "307"] -[8.579213, "o", "3082"] -[8.673774, "o", "71af"] -[8.766891, "o", "b82"] -[8.860623, "o", "a6fe"] -[8.954634, "o", "beb"] -[9.048757, "o", "2b1c"] -[9.142513, "o", "b3ea"] -[9.236103, "o", "a7d"] -[9.330476, "o", "\r\n"] -[9.336579, "o", "\u001b[0m\u001b[38;5;8m[\u001b[0m2022-05-23T13:16:50Z \u001b[0m\u001b[32mINFO \u001b[0m subwasm\u001b[0m\u001b[38;5;8m]\u001b[0m Running subwasm v0.17.0\r\n\u001b[0m\u001b[38;5;8m[\u001b[0m2022-05-23T13:16:50Z \u001b[0m\u001b[32mINFO \u001b[0m subwasmlib\u001b[0m\u001b[38;5;8m]\u001b[0m Downloading runtime from OnchainBlock { endpoint: WebSocket(\"wss://rpc.polkadot.io\"), block_ref: Some(\"0x825e14cb9f1707f976d7873ff47ff89a307308271afb82a6febeb2b1cb3eaa7d\") }\r\n"] -[9.337351, "o", "Transport(Invalid URL: No port number in URL (default port is not supported))\r\n"] -[9.337721, "o", "thread 'main' panicked at 'Getting wasm from the node: WsClient', lib/src/lib.rs:77:78\r\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\r\n"] -[9.374065, "o", "./demo-diff.sh: line 10: 67766 Abort trap: 6 $cmd\r\n"] -[9.377894, "o", "sub"] -[9.565229, "o", "wasm"] -[9.656262, "o", " ge"] -[9.750669, "o", "t ws"] -[9.843545, "o", "s:/"] -[9.937026, "o", "/rpc"] -[10.029813, "o", ".pol"] -[10.12398, "o", "kad"] -[10.217325, "o", "ot.i"] -[10.311527, "o", "o -"] -[10.405344, "o", "-out"] -[10.498755, "o", "put "] -[10.598708, "o", "run"] -[10.698708, "o", "time"] -[10.798623, "o", "_la"] -[10.896628, "o", "test"] -[10.996608, "o", ".was"] -[11.092078, "o", "m\r\n"] -[11.097244, "o", "\u001b[0m\u001b[38;5;8m[\u001b[0m2022-05-23T13:16:52Z \u001b[0m\u001b[32mINFO \u001b[0m subwasm\u001b[0m\u001b[38;5;8m]\u001b[0m Running subwasm v0.17.0\r\n\u001b[0m\u001b[38;5;8m[\u001b[0m2022-05-23T13:16:52Z \u001b[0m\u001b[32mINFO \u001b[0m subwasmlib\u001b[0m\u001b[38;5;8m]\u001b[0m Downloading runtime from OnchainBlock { endpoint: WebSocket(\"wss://rpc.polkadot.io\"), block_ref: None }\r\n"] -[11.098094, "o", "Transport(Invalid URL: No port number in URL (default port is not supported))\r\n"] -[11.098388, "o", "thread 'main' panicked at 'Getting wasm from the node: WsClient', lib/src/lib.rs:77:78\r\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\r\n"] -[11.134712, "o", "./demo-diff.sh: line 13: 67771 Abort trap: 6 $cmd\r\n"] -[11.134882, "o", "\r\n"] -[11.138146, "o", "Let"] -[11.332692, "o", "'s c"] -[11.424029, "o", "hec"] -[11.523676, "o", "k id"] -[11.623669, "o", "ent"] -[11.723775, "o", "ity "] -[11.823666, "o", "firs"] -[11.923659, "o", "t!\r\n"] -[11.928484, "o", "sub"] -[12.123695, "o", "wasm"] -[12.223695, "o", " di"] -[12.32365, "o", "ff r"] -[12.423649, "o", "unt"] -[12.523641, "o", "ime_"] -[12.623639, "o", "late"] -[12.72364, "o", "st."] -[12.823631, "o", "wasm"] -[12.923646, "o", " ru"] -[13.023623, "o", "ntim"] -[13.123625, "o", "e_la"] -[13.223618, "o", "tes"] -[13.323632, "o", "t.wa"] -[13.42362, "o", "sm\r\n"] -[13.428795, "o", "Running subwasm v0.17.0\r\n\u001b[0m\u001b[38;5;8m[\u001b[0m2022-05-23T13:16:54Z \u001b[0m\u001b[34mDEBUG\u001b[0m subwasmlib\u001b[0m\u001b[38;5;8m]\u001b[0m Loading WASM runtimes:\r\n"] -[13.428948, "o", " 🅰️ File(\"runtime_latest.wasm\")\r\nthread 'main' panicked at 'File runtime_latest.wasm not found', libs/wasm-loader/src/lib.rs:74:62\r\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\r\n"] -[13.464795, "o", "./demo-diff.sh: line 19: 67776 Abort trap: 6 $cmd\r\n"] -[16.477161, "o", "\r\n"] -[16.480323, "o", "We "] -[16.673531, "o", "can "] -[16.773511, "o", "now"] -[16.873509, "o", " che"] -[16.97354, "o", "ck "] -[17.073499, "o", "for "] -[17.173486, "o", "the "] -[17.273486, "o", "dif"] -[17.373485, "o", "fere"] -[17.473525, "o", "nce"] -[17.573489, "o", "s:\r\n"] -[17.576936, "o", "sub"] -[17.773483, "o", "wasm"] -[17.873465, "o", " di"] -[17.973523, "o", "ff r"] -[18.073464, "o", "unt"] -[18.173459, "o", "ime_"] -[18.273459, "o", "olde"] -[18.373458, "o", "r.w"] -[18.473456, "o", "asm "] -[18.573449, "o", "run"] -[18.673451, "o", "time"] -[18.773462, "o", "_lat"] -[18.873432, "o", "est"] -[18.973451, "o", ".was"] -[19.07343, "o", "m\r\n"] -[19.078051, "o", "Running subwasm v0.17.0\r\n\u001b[0m\u001b[38;5;8m[\u001b[0m2022-05-23T13:17:00Z \u001b[0m\u001b[34mDEBUG\u001b[0m subwasmlib\u001b[0m\u001b[38;5;8m]\u001b[0m Loading WASM runtimes:\r\n"] -[19.078145, "o", " 🅰️ File(\"runtime_older.wasm\")\r\nthread 'main' panicked at 'File runtime_older.wasm not found', libs/wasm-loader/src/lib.rs:74:62\r\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\r\n"] -[19.116529, "o", "./demo-diff.sh: line 26: 67784 Abort trap: 6 $cmd\r\n"] -[22.124298, "o", "\r\n"] +{"version": 2, "width": 208, "height": 27, "timestamp": 1656948511, "env": {"SHELL": "/bin/zsh", "TERM": "xterm-256color"}} +[0.018498, "o", "Wou"] +[0.203621, "o", "ld "] +[0.297261, "o", "tha"] +[0.390534, "o", "t n"] +[0.482406, "o", "ot "] +[0.574406, "o", "be "] +[0.665545, "o", "coo"] +[0.757264, "o", "l t"] +[0.849017, "o", "o b"] +[0.941178, "o", "e a"] +[1.032254, "o", "ble"] +[1.126094, "o", " to"] +[1.219062, "o", " di"] +[1.405555, "o", "ff "] +[1.499588, "o", "2 r"] +[1.590198, "o", "unt"] +[1.682562, "o", "ime"] +[1.776323, "o", "s ?"] +[1.869467, "o", " Th"] +[1.962079, "o", "is "] +[2.056048, "o", "is "] +[2.149634, "o", "pre"] +[2.243068, "o", "cis"] +[2.337113, "o", "ely"] +[2.428764, "o", " wh"] +[2.522588, "o", "at "] +[2.707895, "o", "the"] +[2.797982, "o", " di"] +[2.891193, "o", "ff "] +[2.983953, "o", "com"] +[3.077066, "o", "man"] +[3.17159, "o", "d d"] +[3.261737, "o", "oes"] +[3.352544, "o", "!\r\n"] +[3.356197, "o", "We "] +[3.543594, "o", "fir"] +[3.635909, "o", "st "] +[3.72872, "o", "use"] +[3.821535, "o", " th"] +[3.915181, "o", "e g"] +[4.005659, "o", "et "] +[4.098492, "o", "com"] +[4.192126, "o", "man"] +[4.285376, "o", "d t"] +[4.377366, "o", "o f"] +[4.471519, "o", "etc"] +[4.565435, "o", "h t"] +[4.656757, "o", "he "] +[4.846505, "o", "lat"] +[4.939532, "o", "est"] +[5.030468, "o", " an"] +[5.123041, "o", "d a"] +[5.216767, "o", "n o"] +[5.309346, "o", "lde"] +[5.402747, "o", "r v"] +[5.496504, "o", "ers"] +[5.588485, "o", "ion"] +[5.681569, "o", " of"] +[5.775581, "o", " th"] +[5.86983, "o", "e P"] +[5.961278, "o", "olk"] +[6.14803, "o", "ado"] +[6.240198, "o", "t r"] +[6.333661, "o", "unt"] +[6.426621, "o", "ime"] +[6.521484, "o", ":\r\n"] +[6.525379, "o", "sub"] +[6.711601, "o", "was"] +[6.801768, "o", "m g"] +[6.896481, "o", "et "] +[6.99011, "o", "wss"] +[7.083633, "o", "://"] +[7.176976, "o", "rpc"] +[7.271528, "o", ".po"] +[7.364878, "o", "lka"] +[7.455394, "o", "dot"] +[7.546453, "o", ".io"] +[7.640149, "o", " --"] +[7.730893, "o", "out"] +[7.915227, "o", "put"] +[8.008149, "o", " ru"] +[8.102221, "o", "nti"] +[8.196805, "o", "me_"] +[8.290103, "o", "old"] +[8.383504, "o", "er."] +[8.476659, "o", "was"] +[8.571437, "o", "m -"] +[8.664268, "o", "-bl"] +[8.75768, "o", "ock"] +[8.850134, "o", " 0x"] +[8.943469, "o", "825"] +[9.037261, "o", "e14"] +[9.127849, "o", "cb9"] +[9.312026, "o", "f17"] +[9.404176, "o", "07f"] +[9.497706, "o", "976"] +[9.591538, "o", "d78"] +[9.68373, "o", "73f"] +[9.775397, "o", "f47"] +[9.869698, "o", "ff8"] +[9.961616, "o", "9a3"] +[10.052392, "o", "073"] +[10.146419, "o", "082"] +[10.240414, "o", "71a"] +[10.331813, "o", "fb8"] +[10.426092, "o", "2a6"] +[10.609746, "o", "feb"] +[10.702355, "o", "eb2"] +[10.796884, "o", "b1c"] +[10.890507, "o", "b3e"] +[10.983683, "o", "aa7"] +[11.076693, "o", "d\r\n"] +[11.081836, "o", "\u001b[0m\u001b[38;5;8m[\u001b[0m2022-07-04T15:28:42Z \u001b[0m\u001b[32mINFO \u001b[0m subwasm\u001b[0m\u001b[38;5;8m]\u001b[0m Running subwasm v0.17.1\r\n\u001b[0m\u001b[38;5;8m[\u001b[0m2022-07-04T15:28:42Z \u001b[0m\u001b[32mINFO \u001b[0m subwasmlib\u001b[0m\u001b[38;5;8m]\u001b[0m Downloading runtime from OnchainBlock { endpoint: WebSocket(\"wss://rpc.polkadot.io\"), block_ref: Some(\"0x825e14cb9f1707f976d7873ff47ff89a307308271afb82a6febeb2b1cb3eaa7d\") }\r\n"] +[11.082291, "o", "Transport(Invalid URL: No port number in URL (default port is not supported))\r\n"] +[11.082625, "o", "thread 'main' panicked at 'Getting wasm from the node: WsClient', lib/src/lib.rs:77:78\r\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\r\n"] +[11.142948, "o", "./demo-diff.sh: line 10: 54445 Abort trap: 6 $cmd\r\n"] +[11.146322, "o", "sub"] +[11.332012, "o", "was"] +[11.422359, "o", "m g"] +[11.514206, "o", "et "] +[11.608017, "o", "wss"] +[11.698088, "o", "://"] +[11.791241, "o", "rpc"] +[11.883707, "o", ".po"] +[11.976826, "o", "lka"] +[12.071367, "o", "dot"] +[12.165076, "o", ".io"] +[12.257219, "o", " --"] +[12.349882, "o", "out"] +[12.531475, "o", "put"] +[12.624703, "o", " ru"] +[12.714754, "o", "nti"] +[12.808141, "o", "me_"] +[12.901636, "o", "lat"] +[12.996562, "o", "est"] +[13.09, "o", ".wa"] +[13.183485, "o", "sm\r\n"] +[13.188817, "o", "\u001b[0m\u001b[38;5;8m[\u001b[0m2022-07-04T15:28:44Z \u001b[0m\u001b[32mINFO \u001b[0m subwasm\u001b[0m\u001b[38;5;8m]\u001b[0m Running subwasm v0.17.1\r\n\u001b[0m\u001b[38;5;8m[\u001b[0m2022-07-04T15:28:44Z \u001b[0m\u001b[32mINFO \u001b[0m subwasmlib\u001b[0m\u001b[38;5;8m]\u001b[0m Downloading runtime from OnchainBlock { endpoint: WebSocket(\"wss://rpc.polkadot.io\"), block_ref: None }\r\n"] +[13.189254, "o", "Transport(Invalid URL: No port number in URL (default port is not supported))\r\n"] +[13.189572, "o", "thread 'main' panicked at 'Getting wasm from the node: WsClient', lib/src/lib.rs:77:78\r\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\r\n"] +[13.246899, "o", "./demo-diff.sh: line 13: 54448 Abort trap: 6 $cmd\r\n"] +[13.246946, "o", "\r\n"] +[13.250258, "o", "Let"] +[13.434463, "o", "'s "] +[13.528308, "o", "che"] +[13.621332, "o", "ck "] +[13.711363, "o", "ide"] +[13.805152, "o", "nti"] +[13.899064, "o", "ty "] +[13.992544, "o", "fir"] +[14.086233, "o", "st!"] +[14.180503, "o", "\r\n"] +[14.184063, "o", "sub"] +[14.369674, "o", "was"] +[14.461951, "o", "m d"] +[14.55466, "o", "iff"] +[14.64732, "o", " ru"] +[14.740136, "o", "nti"] +[14.831143, "o", "me_"] +[14.921762, "o", "lat"] +[15.015489, "o", "est"] +[15.109101, "o", ".wa"] +[15.199195, "o", "sm "] +[15.290658, "o", "run"] +[15.476837, "o", "tim"] +[15.571357, "o", "e_l"] +[15.665079, "o", "ate"] +[15.759287, "o", "st."] +[15.852723, "o", "was"] +[15.946313, "o", "m\r\n"] +[15.954352, "o", "Running subwasm v0.17.1\r\n\u001b[0m\u001b[38;5;8m[\u001b[0m2022-07-04T15:28:47Z \u001b[0m\u001b[34mDEBUG\u001b[0m subwasmlib\u001b[0m\u001b[38;5;8m]\u001b[0m Loading WASM runtimes:\r\n"] +[15.954678, "o", " 🅰️ File(\"runtime_latest.wasm\")\r\nthread 'main' panicked at 'File runtime_latest.wasm not found', libs/wasm-loader/src/lib.rs:74:62\r\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\r\n"] +[15.996629, "o", "./demo-diff.sh: line 19: 54455 Abort trap: 6 $cmd\r\n"] +[18.999683, "o", "\r\n"] +[19.002915, "o", "We "] +[19.187607, "o", "can"] +[19.278937, "o", " no"] +[19.373104, "o", "w c"] +[19.464991, "o", "hec"] +[19.555945, "o", "k f"] +[19.646207, "o", "or "] +[19.740055, "o", "the"] +[19.830833, "o", " di"] +[19.921761, "o", "ffe"] +[20.014762, "o", "ren"] +[20.107221, "o", "ces"] +[20.292195, "o", ":\r\n"] +[20.295525, "o", "sub"] +[20.482034, "o", "was"] +[20.575895, "o", "m d"] +[20.669285, "o", "iff"] +[20.761692, "o", " ru"] +[20.853657, "o", "nti"] +[20.946531, "o", "me_"] +[21.039959, "o", "old"] +[21.133763, "o", "er."] +[21.227205, "o", "was"] +[21.321175, "o", "m r"] +[21.412247, "o", "unt"] +[21.502508, "o", "ime"] +[21.59617, "o", "_la"] +[21.782247, "o", "tes"] +[21.876073, "o", "t.w"] +[21.969756, "o", "asm"] +[22.060621, "o", "\r\n"] +[22.065686, "o", "Running subwasm v0.17.1\r\n\u001b[0m\u001b[38;5;8m[\u001b[0m2022-07-04T15:28:53Z \u001b[0m\u001b[34mDEBUG\u001b[0m subwasmlib\u001b[0m\u001b[38;5;8m]\u001b[0m Loading WASM runtimes:\r\n 🅰️ File(\"runtime_older.wasm\")\r\n"] +[22.065903, "o", "thread 'main' panicked at 'File runtime_older.wasm not found', libs/wasm-loader/src/lib.rs:74:62\r\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\r\n"] +[22.125979, "o", "./demo-diff.sh: line 26: 54463 Abort trap: 6 $cmd\r\n"] +[25.128091, "o", "\r\n"] diff --git a/scripts/demos/casts/demo-get.cast b/scripts/demos/casts/demo-get.cast index ef0399a..e2eeb2c 100644 --- a/scripts/demos/casts/demo-get.cast +++ b/scripts/demos/casts/demo-get.cast @@ -1,153 +1,129 @@ -{"version": 2, "width": 177, "height": 17, "timestamp": 1653311553, "env": {"SHELL": "/bin/zsh", "TERM": "xterm-256color"}} -[0.033686, "o", "The"] -[0.217819, "o", " 'g"] -[0.30983, "o", "et'"] -[0.401251, "o", " co"] -[0.495393, "o", "mmn"] -[0.589556, "o", "and"] -[0.681606, "o", " al"] -[0.77304, "o", "low"] -[0.867142, "o", "s f"] -[0.960786, "o", "etc"] -[1.05449, "o", "hin"] -[1.148416, "o", "g t"] -[1.242072, "o", "he "] -[1.426979, "o", "run"] -[1.520659, "o", "tim"] -[1.615471, "o", "e W"] -[1.709497, "o", "ASM"] -[1.802766, "o", " fr"] -[1.895134, "o", "om "] -[1.989443, "o", "a l"] -[2.081506, "o", "ive"] -[2.172015, "o", " ch"] -[2.267083, "o", "ain"] -[2.359284, "o", "\r\n"] -[2.872662, "o", "You"] -[3.058841, "o", " ca"] -[3.151331, "o", "n u"] -[3.24345, "o", "se "] -[3.333462, "o", "eit"] -[3.425773, "o", "her"] -[3.519858, "o", " <."] -[3.609937, "o", "..>"] -[3.700446, "o", " or"] -[3.795004, "o", " --"] -[3.886183, "o", "cha"] -[3.979656, "o", "in "] -[4.072799, "o", "<.."] -[4.2619, "o", ".>\r\n"] -[4.770761, "o", "Fir"] -[4.954354, "o", "st "] -[5.046183, "o", "let"] -[5.138915, "o", "'s "] -[5.234005, "o", "dow"] -[5.327215, "o", "nlo"] -[5.418028, "o", "ad "] -[5.512025, "o", "the"] -[5.604506, "o", " la"] -[5.698174, "o", "tes"] -[5.791962, "o", "t P"] -[5.884912, "o", "olk"] -[5.975273, "o", "ado"] -[6.163719, "o", "t r"] -[6.255761, "o", "unt"] -[6.346716, "o", "ime"] -[6.438008, "o", "\r\n"] -[6.947258, "o", "We "] -[7.132761, "o", "use"] -[7.22505, "o", " th"] -[7.31813, "o", "e f"] -[7.410737, "o", "oll"] -[7.501429, "o", "owi"] -[7.594513, "o", "ng "] -[7.687406, "o", "com"] -[7.780175, "o", "man"] -[7.872316, "o", "d:\r\n"] -[7.876007, "o", "sub"] -[8.058894, "o", "was"] -[8.152485, "o", "m g"] -[8.246287, "o", "et "] -[8.339607, "o", "wss"] -[8.431391, "o", "://"] -[8.521394, "o", "rpc"] -[8.612171, "o", ".po"] -[8.703443, "o", "lka"] -[8.795943, "o", "dot"] -[8.888816, "o", ".io"] -[8.983274, "o", " --"] -[9.076839, "o", "out"] -[9.259972, "o", "put"] -[9.350372, "o", " ru"] -[9.442807, "o", "nti"] -[9.536269, "o", "me."] -[9.626659, "o", "was"] -[9.717111, "o", "m\r\n"] -[9.723916, "o", "\u001b[0m\u001b[38;5;8m[\u001b[0m2022-05-23T13:12:43Z \u001b[0m\u001b[32mINFO \u001b[0m subwasm\u001b[0m\u001b[38;5;8m]\u001b[0m Running subwasm v0.17.0\r\n"] -[9.725405, "o", "\u001b[0m\u001b[38;5;8m[\u001b[0m2022-05-23T13:12:43Z \u001b[0m\u001b[32mINFO \u001b[0m subwasmlib\u001b[0m\u001b[38;5;8m]\u001b[0m Downloading runtime from OnchainBlock { endpoint: WebSocket(\"wss://rpc.polkadot.io\"), block_ref: None }\r\n"] -[9.72819, "o", "Transport(Invalid URL: No port number in URL (default port is not supported))\r\n"] -[9.72851, "o", "thread 'main' panicked at 'Getting wasm from the node: WsClient', lib/src/lib.rs:"] -[9.728614, "o", "77:78\r\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\r\n"] -[9.765811, "o", "./demo-get.sh: line 17: 67584 Abort trap: 6 $cmd\r\n"] -[10.272028, "o", "The"] -[10.460198, "o", " la"] -[10.5521, "o", "tes"] -[10.642986, "o", "t P"] -[10.735345, "o", "olk"] -[10.825373, "o", "ado"] -[10.917476, "o", "t r"] -[11.010989, "o", "unt"] -[11.101319, "o", "ime"] -[11.191741, "o", " is"] -[11.286651, "o", " no"] -[11.379563, "o", "w a"] -[11.566764, "o", "vai"] -[11.661134, "o", "lab"] -[11.751169, "o", "le "] -[11.843285, "o", "on "] -[11.938343, "o", "our"] -[12.03346, "o", " di"] -[12.126905, "o", "sk:"] -[12.221931, "o", "\r\n"] -[12.224724, "o", "ls: runtime.wasm: No such file or directory\r\n"] -[12.731766, "o", "Che"] -[12.917314, "o", "ck "] -[13.011111, "o", "the"] -[13.104229, "o", " --"] -[13.194279, "o", "hel"] -[13.284346, "o", "p t"] -[13.375093, "o", "o s"] -[13.467331, "o", "ee "] -[13.558968, "o", "the"] -[13.651722, "o", " ot"] -[13.745686, "o", "her"] -[13.837839, "o", " op"] -[14.020663, "o", "tio"] -[14.113085, "o", "ns,"] -[14.206222, "o", " yo"] -[14.296314, "o", "u c"] -[14.391124, "o", "an "] -[14.481145, "o", "spe"] -[14.571193, "o", "cif"] -[14.665991, "o", "y t"] -[14.758844, "o", "he "] -[14.849582, "o", "nam"] -[14.94163, "o", "e o"] -[15.033773, "o", "f t"] -[15.220181, "o", "he "] -[15.310486, "o", "out"] -[15.403136, "o", "put"] -[15.495622, "o", " fi"] -[15.589405, "o", "le "] -[15.679443, "o", "and"] -[15.773907, "o", " al"] -[15.86659, "o", "so "] -[15.956617, "o", "the"] -[16.050269, "o", " bl"] -[16.142874, "o", "ock"] -[16.233852, "o", " ha"] -[16.421492, "o", "sh\r\n"] -[16.426212, "o", "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[32msubwasm-get\u001b[0m\u001b[0m \u001b[0m\u001b[0m0.17.0\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0mchevdor :Wilfried Kopp \u001b[0m\u001b[0m \u001b[0m\u001b[0mThe node url including (mandatory) the port number. Example: ws://localhost:9944 or\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0mhttp://localhost:9933 [default: http://localhost:9933]\u001b[0m\u001b[0m\r\n\r\n\u001b[0m\u001b[0m\u001b[33mOPTIONS:\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[32m-b\u001b[0m\u001b[0m, \u001b[0m\u001b[0m\u001b[32m--block\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[32m\u001b[0m\u001b[0m \u001b[0m\u001b[0mThe optional block where to fetch the runtime. That allows fetching\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0molder runtimes but you will need to connect to archive nodes.\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0mCurrently, you must pass a block hash. Passing the block numbers is not\u001b"] -[16.42633, "o", "[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0msupported\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[32m--chain\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[32m\u001b[0m\u001b[0m \u001b[0m\u001b[0mProvide the name of a chain and a random url amongst a list of known\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0mnodes will be used. If you pass a valid --chain, --url will be ignored\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0m--chain local = http://localhost:9933\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[32m-h\u001b[0m\u001b[0m, \u001b[0m\u001b[0m\u001b[32m--help\u001b[0m\u001b[0m \u001b[0m\u001b[0mPrint help information\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[32m-j\u001b[0m\u001b[0m, \u001b[0m\u001b[0m\u001b[32m--json\u001b[0m\u001b[0m \u001b[0m\u001b[0mOutput as json\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[32m-o\u001b[0m\u001b[0m, \u001b[0m\u001b[0m\u001b[32m--output\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[32m\u001b[0m\u001b[0m \u001b[0m\u001b[0mYou may specifiy the output filename where the runtime will be saved.\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0mIf not provided, we will figure out an appropriate default name based\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m "] -[16.426379, "o", " \u001b[0m\u001b[0mon a counter: runtime_NNN.wasm where NNN is incrementing to make sure\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0myou do not override previous runtime. If you specify an existing file\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0mas output, it will be overwritten\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[32m-V\u001b[0m\u001b[0m, \u001b[0m\u001b[0m\u001b[32m--version\u001b[0m\u001b[0m \u001b[0m\u001b[0mPrint version information\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\r\n\u001b[0m"] -[17.431847, "o", "\r\n"] +{"version": 2, "width": 208, "height": 27, "timestamp": 1656948168, "env": {"SHELL": "/bin/zsh", "TERM": "xterm-256color"}} +[0.020753, "o", "The"] +[0.206833, "o", " 'ge"] +[0.298189, "o", "t' "] +[0.391413, "o", "comm"] +[0.484031, "o", "nan"] +[0.577927, "o", "d al"] +[0.667985, "o", "lows"] +[0.759409, "o", " fe"] +[0.853193, "o", "tchi"] +[0.948007, "o", "ng "] +[1.040875, "o", "the "] +[1.133108, "o", "runt"] +[1.226859, "o", "ime"] +[1.409397, "o", " WAS"] +[1.501759, "o", "M f"] +[1.594846, "o", "rom "] +[1.686062, "o", "a li"] +[1.780085, "o", "ve "] +[1.873569, "o", "chai"] +[1.964158, "o", "n\r\n"] +[2.47431, "o", "You"] +[2.660273, "o", " can"] +[2.754008, "o", " us"] +[2.847969, "o", "e ei"] +[2.941625, "o", "the"] +[3.033111, "o", "r <."] +[3.123483, "o", "..> "] +[3.217482, "o", "or "] +[3.310362, "o", "--ch"] +[3.403647, "o", "ain"] +[3.497967, "o", " <.."] +[3.592769, "o", ".>\r\n"] +[4.102847, "o", "Fir"] +[4.290341, "o", "st l"] +[4.383751, "o", "et'"] +[4.474623, "o", "s do"] +[4.568961, "o", "wnl"] +[4.659173, "o", "oad "] +[4.752909, "o", "the "] +[4.843932, "o", "lat"] +[4.937799, "o", "est "] +[5.030012, "o", "Pol"] +[5.123853, "o", "kado"] +[5.217068, "o", "t ru"] +[5.309639, "o", "nti"] +[5.403155, "o", "me\r\n"] +[5.913534, "o", "We "] +[6.099689, "o", "use "] +[6.193137, "o", "the"] +[6.286248, "o", " fol"] +[6.377984, "o", "low"] +[6.472919, "o", "ing "] +[6.566526, "o", "comm"] +[6.659625, "o", "and"] +[6.752158, "o", ":\r\n"] +[6.755539, "o", "sub"] +[6.942461, "o", "wasm"] +[7.035754, "o", " ge"] +[7.126747, "o", "t ws"] +[7.21872, "o", "s:/"] +[7.310196, "o", "/rpc"] +[7.404226, "o", ".pol"] +[7.497871, "o", "kad"] +[7.587921, "o", "ot.i"] +[7.681326, "o", "o -"] +[7.772869, "o", "-out"] +[7.86676, "o", "put "] +[7.960797, "o", "run"] +[8.145348, "o", "time"] +[8.238108, "o", ".wa"] +[8.328129, "o", "sm\r\n"] +[8.335135, "o", "\u001b[0m\u001b[38;5;8m[\u001b[0m2022-07-04T15:22:56Z \u001b[0m\u001b[32mINFO \u001b[0m subwasm\u001b[0m\u001b[38;5;8m]\u001b[0m Running subwasm v0.17.1\r\n\u001b[0m\u001b[38;5;8m[\u001b[0m2022-07-04T15:22:56Z \u001b[0m\u001b[32mINFO \u001b[0m subwasmlib\u001b[0m\u001b[38;5;8m]\u001b[0m Downloading runtime from OnchainBlock { endpoint: WebSocket(\"wss://rpc.polkadot.io\"), block_ref: None }\r\n"] +[8.336098, "o", "Transport(Invalid URL: No port number in URL (default port is not supported))\r\n"] +[8.337808, "o", "thread 'main' panicked at 'Getting wasm from the node: WsClient', lib/src/lib.rs:77:78\r\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\r\n"] +[8.393471, "o", "./demo-get.sh: line 17: 54211 Abort trap: 6 $cmd\r\n"] +[8.903968, "o", "The"] +[9.090738, "o", " lat"] +[9.181733, "o", "est"] +[9.274339, "o", " Pol"] +[9.366767, "o", "kad"] +[9.457075, "o", "ot r"] +[9.550037, "o", "unti"] +[9.6441, "o", "me "] +[9.735808, "o", "is n"] +[9.828166, "o", "ow "] +[9.922827, "o", "avai"] +[10.01673, "o", "labl"] +[10.109758, "o", "e o"] +[10.293035, "o", "n ou"] +[10.38714, "o", "r d"] +[10.481524, "o", "isk:"] +[10.575593, "o", "\r\n"] +[10.578454, "o", "ls: runtime.wasm: No such file or directory\r\n"] +[11.08411, "o", "Che"] +[11.270847, "o", "ck t"] +[11.364386, "o", "he "] +[11.458885, "o", "--he"] +[11.552315, "o", "lp "] +[11.647231, "o", "to s"] +[11.740943, "o", "ee t"] +[11.830987, "o", "he "] +[11.925542, "o", "othe"] +[12.016382, "o", "r o"] +[12.10999, "o", "ptio"] +[12.203466, "o", "ns, "] +[12.297816, "o", "you"] +[12.3913, "o", " can"] +[12.484357, "o", " sp"] +[12.672767, "o", "ecif"] +[12.76624, "o", "y th"] +[12.859182, "o", "e n"] +[12.95187, "o", "ame "] +[13.043234, "o", "of "] +[13.13428, "o", "the "] +[13.228324, "o", "outp"] +[13.322756, "o", "ut "] +[13.416149, "o", "file"] +[13.507174, "o", " an"] +[13.597737, "o", "d al"] +[13.692212, "o", "so t"] +[13.785544, "o", "he "] +[13.975505, "o", "bloc"] +[14.065624, "o", "k h"] +[14.158264, "o", "ash\r\n"] +[14.163445, "o", "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[32msubwasm-get\u001b[0m\u001b[0m \u001b[0m\u001b[0m0.17.1\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0mchevdor :Wilfried Kopp \u001b[0m\u001b[0m \u001b[0m\u001b[0mThe node url including (mandatory) the port number. Example: ws://localhost:9944 or\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0mhttp://localhost:9933 [default: http://localhost:9933]\u001b[0m\u001b[0m\r\n\r\n\u001b[0m\u001b[0m\u001b[33mOPTIONS:\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[32m-b\u001b[0m\u001b[0m, \u001b[0m\u001b[0m\u001b[32m--block\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[32m\u001b[0m\u001b[0m \u001b[0m\u001b[0mThe optional block where to fetch the runtime. That allows fetching\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0molder runtimes but you will need to connect to archive nodes.\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0mCurrently, you must pass a block hash. Passing the block numbers is not\u001b"] +[14.163501, "o", "[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0msupported\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[32m--chain\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[32m\u001b[0m\u001b[0m \u001b[0m\u001b[0mProvide the name of a chain and a random url amongst a list of known\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0mnodes will be used. If you pass a valid --chain, --url will be ignored\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0m--chain local = http://localhost:9933\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[32m-h\u001b[0m\u001b[0m, \u001b[0m\u001b[0m\u001b[32m--help\u001b[0m\u001b[0m \u001b[0m\u001b[0mPrint help information\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[32m-j\u001b[0m\u001b[0m, \u001b[0m\u001b[0m\u001b[32m--json\u001b[0m\u001b[0m \u001b[0m\u001b[0mOutput as json\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[32m-o\u001b[0m\u001b[0m, \u001b[0m\u001b[0m\u001b[32m--output\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[32m\u001b[0m\u001b[0m \u001b[0m\u001b[0mYou may specifiy the output filename where the runtime will be saved.\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0mIf not provided, we will figure out an appropriate default name based\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m "] +[14.163751, "o", " \u001b[0m\u001b[0mon a counter: runtime_NNN.wasm where NNN is incrementing to make sure\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0myou do not override previous runtime. If you specify an existing file\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0mas output, it will be overwritten\u001b[0m\u001b[0m\r\n\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[32m-V\u001b[0m\u001b[0m, \u001b[0m\u001b[0m\u001b[32m--version\u001b[0m\u001b[0m \u001b[0m\u001b[0mPrint version information\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\r\n\u001b[0m"] +[15.167329, "o", "\r\n"] diff --git a/scripts/demos/casts/demo-info.cast b/scripts/demos/casts/demo-info.cast index 61bb7a4..8074741 100644 --- a/scripts/demos/casts/demo-info.cast +++ b/scripts/demos/casts/demo-info.cast @@ -1,90 +1,107 @@ -{"version": 2, "width": 177, "height": 17, "timestamp": 1653311636, "env": {"SHELL": "/bin/zsh", "TERM": "xterm-256color"}} -[0.019845, "o", "sub"] -[0.20504, "o", "wasm"] -[0.295163, "o", " can"] -[0.388533, "o", " wo"] -[0.482367, "o", "rk o"] -[0.576567, "o", "n a "] -[0.67017, "o", "run"] -[0.761531, "o", "time"] -[0.853713, "o", " fro"] -[0.946699, "o", "m yo"] -[1.040447, "o", "ur "] -[1.133946, "o", "fils"] -[1.22653, "o", "yste"] -[1.319763, "o", "m b"] -[1.503184, "o", "ut c"] -[1.595049, "o", "an a"] -[1.688508, "o", "lso"] -[1.780708, "o", " dir"] -[1.875637, "o", "ectl"] -[1.965652, "o", "y wo"] -[2.060005, "o", "rk "] -[2.151917, "o", "on t"] -[2.242805, "o", "he r"] -[2.335995, "o", "unt"] -[2.42823, "o", "ime "] -[2.521748, "o", "from"] -[2.704327, "o", " a "] -[2.794359, "o", "live"] -[2.886213, "o", " cha"] -[2.97825, "o", "in.\r\n"] -[2.981879, "o", "Let"] -[3.165969, "o", "'s g"] -[3.256095, "o", "et s"] -[3.350698, "o", "ome"] -[3.443675, "o", " inf"] -[3.5337, "o", "orma"] -[3.625636, "o", "tio"] -[3.716477, "o", "n ab"] -[3.810469, "o", "out "] -[3.903932, "o", "the "] -[3.993979, "o", "run"] -[4.086437, "o", "time"] -[4.275507, "o", " on "] -[4.366302, "o", "a l"] -[4.460109, "o", "ive "] -[4.552729, "o", "chai"] -[4.645637, "o", "n.\r\n"] -[4.64908, "o", "We "] -[4.835649, "o", "use "] -[4.9268, "o", "the "] -[5.020506, "o", "fol"] -[5.110532, "o", "lowi"] -[5.203952, "o", "ng c"] -[5.296623, "o", "omm"] -[5.391228, "o", "and:"] -[5.481622, "o", "\r\n"] -[5.485063, "o", "sub"] -[5.669575, "o", "wasm"] -[5.763187, "o", " inf"] -[5.853749, "o", "o w"] -[5.947382, "o", "ss:/"] -[6.037407, "o", "/rpc"] -[6.129844, "o", ".po"] -[6.223595, "o", "lkad"] -[6.314213, "o", "ot.i"] -[6.40455, "o", "o\r\n"] -[6.410435, "o", "\u001b[0m\u001b[38;5;8m[\u001b[0m2022-05-23T13:14:02Z \u001b[0m\u001b[32mINFO \u001b[0m subwasm\u001b[0m\u001b[38;5;8m]\u001b[0m Running subwasm v0.17.0\r\n"] -[6.411322, "o", "\u001b[0m\u001b[38;5;8m[\u001b[0m2022-05-23T13:14:02Z \u001b[0m\u001b[32mINFO \u001b[0m subwasm\u001b[0m\u001b[38;5;8m]\u001b[0m ⏱️ Loading WASM from Chain(OnchainBlock { endpoint: WebSocket(\"wss://rpc.polkadot.io\"), block_ref: None })\r\n"] -[6.411824, "o", "Transport(Invalid URL: No port number in URL (default port is not supported))\r\n"] -[6.412505, "o", "Failed Loading: \"OnchainBlock { endpoint: WebSocket(\\\"wss://rpc.polkadot.io\\\"), block_ref: None }\"\r\n"] -[6.412596, "o", "🗣️ If you think it should have worked, please open an issue at https://github.com/chevdor/subwasm/issues\r\nand attach your runtime and mention using subwasmlib v0.17.0\r\nThe source was OnchainBlock { endpoint: WebSocket(\"wss://rpc.polkadot.io\"), block_ref: None } \r\nthread 'main' panicked at 'Could not load runtime', lib/src/subwasm.rs:27:17\r\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\r\n"] -[6.45206, "o", "./demo-info.sh: line 10: 67641 Abort trap: 6 $cmd\r\n"] -[6.961609, "o", "Did"] -[7.144063, "o", " you"] -[7.236104, "o", " see"] -[7.326441, "o", " th"] -[7.419578, "o", "at t"] -[7.512774, "o", "he p"] -[7.602786, "o", "rop"] -[7.692813, "o", "osal"] -[7.7869, "o", " has"] -[7.880754, "o", "h is"] -[7.975493, "o", " al"] -[8.068165, "o", "so d"] -[8.250877, "o", "ispl"] -[8.34356, "o", "aye"] -[8.434866, "o", "d he"] -[8.525408, "o", "re?\r\n"] -[9.028278, "o", "\r\n"] +{"version": 2, "width": 208, "height": 27, "timestamp": 1656948271, "env": {"SHELL": "/bin/zsh", "TERM": "xterm-256color"}} +[0.01686, "o", "sub"] +[0.203746, "o", "was"] +[0.2961, "o", "m c"] +[0.389238, "o", "an "] +[0.482612, "o", "wor"] +[0.576026, "o", "k o"] +[0.66876, "o", "n a"] +[0.762569, "o", " ru"] +[0.855972, "o", "nti"] +[0.949398, "o", "me "] +[1.04308, "o", "fro"] +[1.137889, "o", "m y"] +[1.232588, "o", "our"] +[1.32599, "o", " fi"] +[1.419338, "o", "lsy"] +[1.60759, "o", "ste"] +[1.700997, "o", "m b"] +[1.794825, "o", "ut "] +[1.886115, "o", "can"] +[1.976535, "o", " al"] +[2.069274, "o", "so "] +[2.162801, "o", "dir"] +[2.257565, "o", "ect"] +[2.35086, "o", "ly "] +[2.442912, "o", "wor"] +[2.535681, "o", "k o"] +[2.627433, "o", "n t"] +[2.719086, "o", "he "] +[2.907558, "o", "run"] +[3.001578, "o", "tim"] +[3.092728, "o", "e f"] +[3.185889, "o", "rom"] +[3.279078, "o", " a "] +[3.373023, "o", "liv"] +[3.464381, "o", "e c"] +[3.557832, "o", "hai"] +[3.651245, "o", "n.\r\n"] +[3.656182, "o", "Let"] +[3.843496, "o", "'s "] +[3.93742, "o", "get"] +[4.027798, "o", " so"] +[4.11882, "o", "me "] +[4.208817, "o", "inf"] +[4.302821, "o", "orm"] +[4.393972, "o", "ati"] +[4.485391, "o", "on "] +[4.57866, "o", "abo"] +[4.6703, "o", "ut "] +[4.764365, "o", "the"] +[4.857517, "o", " ru"] +[5.044684, "o", "nti"] +[5.137679, "o", "me "] +[5.232506, "o", "on "] +[5.325987, "o", "a l"] +[5.419068, "o", "ive"] +[5.512319, "o", " ch"] +[5.60422, "o", "ain"] +[5.696416, "o", ".\r\n"] +[5.699648, "o", "We "] +[5.884428, "o", "use"] +[5.97704, "o", " th"] +[6.069139, "o", "e f"] +[6.162451, "o", "oll"] +[6.252512, "o", "owi"] +[6.345878, "o", "ng "] +[6.4378, "o", "com"] +[6.53249, "o", "man"] +[6.626082, "o", "d:\r\n"] +[6.629759, "o", "sub"] +[6.815008, "o", "was"] +[6.907468, "o", "m i"] +[7.00113, "o", "nfo"] +[7.095048, "o", " ws"] +[7.186215, "o", "s:/"] +[7.27904, "o", "/rp"] +[7.370688, "o", "c.p"] +[7.462957, "o", "olk"] +[7.557453, "o", "ado"] +[7.648024, "o", "t.i"] +[7.741443, "o", "o\r\n"] +[7.747191, "o", "\u001b[0m\u001b[38;5;8m[\u001b[0m2022-07-04T15:24:38Z \u001b[0m\u001b[32mINFO \u001b[0m subwasm\u001b[0m\u001b[38;5;8m]\u001b[0m Running subwasm v0.17.1\r\n\u001b[0m\u001b[38;5;8m[\u001b[0m2022-07-04T15:24:38Z \u001b[0m\u001b[32mINFO \u001b[0m subwasm\u001b[0m\u001b[38;5;8m]\u001b[0m ⏱️ Loading WASM from Chain(OnchainBlock { endpoint: WebSocket(\"wss://rpc.polkadot.io\"), block_ref: None })\r\n"] +[7.747876, "o", "Transport(Invalid URL: No port number in URL (default port is not supported))\r\n"] +[7.748184, "o", "Failed Loading: \"OnchainBlock { endpoint: WebSocket(\\\"wss://rpc.polkadot.io\\\"), block_ref: None }\"\r\n"] +[7.748356, "o", "🗣️ If you think it should have worked, please open an issue at https://github.com/chevdor/subwasm/issues\r\nand attach your runtime and mention using subwasmlib v0.17.1\r\nThe source was OnchainBlock { endpoint: WebSocket(\"wss://rpc.polkadot.io\"), block_ref: None } \r\nthread 'main' panicked at 'Could not load runtime', lib/src/subwasm.rs:27:17\r\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\r\n"] +[7.804758, "o", "./demo-info.sh: line 10: 54276 Abort trap: 6 $cmd\r\n"] +[8.312254, "o", "Did"] +[8.497568, "o", " yo"] +[8.59061, "o", "u s"] +[8.682451, "o", "ee "] +[8.776371, "o", "tha"] +[8.869871, "o", "t t"] +[8.963089, "o", "he "] +[9.057431, "o", "pro"] +[9.15137, "o", "pos"] +[9.244941, "o", "al "] +[9.338627, "o", "has"] +[9.432419, "o", "h i"] +[9.526366, "o", "s a"] +[9.617491, "o", "lso"] +[9.801044, "o", " di"] +[9.891064, "o", "spl"] +[9.984024, "o", "aye"] +[10.077949, "o", "d h"] +[10.17209, "o", "ere"] +[10.264831, "o", "?\r\n"] +[10.77056, "o", "\r\n"] diff --git a/scripts/demos/casts/demo-meta.cast b/scripts/demos/casts/demo-meta.cast index 66a1317..317122c 100644 --- a/scripts/demos/casts/demo-meta.cast +++ b/scripts/demos/casts/demo-meta.cast @@ -1,241 +1,210 @@ -{"version": 2, "width": 177, "height": 17, "timestamp": 1653311681, "env": {"SHELL": "/bin/zsh", "TERM": "xterm-256color"}} -[0.019506, "o", "sub"] -[0.207173, "o", "was"] -[0.299892, "o", "m k"] -[0.39256, "o", "now"] -[0.483955, "o", "s co"] -[0.576462, "o", "ol "] -[0.669796, "o", "tri"] -[0.763184, "o", "cks"] -[0.857532, "o", ". I"] -[0.948471, "o", "t ca"] -[1.038625, "o", "n s"] -[1.132102, "o", "how"] -[1.222106, "o", " yo"] -[1.40712, "o", "u t"] -[1.501594, "o", "he m"] -[1.593867, "o", "eta"] -[1.686494, "o", "dat"] -[1.778926, "o", "a d"] -[1.869021, "o", "ire"] -[1.963756, "o", "ctly"] -[2.058505, "o", " fr"] -[2.150154, "o", "om "] -[2.240206, "o", "the"] -[2.332385, "o", " WA"] -[2.422446, "o", "SM w"] -[2.607774, "o", "ith"] -[2.702444, "o", "out"] -[2.796566, "o", " co"] -[2.888076, "o", "nne"] -[2.982026, "o", "ctin"] -[3.072053, "o", "g t"] -[3.164105, "o", "o a"] -[3.25786, "o", "ny "] -[3.349169, "o", "nod"] -[3.440617, "o", "e.\r\n"] -[3.445047, "o", "You"] -[3.632418, "o", " ma"] -[3.723831, "o", "y g"] -[3.816913, "o", "ene"] -[3.910541, "o", "rate"] -[4.001725, "o", " th"] -[4.094062, "o", "e W"] -[4.18412, "o", "ASM"] -[4.274689, "o", " us"] -[4.367004, "o", "ing "] -[4.460317, "o", "srt"] -[4.55309, "o", "ool"] -[4.736178, "o", " fo"] -[4.828643, "o", "r i"] -[4.920294, "o", "nsta"] -[5.012848, "o", "nce"] -[5.107004, "o", ", h"] -[5.1994, "o", "ere"] -[5.29151, "o", " we"] -[5.384008, "o", " kee"] -[5.477126, "o", "p i"] -[5.570638, "o", "t s"] -[5.66339, "o", "imp"] -[5.757365, "o", "le "] -[5.849583, "o", "and "] -[6.031978, "o", "fet"] -[6.121958, "o", "ch "] -[6.216796, "o", "it "] -[6.308847, "o", "fro"] -[6.402008, "o", "m a "] -[6.492409, "o", "nod"] -[6.582509, "o", "e w"] -[6.672603, "o", "ith"] -[6.764421, "o", ":\r\n"] -[6.768689, "o", "We "] -[6.956902, "o", "use"] -[7.050788, "o", " th"] -[7.140771, "o", "e f"] -[7.23232, "o", "ollo"] -[7.327019, "o", "win"] -[7.422083, "o", "g c"] -[7.514876, "o", "omm"] -[7.607298, "o", "and"] -[7.701297, "o", ":\r\n"] -[7.705157, "o", "sub"] -[7.892425, "o", "was"] -[7.984938, "o", "m g"] -[8.076906, "o", "et "] -[8.171808, "o", "wss:"] -[8.261861, "o", "//r"] -[8.356851, "o", "pc."] -[8.449053, "o", "pol"] -[8.541998, "o", "kad"] -[8.632826, "o", "ot.i"] -[8.725989, "o", "o -"] -[8.816761, "o", "-ou"] -[8.909197, "o", "tpu"] -[9.090494, "o", "t r"] -[9.181821, "o", "unti"] -[9.274291, "o", "me."] -[9.367347, "o", "was"] -[9.4612, "o", "m\r\n"] -[9.467546, "o", "\u001b[0m\u001b[38;5;8m[\u001b[0m2022-05-23T13:14:50Z \u001b[0m\u001b[32mINFO \u001b[0m subwasm\u001b[0m\u001b[38;5;8m]\u001b[0m Running subwasm v0.17.0\r\n\u001b[0m\u001b[38;5;8m[\u001b[0m2022-05-23T13:14:50Z \u001b[0m\u001b[32mINFO \u001b[0m subwasmlib\u001b[0m\u001b[38;5;8m]\u001b[0m Downloading runtime from OnchainBlock { endpoint: WebSocket(\"wss://rpc.polkadot.io\"), block_ref: None }\r\n"] -[9.467945, "o", "Transport(Invalid URL: No port number in URL (default port is not supported))\r\n"] -[9.468317, "o", "thread 'main' panicked at 'Getting wasm from the node: WsClient', lib/src/lib.rs:77:78\r\n"] -[9.468398, "o", "note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\r\n"] -[9.504963, "o", "./demo-meta.sh: line 11: 67683 Abort trap: 6 $cmd\r\n"] -[10.011321, "o", "Let"] -[10.198783, "o", "'s "] -[10.292567, "o", "ask"] -[10.385221, "o", " su"] -[10.477204, "o", "bwas"] -[10.56723, "o", "m t"] -[10.657824, "o", "o c"] -[10.749619, "o", "all"] -[10.839655, "o", " in"] -[10.933068, "o", "to t"] -[11.027156, "o", "he "] -[11.122114, "o", "run"] -[11.215097, "o", "tim"] -[11.399608, "o", "e a"] -[11.490941, "o", "nd s"] -[11.583382, "o", "how"] -[11.676686, "o", " us"] -[11.767671, "o", " th"] -[11.860101, "o", "e l"] -[11.953639, "o", "ist "] -[12.043682, "o", "of "] -[12.138247, "o", "mod"] -[12.23189, "o", "ule"] -[12.32193, "o", "s f"] -[12.412749, "o", "rom "] -[12.598612, "o", "the"] -[12.688639, "o", " me"] -[12.783711, "o", "tad"] -[12.878704, "o", "ata"] -[12.973767, "o", ":\r\n"] -[12.978097, "o", "We "] -[13.161576, "o", "use"] -[13.254141, "o", " th"] -[13.344166, "o", "e f"] -[13.437319, "o", "ollo"] -[13.53173, "o", "win"] -[13.62669, "o", "g c"] -[13.716702, "o", "omm"] -[13.809657, "o", "and"] -[13.899766, "o", ":\r\n"] -[13.903838, "o", "sub"] -[14.088724, "o", "was"] -[14.18166, "o", "m m"] -[14.2717, "o", "eta"] -[14.365664, "o", " run"] -[14.457124, "o", "tim"] -[14.547148, "o", "e.w"] -[14.639745, "o", "asm"] -[14.73173, "o", "\r\n"] -[14.73716, "o", "\u001b[0m\u001b[38;5;8m[\u001b[0m2022-05-23T13:14:55Z \u001b[0m\u001b[32mINFO \u001b[0m subwasm\u001b[0m\u001b[38;5;8m]\u001b[0m Running subwasm v0.17.0\r\n\u001b[0m\u001b[38;5;8m[\u001b[0m2022-05-23T13:14:55Z \u001b[0m\u001b[32mINFO \u001b[0m subwasm\u001b[0m\u001b[38;5;8m]\u001b[0m ⏱️ Loading WASM from File(\"runtime.wasm\")\r\n"] -[14.738031, "o", "thread 'main' panicked at 'File runtime.wasm not found', libs/wasm-loader/src/lib.rs:74:62\r\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\r\n"] -[14.77443, "o", "./demo-meta.sh: line 18: 67694 Abort trap: 6 $cmd\r\n"] -[15.280009, "o", "Do "] -[15.461185, "o", "you"] -[15.553035, "o", " pr"] -[15.645808, "o", "efe"] -[15.736177, "o", "r th"] -[15.828648, "o", "e o"] -[15.922297, "o", "utp"] -[16.015152, "o", "ut "] -[16.109039, "o", "as "] -[16.202168, "o", "json"] -[16.295483, "o", " ?:"] -[16.385525, "o", "\r\n"] -[16.388965, "o", "We "] -[16.573056, "o", "use"] -[16.665826, "o", " th"] -[16.756955, "o", "e f"] -[16.851067, "o", "ollo"] -[16.945032, "o", "win"] -[17.035057, "o", "g c"] -[17.125083, "o", "omm"] -[17.218013, "o", "and"] -[17.308061, "o", ":\r\n"] -[17.31197, "o", "sub"] -[17.500882, "o", "was"] -[17.595002, "o", "m -"] -[17.685035, "o", "-js"] -[17.775068, "o", "on m"] -[17.868311, "o", "eta"] -[17.96203, "o", " ru"] -[18.056571, "o", "nti"] -[18.149534, "o", "me."] -[18.244391, "o", "wasm"] -[18.336407, "o", "\r\n"] -[18.34114, "o", "\u001b[0m\u001b[38;5;8m[\u001b[0m2022-05-23T13:14:59Z \u001b[0m\u001b[32mINFO \u001b[0m subwasm\u001b[0m\u001b[38;5;8m]\u001b[0m Running subwasm v0.17.0\r\n\u001b[0m\u001b[38;5;8m[\u001b[0m2022-05-23T13:14:59Z \u001b[0m\u001b[32mINFO \u001b[0m subwasm\u001b[0m\u001b[38;5;8m]\u001b[0m ⏱️ Loading WASM from File(\"runtime.wasm\")\r\n"] -[18.34138, "o", "thread 'main' panicked at 'File runtime.wasm not found', libs/wasm-loader/src/lib.rs:74:62\r\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\r\n"] -[18.377459, "o", "...\r\n"] -[18.887489, "o", "We "] -[19.071931, "o", "can"] -[19.163959, "o", " al"] -[19.257773, "o", "so "] -[19.35241, "o", "zoom"] -[19.445774, "o", " in"] -[19.5403, "o", " an"] -[19.63374, "o", "d s"] -[19.723768, "o", "ee "] -[19.816292, "o", "some"] -[19.906706, "o", " in"] -[19.998544, "o", "for"] -[20.088583, "o", "mat"] -[20.276226, "o", "ion"] -[20.369692, "o", " abo"] -[20.463064, "o", "ut "] -[20.557337, "o", "a s"] -[20.651754, "o", "pec"] -[20.746173, "o", "ifi"] -[20.838435, "o", "c mo"] -[20.931443, "o", "dul"] -[21.024276, "o", "e:\r\n"] -[21.028119, "o", "We "] -[21.208916, "o", "use"] -[21.299709, "o", " th"] -[21.394756, "o", "e f"] -[21.485378, "o", "ollo"] -[21.578303, "o", "win"] -[21.669859, "o", "g c"] -[21.759915, "o", "omm"] -[21.853756, "o", "and"] -[21.945286, "o", ":\r\n"] -[21.949946, "o", "sub"] -[22.131988, "o", "was"] -[22.226, "o", "m m"] -[22.317889, "o", "eta"] -[22.409427, "o", " run"] -[22.503395, "o", "tim"] -[22.593431, "o", "e.w"] -[22.686921, "o", "asm"] -[22.781474, "o", " --"] -[22.873504, "o", "modu"] -[22.967159, "o", "le "] -[23.059966, "o", "sys"] -[23.151723, "o", "tem"] -[23.337367, "o", "\r\n"] -[23.342206, "o", "\u001b[0m\u001b[38;5;8m[\u001b[0m2022-05-23T13:15:04Z \u001b[0m\u001b[32mINFO \u001b[0m subwasm\u001b[0m\u001b[38;5;8m]\u001b[0m Running subwasm v0.17.0\r\n\u001b[0m\u001b[38;5;8m[\u001b[0m2022-05-23T13:15:04Z \u001b[0m\u001b[32mINFO \u001b[0m subwasm\u001b[0m\u001b[38;5;8m]\u001b[0m ⏱️ Loading WASM from File(\"runtime.wasm\")\r\n"] -[23.342404, "o", "thread 'main' panicked at 'File runtime.wasm not found', libs/wasm-loader/src/lib.rs:74:62\r\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\r\n"] -[23.379607, "o", "./demo-meta.sh: line 33: 67716 Abort trap: 6 $cmd\r\n"] -[23.882526, "o", "\r\n"] +{"version": 2, "width": 208, "height": 27, "timestamp": 1656948352, "env": {"SHELL": "/bin/zsh", "TERM": "xterm-256color"}} +[0.024304, "o", "sub"] +[0.21016, "o", "wasm"] +[0.301934, "o", " kno"] +[0.395541, "o", "ws "] +[0.486642, "o", "cool"] +[0.57812, "o", " tri"] +[0.670998, "o", "cks"] +[0.762892, "o", ". It"] +[0.856731, "o", " can"] +[0.951486, "o", " sho"] +[1.045163, "o", "w y"] +[1.13718, "o", "ou t"] +[1.227341, "o", "he m"] +[1.411341, "o", "eta"] +[1.503623, "o", "data"] +[1.596969, "o", " dir"] +[1.688868, "o", "ect"] +[1.782663, "o", "ly f"] +[1.876908, "o", "rom "] +[1.969706, "o", "the "] +[2.063484, "o", "WAS"] +[2.155418, "o", "M wi"] +[2.250278, "o", "thou"] +[2.342568, "o", "t c"] +[2.436044, "o", "onne"] +[2.52908, "o", "ctin"] +[2.712798, "o", "g t"] +[2.805262, "o", "o an"] +[2.898441, "o", "y no"] +[2.990006, "o", "de.\r\n"] +[2.994016, "o", "You"] +[3.177679, "o", " may"] +[3.270854, "o", " gen"] +[3.364076, "o", "era"] +[3.454125, "o", "te t"] +[3.548115, "o", "he W"] +[3.63826, "o", "ASM"] +[3.731834, "o", " usi"] +[3.826425, "o", "ng s"] +[3.920409, "o", "rtoo"] +[4.01408, "o", "l f"] +[4.106141, "o", "or i"] +[4.198025, "o", "nsta"] +[4.381997, "o", "nce"] +[4.476454, "o", ", he"] +[4.569874, "o", "re w"] +[4.662685, "o", "e k"] +[4.757409, "o", "eep "] +[4.851406, "o", "it s"] +[4.944862, "o", "impl"] +[5.036919, "o", "e a"] +[5.128018, "o", "nd f"] +[5.221413, "o", "etch"] +[5.31408, "o", " it"] +[5.407398, "o", " fro"] +[5.501395, "o", "m a "] +[5.594111, "o", "nod"] +[5.781356, "o", "e wi"] +[5.876411, "o", "th:\r\n"] +[5.880506, "o", "We "] +[6.067664, "o", "use "] +[6.16128, "o", "the "] +[6.251518, "o", "fol"] +[6.346012, "o", "lowi"] +[6.437327, "o", "ng c"] +[6.53098, "o", "omm"] +[6.623376, "o", "and:"] +[6.716605, "o", "\r\n"] +[6.720028, "o", "sub"] +[6.908196, "o", "wasm"] +[7.001609, "o", " get"] +[7.094523, "o", " ws"] +[7.188346, "o", "s://"] +[7.281342, "o", "rpc."] +[7.376354, "o", "pol"] +[7.469944, "o", "kado"] +[7.562521, "o", "t.io"] +[7.655324, "o", " --o"] +[7.74817, "o", "utp"] +[7.840434, "o", "ut r"] +[7.93527, "o", "unti"] +[8.029077, "o", "me."] +[8.12302, "o", "wasm"] +[8.311043, "o", "\r\n"] +[8.315944, "o", "\u001b[0m\u001b[38;5;8m[\u001b[0m2022-07-04T15:26:00Z \u001b[0m\u001b[32mINFO \u001b[0m subwasm\u001b[0m\u001b[38;5;8m]\u001b[0m Running subwasm v0.17.1\r\n\u001b[0m\u001b[38;5;8m[\u001b[0m2022-07-04T15:26:00Z \u001b[0m\u001b[32mINFO \u001b[0m subwasmlib\u001b[0m\u001b[38;5;8m]\u001b[0m Downloading runtime from OnchainBlock { endpoint: WebSocket(\"wss://rpc.polkadot.io\"), block_ref: None }\r\n"] +[8.316613, "o", "Transport(Invalid URL: No port number in URL (default port is not supported))\r\n"] +[8.316956, "o", "thread 'main' panicked at 'Getting wasm from the node: WsClient', lib/src/lib.rs:77:78\r\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\r\n"] +[8.361398, "o", "./demo-meta.sh: line 11: 54324 Abort trap: 6 $cmd\r\n"] +[8.871406, "o", "Let"] +[9.057466, "o", "'s a"] +[9.151364, "o", "sk s"] +[9.244988, "o", "ubw"] +[9.335205, "o", "asm "] +[9.428536, "o", "to c"] +[9.521258, "o", "all"] +[9.614071, "o", " int"] +[9.707169, "o", "o th"] +[9.801841, "o", "e ru"] +[9.89552, "o", "nti"] +[9.988394, "o", "me a"] +[10.081605, "o", "nd s"] +[10.1763, "o", "how"] +[10.357125, "o", " us "] +[10.45129, "o", "the "] +[10.541329, "o", "lis"] +[10.634299, "o", "t of"] +[10.727983, "o", " mod"] +[10.819691, "o", "ules"] +[10.913649, "o", " fr"] +[11.007422, "o", "om t"] +[11.101686, "o", "he m"] +[11.194681, "o", "eta"] +[11.288053, "o", "data"] +[11.381537, "o", ":\r\n"] +[11.385289, "o", "We "] +[11.570073, "o", "use "] +[11.663986, "o", "the "] +[11.757306, "o", "fol"] +[11.851263, "o", "lowi"] +[11.945736, "o", "ng c"] +[12.036748, "o", "omm"] +[12.127909, "o", "and:"] +[12.221626, "o", "\r\n"] +[12.225206, "o", "sub"] +[12.409138, "o", "wasm"] +[12.502307, "o", " met"] +[12.594987, "o", "a r"] +[12.688351, "o", "unti"] +[12.782217, "o", "me.w"] +[12.876357, "o", "asm"] +[12.967684, "o", "\r\n"] +[12.974792, "o", "\u001b[0m\u001b[38;5;8m[\u001b[0m2022-07-04T15:26:05Z \u001b[0m\u001b[32mINFO \u001b[0m subwasm\u001b[0m\u001b[38;5;8m]\u001b[0m Running subwasm v0.17.1\r\n\u001b[0m\u001b[38;5;8m[\u001b[0m2022-07-04T15:26:05Z \u001b[0m\u001b[32mINFO \u001b[0m subwasm\u001b[0m\u001b[38;5;8m]\u001b[0m ⏱️ Loading WASM from File(\"runtime.wasm\")\r\n"] +[12.975012, "o", "thread 'main' panicked at 'File runtime.wasm not found', libs/wasm-loader/src/lib.rs:74:62\r\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\r\n"] +[13.014999, "o", "./demo-meta.sh: line 18: 54334 Abort trap: 6 $cmd\r\n"] +[13.521117, "o", "Do "] +[13.708707, "o", "you "] +[13.802473, "o", "pref"] +[13.895444, "o", "er "] +[13.989175, "o", "the "] +[14.082998, "o", "outp"] +[14.176308, "o", "ut "] +[14.269145, "o", "as j"] +[14.361677, "o", "son "] +[14.452731, "o", "?:\r\n"] +[14.457757, "o", "We "] +[14.645294, "o", "use "] +[14.736443, "o", "the "] +[14.829742, "o", "fol"] +[14.923599, "o", "lowi"] +[15.017353, "o", "ng c"] +[15.107375, "o", "omm"] +[15.201244, "o", "and:"] +[15.294889, "o", "\r\n"] +[15.29834, "o", "sub"] +[15.481536, "o", "wasm"] +[15.57619, "o", " --j"] +[15.669071, "o", "son"] +[15.762475, "o", " met"] +[15.853187, "o", "a ru"] +[15.945715, "o", "nti"] +[16.039611, "o", "me.w"] +[16.132207, "o", "asm\r\n"] +[16.137626, "o", "\u001b[0m\u001b[38;5;8m[\u001b[0m2022-07-04T15:26:08Z \u001b[0m\u001b[32mINFO \u001b[0m subwasm\u001b[0m\u001b[38;5;8m]\u001b[0m Running subwasm v0.17.1\r\n\u001b[0m\u001b[38;5;8m[\u001b[0m2022-07-04T15:26:08Z \u001b[0m\u001b[32mINFO \u001b[0m subwasm\u001b[0m\u001b[38;5;8m]\u001b[0m ⏱️ Loading WASM from File(\"runtime.wasm\")\r\n"] +[16.137672, "o", "thread 'main' panicked at 'File runtime.wasm not found', libs/wasm-loader/src/lib.rs:74:62\r\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\r\n"] +[16.17803, "o", "...\r\n"] +[16.684711, "o", "We "] +[16.871195, "o", "can "] +[16.9631, "o", "also"] +[17.057055, "o", " zo"] +[17.151154, "o", "om i"] +[17.244773, "o", "n an"] +[17.338042, "o", "d s"] +[17.430887, "o", "ee s"] +[17.524012, "o", "ome "] +[17.617279, "o", "info"] +[17.709976, "o", "rma"] +[17.801144, "o", "tion"] +[17.895537, "o", " abo"] +[17.988989, "o", "ut "] +[18.174619, "o", "a sp"] +[18.265721, "o", "ecif"] +[18.35615, "o", "ic "] +[18.451132, "o", "modu"] +[18.544854, "o", "le:\r\n"] +[18.548214, "o", "We "] +[18.731638, "o", "use "] +[18.826124, "o", "the "] +[18.91834, "o", "fol"] +[19.008493, "o", "lowi"] +[19.102696, "o", "ng c"] +[19.195206, "o", "omm"] +[19.287106, "o", "and:"] +[19.38107, "o", "\r\n"] +[19.384832, "o", "sub"] +[19.572113, "o", "wasm"] +[19.665567, "o", " met"] +[19.758189, "o", "a r"] +[19.851099, "o", "unti"] +[19.944516, "o", "me.w"] +[20.036566, "o", "asm"] +[20.126648, "o", " --m"] +[20.217448, "o", "odul"] +[20.308303, "o", "e sy"] +[20.401089, "o", "ste"] +[20.494736, "o", "m\r\n"] +[20.499831, "o", "\u001b[0m\u001b[38;5;8m[\u001b[0m2022-07-04T15:26:13Z \u001b[0m\u001b[32mINFO \u001b[0m subwasm\u001b[0m\u001b[38;5;8m]\u001b[0m Running subwasm v0.17.1\r\n\u001b[0m\u001b[38;5;8m[\u001b[0m2022-07-04T15:26:13Z \u001b[0m\u001b[32mINFO \u001b[0m subwasm\u001b[0m\u001b[38;5;8m]\u001b[0m ⏱️ Loading WASM from File(\"runtime.wasm\")\r\n"] +[20.49987, "o", "thread 'main' panicked at 'File runtime.wasm not found', libs/wasm-loader/src/lib.rs:74:62\r\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\r\n"] +[20.539488, "o", "./demo-meta.sh: line 33: 54353 Abort trap: 6 $cmd\r\n"] +[21.045056, "o", "\r\n"] diff --git a/scripts/demos/gif/demo-diff.gif b/scripts/demos/gif/demo-diff.gif index 59f40e3..54d285f 100644 Binary files a/scripts/demos/gif/demo-diff.gif and b/scripts/demos/gif/demo-diff.gif differ diff --git a/scripts/demos/gif/demo-get.gif b/scripts/demos/gif/demo-get.gif index 311e725..456418f 100644 Binary files a/scripts/demos/gif/demo-get.gif and b/scripts/demos/gif/demo-get.gif differ diff --git a/scripts/demos/gif/demo-info.gif b/scripts/demos/gif/demo-info.gif index e8b407d..494ab8a 100644 Binary files a/scripts/demos/gif/demo-info.gif and b/scripts/demos/gif/demo-info.gif differ diff --git a/scripts/demos/gif/demo-meta.gif b/scripts/demos/gif/demo-meta.gif index 67249f1..64e5470 100644 Binary files a/scripts/demos/gif/demo-meta.gif and b/scripts/demos/gif/demo-meta.gif differ