chore: regenerate umbrella crate, fix feature propagation
This commit is contained in:
@@ -24,13 +24,13 @@ use crate::{
|
||||
};
|
||||
use pezsc_network::config::MultiaddrWithPeerId;
|
||||
use pezsc_telemetry::TelemetryEndpoints;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json as json;
|
||||
use pezsp_core::{
|
||||
storage::{ChildInfo, Storage, StorageChild, StorageData, StorageKey},
|
||||
Bytes,
|
||||
};
|
||||
use pezsp_runtime::BuildStorage;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json as json;
|
||||
use std::{
|
||||
borrow::Cow,
|
||||
collections::{BTreeMap, VecDeque},
|
||||
@@ -166,8 +166,8 @@ where
|
||||
});
|
||||
},
|
||||
// The `StateRootHash` variant exists as a way to keep note that other clients support
|
||||
// it, but Bizinikiwi itself isn't capable of loading chain specs with just a hash at the
|
||||
// moment.
|
||||
// it, but Bizinikiwi itself isn't capable of loading chain specs with just a hash at
|
||||
// the moment.
|
||||
Genesis::StateRootHash(_) =>
|
||||
return Err("Genesis storage in hash format not supported".into()),
|
||||
Genesis::RuntimeGenesis(RuntimeGenesisInner {
|
||||
@@ -795,11 +795,11 @@ pub fn set_code_substitute_in_json_chain_spec(
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use pretty_assertions::assert_eq;
|
||||
use serde_json::{from_str, json, Value};
|
||||
use pezsp_application_crypto::Ss58Codec;
|
||||
use pezsp_core::storage::well_known_keys;
|
||||
use pezsp_keyring::Sr25519Keyring;
|
||||
use pretty_assertions::assert_eq;
|
||||
use serde_json::{from_str, json, Value};
|
||||
|
||||
type TestSpec = ChainSpec;
|
||||
|
||||
@@ -966,9 +966,10 @@ mod tests {
|
||||
.build();
|
||||
|
||||
let actual = output.as_json(false).unwrap();
|
||||
let expected =
|
||||
from_str::<Value>(include_str!("../res/bizinikiwi_test_runtime_from_named_preset.json"))
|
||||
.unwrap();
|
||||
let expected = from_str::<Value>(include_str!(
|
||||
"../res/bizinikiwi_test_runtime_from_named_preset.json"
|
||||
))
|
||||
.unwrap();
|
||||
|
||||
//wasm blob may change overtime so let's zero it. Also ensure it is there:
|
||||
let actual = zeroize_code_key_in_json(false, actual.as_str());
|
||||
|
||||
@@ -106,8 +106,9 @@ impl<Block: BlockT, B: Backend<Block>, E: RuntimeVersionOf> GenesisBlockBuilder<
|
||||
backend: Arc<B>,
|
||||
executor: E,
|
||||
) -> pezsp_blockchain::Result<Self> {
|
||||
let genesis_storage =
|
||||
build_genesis_storage.build_storage().map_err(pezsp_blockchain::Error::Storage)?;
|
||||
let genesis_storage = build_genesis_storage
|
||||
.build_storage()
|
||||
.map_err(pezsp_blockchain::Error::Storage)?;
|
||||
Self::new_with_storage(genesis_storage, commit_genesis_state, backend, executor)
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
use codec::{Decode, Encode};
|
||||
pub use pezsc_executor::pezsp_wasm_interface::HostFunctions;
|
||||
use pezsc_executor::{error::Result, WasmExecutor};
|
||||
use serde_json::{from_slice, Value};
|
||||
use pezsp_core::{
|
||||
storage::Storage,
|
||||
traits::{CallContext, CodeExecutor, Externalities, FetchRuntimeCode, RuntimeCode},
|
||||
@@ -29,6 +28,7 @@ use pezsp_core::{
|
||||
use pezsp_genesis_builder::{PresetId, Result as BuildResult};
|
||||
pub use pezsp_genesis_builder::{DEV_RUNTIME_PRESET, LOCAL_TESTNET_RUNTIME_PRESET};
|
||||
use pezsp_state_machine::BasicExternalities;
|
||||
use serde_json::{from_slice, Value};
|
||||
use std::borrow::Cow;
|
||||
|
||||
/// A utility that facilitates calling the GenesisBuilder API from the runtime wasm code blob.
|
||||
@@ -85,8 +85,8 @@ where
|
||||
/// Returns a json representation of the default `RuntimeGenesisConfig` provided by the
|
||||
/// `runtime`.
|
||||
///
|
||||
/// Calls [`GenesisBuilder::get_preset`](pezsp_genesis_builder::GenesisBuilder::get_preset) in the
|
||||
/// `runtime` with `None` argument.
|
||||
/// Calls [`GenesisBuilder::get_preset`](pezsp_genesis_builder::GenesisBuilder::get_preset) in
|
||||
/// the `runtime` with `None` argument.
|
||||
pub fn get_default_config(&self) -> core::result::Result<Value, String> {
|
||||
self.get_named_preset(None)
|
||||
}
|
||||
@@ -176,9 +176,9 @@ where
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use serde_json::{from_str, json};
|
||||
pub use pezsp_consensus_babe::{AllowedSlots, BabeEpochConfiguration};
|
||||
pub use pezsp_genesis_builder::PresetId;
|
||||
use serde_json::{from_str, json};
|
||||
|
||||
#[test]
|
||||
fn list_presets_works() {
|
||||
|
||||
@@ -192,9 +192,9 @@
|
||||
//!
|
||||
//! This interaction involves passing the runtime genesis config JSON blob to the runtime using the
|
||||
//! [`pezsp_genesis_builder::GenesisBuilder::build_state`] function. During this operation, the
|
||||
//! runtime converts the JSON representation of the genesis config into [`pezsp_io::storage`] items. It
|
||||
//! is a crucial step for computing the storage root hash, which is a key component in determining
|
||||
//! the genesis hash.
|
||||
//! runtime converts the JSON representation of the genesis config into [`pezsp_io::storage`] items.
|
||||
//! It is a crucial step for computing the storage root hash, which is a key component in
|
||||
//! determining the genesis hash.
|
||||
//!
|
||||
//! Consequently, the runtime must support the [`pezsp_genesis_builder::GenesisBuilder`] API to
|
||||
//! utilize either `patch` or `full` formats.
|
||||
|
||||
Reference in New Issue
Block a user