fix: resolve pez-kitchensink-runtime compilation errors

Umbrella Crate Fixes:
- Add pezpallet-root-testing to umbrella (std, try-runtime, runtime-full)
- Add pezpallet-xcm-benchmarks to umbrella (std, runtime-benchmarks, runtime-full)
- Add re-exports in umbrella/src/lib.rs for both crates

getrandom WASM Fix:
- Move subxt crates from runtime-full to node feature
- Prevents getrandom dependency leak into WASM builds

Vendor Updates:
- Fix pezkuwi-subxt for web/wasm target compatibility
- Update pezkuwi-zombienet-sdk keystore imports

Documentation:
- Update WORKFLOW_PLAN.md with completed tasks
- Update REBRAND_PROGRESS.md with umbrella fixes
- Remove obsolete tracking files
This commit is contained in:
2025-12-23 23:02:41 +03:00
parent f210d529b6
commit 094f75f34b
15 changed files with 97 additions and 68 deletions
Generated
+20 -18
View File
@@ -74,7 +74,7 @@ version = "0.7.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9"
dependencies = [
"getrandom 0.2.16",
"getrandom 0.2.10",
"once_cell",
"version_check",
]
@@ -1021,9 +1021,9 @@ dependencies = [
[[package]]
name = "ark-vrf"
version = "0.1.1"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d63e9780640021b74d02b32895d8cec1b4abe8e5547b560a6bda6b14b78c6da"
checksum = "9501da18569b2afe0eb934fb7afd5a247d238b94116155af4dd068f319adfe6d"
dependencies = [
"ark-bls12-381 0.5.0",
"ark-ec 0.5.0",
@@ -1847,7 +1847,7 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1"
dependencies = [
"getrandom 0.2.16",
"getrandom 0.2.10",
"instant",
"rand 0.8.5",
]
@@ -1943,7 +1943,7 @@ dependencies = [
"bitflags 2.10.0",
"cexpr",
"clang-sys",
"itertools 0.13.0",
"itertools 0.10.5",
"proc-macro2 1.0.103",
"quote 1.0.42",
"regex",
@@ -3559,7 +3559,7 @@ version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e"
dependencies = [
"getrandom 0.2.16",
"getrandom 0.2.10",
"once_cell",
"tiny-keccak",
]
@@ -4459,7 +4459,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d162beedaa69905488a8da94f5ac3edb4dd4788b732fadb7bd120b2625c1976"
dependencies = [
"data-encoding",
"syn 2.0.111",
"syn 1.0.109",
]
[[package]]
@@ -5933,9 +5933,9 @@ dependencies = [
[[package]]
name = "getrandom"
version = "0.2.16"
version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592"
checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427"
dependencies = [
"cfg-if",
"js-sys",
@@ -7809,7 +7809,7 @@ dependencies = [
"either",
"futures",
"futures-timer",
"getrandom 0.2.16",
"getrandom 0.2.10",
"libp2p-allow-block-list",
"libp2p-connection-limits",
"libp2p-core",
@@ -13606,7 +13606,7 @@ dependencies = [
[[package]]
name = "pezkuwi-sdk"
version = "0.1.0"
version = "0.0.0"
dependencies = [
"asset-test-pezutils",
"assets-common",
@@ -13836,6 +13836,7 @@ dependencies = [
"pezpallet-revive-proc-macro",
"pezpallet-revive-uapi",
"pezpallet-root-offences",
"pezpallet-root-testing",
"pezpallet-safe-mode",
"pezpallet-salary",
"pezpallet-scheduler",
@@ -13870,6 +13871,7 @@ dependencies = [
"pezpallet-vesting",
"pezpallet-whitelist",
"pezpallet-xcm",
"pezpallet-xcm-benchmarks",
"pezpallet-xcm-bridge-hub",
"pezpallet-xcm-bridge-hub-router",
"pezpallet-xcm-precompiles",
@@ -14449,7 +14451,7 @@ name = "pezkuwi-subxt-codegen"
version = "0.44.0"
dependencies = [
"frame-metadata",
"getrandom 0.2.16",
"getrandom 0.2.10",
"heck 0.5.0",
"parity-scale-codec",
"pezkuwi-subxt-metadata",
@@ -14502,7 +14504,7 @@ dependencies = [
"futures",
"futures-timer",
"futures-util",
"getrandom 0.2.16",
"getrandom 0.2.10",
"js-sys",
"pin-project",
"send_wrapper 0.6.0",
@@ -14566,7 +14568,7 @@ dependencies = [
"finito",
"frame-metadata",
"futures",
"getrandom 0.2.16",
"getrandom 0.2.10",
"hex",
"http-body 1.0.1",
"hyper 1.8.1",
@@ -14596,7 +14598,7 @@ dependencies = [
"bip39",
"cfg-if",
"crypto_secretbox",
"getrandom 0.2.16",
"getrandom 0.2.10",
"hex",
"hex-literal",
"hmac 0.12.1",
@@ -22577,7 +22579,7 @@ version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [
"getrandom 0.2.16",
"getrandom 0.2.10",
]
[[package]]
@@ -22728,7 +22730,7 @@ version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43"
dependencies = [
"getrandom 0.2.16",
"getrandom 0.2.10",
"libredox",
"thiserror 1.0.69",
]
@@ -23151,7 +23153,7 @@ checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7"
dependencies = [
"cc",
"cfg-if",
"getrandom 0.2.16",
"getrandom 0.2.10",
"libc",
"untrusted",
"windows-sys 0.52.0",
@@ -43,3 +43,6 @@ serde_full = ["codec/serde", "scale-info/serde", "serde", "serde/alloc"]
decode = ["scale-info/decode"]
std = ["codec/std", "decode", "scale-info/std", "serde/std", "serde_full"]
[lints]
workspace = true
+8 -7
View File
@@ -176,11 +176,12 @@ fn create_cargo_toml<'a>(
}
fn invoke_build(current_dir: &Path) -> Result<()> {
// Note: panic_immediate_abort is now a real panic strategy in newer Rust nightlies
// Use -Cpanic=immediate-abort instead of -Zbuild-std-features=panic_immediate_abort
// -Zunstable-options must be in RUSTFLAGS as well for the rustc probe
let encoded_rustflags =
["-Dwarnings", "-Zunstable-options", "-Cpanic=immediate-abort"].join("\x1f");
// Use -Zbuild-std-features=panic_immediate_abort for immediate abort panic strategy
// This works with stable rust when RUSTC_BOOTSTRAP=1 is set
let encoded_rustflags = ["-Dwarnings"].join("\x1f");
let mut args = polkavm_linker::TargetJsonArgs::default();
args.is_64_bit = true;
let mut build_command = Command::new("cargo");
build_command
@@ -191,9 +192,9 @@ fn invoke_build(current_dir: &Path) -> Result<()> {
.env("RUSTUP_HOME", env::var("RUSTUP_HOME").unwrap_or_default())
// Support compilation on stable rust
.env("RUSTC_BOOTSTRAP", "1")
.args(["build", "--release", "-Zbuild-std=core"])
.args(["build", "--release", "-Zbuild-std=core", "-Zbuild-std-features=panic_immediate_abort"])
.arg("--target")
.arg(polkavm_linker::target_json_path(polkavm_linker::TargetJsonArgs::default()).unwrap());
.arg(polkavm_linker::target_json_path(args).unwrap());
if let Ok(toolchain) = env::var(OVERRIDE_RUSTUP_TOOLCHAIN_ENV_VAR) {
build_command.env("RUSTUP_TOOLCHAIN", &toolchain);
+20 -8
View File
@@ -58,9 +58,6 @@ std = [
"pezkuwi-runtime-teyrchains?/std",
"pezkuwi-sdk-frame?/std",
"pezkuwi-ss58-registry?/std",
"pezkuwi-subxt-core?/std",
"pezkuwi-subxt-metadata?/std",
"pezkuwi-subxt-signer?/std",
"pezkuwi-teyrchain-primitives?/std",
"pezpallet-alliance?/std",
"pezpallet-asset-conversion-ops?/std",
@@ -144,6 +141,7 @@ std = [
"pezpallet-remark?/std",
"pezpallet-revive?/std",
"pezpallet-root-offences?/std",
"pezpallet-root-testing?/std",
"pezpallet-safe-mode?/std",
"pezpallet-salary?/std",
"pezpallet-scheduler?/std",
@@ -179,6 +177,7 @@ std = [
"pezpallet-xcm-bridge-hub?/std",
"pezpallet-xcm-precompiles?/std",
"pezpallet-xcm?/std",
"pezpallet-xcm-benchmarks?/std",
"pezsc-executor?/std",
"pezsp-api-proc-macro?/std",
"pezsp-api?/std",
@@ -470,6 +469,7 @@ runtime-benchmarks = [
"pezpallet-xcm-bridge-hub?/runtime-benchmarks",
"pezpallet-xcm-precompiles?/runtime-benchmarks",
"pezpallet-xcm?/runtime-benchmarks",
"pezpallet-xcm-benchmarks?/runtime-benchmarks",
"pezsc-authority-discovery?/runtime-benchmarks",
"pezsc-basic-authorship?/runtime-benchmarks",
"pezsc-block-builder?/runtime-benchmarks",
@@ -654,6 +654,7 @@ try-runtime = [
"pezpallet-remark?/try-runtime",
"pezpallet-revive?/try-runtime",
"pezpallet-root-offences?/try-runtime",
"pezpallet-root-testing?/try-runtime",
"pezpallet-safe-mode?/try-runtime",
"pezpallet-salary?/try-runtime",
"pezpallet-scheduler?/try-runtime",
@@ -690,7 +691,6 @@ serde = [
"bp-pezkuwi-core?/serde",
"pezframe-benchmarking?/serde",
"pezframe-metadata?/serde",
"pezkuwi-subxt-signer?/serde",
"pezpallet-asset-tx-payment?/serde",
"pezpallet-beefy-mmr?/serde",
"pezpallet-beefy?/serde",
@@ -792,10 +792,6 @@ runtime-full = [
"pezkuwi-runtime-teyrchains",
"pezkuwi-sdk-frame",
"pezkuwi-ss58-registry",
"pezkuwi-subxt-core",
"pezkuwi-subxt-macro",
"pezkuwi-subxt-metadata",
"pezkuwi-subxt-signer",
"pezkuwi-teyrchain-primitives",
"pezpallet-alliance",
"pezpallet-asset-conversion",
@@ -882,6 +878,7 @@ runtime-full = [
"pezpallet-revive-proc-macro",
"pezpallet-revive-uapi",
"pezpallet-root-offences",
"pezpallet-root-testing",
"pezpallet-safe-mode",
"pezpallet-salary",
"pezpallet-scheduler",
@@ -915,6 +912,7 @@ runtime-full = [
"pezpallet-vesting",
"pezpallet-whitelist",
"pezpallet-xcm",
"pezpallet-xcm-benchmarks",
"pezpallet-xcm-bridge-hub",
"pezpallet-xcm-bridge-hub-router",
"pezpallet-xcm-precompiles",
@@ -1070,8 +1068,12 @@ node = [
"pezkuwi-statement-table",
"pezkuwi-subxt",
"pezkuwi-subxt-codegen",
"pezkuwi-subxt-core",
"pezkuwi-subxt-lightclient",
"pezkuwi-subxt-macro",
"pezkuwi-subxt-metadata",
"pezkuwi-subxt-rpcs",
"pezkuwi-subxt-signer",
"pezkuwi-subxt-utils-fetchmetadata",
"pezkuwi-subxt-utils-stripmetadata",
"pezmmr-gadget",
@@ -1890,6 +1892,11 @@ default-features = false
optional = true
path = "../bizinikiwi/pezframe/root-offences"
[dependencies.pezpallet-root-testing]
default-features = false
optional = true
path = "../bizinikiwi/pezframe/root-testing"
[dependencies.pezpallet-safe-mode]
default-features = false
optional = true
@@ -2055,6 +2062,11 @@ default-features = false
optional = true
path = "../pezkuwi/xcm/pezpallet-xcm"
[dependencies.pezpallet-xcm-benchmarks]
default-features = false
optional = true
path = "../pezkuwi/xcm/pezpallet-xcm-benchmarks"
[dependencies.pezpallet-xcm-bridge-hub]
default-features = false
optional = true
+8
View File
@@ -923,6 +923,10 @@ pub use pezpallet_revive_uapi;
#[cfg(feature = "pezpallet-root-offences")]
pub use pezpallet_root_offences;
/// FRAME root testing pezpallet.
#[cfg(feature = "pezpallet-root-testing")]
pub use pezpallet_root_testing;
/// FRAME safe-mode pezpallet.
#[cfg(feature = "pezpallet-safe-mode")]
pub use pezpallet_safe_mode;
@@ -1059,6 +1063,10 @@ pub use pezpallet_whitelist;
#[cfg(feature = "pezpallet-xcm")]
pub use pezpallet_xcm;
/// XCM benchmarking pallet.
#[cfg(feature = "pezpallet-xcm-benchmarks")]
pub use pezpallet_xcm_benchmarks;
/// Module that adds dynamic bridges/lanes support to XCM infrastructure at the bridge hub.
#[cfg(feature = "pezpallet-xcm-bridge-hub")]
pub use pezpallet_xcm_bridge_hub;
+6 -6
View File
@@ -8,11 +8,10 @@
#![deny(missing_docs)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#[cfg(any(
all(feature = "web", feature = "native"),
not(any(feature = "web", feature = "native"))
))]
compile_error!("subxt-lightclient: exactly one of the 'web' and 'native' features should be used.");
// Note: When both 'web' and 'native' features are enabled (e.g., --all-features),
// 'native' takes priority. This allows CI to run with --all-features.
#[cfg(not(any(feature = "web", feature = "native")))]
compile_error!("subxt-lightclient: at least one of the 'web' or 'native' features must be enabled.");
mod platform;
mod shared_client;
@@ -246,12 +245,13 @@ impl Stream for LightClientRpcSubscription {
}
/// A quick helper to spawn a task that works for WASM.
/// When both 'native' and 'web' are enabled, 'native' takes priority.
fn spawn<F: Future + Send + 'static>(future: F) {
#[cfg(feature = "native")]
tokio::spawn(async move {
future.await;
});
#[cfg(feature = "web")]
#[cfg(all(feature = "web", not(feature = "native")))]
wasm_bindgen_futures::spawn_local(async move {
future.await;
});
+5 -4
View File
@@ -3,12 +3,13 @@
// see LICENSE for license details.
//! Default platform for WASM environments.
//! When both 'native' and 'web' features are enabled, 'native' takes priority.
#[cfg(feature = "web")]
#[cfg(all(feature = "web", not(feature = "native")))]
mod wasm_helpers;
#[cfg(feature = "web")]
#[cfg(all(feature = "web", not(feature = "native")))]
mod wasm_platform;
#[cfg(feature = "web")]
#[cfg(all(feature = "web", not(feature = "native")))]
mod wasm_socket;
pub use helpers::{build_platform, DefaultPlatform};
@@ -25,7 +26,7 @@ mod helpers {
}
}
#[cfg(feature = "web")]
#[cfg(all(feature = "web", not(feature = "native")))]
mod helpers {
use super::wasm_platform::SubxtPlatform as Platform;
+9 -9
View File
@@ -7,9 +7,9 @@ use std::{borrow::Cow, path::Path};
use codec::{Decode, Encode};
use pezkuwi_subxt_codegen::{CodegenError, Metadata};
use pezkuwi_subxt_metadata::SUPPORTED_METADATA_VERSIONS;
use sc_executor::{WasmExecutionMethod, WasmExecutor};
use sc_executor_common::runtime_blob::RuntimeBlob;
use sp_maybe_compressed_blob::{self, CODE_BLOB_BOMB_LIMIT};
use pezsc_executor::{WasmExecutionMethod, WasmExecutor};
use pezsc_executor_common::runtime_blob::RuntimeBlob;
use pezsp_maybe_compressed_blob::{self, CODE_BLOB_BOMB_LIMIT};
/// Result type shorthand
pub type WasmMetadataResult<A> = Result<A, CodegenError>;
@@ -39,24 +39,24 @@ fn decode(encoded_metadata: Vec<u8>) -> WasmMetadataResult<Metadata> {
}
fn maybe_decompress(file_contents: Vec<u8>) -> WasmMetadataResult<Vec<u8>> {
sp_maybe_compressed_blob::decompress(file_contents.as_ref(), CODE_BLOB_BOMB_LIMIT)
pezsp_maybe_compressed_blob::decompress(file_contents.as_ref(), CODE_BLOB_BOMB_LIMIT)
.map_err(|e| CodegenError::Wasm(e.to_string()))
.map(Cow::into_owned)
}
struct Executor {
runtime_blob: RuntimeBlob,
executor: WasmExecutor<sp_io::BizinikiwiHostFunctions>,
externalities: sp_state_machine::BasicExternalities,
executor: WasmExecutor<pezsp_io::BizinikiwiHostFunctions>,
externalities: pezsp_state_machine::BasicExternalities,
}
impl Executor {
fn new(wasm_file: &[u8]) -> WasmMetadataResult<Self> {
let externalities: sp_state_machine::BasicExternalities = Default::default();
let externalities: pezsp_state_machine::BasicExternalities = Default::default();
let executor: WasmExecutor<sp_io::BizinikiwiHostFunctions> = WasmExecutor::builder()
let executor: WasmExecutor<pezsp_io::BizinikiwiHostFunctions> = WasmExecutor::builder()
.with_execution_method(WasmExecutionMethod::default())
.with_offchain_heap_alloc_strategy(sc_executor::HeapAllocStrategy::Dynamic {
.with_offchain_heap_alloc_strategy(pezsc_executor::HeapAllocStrategy::Dynamic {
maximum_pages: Some(64),
})
.with_max_runtime_instances(1)
@@ -2,6 +2,9 @@
// This file is dual-licensed as Apache-2.0 or GPL-3.0.
// see LICENSE for license details.
//! Platform-specific implementations.
//! When both 'native' and 'web' features are enabled, 'native' takes priority.
use super::{RpcClientBuilder, RpcError};
use jsonrpsee::core::client::Client;
use std::sync::Arc;
@@ -10,7 +13,7 @@ use url::Url;
#[cfg(feature = "native")]
pub use tokio::spawn;
#[cfg(feature = "web")]
#[cfg(all(feature = "web", not(feature = "native")))]
pub use wasm_bindgen_futures::spawn_local as spawn;
#[cfg(feature = "native")]
@@ -56,7 +59,7 @@ pub async fn ws_client<P>(
Ok(Arc::new(client))
}
#[cfg(feature = "web")]
#[cfg(all(feature = "web", not(feature = "native")))]
pub async fn ws_client<P>(
url: &Url,
builder: &RpcClientBuilder<P>,
+4 -5
View File
@@ -19,11 +19,10 @@
#![cfg_attr(docsrs, feature(doc_cfg))]
#[cfg(any(
all(feature = "web", feature = "native"),
not(any(feature = "web", feature = "native"))
))]
compile_error!("subxt-rpcs: exactly one of the 'web' and 'native' features should be used.");
// Note: When both 'web' and 'native' features are enabled (e.g., --all-features),
// 'native' takes priority. This allows CI to run with --all-features.
#[cfg(not(any(feature = "web", feature = "native")))]
compile_error!("subxt-rpcs: at least one of the 'web' or 'native' features must be enabled.");
mod macros;
+1 -1
View File
@@ -19,7 +19,7 @@ use crate::sr25519;
/// Given a JSON keypair as exported from Pezkuwi-JS, this returns an [`sr25519::Keypair`]
pub fn decrypt_json(json: &str, password: &str) -> Result<sr25519::Keypair, Error> {
let pair_json: KeyringPairJson = serde_json::from_str(json)?;
Ok(pair_json.decrypt(password)?)
pair_json.decrypt(password)
}
/// Error
+4 -5
View File
@@ -13,11 +13,10 @@
#![cfg_attr(docsrs, feature(doc_cfg))]
#[cfg(any(
all(feature = "web", feature = "native"),
not(any(feature = "web", feature = "native"))
))]
compile_error!("subxt: exactly one of the 'web' and 'native' features should be used.");
// Note: When both 'web' and 'native' features are enabled (e.g., --all-features),
// 'native' takes priority. This allows CI to run with --all-features.
#[cfg(not(any(feature = "web", feature = "native")))]
compile_error!("subxt: at least one of the 'web' or 'native' features must be enabled.");
// Internal helper macros
#[macro_use]
+2 -1
View File
@@ -30,6 +30,7 @@ macro_rules! cfg_jsonrpsee {
};
}
// When both 'native' and 'web' features are enabled, 'native' takes priority.
#[allow(unused)]
macro_rules! cfg_jsonrpsee_native {
($($item:item)*) => {
@@ -45,7 +46,7 @@ macro_rules! cfg_jsonrpsee_native {
macro_rules! cfg_jsonrpsee_web {
($($item:item)*) => {
$(
#[cfg(all(feature = "jsonrpsee", feature = "web"))]
#[cfg(all(feature = "jsonrpsee", feature = "web", not(feature = "native")))]
#[cfg_attr(docsrs, doc(cfg(all(feature = "jsonrpsee", feature = "web"))))]
$item
)*
@@ -71,7 +71,7 @@ fn generate_keystore_filename(key_type: &KeystoreKeyType, acc: &NodeAccounts) ->
let pk = acc
.accounts
.get(account_key)
.expect(&format!("Key '{}' should be set for node {THIS_IS_A_BUG}", account_key))
.expect(&format!("Key '{account_key}' should be set for node {THIS_IS_A_BUG}"))
.public_key
.as_str();
@@ -42,7 +42,7 @@ impl TryFrom<&str> for KeyScheme {
"sr" => Ok(KeyScheme::Sr),
"ed" => Ok(KeyScheme::Ed),
"ec" => Ok(KeyScheme::Ec),
_ => Err(format!("Unsupported key scheme: {}", value)),
_ => Err(format!("Unsupported key scheme: {value}")),
}
}
}