Refactoring Checkpoint: (WIP)
This commit is contained in:
@@ -20,7 +20,7 @@ use pezkuwi_sdk::*;
|
||||
|
||||
use criterion::{criterion_group, criterion_main, BatchSize, Criterion, Throughput};
|
||||
|
||||
use kitchensink_runtime::{constants::currency::*, BalancesCall};
|
||||
use pez_kitchensink_runtime::{constants::currency::*, BalancesCall};
|
||||
use node_cli::service::{create_extrinsic, FullClient};
|
||||
use pezkuwi_sdk::pezsc_service::config::{ExecutorConfiguration, RpcConfiguration};
|
||||
use pezsc_block_builder::{BlockBuilderBuilder, BuiltBlock};
|
||||
@@ -123,14 +123,14 @@ fn new_node(tokio_handle: Handle) -> node_cli::service::NewFullBase {
|
||||
}
|
||||
|
||||
fn extrinsic_set_time(now: u64) -> OpaqueExtrinsic {
|
||||
let utx: kitchensink_runtime::UncheckedExtrinsic = generic::UncheckedExtrinsic::new_bare(
|
||||
kitchensink_runtime::RuntimeCall::Timestamp(pezpallet_timestamp::Call::set { now }),
|
||||
let utx: pez_kitchensink_runtime::UncheckedExtrinsic = generic::UncheckedExtrinsic::new_bare(
|
||||
pez_kitchensink_runtime::RuntimeCall::Timestamp(pezpallet_timestamp::Call::set { now }),
|
||||
)
|
||||
.into();
|
||||
utx.into()
|
||||
}
|
||||
|
||||
fn import_block(client: &FullClient, built: BuiltBlock<node_primitives::Block>) {
|
||||
fn import_block(client: &FullClient, built: BuiltBlock<pez_node_primitives::Block>) {
|
||||
let mut params = BlockImportParams::new(BlockOrigin::File, built.block.header);
|
||||
params.state_action =
|
||||
StateAction::ApplyChanges(pezsc_consensus::StorageChanges::Changes(built.storage_changes));
|
||||
|
||||
@@ -21,12 +21,12 @@ use pezkuwi_sdk::*;
|
||||
use codec::{Decode, Encode};
|
||||
use criterion::{criterion_group, criterion_main, BatchSize, Criterion};
|
||||
use pezframe_support::Hashable;
|
||||
use kitchensink_runtime::{
|
||||
use pez_kitchensink_runtime::{
|
||||
constants::currency::*, Block, BuildStorage, CheckedExtrinsic, Header, RuntimeCall,
|
||||
RuntimeGenesisConfig, UncheckedExtrinsic,
|
||||
};
|
||||
use node_primitives::{BlockNumber, Hash};
|
||||
use node_testing::keyring::*;
|
||||
use pez_node_primitives::{BlockNumber, Hash};
|
||||
use pez_node_testing::keyring::*;
|
||||
use pezsc_executor::{Externalities, RuntimeVersionOf};
|
||||
use pezsp_core::{
|
||||
storage::well_known_keys,
|
||||
@@ -41,7 +41,7 @@ criterion_main!(benches);
|
||||
|
||||
/// The wasm runtime code.
|
||||
pub fn compact_code_unwrap() -> &'static [u8] {
|
||||
kitchensink_runtime::WASM_BINARY.expect(
|
||||
pez_kitchensink_runtime::WASM_BINARY.expect(
|
||||
"Development wasm binary is not available. Testing is only supported with the flag \
|
||||
disabled.",
|
||||
)
|
||||
@@ -49,16 +49,16 @@ pub fn compact_code_unwrap() -> &'static [u8] {
|
||||
|
||||
const GENESIS_HASH: [u8; 32] = [69u8; 32];
|
||||
|
||||
const TRANSACTION_VERSION: u32 = kitchensink_runtime::VERSION.transaction_version;
|
||||
const TRANSACTION_VERSION: u32 = pez_kitchensink_runtime::VERSION.transaction_version;
|
||||
|
||||
const SPEC_VERSION: u32 = kitchensink_runtime::VERSION.spec_version;
|
||||
const SPEC_VERSION: u32 = pez_kitchensink_runtime::VERSION.spec_version;
|
||||
|
||||
const HEAP_PAGES: u64 = 20;
|
||||
|
||||
type TestExternalities<H> = CoreTestExternalities<H>;
|
||||
|
||||
fn sign(xt: CheckedExtrinsic) -> UncheckedExtrinsic {
|
||||
node_testing::keyring::sign(xt, SPEC_VERSION, TRANSACTION_VERSION, GENESIS_HASH, None)
|
||||
pez_node_testing::keyring::sign(xt, SPEC_VERSION, TRANSACTION_VERSION, GENESIS_HASH, None)
|
||||
}
|
||||
|
||||
fn new_test_ext(genesis_config: &RuntimeGenesisConfig) -> TestExternalities<BlakeTwo256> {
|
||||
@@ -167,7 +167,7 @@ fn bench_execute_block(c: &mut Criterion) {
|
||||
let mut group = c.benchmark_group("execute blocks");
|
||||
|
||||
group.bench_function("wasm", |b| {
|
||||
let genesis_config = node_testing::genesis::config();
|
||||
let genesis_config = pez_node_testing::genesis::config();
|
||||
|
||||
let executor = RuntimeExecutor::builder().build();
|
||||
let runtime_code = RuntimeCode {
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
|
||||
use criterion::{criterion_group, criterion_main, BatchSize, Criterion, Throughput};
|
||||
use futures::{future, StreamExt};
|
||||
use kitchensink_runtime::{constants::currency::*, BalancesCall, SudoCall};
|
||||
use pez_kitchensink_runtime::{constants::currency::*, BalancesCall, SudoCall};
|
||||
use node_cli::service::{create_extrinsic, fetch_nonce, FullClient, TransactionPool};
|
||||
use node_primitives::AccountId;
|
||||
use pez_node_primitives::AccountId;
|
||||
use pezkuwi_sdk::{
|
||||
pezsc_service::config::{ExecutorConfiguration, RpcConfiguration},
|
||||
pezsc_transaction_pool_api::TransactionPool as _,
|
||||
|
||||
Reference in New Issue
Block a user