Refactoring Checkpoint: (WIP)

This commit is contained in:
2025-12-14 10:29:31 +03:00
parent 09735eb97a
commit c89d7cac55
1424 changed files with 6415 additions and 6064 deletions
+8 -8
View File
@@ -1,5 +1,5 @@
[package]
name = "node-bench"
name = "pez-node-bench"
version = "0.9.0-dev"
authors.workspace = true
description = "Bizinikiwi node integration benchmarks."
@@ -8,7 +8,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
homepage.workspace = true
repository.workspace = true
publish = false
documentation = "https://docs.rs/node-bench"
documentation = "https://docs.rs/pez-node-bench"
[lints]
workspace = true
@@ -23,12 +23,12 @@ derive_more = { features = ["display"], workspace = true }
fs_extra = { workspace = true }
futures = { features = ["thread-pool"], workspace = true }
hash-db = { workspace = true, default-features = true }
kitchensink-runtime = { workspace = true }
pez-kitchensink-runtime = { workspace = true }
kvdb = { workspace = true }
kvdb-rocksdb = { workspace = true }
log = { workspace = true, default-features = true }
node-primitives = { workspace = true, default-features = true }
node-testing = { workspace = true }
pez-node-primitives = { workspace = true, default-features = true }
pez-node-testing = { workspace = true }
parity-db = { workspace = true }
rand = { features = ["small_rng"], workspace = true, default-features = true }
pezsc-basic-authorship = { workspace = true, default-features = true }
@@ -49,9 +49,9 @@ tempfile = { workspace = true }
[features]
runtime-benchmarks = [
"kitchensink-runtime/runtime-benchmarks",
"node-primitives/runtime-benchmarks",
"node-testing/runtime-benchmarks",
"pez-kitchensink-runtime/runtime-benchmarks",
"pez-node-primitives/runtime-benchmarks",
"pez-node-testing/runtime-benchmarks",
"pezsc-basic-authorship/runtime-benchmarks",
"pezsc-client-api/runtime-benchmarks",
"pezsc-transaction-pool-api/runtime-benchmarks",
+7 -7
View File
@@ -27,8 +27,8 @@
use std::{borrow::Cow, collections::HashMap, pin::Pin, sync::Arc};
use async_trait::async_trait;
use node_primitives::Block;
use node_testing::bench::{BenchDb, BlockType, DatabaseType, KeyTypes};
use pez_node_primitives::Block;
use pez_node_testing::bench::{BenchDb, BlockType, DatabaseType, KeyTypes};
use pezsc_transaction_pool_api::{
ImportNotificationStream, PoolStatus, ReadyTransactions, TransactionFor, TransactionSource,
TransactionStatusStreamFor, TxHash, TxInvalidityReportMap,
@@ -167,18 +167,18 @@ impl core::Benchmark for ConstructionBenchmark {
#[derive(Clone, Debug)]
pub struct PoolTransaction {
data: Arc<OpaqueExtrinsic>,
hash: node_primitives::Hash,
hash: pez_node_primitives::Hash,
}
impl From<OpaqueExtrinsic> for PoolTransaction {
fn from(e: OpaqueExtrinsic) -> Self {
PoolTransaction { data: Arc::from(e), hash: node_primitives::Hash::zero() }
PoolTransaction { data: Arc::from(e), hash: pez_node_primitives::Hash::zero() }
}
}
impl pezsc_transaction_pool_api::InPoolTransaction for PoolTransaction {
type Transaction = Arc<OpaqueExtrinsic>;
type Hash = node_primitives::Hash;
type Hash = pez_node_primitives::Hash;
fn data(&self) -> &Self::Transaction {
&self.data
@@ -228,7 +228,7 @@ impl ReadyTransactions for TransactionsIterator {
#[async_trait]
impl pezsc_transaction_pool_api::TransactionPool for Transactions {
type Block = Block;
type Hash = node_primitives::Hash;
type Hash = pez_node_primitives::Hash;
type InPoolTransaction = PoolTransaction;
type Error = pezsc_transaction_pool_api::error::Error;
@@ -238,7 +238,7 @@ impl pezsc_transaction_pool_api::TransactionPool for Transactions {
_at: Self::Hash,
_source: TransactionSource,
_xts: Vec<TransactionFor<Self>>,
) -> Result<Vec<Result<node_primitives::Hash, Self::Error>>, Self::Error> {
) -> Result<Vec<Result<pez_node_primitives::Hash, Self::Error>>, Self::Error> {
unimplemented!()
}
+1 -1
View File
@@ -19,7 +19,7 @@
use std::{collections::HashMap, sync::Arc};
use kvdb::KeyValueDB;
use node_primitives::Hash;
use pez_node_primitives::Hash;
use pezsp_trie::{trie_types::TrieDBMutBuilderV1, TrieMut};
use crate::simple_trie::SimpleTrie;
+2 -2
View File
@@ -32,8 +32,8 @@
use std::borrow::Cow;
use node_primitives::Block;
use node_testing::bench::{BenchDb, BlockType, DatabaseType, KeyTypes};
use pez_node_primitives::Block;
use pez_node_testing::bench::{BenchDb, BlockType, DatabaseType, KeyTypes};
use pezsc_client_api::backend::Backend;
use crate::{
+2 -2
View File
@@ -30,7 +30,7 @@ mod txpool;
use clap::Parser;
use node_testing::bench::{BlockType, DatabaseType as BenchDataBaseType, KeyTypes};
use pez_node_testing::bench::{BlockType, DatabaseType as BenchDataBaseType, KeyTypes};
use crate::{
common::SizeType,
@@ -43,7 +43,7 @@ use crate::{
};
#[derive(Debug, Parser)]
#[command(name = "node-bench", about = "Node integration benchmarks")]
#[command(name = "pez-node-bench", about = "Node integration benchmarks")]
struct Opt {
/// Show list of all available benchmarks.
///
+1 -1
View File
@@ -20,7 +20,7 @@ use std::{collections::HashMap, sync::Arc};
use hash_db::{AsHashDB, HashDB, Hasher as _, Prefix};
use kvdb::KeyValueDB;
use node_primitives::Hash;
use pez_node_primitives::Hash;
use pezsp_trie::DBValue;
pub type Hasher = pezsp_core::Blake2Hasher;
+1 -1
View File
@@ -29,7 +29,7 @@ use std::{
sync::{Arc, LazyLock},
};
use node_primitives::Hash;
use pez_node_primitives::Hash;
use crate::{
core::{self, Mode, Path},
+1 -1
View File
@@ -23,7 +23,7 @@
use std::borrow::Cow;
use node_testing::bench::{BenchDb, BlockType, DatabaseType, KeyTypes};
use pez_node_testing::bench::{BenchDb, BlockType, DatabaseType, KeyTypes};
use pezsc_transaction_pool::BasicPool;
use pezsc_transaction_pool_api::{TransactionPool, TransactionSource};