Skip to content

Commit

Permalink
Merge branch 'bko-bridges-congestion' into bko-permlanes-on-ahs
Browse files Browse the repository at this point in the history
  • Loading branch information
bkontur authored Nov 28, 2024
2 parents 8aa253c + 91567e0 commit 9b36499
Show file tree
Hide file tree
Showing 31 changed files with 1,793 additions and 64 deletions.
35 changes: 24 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ frame-benchmarking-pallet-pov = { default-features = false, path = "substrate/fr
frame-election-provider-solution-type = { path = "substrate/frame/election-provider-support/solution-type", default-features = false }
frame-election-provider-support = { path = "substrate/frame/election-provider-support", default-features = false }
frame-executive = { path = "substrate/frame/executive", default-features = false }
frame-metadata = { version = "16.0.0", default-features = false }
frame-metadata = { version = "18.0.0", default-features = false }
frame-metadata-hash-extension = { path = "substrate/frame/metadata-hash-extension", default-features = false }
frame-support = { path = "substrate/frame/support", default-features = false }
frame-support-procedural = { path = "substrate/frame/support/procedural", default-features = false }
Expand Down Expand Up @@ -854,7 +854,7 @@ macro_magic = { version = "0.5.1" }
maplit = { version = "1.0.2" }
memmap2 = { version = "0.9.3" }
memory-db = { version = "0.32.0", default-features = false }
merkleized-metadata = { version = "0.1.0" }
merkleized-metadata = { version = "0.1.2" }
merlin = { version = "3.0", default-features = false }
messages-relay = { path = "bridges/relays/messages" }
metered = { version = "0.6.1", default-features = false, package = "prioritized-metered-channel" }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
use serde_json::{json, Value};
use std::{process::Command, str};

const WASM_FILE_PATH: &str =
"../../../../../target/release/wbuild/chain-spec-guide-runtime/chain_spec_guide_runtime.wasm";
fn wasm_file_path() -> &'static str {
chain_spec_guide_runtime::runtime::WASM_BINARY_PATH
.expect("chain_spec_guide_runtime wasm should exist. qed")
}

const CHAIN_SPEC_BUILDER_PATH: &str = "../../../../../target/release/chain-spec-builder";

Expand All @@ -26,7 +28,7 @@ fn list_presets() {
let output = Command::new(get_chain_spec_builder_path())
.arg("list-presets")
.arg("-r")
.arg(WASM_FILE_PATH)
.arg(wasm_file_path())
.output()
.expect("Failed to execute command");

Expand All @@ -50,7 +52,7 @@ fn get_preset() {
let output = Command::new(get_chain_spec_builder_path())
.arg("display-preset")
.arg("-r")
.arg(WASM_FILE_PATH)
.arg(wasm_file_path())
.arg("-p")
.arg("preset_2")
.output()
Expand Down Expand Up @@ -83,7 +85,7 @@ fn generate_chain_spec() {
.arg("/dev/stdout")
.arg("create")
.arg("-r")
.arg(WASM_FILE_PATH)
.arg(wasm_file_path())
.arg("named-preset")
.arg("preset_2")
.output()
Expand Down Expand Up @@ -140,7 +142,7 @@ fn generate_para_chain_spec() {
.arg("-p")
.arg("1000")
.arg("-r")
.arg(WASM_FILE_PATH)
.arg(wasm_file_path())
.arg("named-preset")
.arg("preset_2")
.output()
Expand Down
29 changes: 29 additions & 0 deletions prdoc/pr_5732.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
title: Expose the unstable metadata v16
doc:
- audience: Node Dev
description: |
This PR exposes the *unstable* metadata V16. The metadata is exposed under the unstable u32::MAX number.
Developers can start experimenting with the new features of the metadata v16. *Please note that this metadata is under development and expect breaking changes until stabilization.*
The `ExtrinsicMetadata` trait receives a breaking change. Its associated type `VERSION` is rename to `VERSIONS` and now supports a constant static list of metadata versions.
The versions implemented for `UncheckedExtrinsic` are v4 (legacy version) and v5 (new version).
For metadata collection, it is assumed that all `TransactionExtensions` are under version 0.

crates:
- name: sp-metadata-ir
bump: major
- name: frame-support-procedural
bump: patch
- name: frame-support
bump: minor
- name: frame-support-test
bump: major
- name: frame-metadata-hash-extension
bump: patch
- name: substrate-wasm-builder
bump: minor
- name: pallet-revive
bump: minor
- name: sp-runtime
bump: major
- name: frame-benchmarking-cli
bump: patch
18 changes: 18 additions & 0 deletions prdoc/pr_5997.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json

title: Implement archive_unstable_storageDiff method

doc:
- audience: Node Dev
description: |
This PR implements the `archive_unstable_storageDiff` rpc-v2 method.
Developers can use this method to fetch the storage differences
between two blocks. This is useful for oracles and archive nodes.
For more details see: https://github.com/paritytech/json-rpc-interface-spec/blob/main/src/api/archive_unstable_storageDiff.md.

crates:
- name: sc-rpc-spec-v2
bump: major
- name: sc-service
bump: patch
7 changes: 7 additions & 0 deletions prdoc/pr_6673.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
title: 'chain-spec-guide-runtime: path to wasm blob fixed'
doc:
- audience: Runtime Dev
description: In `chain-spec-guide-runtime` crate's tests, there was assumption that
release version of wasm blob exists. This PR uses `chain_spec_guide_runtime::runtime::WASM_BINARY_PATH`
const to use correct path to runtime blob.
crates: []
1 change: 1 addition & 0 deletions substrate/client/rpc-spec-v2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ log = { workspace = true, default-features = true }
futures-util = { workspace = true }
rand = { workspace = true, default-features = true }
schnellru = { workspace = true }
itertools = { workspace = true }

[dev-dependencies]
async-trait = { workspace = true }
Expand Down
22 changes: 21 additions & 1 deletion substrate/client/rpc-spec-v2/src/archive/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
//! API trait of the archive methods.

use crate::{
common::events::{ArchiveStorageResult, PaginatedStorageQuery},
common::events::{
ArchiveStorageDiffEvent, ArchiveStorageDiffItem, ArchiveStorageResult,
PaginatedStorageQuery,
},
MethodResult,
};
use jsonrpsee::{core::RpcResult, proc_macros::rpc};
Expand Down Expand Up @@ -104,4 +107,21 @@ pub trait ArchiveApi<Hash> {
items: Vec<PaginatedStorageQuery<String>>,
child_trie: Option<String>,
) -> RpcResult<ArchiveStorageResult>;

/// Returns the storage difference between two blocks.
///
/// # Unstable
///
/// This method is unstable and can change in minor or patch releases.
#[subscription(
name = "archive_unstable_storageDiff" => "archive_unstable_storageDiffEvent",
unsubscribe = "archive_unstable_storageDiff_stopStorageDiff",
item = ArchiveStorageDiffEvent,
)]
fn archive_unstable_storage_diff(
&self,
hash: Hash,
items: Vec<ArchiveStorageDiffItem<String>>,
previous_hash: Option<Hash>,
);
}
Loading

0 comments on commit 9b36499

Please sign in to comment.