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 35612a9cad
commit 4c13406c00
21 changed files with 177 additions and 506 deletions
+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
)*