fix(ci): fix check-toml-format, check-licenses-headers, check-zepter

- taplo.toml: add .cargo/** to exclude list (prevents scanning cached registry files)
- deny.toml: reformat with taplo (tab indentation, proper spacing)
- pezpallets: add Apache-2.0 SPDX license header to 51 files missing headers
  (referral, trust, perwerde, pez-treasury, pez-rewards, welati, token-wrapper,
   messaging, staking-score, presale, identity-kyc)
- ci: check-zepter: prepend $HOME/.cargo/bin to PATH after cargo install
  so newly installed 1.82.1 takes precedence over system 1.78.2
- identity-kyc: fix clippy::needless_borrows_for_generic_args at lib.rs:326
This commit is contained in:
Kurdistan Tech Ministry committed 2026-04-22 04:52:25 +03:00
1 parent 857b63130d
commit 99be20ba05
54 files changed
+314 -57

No files matched your search

+1
View File
@@ -7,6 +7,7 @@ exclude = [
"**/zombienet/**",
"**/zombienet_tests/**",
"target/**",
".cargo/**",
]
# global rules
+1
View File
@@ -103,6 +103,7 @@ check-zepter:
script:
- cargo metadata --format-version=1 --locked > /dev/null
- cargo install zepter@1.82.1 --force
- export PATH="$HOME/.cargo/bin:$PATH"
- zepter --version
- zepter run check
+56 -56
View File
@@ -3,9 +3,9 @@
[graph]
targets = [
{ triple = "wasm32-unknown-unknown" },
{ triple = "x86_64-unknown-linux-gnu" },
{ triple = "x86_64-unknown-linux-musl" },
{ triple = "wasm32-unknown-unknown" },
{ triple = "x86_64-unknown-linux-gnu" },
{ triple = "x86_64-unknown-linux-musl" },
]
# all-features prevents krates 0.20+ from panicking with "unable to locate std"
# on workspace crates that have a std feature but don't enable it by default.
@@ -20,36 +20,36 @@ yanked = "warn"
# Track via quarterly review instead of blocking CI.
unmaintained = "none"
ignore = [
# ── wasmtime ──────────────────────────────────────────────────────────────
# Fix requires wasmtime 42.0.2+ → cranelift-assembler-x64 0.129+ → rustc 1.91.0+
# Toolchain pinned to 1.88.0. Unblock when toolchain upgrades.
# We do NOT use Winch backend, Component Model, or 64-bit tables;
# most CVEs below only affect those code paths.
"RUSTSEC-2026-0006", # wasmtime: segfault with f64.copysign on x86-64
"RUSTSEC-2026-0020", # wasmtime: WASI guest-controlled resource exhaustion
"RUSTSEC-2026-0021", # wasmtime: panic in wasi:http/types.fields
"RUSTSEC-2026-0085", # wasmtime: panic lifting flags component value
"RUSTSEC-2026-0086", # wasmtime: host data leakage 64-bit tables + Winch
"RUSTSEC-2026-0087", # wasmtime: segfault f64x2.splat on Cranelift x86-64
"RUSTSEC-2026-0088", # wasmtime: data leakage pooling allocator instances
"RUSTSEC-2026-0089", # wasmtime: host panic table.fill with Winch
"RUSTSEC-2026-0091", # wasmtime: OOB write transcoding component model strings
"RUSTSEC-2026-0092", # wasmtime: panic transcoding misaligned UTF-16 strings
"RUSTSEC-2026-0093", # wasmtime: heap OOB read UTF-16 to latin1+utf16
"RUSTSEC-2026-0094", # wasmtime: masked return value table.grow Winch
"RUSTSEC-2026-0095", # wasmtime: Winch sandbox-escaping memory access
"RUSTSEC-2026-0096", # wasmtime: miscompiled guest heap aarch64 Cranelift
# ── wasmtime ──────────────────────────────────────────────────────────────
# Fix requires wasmtime 42.0.2+ → cranelift-assembler-x64 0.129+ → rustc 1.91.0+
# Toolchain pinned to 1.88.0. Unblock when toolchain upgrades.
# We do NOT use Winch backend, Component Model, or 64-bit tables;
# most CVEs below only affect those code paths.
"RUSTSEC-2026-0006", # wasmtime: segfault with f64.copysign on x86-64
"RUSTSEC-2026-0020", # wasmtime: WASI guest-controlled resource exhaustion
"RUSTSEC-2026-0021", # wasmtime: panic in wasi:http/types.fields
"RUSTSEC-2026-0085", # wasmtime: panic lifting flags component value
"RUSTSEC-2026-0086", # wasmtime: host data leakage 64-bit tables + Winch
"RUSTSEC-2026-0087", # wasmtime: segfault f64x2.splat on Cranelift x86-64
"RUSTSEC-2026-0088", # wasmtime: data leakage pooling allocator instances
"RUSTSEC-2026-0089", # wasmtime: host panic table.fill with Winch
"RUSTSEC-2026-0091", # wasmtime: OOB write transcoding component model strings
"RUSTSEC-2026-0092", # wasmtime: panic transcoding misaligned UTF-16 strings
"RUSTSEC-2026-0093", # wasmtime: heap OOB read UTF-16 to latin1+utf16
"RUSTSEC-2026-0094", # wasmtime: masked return value table.grow Winch
"RUSTSEC-2026-0095", # wasmtime: Winch sandbox-escaping memory access
"RUSTSEC-2026-0096", # wasmtime: miscompiled guest heap aarch64 Cranelift
# ── rand 0.9.2 ────────────────────────────────────────────────────────────
# Unsound only when a custom Rust logger calls rand::rng() during init.
# No custom logger in our stack. No fixed version available yet.
"RUSTSEC-2026-0097", # rand: unsound with custom logger using rand::rng()
# ── rand 0.9.2 ────────────────────────────────────────────────────────────
# Unsound only when a custom Rust logger calls rand::rng() during init.
# No custom logger in our stack. No fixed version available yet.
"RUSTSEC-2026-0097", # rand: unsound with custom logger using rand::rng()
# ── webpki ────────────────────────────────────────────────────────────────
# Name-constraints validation bugs in transitive webpki dep.
# We do not rely on certificate name constraints in our P2P/RPC stack.
"RUSTSEC-2026-0098", # webpki: URI name constraints incorrectly accepted
"RUSTSEC-2026-0099", # webpki: wildcard name constraints incorrectly accepted
# ── webpki ────────────────────────────────────────────────────────────────
# Name-constraints validation bugs in transitive webpki dep.
# We do not rely on certificate name constraints in our P2P/RPC stack.
"RUSTSEC-2026-0098", # webpki: URI name constraints incorrectly accepted
"RUSTSEC-2026-0099", # webpki: wildcard name constraints incorrectly accepted
]
# License compliance
@@ -58,31 +58,31 @@ ignore = [
[licenses]
confidence-threshold = 0.8
allow = [
"Apache-2.0 WITH LLVM-exception",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause",
"BSL-1.0",
"CC0-1.0",
"CDLA-Permissive-2.0",
"GPL-3.0-only WITH Classpath-exception-2.0",
"GPL-3.0-only",
"GPL-3.0-or-later WITH Classpath-exception-2.0",
"GPL-3.0-or-later",
"ISC",
"MIT",
"MIT-0",
"MPL-2.0",
"NCSA",
"OpenSSL",
"Unicode-3.0",
"Unicode-DFS-2016",
"Unlicense",
"Zlib",
"Apache-2.0 WITH LLVM-exception",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause",
"BSL-1.0",
"CC0-1.0",
"CDLA-Permissive-2.0",
"GPL-3.0-only WITH Classpath-exception-2.0",
"GPL-3.0-only",
"GPL-3.0-or-later WITH Classpath-exception-2.0",
"GPL-3.0-or-later",
"ISC",
"MIT",
"MIT-0",
"MPL-2.0",
"NCSA",
"OpenSSL",
"Unicode-3.0",
"Unicode-DFS-2016",
"Unlicense",
"Zlib",
]
exceptions = [
# ring uses a custom ISC-style license
{ allow = ["OpenSSL"], name = "ring" },
# ring uses a custom ISC-style license
{ allow = ["OpenSSL"], name = "ring" },
]
[licenses.private]
@@ -103,6 +103,6 @@ unknown-registry = "warn"
unknown-git = "warn"
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
allow-git = [
# Our serde fork with wasm32v1-none target fix (pending upstream merge)
"https://github.com/pezkuwichain/serde.git",
# Our serde fork with wasm32v1-none target fix (pending upstream merge)
"https://github.com/pezkuwichain/serde.git",
]
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
//! Benchmarking setup for pezpallet-identity-kyc
use super::*;
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
#![cfg_attr(not(feature = "std"), no_std)]
//! # Identity & KYC Pezpallet - TRUSTLESS MODEL
@@ -323,7 +328,7 @@ pub mod pezpallet {
// Identity hash must be unique - no other account can use the same hash
ensure!(
!IdentityHashToAccount::<T>::contains_key(&identity_hash),
!IdentityHashToAccount::<T>::contains_key(identity_hash),
Error::<T>::IdentityHashAlreadyUsed
);
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
use crate as pezpallet_identity_kyc;
use pezframe_support::{construct_runtime, derive_impl, parameter_types, traits::ConstU128};
use pezframe_system::EnsureRoot;
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
use crate::{mock::*, types::KycLevel, Error, Event};
use pezframe_support::{assert_noop, assert_ok, traits::Currency};
use pezsp_core::H256;
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
//! Benchmarking setup for pezpallet-messaging
//!
//! Run benchmarks with:
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
use crate as pezpallet_messaging;
use pezframe_support::{
derive_impl,
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
use crate::{mock::*, Error, Event, *};
use pezframe_support::{assert_noop, assert_ok};
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
//! Benchmarking setup for pezpallet-perwerde
use super::{Pezpallet as Perwerde, *};
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
#![cfg_attr(not(feature = "std"), no_std)]
//! # Perwerde (Education) Pezpallet
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
use crate as pezpallet_perwerde;
use pezframe_support::{
construct_runtime, parameter_types,
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
use crate::{
mock::{new_test_ext, Perwerde as PerwerdePallet, RuntimeOrigin, System, Test},
Event,
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
// pezkuwi/pallets/pez-rewards/src/benchmarking.rs
use super::{BalanceOf, Call, Config};
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
#![cfg_attr(not(feature = "std"), no_std)]
//! # PEZ Rewards Pezpallet
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
// pezkuwi/pallets/pez-rewards/src/mock.rs (v1.0 - dev_accounts FIXED)
use crate as pezpallet_pez_rewards;
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
// tests.rs (v11 - Final Bug Fixes)
use crate::{mock::*, EpochState, Error, Event};
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
// pezkuwi/pallets/pez-treasury/src/benchmarking.rs
use super::*;
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
#![cfg_attr(not(feature = "std"), no_std)]
//! # PEZ Treasury Pezpallet
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
//! Storage migrations for pezpallet-pez-treasury
use super::*;
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
// pezkuwi/pallets/pez-treasury/src/mock.rs
// VERSION 3: AccountId tipi H256 yapıldı (u64 yerine)
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
// pezkuwi/pallets/pez-treasury/src/tests.rs
use crate::{mock::*, Error, Event};
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
//! Autogenerated weights for `pezpallet_pez_treasury`
//!
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
//! Benchmarking setup for pezpallet-presale
//!
//! Complete benchmarks for all presale operations including:
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
use crate as pezpallet_presale;
use pezframe_support::{
parameter_types,
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
//! Benchmarking setup for pezpallet-referral
use super::*;
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
#![cfg_attr(not(feature = "std"), no_std)]
//! # Referral Pezpallet
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
// pezkuwi/pallets/referral/src/mock.rs (Updated for new trustless model)
use crate as pezpallet_referral;
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
use crate::{
mock::*, Error, Event, PendingReferrals, ReferralCount, Referrals, ReferrerStatsStorage,
};
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
use codec::{Decode, Encode, MaxEncodedLen};
use pezframe_support::pezpallet_prelude::RuntimeDebug;
use scale_info::TypeInfo;
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
//! Benchmarking setup for pezpallet-staking-score
use crate::{
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
//! Simplified mock runtime for pezpallet-staking-score.
//! No real staking pallet - all data comes via CachedStakingDetails.
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
//! Tests for pezpallet-staking-score.
//! All tests use receive_staking_details to populate CachedStakingDetails,
//! mirroring the real People Chain architecture.
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
//! Benchmarking setup for pezpallet-tiki
use super::*;
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
//! Custom Origin verification mechanisms based on Tiki ownership.
//!
//! This module provides `EnsureOrigin` implementations that verify
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
#![cfg_attr(not(feature = "std"), no_std)]
//! # Tiki (Role) Pezpallet
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
//! Storage migrations for pezpallet-tiki
use super::*;
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
use crate as pezpallet_tiki;
use crate::Tiki as TikiEnum;
use pezframe_support::{
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
use crate::{
mock::*, Error, Event, RoleAssignmentType, Tiki as TikiEnum, TikiProvider, TikiScoreProvider,
};
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
//! Benchmarking setup for pezpallet-token-wrapper
use super::*;
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
#![cfg_attr(not(feature = "std"), no_std)]
//! # Token Wrapper Pezpallet
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
use crate as pezpallet_token_wrapper;
use pezframe_support::{
construct_runtime, parameter_types,
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
use super::*;
use crate::mock::*;
use pezframe_support::{assert_noop, assert_ok};
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
//! Benchmarking setup for pezpallet-trust
//!
//! These benchmarks measure the performance of trust score operations.
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
#![cfg_attr(not(feature = "std"), no_std)]
//! # Trust Score Pezpallet
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
use crate as pezpallet_trust;
use pezframe_support::{
derive_impl, parameter_types,
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
use crate::{mock::*, Error, Event};
use pezframe_support::{assert_noop, assert_ok};
use pezsp_runtime::traits::BadOrigin;
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
use super::*;
use crate::types::*;
use pezframe_benchmarking::v2::*;
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
#![cfg_attr(not(feature = "std"), no_std)]
//! # Welati (Governance) Pezpallet
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
//! Storage migrations for pezpallet-welati (Governance)
use super::*;
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
use crate::{self as pezpallet_welati, *};
use pezframe_support::{
assert_ok, construct_runtime, derive_impl, parameter_types,
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
use crate::{
mock::{
add_parliament_member, last_event, run_to_block, ExtBuilder, RuntimeEvent, RuntimeOrigin,
@@ -1,3 +1,8 @@
// This file is part of PezkuwiChain.
// Copyright (C) Dijital Kurdistan Tech Institute
// SPDX-License-Identifier: Apache-2.0
use codec::{Decode, Encode, MaxEncodedLen};
use pezframe_support::pezpallet_prelude::*;
use pezframe_system::{pezpallet_prelude::BlockNumberFor, Config as SystemConfig};