fix: Resolve cargo clippy errors and add CI workflow plan
## Changes
### Clippy Fixes
- Fixed deprecated `cargo_bin` usage in 27 test files (added #![allow(deprecated)])
- Fixed uninlined_format_args in zombienet-sdk-tests
- Fixed subxt API changes in revive/rpc/tests.rs (fetch signature, StorageValue)
- Fixed dead_code warnings in validator-pool and identity-kyc mocks
- Fixed field name `i` -> `_i` in tasks example
### CI Infrastructure
- Added .claude/WORKFLOW_PLAN.md for tracking CI fix progress
- Updated lychee.toml and taplo.toml configs
### Files Modified
- 27 test files with deprecated cargo_bin fix
- bizinikiwi/pezframe/revive/rpc/src/tests.rs (subxt API)
- pezkuwi/pezpallets/validator-pool/src/{mock,tests}.rs
- pezcumulus/teyrchains/pezpallets/identity-kyc/src/mock.rs
- bizinikiwi/pezframe/examples/tasks/src/tests.rs
## Status
- cargo clippy: PASSING
- Next: cargo fmt, zepter, workspace checks
This commit is contained in:
@@ -23,22 +23,20 @@ chrono = { workspace = true }
|
||||
clap = { features = ["derive"], workspace = true }
|
||||
codec = { workspace = true, default-features = true }
|
||||
comfy-table = { workspace = true }
|
||||
pezcumulus-client-teyrchain-inherent = { workspace = true, default-features = true }
|
||||
pezcumulus-primitives-proof-size-hostfunction = { workspace = true, default-features = true }
|
||||
env_filter = { workspace = true }
|
||||
pezframe-benchmarking = { workspace = true, default-features = true }
|
||||
frame-storage-access-test-runtime = { workspace = true, default-features = true }
|
||||
pezframe-support = { workspace = true, default-features = true }
|
||||
pezframe-system = { workspace = true, default-features = true }
|
||||
gethostname = { workspace = true }
|
||||
handlebars = { workspace = true }
|
||||
itertools = { workspace = true }
|
||||
linked-hash-map = { workspace = true }
|
||||
log = { workspace = true, default-features = true }
|
||||
pezcumulus-client-teyrchain-inherent = { workspace = true, default-features = true }
|
||||
pezcumulus-primitives-proof-size-hostfunction = { workspace = true, default-features = true }
|
||||
pezframe-benchmarking = { workspace = true, default-features = true }
|
||||
pezframe-support = { workspace = true, default-features = true }
|
||||
pezframe-system = { workspace = true, default-features = true }
|
||||
pezkuwi-primitives = { workspace = true, default-features = true }
|
||||
pezkuwi-teyrchain-primitives = { workspace = true, default-features = true }
|
||||
rand = { features = ["small_rng"], workspace = true, default-features = true }
|
||||
rand_pcg = { workspace = true }
|
||||
pezsc-block-builder = { workspace = true, default-features = true }
|
||||
pezsc-chain-spec = { workspace = true }
|
||||
pezsc-cli = { workspace = true, default-features = false }
|
||||
@@ -50,8 +48,6 @@ pezsc-executor-wasmtime = { workspace = true }
|
||||
pezsc-runtime-utilities = { workspace = true, default-features = true }
|
||||
pezsc-service = { workspace = true, default-features = false }
|
||||
pezsc-sysinfo = { workspace = true, default-features = true }
|
||||
serde = { workspace = true, default-features = true }
|
||||
serde_json = { workspace = true, default-features = true }
|
||||
pezsp-api = { workspace = true, default-features = true }
|
||||
pezsp-block-builder = { workspace = true, default-features = true }
|
||||
pezsp-blockchain = { workspace = true, default-features = true }
|
||||
@@ -71,52 +67,56 @@ pezsp-transaction-pool = { workspace = true, default-features = true }
|
||||
pezsp-trie = { workspace = true, default-features = true }
|
||||
pezsp-version = { workspace = true, default-features = true }
|
||||
pezsp-wasm-interface = { workspace = true, default-features = true }
|
||||
subxt = { workspace = true, features = ["native"] }
|
||||
subxt-signer = { workspace = true, features = ["unstable-eth"] }
|
||||
rand = { features = ["small_rng"], workspace = true, default-features = true }
|
||||
rand_pcg = { workspace = true }
|
||||
serde = { workspace = true, default-features = true }
|
||||
serde_json = { workspace = true, default-features = true }
|
||||
pezkuwi-subxt = { workspace = true, features = ["native"] }
|
||||
pezkuwi-subxt-signer = { workspace = true, features = ["unstable-eth", "sr25519", "subxt"] }
|
||||
thiserror = { workspace = true }
|
||||
thousands = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
pezcumulus-test-runtime = { workspace = true, default-features = true }
|
||||
bizinikiwi-test-runtime = { workspace = true, default-features = true }
|
||||
pezcumulus-test-runtime = { workspace = true, default-features = true }
|
||||
zagros-runtime = { workspace = true, default-features = true }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
runtime-benchmarks = [
|
||||
"pezcumulus-client-teyrchain-inherent/runtime-benchmarks",
|
||||
"pezcumulus-primitives-proof-size-hostfunction/runtime-benchmarks",
|
||||
"pezcumulus-test-runtime/runtime-benchmarks",
|
||||
"pezframe-benchmarking/runtime-benchmarks",
|
||||
"frame-storage-access-test-runtime/runtime-benchmarks",
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
"pezframe-system/runtime-benchmarks",
|
||||
"pezkuwi-primitives/runtime-benchmarks",
|
||||
"pezkuwi-teyrchain-primitives/runtime-benchmarks",
|
||||
"pezsc-block-builder/runtime-benchmarks",
|
||||
"pezsc-chain-spec/runtime-benchmarks",
|
||||
"pezsc-cli/runtime-benchmarks",
|
||||
"pezsc-client-api/runtime-benchmarks",
|
||||
"pezsc-client-db/runtime-benchmarks",
|
||||
"pezsc-executor-wasmtime/runtime-benchmarks",
|
||||
"pezsc-executor/runtime-benchmarks",
|
||||
"pezsc-runtime-utilities/runtime-benchmarks",
|
||||
"pezsc-service/runtime-benchmarks",
|
||||
"pezsc-sysinfo/runtime-benchmarks",
|
||||
"pezsp-api/runtime-benchmarks",
|
||||
"pezsp-block-builder/runtime-benchmarks",
|
||||
"pezsp-blockchain/runtime-benchmarks",
|
||||
"pezsp-genesis-builder/runtime-benchmarks",
|
||||
"pezsp-inherents/runtime-benchmarks",
|
||||
"pezsp-io/runtime-benchmarks",
|
||||
"pezsp-runtime-interface/runtime-benchmarks",
|
||||
"pezsp-runtime/runtime-benchmarks",
|
||||
"pezsp-state-machine/runtime-benchmarks",
|
||||
"pezsp-timestamp/runtime-benchmarks",
|
||||
"pezsp-transaction-pool/runtime-benchmarks",
|
||||
"pezsp-trie/runtime-benchmarks",
|
||||
"pezsp-version/runtime-benchmarks",
|
||||
"bizinikiwi-test-runtime/runtime-benchmarks",
|
||||
"zagros-runtime/runtime-benchmarks",
|
||||
"bizinikiwi-test-runtime/runtime-benchmarks",
|
||||
"frame-storage-access-test-runtime/runtime-benchmarks",
|
||||
"pezcumulus-client-teyrchain-inherent/runtime-benchmarks",
|
||||
"pezcumulus-primitives-proof-size-hostfunction/runtime-benchmarks",
|
||||
"pezcumulus-test-runtime/runtime-benchmarks",
|
||||
"pezframe-benchmarking/runtime-benchmarks",
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
"pezframe-system/runtime-benchmarks",
|
||||
"pezkuwi-primitives/runtime-benchmarks",
|
||||
"pezkuwi-teyrchain-primitives/runtime-benchmarks",
|
||||
"pezsc-block-builder/runtime-benchmarks",
|
||||
"pezsc-chain-spec/runtime-benchmarks",
|
||||
"pezsc-cli/runtime-benchmarks",
|
||||
"pezsc-client-api/runtime-benchmarks",
|
||||
"pezsc-client-db/runtime-benchmarks",
|
||||
"pezsc-executor-wasmtime/runtime-benchmarks",
|
||||
"pezsc-executor/runtime-benchmarks",
|
||||
"pezsc-runtime-utilities/runtime-benchmarks",
|
||||
"pezsc-service/runtime-benchmarks",
|
||||
"pezsc-sysinfo/runtime-benchmarks",
|
||||
"pezsp-api/runtime-benchmarks",
|
||||
"pezsp-block-builder/runtime-benchmarks",
|
||||
"pezsp-blockchain/runtime-benchmarks",
|
||||
"pezsp-genesis-builder/runtime-benchmarks",
|
||||
"pezsp-inherents/runtime-benchmarks",
|
||||
"pezsp-io/runtime-benchmarks",
|
||||
"pezsp-runtime-interface/runtime-benchmarks",
|
||||
"pezsp-runtime/runtime-benchmarks",
|
||||
"pezsp-state-machine/runtime-benchmarks",
|
||||
"pezsp-timestamp/runtime-benchmarks",
|
||||
"pezsp-transaction-pool/runtime-benchmarks",
|
||||
"pezsp-trie/runtime-benchmarks",
|
||||
"pezsp-version/runtime-benchmarks",
|
||||
"zagros-runtime/runtime-benchmarks",
|
||||
]
|
||||
rocksdb = ["pezsc-cli/rocksdb", "pezsc-client-db/rocksdb"]
|
||||
|
||||
@@ -70,7 +70,7 @@ use std::{
|
||||
path::PathBuf,
|
||||
sync::Arc,
|
||||
};
|
||||
use subxt::{client::RuntimeVersion, ext::futures, Metadata};
|
||||
use pezkuwi_subxt::{client::RuntimeVersion, ext::futures, Metadata};
|
||||
|
||||
const DEFAULT_PARA_ID: u32 = 100;
|
||||
const LOG_TARGET: &'static str = "pezkuwi_sdk_frame::benchmark::overhead";
|
||||
@@ -366,7 +366,7 @@ impl OverheadCmd {
|
||||
{
|
||||
self.run_with_extrinsic_builder_and_spec::<Block, ExtraHF>(
|
||||
Box::new(|metadata, hash, version| {
|
||||
let genesis = subxt::utils::H256::from(hash.to_fixed_bytes());
|
||||
let genesis = pezkuwi_subxt::utils::H256::from(hash.to_fixed_bytes());
|
||||
Box::new(BizinikiwiRemarkBuilder::new(metadata, genesis, version)) as Box<_>
|
||||
}),
|
||||
chain_spec,
|
||||
@@ -406,7 +406,7 @@ impl OverheadCmd {
|
||||
.map_err(|_| {
|
||||
<&str as Into<pezsc_cli::Error>>::into("Unable to fetch latest stable metadata")
|
||||
})?;
|
||||
let metadata = subxt::Metadata::decode(&mut (*opaque_metadata).as_slice())?;
|
||||
let metadata = pezkuwi_subxt::Metadata::decode(&mut (*opaque_metadata).as_slice())?;
|
||||
|
||||
// At this point we know what kind of chain we are dealing with.
|
||||
let chain_type = identify_chain(&metadata, para_id);
|
||||
@@ -699,7 +699,7 @@ mod tests {
|
||||
.to_vec();
|
||||
let opaque_metadata =
|
||||
super::fetch_latest_metadata_from_code_blob(&executor, code_bytes.into()).unwrap();
|
||||
let metadata = subxt::Metadata::decode(&mut (*opaque_metadata).as_slice()).unwrap();
|
||||
let metadata = pezkuwi_subxt::Metadata::decode(&mut (*opaque_metadata).as_slice()).unwrap();
|
||||
let chain_type = identify_chain(&metadata, None);
|
||||
assert_eq!(chain_type, ChainType::Relaychain);
|
||||
assert_eq!(chain_type.requires_proof_recording(), false);
|
||||
@@ -713,7 +713,7 @@ mod tests {
|
||||
.to_vec();
|
||||
let opaque_metadata =
|
||||
super::fetch_latest_metadata_from_code_blob(&executor, code_bytes.into()).unwrap();
|
||||
let metadata = subxt::Metadata::decode(&mut (*opaque_metadata).as_slice()).unwrap();
|
||||
let metadata = pezkuwi_subxt::Metadata::decode(&mut (*opaque_metadata).as_slice()).unwrap();
|
||||
let chain_type = identify_chain(&metadata, Some(100));
|
||||
assert_eq!(chain_type, ChainType::Teyrchain(100));
|
||||
assert!(chain_type.requires_proof_recording());
|
||||
@@ -728,7 +728,7 @@ mod tests {
|
||||
.to_vec();
|
||||
let opaque_metadata =
|
||||
super::fetch_latest_metadata_from_code_blob(&executor, code_bytes.into()).unwrap();
|
||||
let metadata = subxt::Metadata::decode(&mut (*opaque_metadata).as_slice()).unwrap();
|
||||
let metadata = pezkuwi_subxt::Metadata::decode(&mut (*opaque_metadata).as_slice()).unwrap();
|
||||
let chain_type = identify_chain(&metadata, None);
|
||||
assert_eq!(chain_type, ChainType::Unknown);
|
||||
assert_eq!(chain_type.requires_proof_recording(), false);
|
||||
|
||||
@@ -21,16 +21,16 @@ use pezsc_client_api::UsageProvider;
|
||||
use pezsp_api::{ApiExt, Core, Metadata, ProvideRuntimeApi};
|
||||
use pezsp_runtime::{traits::Block as BlockT, OpaqueExtrinsic};
|
||||
use std::sync::Arc;
|
||||
use subxt::{
|
||||
use pezkuwi_subxt::{
|
||||
client::RuntimeVersion as SubxtRuntimeVersion,
|
||||
config::{substrate::SubstrateExtrinsicParamsBuilder, HashFor},
|
||||
Config, OfflineClient, SubstrateConfig,
|
||||
config::{bizinikiwi::BizinikiwiExtrinsicParamsBuilder as ParamsBuilder, HashFor},
|
||||
Config, OfflineClient, BizinikiwConfig,
|
||||
};
|
||||
|
||||
/// Bizinikiwi configuration - based on SubstrateConfig
|
||||
pub type BizinikiwiConfig = SubstrateConfig;
|
||||
/// Bizinikiwi extrinsic params builder - based on SubstrateExtrinsicParamsBuilder
|
||||
pub type BizinikiwiExtrinsicParamsBuilder = SubstrateExtrinsicParamsBuilder<BizinikiwiConfig>;
|
||||
/// Bizinikiwi configuration
|
||||
pub type BizinikiwiConfig = BizinikiwConfig;
|
||||
/// Bizinikiwi extrinsic params builder
|
||||
pub type BizinikiwiExtrinsicParamsBuilder = ParamsBuilder<BizinikiwiConfig>;
|
||||
|
||||
pub type BizinikiwiRemarkBuilder = DynamicRemarkBuilder<BizinikiwiConfig>;
|
||||
|
||||
@@ -83,7 +83,7 @@ impl<C: Config> DynamicRemarkBuilder<C> {
|
||||
spec_version: version.spec_version,
|
||||
transaction_version: version.transaction_version,
|
||||
};
|
||||
let metadata = subxt::Metadata::decode(&mut (*opaque_metadata).as_slice())?;
|
||||
let metadata = pezkuwi_subxt::Metadata::decode(&mut (*opaque_metadata).as_slice())?;
|
||||
let genesis = HashFor::<C>::decode(&mut &genesis.encode()[..])
|
||||
.map_err(|_| "Incompatible hash types?")?;
|
||||
|
||||
@@ -94,7 +94,7 @@ impl<C: Config> DynamicRemarkBuilder<C> {
|
||||
impl<C: Config> DynamicRemarkBuilder<C> {
|
||||
/// Constructs a new remark builder.
|
||||
pub fn new(
|
||||
metadata: subxt::Metadata,
|
||||
metadata: pezkuwi_subxt::Metadata,
|
||||
genesis_hash: HashFor<C>,
|
||||
runtime_version: SubxtRuntimeVersion,
|
||||
) -> Self {
|
||||
@@ -112,8 +112,8 @@ impl ExtrinsicBuilder for DynamicRemarkBuilder<BizinikiwiConfig> {
|
||||
}
|
||||
|
||||
fn build(&self, nonce: u32) -> std::result::Result<OpaqueExtrinsic, &'static str> {
|
||||
let signer = subxt_signer::sr25519::dev::alice();
|
||||
let dynamic_tx = subxt::dynamic::tx("System", "remark", vec![Vec::<u8>::new()]);
|
||||
let signer = pezkuwi_subxt_signer::sr25519::dev::alice();
|
||||
let dynamic_tx = pezkuwi_subxt::dynamic::tx("System", "remark", vec![Vec::<u8>::new()]);
|
||||
|
||||
let params = BizinikiwiExtrinsicParamsBuilder::new().nonce(nonce.into()).build();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user