Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,018 changes: 522 additions & 496 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions common/helpers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ targets = ['x86_64-unknown-linux-gnu']
apache-avro = { version = "0.14.0", features = ["snappy"] }
thiserror = "1.0.34"
jsonrpsee = { version = "0.16.2", features = ["client-core", "server", "macros"] }
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.38" }
sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.38" }
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.38" }
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.39" }
sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.39" }
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.39" }
common-primitives = { path = "../primitives", default-features = false }

[features]
Expand Down
12 changes: 6 additions & 6 deletions common/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ targets = ['x86_64-unknown-linux-gnu']
codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = [
"derive",
] }
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
impl-serde = { version = "0.4.0", default-features = false }
scale-info = { version = "2.2.0", default-features = false, features = [
"derive",
Expand All @@ -28,10 +28,10 @@ serde_json = { version = "1.0.86", default-features = false, features = [
] }
enumflags2 = "0.7.5"
smallvec = "1.10.0"
sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.38" }
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.38" }
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.38" }
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.38" }
sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.39" }
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.39" }
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.39" }
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.39" }

[features]
default = ['std']
Expand Down
4 changes: 2 additions & 2 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: "3"
services:
relay_alice:
container_name: alice
image: "parity/polkadot:v0.9.38"
image: "parity/polkadot:v0.9.39"
hostname: relay_alice
ports:
- "30335:30335" # p2p port
Expand Down Expand Up @@ -34,7 +34,7 @@ services:

relay_bob:
container_name: bob
image: "parity/polkadot:v0.9.38"
image: "parity/polkadot:v0.9.39"
hostname: relay_bob
ports:
- "30336:30336" # p2p port
Expand Down
2 changes: 1 addition & 1 deletion node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ name = "frequency"
path = "src/main.rs"

[build-dependencies]
substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }

[dependencies]
# Frequency Runtime
Expand Down
58 changes: 29 additions & 29 deletions node/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,39 +28,39 @@ pallet-handles = { package = "pallet-handles", path = "../../pallets/handles", d
cli-opt = { default-features = false, path = "../cli-opt" }

# Substrate
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.38" }
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.38" }
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.38" }
pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.38" }
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.38" }
sc-cli = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.38" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
sc-service = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.38" }
sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
sc-executor = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.38" }
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.38" }
sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.38" }
sp-core = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.38" }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
try-runtime-cli = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.38" }
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.39" }
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.39" }
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.39" }
pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.39" }
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.39" }
sc-cli = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.39" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
sc-service = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.39" }
sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
sc-executor = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.39" }
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.39" }
sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.39" }
sp-core = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.39" }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
try-runtime-cli = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.39" }
# Polkadot
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38" }
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38" }
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.39" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.39" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.39" }
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.39" }
# Cumulus
cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" }
cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" }
cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.39" }
cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.39" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.39" }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.39" }

[build-dependencies]
substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }

[features]
std = ["sp-api/std"]
Expand Down
18 changes: 10 additions & 8 deletions node/cli/src/export_metadata_cmd.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
use clap::Parser;
use sc_cli::{CliConfiguration, Error, GenericNumber, SharedParams};
use sc_client_api::HeaderBackend;
use serde_json::{json, to_writer};
use sp_api::{Metadata, ProvideRuntimeApi};
use sp_core::Bytes;
use sp_runtime::{
generic::BlockId,
traits::{Block as BlockT, Header as HeaderT},
};
use sp_runtime::traits::{Block as BlockT, Header as HeaderT};
use std::{fmt::Debug, fs, io, path::PathBuf, str::FromStr, sync::Arc};

/// The `export-metadata` command used to export chain metadata.
Expand Down Expand Up @@ -44,13 +42,17 @@ impl ExportMetadataCmd {
pub async fn run<B, C>(&self, client: Arc<C>) -> Result<(), Error>
where
B: BlockT,
C: ProvideRuntimeApi<B>,
C: ProvideRuntimeApi<B> + HeaderBackend<B>,
C::Api: Metadata<B> + 'static,
<<B::Header as HeaderT>::Number as FromStr>::Err: Debug,
{
let from = self.from.as_ref().and_then(|f| f.parse().ok()).unwrap_or(0u32);
let metadata: Bytes =
client.runtime_api().metadata(&BlockId::number(from.into())).unwrap().into();
let api = client.runtime_api();

let block_number = self.from.as_ref().and_then(|f| f.parse().ok()).unwrap_or(0u32);
let maybe_hash = client.hash(block_number.into())?;
let block_hash = maybe_hash.ok_or_else(|| Error::from("Block not found"))?;

let metadata: Bytes = api.metadata(block_hash).unwrap().into();
let result = json!({ "result": metadata });

let file: Box<dyn io::Write> = match &self.output {
Expand Down
Loading