fix: resolve pezsp_runtime visibility issues across workspace
- Add direct pezsp-runtime dependency to crates requiring pezsp_runtime types - Update imports to use pezkuwi_sdk:: prefix for primitive crates - Fix subxt_client.rs substitute_type paths to match rebranded metadata - Update umbrella crate with additional feature exports - Fix pezstaging-node-cli, pez-minimal-template-node, teyrchain templates - Delete stale sqlx query cache files (require regeneration with running chain)
This commit is contained in:
@@ -123,14 +123,24 @@ pezkuwi-sdk = { features = [
|
||||
"pezsc-transaction-pool",
|
||||
"pezsc-transaction-pool-api",
|
||||
"pezsc-utils",
|
||||
"pezsp-api",
|
||||
"pezsp-blockchain",
|
||||
"pezsp-consensus",
|
||||
"pezsp-core",
|
||||
"pezsp-core-hashing",
|
||||
"pezsp-core-hashing-proc-macro",
|
||||
"pezsp-database",
|
||||
"pezsp-inherents",
|
||||
"pezsp-io",
|
||||
"pezsp-keystore",
|
||||
"pezsp-maybe-compressed-blob",
|
||||
"pezsp-mmr-primitives",
|
||||
"pezsp-panic-handler",
|
||||
"pezsp-rpc",
|
||||
"pezsp-statement-store",
|
||||
"pezsp-timestamp",
|
||||
"pezsp-tracing",
|
||||
"pezsp-transaction-storage-proof",
|
||||
"pezstaging-chain-spec-builder",
|
||||
"pezstaging-node-inspect",
|
||||
"pezstaging-tracking-allocator",
|
||||
@@ -146,6 +156,9 @@ pezkuwi-sdk = { features = [
|
||||
"pez-tracing-gum",
|
||||
], workspace = true, default-features = true }
|
||||
|
||||
# Direct dependency needed (not through umbrella due to macro visibility issues)
|
||||
pezsp-runtime = { workspace = true }
|
||||
|
||||
# Shared code between the staging node and kitchensink runtime:
|
||||
pez-kitchensink-runtime = { workspace = true }
|
||||
node-inspect = { optional = true, workspace = true, default-features = true }
|
||||
@@ -205,6 +218,7 @@ runtime-benchmarks = [
|
||||
"pezkuwi-sdk/runtime-benchmarks",
|
||||
"pezsc-service-test/runtime-benchmarks",
|
||||
"pezsp-keyring/runtime-benchmarks",
|
||||
"pezsp-runtime/runtime-benchmarks",
|
||||
"bizinikiwi-cli-test-utils/runtime-benchmarks",
|
||||
]
|
||||
try-runtime = [
|
||||
|
||||
@@ -46,21 +46,23 @@ use pezsc_statement_store::Store as StatementStore;
|
||||
use pezsc_telemetry::{Telemetry, TelemetryWorker};
|
||||
use pezsc_transaction_pool::TransactionPoolHandle;
|
||||
use pezsc_transaction_pool_api::OffchainTransactionPoolFactory;
|
||||
use pezsp_api::ProvideRuntimeApi;
|
||||
use pezsp_core::crypto::Pair;
|
||||
use pezkuwi_sdk::pezsp_api::ProvideRuntimeApi;
|
||||
use pezkuwi_sdk::pezsp_core::crypto::Pair;
|
||||
use pezsp_runtime::{generic, traits::Block as BlockT, SaturatedConversion};
|
||||
use std::{path::Path, sync::Arc};
|
||||
|
||||
/// Host functions required for kitchensink runtime and Bizinikiwi node.
|
||||
#[cfg(not(feature = "runtime-benchmarks"))]
|
||||
pub type HostFunctions =
|
||||
(pezsp_io::BizinikiwiHostFunctions, pezsp_statement_store::runtime_api::HostFunctions);
|
||||
pub type HostFunctions = (
|
||||
pezkuwi_sdk::pezsp_io::BizinikiwiHostFunctions,
|
||||
pezkuwi_sdk::pezsp_statement_store::runtime_api::HostFunctions,
|
||||
);
|
||||
|
||||
/// Host functions required for kitchensink runtime and Bizinikiwi node.
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
pub type HostFunctions = (
|
||||
pezsp_io::BizinikiwiHostFunctions,
|
||||
pezsp_statement_store::runtime_api::HostFunctions,
|
||||
pezkuwi_sdk::pezsp_io::BizinikiwiHostFunctions,
|
||||
pezkuwi_sdk::pezsp_statement_store::runtime_api::HostFunctions,
|
||||
pezframe_benchmarking::benchmarking::HostFunctions,
|
||||
);
|
||||
|
||||
@@ -273,9 +275,9 @@ pub fn new_partial(
|
||||
beefy_block_import,
|
||||
client.clone(),
|
||||
Arc::new(move |_, _| async move {
|
||||
let timestamp = pezsp_timestamp::InherentDataProvider::from_system_time();
|
||||
let timestamp = pezkuwi_sdk::pezsp_timestamp::InherentDataProvider::from_system_time();
|
||||
let slot =
|
||||
pezsp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
|
||||
pezkuwi_sdk::pezsp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
|
||||
*timestamp,
|
||||
slot_duration,
|
||||
);
|
||||
@@ -621,16 +623,16 @@ pub fn new_full_base<N: NetworkBackend<Block, <Block as BlockT>::Hash>>(
|
||||
create_inherent_data_providers: move |parent, ()| {
|
||||
let client_clone = client_clone.clone();
|
||||
async move {
|
||||
let timestamp = pezsp_timestamp::InherentDataProvider::from_system_time();
|
||||
let timestamp = pezkuwi_sdk::pezsp_timestamp::InherentDataProvider::from_system_time();
|
||||
|
||||
let slot =
|
||||
pezsp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
|
||||
pezkuwi_sdk::pezsp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
|
||||
*timestamp,
|
||||
slot_duration,
|
||||
);
|
||||
|
||||
let storage_proof =
|
||||
pezsp_transaction_storage_proof::registration::new_data_provider(
|
||||
pezkuwi_sdk::pezsp_transaction_storage_proof::registration::new_data_provider(
|
||||
&*client_clone,
|
||||
&parent,
|
||||
)?;
|
||||
@@ -729,7 +731,7 @@ pub fn new_full_base<N: NetworkBackend<Block, <Block as BlockT>::Hash>>(
|
||||
pezmmr_gadget::MmrGadget::start(
|
||||
client.clone(),
|
||||
backend.clone(),
|
||||
pezsp_mmr_primitives::INDEXING_PREFIX.to_vec(),
|
||||
pezkuwi_sdk::pezsp_mmr_primitives::INDEXING_PREFIX.to_vec(),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -877,7 +879,17 @@ mod tests {
|
||||
Address, BalancesCall, RuntimeCall, TxExtension,
|
||||
};
|
||||
use pez_node_primitives::{Block, DigestItem, Signature};
|
||||
use pezkuwi_sdk::{pezsc_transaction_pool_api::MaintainedTransactionPool, *};
|
||||
use pezkuwi_sdk::{
|
||||
pezsc_transaction_pool_api::MaintainedTransactionPool,
|
||||
pezsp_consensus::{BlockOrigin, Environment, Proposer},
|
||||
pezsp_consensus_babe,
|
||||
pezsp_core::crypto::Pair,
|
||||
pezsp_inherents::InherentDataProvider,
|
||||
pezsp_keystore::KeystorePtr,
|
||||
pezsp_timestamp,
|
||||
pezsp_tracing,
|
||||
*,
|
||||
};
|
||||
use pezsc_client_api::BlockBackend;
|
||||
use pezsc_consensus::{BlockImport, BlockImportParams, ForkChoiceStrategy};
|
||||
use pezsc_consensus_babe::{BabeIntermediate, CompatibleDigestItem, INTERMEDIATE_KEY};
|
||||
@@ -885,18 +897,13 @@ mod tests {
|
||||
use pezsc_keystore::LocalKeystore;
|
||||
use pezsc_service_test::TestNetNode;
|
||||
use pezsc_transaction_pool_api::ChainEvent;
|
||||
use pezsp_consensus::{BlockOrigin, Environment, Proposer};
|
||||
use pezsp_core::crypto::Pair;
|
||||
use pezsp_inherents::InherentDataProvider;
|
||||
use pezsp_keyring::Sr25519Keyring;
|
||||
use pezsp_keystore::KeystorePtr;
|
||||
use pezsp_runtime::{
|
||||
generic::{self, Digest, Era, SignedPayload},
|
||||
key_types::BABE,
|
||||
traits::{Block as BlockT, Header as HeaderT, IdentifyAccount, Verify},
|
||||
RuntimeAppPublic,
|
||||
};
|
||||
use pezsp_timestamp;
|
||||
use std::sync::Arc;
|
||||
|
||||
type AccountPublic = <Signature as Verify>::Signer;
|
||||
|
||||
@@ -37,7 +37,7 @@ primitive-types = { features = [
|
||||
], workspace = true }
|
||||
|
||||
pezkuwi-sdk = { features = ["runtime-full", "tuples-96"], workspace = true }
|
||||
pezsp-runtime = { workspace = true }
|
||||
pezsp-runtime = { path = "../../../primitives/runtime", default-features = false }
|
||||
|
||||
# shared code between runtime and node
|
||||
pez-node-primitives = { workspace = true }
|
||||
|
||||
@@ -2332,7 +2332,7 @@ impl pezpallet_alliance::Config for Runtime {
|
||||
type RetirementPeriod = RetirementPeriod;
|
||||
}
|
||||
|
||||
impl pezframe_benchmarking_pallet_pov::Config for Runtime {
|
||||
impl pezframe_benchmarking_pezpallet_pov::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
}
|
||||
|
||||
@@ -2806,7 +2806,7 @@ mod runtime {
|
||||
pub type MessageQueue = pezpallet_message_queue::Pezpallet<Runtime>;
|
||||
|
||||
#[runtime::pezpallet_index(68)]
|
||||
pub type Pov = pezframe_benchmarking_pallet_pov::Pezpallet<Runtime>;
|
||||
pub type Pov = pezframe_benchmarking_pezpallet_pov::Pezpallet<Runtime>;
|
||||
|
||||
#[runtime::pezpallet_index(69)]
|
||||
pub type TxPause = pezpallet_tx_pause::Pezpallet<Runtime>;
|
||||
@@ -2866,9 +2866,6 @@ mod runtime {
|
||||
pub type MultiAssetBounties = pezpallet_multi_asset_bounties::Pezpallet<Runtime>;
|
||||
}
|
||||
|
||||
// Re-export all pallet types from the runtime module
|
||||
pub use runtime::*;
|
||||
|
||||
/// The address format for describing accounts.
|
||||
pub type Address = pezsp_runtime::MultiAddress<AccountId, AccountIndex>;
|
||||
/// Block header type as expected by this runtime.
|
||||
@@ -3109,7 +3106,7 @@ impl
|
||||
mod benches {
|
||||
pezkuwi_sdk::pezframe_benchmarking::define_benchmarks!(
|
||||
[pezframe_benchmarking, BaselineBench::<Runtime>]
|
||||
[pezframe_benchmarking_pallet_pov, Pov]
|
||||
[pezframe_benchmarking_pezpallet_pov, Pov]
|
||||
[pezpallet_alliance, Alliance]
|
||||
[pezpallet_assets, Assets]
|
||||
[pezpallet_babe, Babe]
|
||||
|
||||
@@ -24,7 +24,18 @@ futures = { features = ["thread-pool"], workspace = true }
|
||||
futures-timer = { workspace = true }
|
||||
jsonrpsee = { features = ["server"], workspace = true }
|
||||
|
||||
pezkuwi-sdk = { workspace = true, features = ["experimental", "node"] }
|
||||
# Direct dependency needed (not through umbrella due to macro visibility issues)
|
||||
pezsp-runtime = { workspace = true }
|
||||
|
||||
pezkuwi-sdk = { workspace = true, features = [
|
||||
"experimental",
|
||||
"node",
|
||||
"pezsp-core",
|
||||
"pezsp-io",
|
||||
"pezsp-genesis-builder",
|
||||
"pezsp-block-builder",
|
||||
"pezsp-timestamp",
|
||||
] }
|
||||
pez-revive-dev-runtime = { workspace = true }
|
||||
|
||||
[build-dependencies]
|
||||
|
||||
@@ -36,7 +36,7 @@ pub fn development_chain_spec() -> Result<ChainSpec, String> {
|
||||
.with_name("Development")
|
||||
.with_id("dev")
|
||||
.with_chain_type(ChainType::Development)
|
||||
.with_genesis_config_preset_name(pezsp_genesis_builder::DEV_RUNTIME_PRESET)
|
||||
.with_genesis_config_preset_name(pezkuwi_sdk::pezsp_genesis_builder::DEV_RUNTIME_PRESET)
|
||||
.with_properties(props())
|
||||
.build())
|
||||
}
|
||||
|
||||
@@ -81,11 +81,11 @@ where
|
||||
C: Send
|
||||
+ Sync
|
||||
+ 'static
|
||||
+ pezsp_api::ProvideRuntimeApi<OpaqueBlock>
|
||||
+ pezkuwi_sdk::pezsp_api::ProvideRuntimeApi<OpaqueBlock>
|
||||
+ HeaderBackend<OpaqueBlock>
|
||||
+ HeaderMetadata<OpaqueBlock, Error = BlockChainError>
|
||||
+ 'static,
|
||||
C::Api: pezsp_block_builder::BlockBuilder<OpaqueBlock>,
|
||||
C::Api: pezkuwi_sdk::pezsp_block_builder::BlockBuilder<OpaqueBlock>,
|
||||
C::Api: bizinikiwi_frame_rpc_system::AccountNonceApi<OpaqueBlock, AccountId, Nonce>,
|
||||
P: TransactionPool + 'static,
|
||||
{
|
||||
|
||||
@@ -22,12 +22,12 @@ use pezkuwi_sdk::{
|
||||
pezsc_executor::WasmExecutor,
|
||||
pezsc_service::{error::Error as ServiceError, Configuration, TaskManager},
|
||||
pezsc_telemetry::{Telemetry, TelemetryWorker},
|
||||
pezsp_runtime::traits::Block as BlockT,
|
||||
*,
|
||||
};
|
||||
use pezsp_runtime::traits::Block as BlockT;
|
||||
use std::sync::Arc;
|
||||
|
||||
type HostFunctions = pezsp_io::BizinikiwiHostFunctions;
|
||||
type HostFunctions = pezkuwi_sdk::pezsp_io::BizinikiwiHostFunctions;
|
||||
|
||||
#[docify::export]
|
||||
pub(crate) type FullClient =
|
||||
@@ -190,10 +190,10 @@ pub fn new_full<Network: pezsc_network::NetworkBackend<Block, <Block as BlockT>:
|
||||
move |parent, ()| {
|
||||
let client = client.clone();
|
||||
async move {
|
||||
let key = pezsp_core::storage::StorageKey(
|
||||
let key = pezkuwi_sdk::pezsp_core::storage::StorageKey(
|
||||
pezkuwi_sdk::pezpallet_timestamp::Now::<Runtime>::hashed_key().to_vec(),
|
||||
);
|
||||
let current = pezsp_timestamp::Timestamp::current();
|
||||
let current = pezkuwi_sdk::pezsp_timestamp::Timestamp::current();
|
||||
let next = client
|
||||
.storage(parent, &key)
|
||||
.ok()
|
||||
@@ -201,10 +201,10 @@ pub fn new_full<Network: pezsc_network::NetworkBackend<Block, <Block as BlockT>:
|
||||
.and_then(|data| data.0.try_into().ok())
|
||||
.map(|data| {
|
||||
let last = u64::from_le_bytes(data) / 1000;
|
||||
pezsp_timestamp::Timestamp::new((last + 1) * 1000)
|
||||
pezkuwi_sdk::pezsp_timestamp::Timestamp::new((last + 1) * 1000)
|
||||
})
|
||||
.unwrap_or(current);
|
||||
Ok(pezsp_timestamp::InherentDataProvider::new(current.max(next)))
|
||||
Ok(pezkuwi_sdk::pezsp_timestamp::InherentDataProvider::new(current.max(next)))
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"db_name": "SQLite",
|
||||
"query": "\n\t\t\tSELECT bizinikiwi_block_hash\n\t\t\tFROM eth_to_bizinikiwi_blocks\n\t\t\tWHERE ethereum_block_hash = $1\n\t\t\t",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"name": "bizinikiwi_block_hash",
|
||||
"ordinal": 0,
|
||||
"type_info": "Blob"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Right": 1
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "47b830cef6768ed5b119c74037482baef86a7c3d3469873a205805ef342ba031"
|
||||
}
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"db_name": "SQLite",
|
||||
"query": "\n\t\t\tSELECT ethereum_block_hash\n\t\t\tFROM eth_to_bizinikiwi_blocks\n\t\t\tWHERE bizinikiwi_block_hash = $1\n\t\t\t",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"name": "ethereum_block_hash",
|
||||
"ordinal": 0,
|
||||
"type_info": "Blob"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Right": 1
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "7e5be81ad6f5d96bc6dbf62098cbd61d257d1ffad222317634327e12be403ab2"
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"db_name": "SQLite",
|
||||
"query": "\n\t\t\tINSERT OR REPLACE INTO eth_to_bizinikiwi_blocks (ethereum_block_hash, bizinikiwi_block_hash)\n\t\t\tVALUES ($1, $2)\n\t\t\t",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Right": 2
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "cf515b47790a2ac4b3802c29e36a07ace0c67849e5b20c92532d7a77861ebf80"
|
||||
}
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"db_name": "SQLite",
|
||||
"query": "SELECT EXISTS(SELECT 1 FROM eth_to_bizinikiwi_blocks WHERE bizinikiwi_block_hash = $1) AS \"exists!:bool\"",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"name": "exists!:bool",
|
||||
"ordinal": 0,
|
||||
"type_info": "Integer"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Right": 1
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "e712acbeb712c0a61fc2a47f966abae1ae43ffba0920a9d209d01dcfce44c5e0"
|
||||
}
|
||||
Binary file not shown.
@@ -27,6 +27,32 @@ pub use subxt::config::PolkadotConfig as SrcChainConfig;
|
||||
with = "::subxt::utils::Static<::pezsp_core::U256>"
|
||||
),
|
||||
|
||||
// The metadata is generated from our rebranded runtime, so paths already use pezsp_* names
|
||||
substitute_type(
|
||||
path = "pezsp_runtime::DispatchError",
|
||||
with = "::subxt::utils::Static<::pezsp_runtime::DispatchError>"
|
||||
),
|
||||
substitute_type(
|
||||
path = "pezsp_runtime::ModuleError",
|
||||
with = "::subxt::utils::Static<::pezsp_runtime::ModuleError>"
|
||||
),
|
||||
substitute_type(
|
||||
path = "pezsp_runtime::TokenError",
|
||||
with = "::subxt::utils::Static<::pezsp_runtime::TokenError>"
|
||||
),
|
||||
substitute_type(
|
||||
path = "pezsp_arithmetic::ArithmeticError",
|
||||
with = "::subxt::utils::Static<::pezsp_runtime::ArithmeticError>"
|
||||
),
|
||||
substitute_type(
|
||||
path = "pezsp_runtime::TransactionalError",
|
||||
with = "::subxt::utils::Static<::pezsp_runtime::TransactionalError>"
|
||||
),
|
||||
substitute_type(
|
||||
path = "pezsp_runtime::MultiSignature",
|
||||
with = "::subxt::utils::Static<::pezsp_runtime::MultiSignature>"
|
||||
),
|
||||
|
||||
substitute_type(
|
||||
path = "pezsp_runtime::generic::block::Block<A, B, C, D, E>",
|
||||
with = "::subxt::utils::Static<::pezsp_runtime::generic::Block<
|
||||
|
||||
@@ -88,13 +88,7 @@ pub fn build(input: TokenStream) -> TokenStream {
|
||||
let ident = syn::Ident::new(&pezsp_runtime, Span::call_site());
|
||||
quote!( #[doc(hidden)] pub use #ident as _sp_runtime; )
|
||||
},
|
||||
Err(e) => match crate_name("pezkuwi-sdk") {
|
||||
Ok(FoundCrate::Name(pezkuwi_sdk)) => {
|
||||
let ident = syn::Ident::new(&pezkuwi_sdk, Span::call_site());
|
||||
quote!( #[doc(hidden)] pub use #ident::pezsp_runtime as _sp_runtime; )
|
||||
},
|
||||
_ => syn::Error::new(Span::call_site(), e).to_compile_error(),
|
||||
},
|
||||
Err(e) => syn::Error::new(Span::call_site(), e).to_compile_error(),
|
||||
};
|
||||
|
||||
let const_name = input.ident;
|
||||
|
||||
Reference in New Issue
Block a user