feat: Rebrand Polkadot/Substrate references to PezkuwiChain

This commit systematically rebrands various references from Parity Technologies'
Polkadot/Substrate ecosystem to PezkuwiChain within the kurdistan-sdk.

Key changes include:
- Updated external repository URLs (zombienet-sdk, parity-db, parity-scale-codec, wasm-instrument) to point to pezkuwichain forks.
- Modified internal documentation and code comments to reflect PezkuwiChain naming and structure.
- Replaced direct references to  with  or specific paths within the  for XCM, Pezkuwi, and other modules.
- Cleaned up deprecated  issue and PR references in various  and  files, particularly in  and  modules.
- Adjusted image and logo URLs in documentation to point to PezkuwiChain assets.
- Removed or rephrased comments related to external Polkadot/Substrate PRs and issues.

This is a significant step towards fully customizing the SDK for the PezkuwiChain ecosystem.
This commit is contained in:
Kurdistan Tech Ministry committed 2025-12-14 00:04:10 +03:00
1 parent e4778b4576
commit 379cb741ed
9082 files changed
+997824 -997542

No files matched your search

+32 -32
View File
@@ -21,18 +21,18 @@ scale-info = { features = ["bit-vec", "derive", "serde"], workspace = true }
serde = { features = ["alloc", "derive"], workspace = true }
thiserror = { workspace = true, optional = true }
sp-api = { workspace = true }
sp-application-crypto = { features = ["serde"], workspace = true }
sp-arithmetic = { features = ["serde"], workspace = true }
sp-authority-discovery = { features = ["serde"], workspace = true }
sp-consensus-slots = { features = ["serde"], workspace = true }
sp-core = { workspace = true }
sp-inherents = { workspace = true }
sp-io = { workspace = true }
sp-keystore = { optional = true, workspace = true }
sp-runtime = { workspace = true }
sp-staking = { features = ["serde"], workspace = true }
sp-std = { workspace = true, optional = true }
pezsp-api = { workspace = true }
pezsp-application-crypto = { features = ["serde"], workspace = true }
pezsp-arithmetic = { features = ["serde"], workspace = true }
pezsp-authority-discovery = { features = ["serde"], workspace = true }
pezsp-consensus-slots = { features = ["serde"], workspace = true }
pezsp-core = { workspace = true }
pezsp-inherents = { workspace = true }
pezsp-io = { workspace = true }
pezsp-keystore = { optional = true, workspace = true }
pezsp-runtime = { workspace = true }
pezsp-staking = { features = ["serde"], workspace = true }
pezsp-std = { workspace = true, optional = true }
pezkuwi-core-primitives = { workspace = true }
pezkuwi-teyrchain-primitives = { workspace = true }
@@ -48,30 +48,30 @@ std = [
"pezkuwi-teyrchain-primitives/std",
"scale-info/std",
"serde/std",
"sp-api/std",
"sp-application-crypto/std",
"sp-arithmetic/std",
"sp-authority-discovery/std",
"sp-consensus-slots/std",
"sp-core/std",
"sp-inherents/std",
"sp-io/std",
"sp-keystore",
"sp-keystore?/std",
"sp-runtime/std",
"sp-staking/std",
"sp-std/std",
"pezsp-api/std",
"pezsp-application-crypto/std",
"pezsp-arithmetic/std",
"pezsp-authority-discovery/std",
"pezsp-consensus-slots/std",
"pezsp-core/std",
"pezsp-inherents/std",
"pezsp-io/std",
"pezsp-keystore",
"pezsp-keystore?/std",
"pezsp-runtime/std",
"pezsp-staking/std",
"pezsp-std/std",
"thiserror",
]
runtime-benchmarks = [
"pezkuwi-core-primitives/runtime-benchmarks",
"pezkuwi-teyrchain-primitives/runtime-benchmarks",
"sp-api/runtime-benchmarks",
"sp-authority-discovery/runtime-benchmarks",
"sp-consensus-slots/runtime-benchmarks",
"sp-inherents/runtime-benchmarks",
"sp-io/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"sp-staking/runtime-benchmarks",
"pezsp-api/runtime-benchmarks",
"pezsp-authority-discovery/runtime-benchmarks",
"pezsp-consensus-slots/runtime-benchmarks",
"pezsp-inherents/runtime-benchmarks",
"pezsp-io/runtime-benchmarks",
"pezsp-runtime/runtime-benchmarks",
"pezsp-staking/runtime-benchmarks",
]
test = []
+4 -4
View File
@@ -37,7 +37,7 @@
//! Let's see a quick example:
//!
//! ```nocompile
//! sp_api::decl_runtime_apis! {
//! pezsp_api::decl_runtime_apis! {
//! #[api_version(2)]
//! pub trait MyApi {
//! fn fn1();
@@ -51,7 +51,7 @@
//!
//! struct Runtime {}
//!
//! sp_api::impl_runtime_apis! {
//! pezsp_api::impl_runtime_apis! {
//! #[api_version(3)]
//! impl self::MyApi<Block> for Runtime {
//! fn fn1() {}
@@ -84,7 +84,7 @@
//!
//! Hopefully this should be all you need to know in order to use versioned methods in the node.
//! For more details about how the API versioning works refer to `spi_api`
//! documentation [here](https://docs.pezkuwichain.io/rustdocs/latest/sp_api/macro.decl_runtime_apis.html).
//! documentation [here](https://docs.pezkuwichain.io/rustdocs/latest/pezsp_api/macro.decl_runtime_apis.html).
//!
//! # How versioned methods are used for `TeyrchainHost`
//!
@@ -129,7 +129,7 @@ use alloc::{
use pezkuwi_core_primitives as pcp;
use pezkuwi_teyrchain_primitives::primitives as ppp;
sp_api::decl_runtime_apis! {
pezsp_api::decl_runtime_apis! {
/// The API for querying the state of teyrchains on-chain.
#[api_version(5)]
pub trait TeyrchainHost {
+5 -5
View File
@@ -1,13 +1,13 @@
// pezkuwi/primitives/src/traits.rs
#![cfg_attr(not(feature = "std"), no_no_std)]
use frame_support::pallet_prelude::*;
use sp_runtime::traits::BlockNumber as BlockNumberT;
use sp_std::prelude::*;
use pezframe_support::pezpallet_prelude::*;
use pezsp_runtime::traits::BlockNumber as BlockNumberT;
use pezsp_std::prelude::*;
use codec::{Encode, Decode};
use scale_info::TypeInfo;
// `pallet-staking-score`'dan StakingDetails'ı doğrudan kullanabilmek için
// StakingDetails'ı burada yeniden tanımlıyoruz. Bu struct, pallet-staking-score'daki ile BİREBİR AYNI olmalı.
// `pezpallet-staking-score`'dan StakingDetails'ı doğrudan kullanabilmek için
// StakingDetails'ı burada yeniden tanımlıyoruz. Bu struct, pezpallet-staking-score'daki ile BİREBİR AYNI olmalı.
#[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo, Debug)]
pub struct StakingDetails<Balance> {
pub staked_amount: Balance,
+1 -1
View File
@@ -21,7 +21,7 @@ use super::*;
use alloc::vec::Vec;
use codec::{Decode, DecodeWithMemTracking, Encode};
use scale_info::TypeInfo;
use sp_core::RuntimeDebug;
use pezsp_core::RuntimeDebug;
/// Candidate's acceptance limitations for asynchronous backing per relay parent.
#[derive(
+29 -29
View File
@@ -27,16 +27,16 @@ use core::{
};
use scale_info::TypeInfo;
use sp_application_crypto::KeyTypeId;
use sp_arithmetic::{
use pezsp_application_crypto::KeyTypeId;
use pezsp_arithmetic::{
traits::{BaseArithmetic, Saturating},
Perbill,
};
use sp_core::RuntimeDebug;
use sp_inherents::InherentIdentifier;
use sp_runtime::traits::{AppVerify, Header as HeaderT};
use pezsp_core::RuntimeDebug;
use pezsp_inherents::InherentIdentifier;
use pezsp_runtime::traits::{AppVerify, Header as HeaderT};
pub use sp_runtime::traits::{BlakeTwo256, Hash as HashT};
pub use pezsp_runtime::traits::{BlakeTwo256, Hash as HashT};
// Export some core primitives.
pub use pezkuwi_core_primitives::v2::{
@@ -53,9 +53,9 @@ pub use pezkuwi_teyrchain_primitives::primitives::{
use serde::{Deserialize, Serialize};
pub use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
pub use sp_consensus_slots::Slot;
pub use sp_staking::SessionIndex;
pub use pezsp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
pub use pezsp_consensus_slots::Slot;
pub use pezsp_staking::SessionIndex;
/// Signed data.
mod signed;
@@ -81,7 +81,7 @@ pub const COLLATOR_KEY_TYPE_ID: KeyTypeId = KeyTypeId(*b"coll");
const LOG_TARGET: &str = "runtime::primitives";
mod collator_app {
use sp_application_crypto::{app_crypto, sr25519};
use pezsp_application_crypto::{app_crypto, sr25519};
app_crypto!(sr25519, super::COLLATOR_KEY_TYPE_ID);
}
@@ -99,7 +99,7 @@ pub type CollatorSignature = collator_app::Signature;
pub const PARACHAIN_KEY_TYPE_ID: KeyTypeId = KeyTypeId(*b"para");
mod validator_app {
use sp_application_crypto::{app_crypto, sr25519};
use pezsp_application_crypto::{app_crypto, sr25519};
app_crypto!(sr25519, super::PARACHAIN_KEY_TYPE_ID);
}
@@ -174,7 +174,7 @@ impl TypeIndex for ValidatorIndex {
}
}
sp_application_crypto::with_pair! {
pezsp_application_crypto::with_pair! {
/// A Parachain validator keypair.
pub type ValidatorPair = validator_app::Pair;
}
@@ -191,7 +191,7 @@ pub mod well_known_keys {
use alloc::vec::Vec;
use codec::Encode as _;
use hex_literal::hex;
use sp_io::hashing::twox_64;
use pezsp_io::hashing::twox_64;
// A note on generating these magic values below:
//
@@ -462,7 +462,7 @@ pub const DEFAULT_SCHEDULING_LOOKAHEAD: u32 = 3;
// The public key of a keypair used by a validator for determining assignments
/// to approve included parachain candidates.
mod assignment_app {
use sp_application_crypto::{app_crypto, sr25519};
use pezsp_application_crypto::{app_crypto, sr25519};
app_crypto!(sr25519, super::ASSIGNMENT_KEY_TYPE_ID);
}
@@ -470,7 +470,7 @@ mod assignment_app {
/// to approve included parachain candidates.
pub type AssignmentId = assignment_app::Public;
sp_application_crypto::with_pair! {
pezsp_application_crypto::with_pair! {
/// The full keypair used by a validator for determining assignments to approve included
/// parachain candidates.
pub type AssignmentPair = assignment_app::Pair;
@@ -1300,7 +1300,7 @@ impl From<ValidityError> for u8 {
}
/// Abridged version of `HostConfiguration` (from the `Configuration` parachains host runtime
/// module) meant to be used by a parachain or PDK such as cumulus.
/// module) meant to be used by a parachain or PDK such as pezcumulus.
#[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)]
#[cfg_attr(feature = "std", derive(PartialEq))]
pub struct AbridgedHostConfiguration {
@@ -1335,7 +1335,7 @@ pub struct AbridgedHostConfiguration {
}
/// Abridged version of `HrmpChannel` (from the `Hrmp` parachains host runtime module) meant to be
/// used by a parachain or PDK such as cumulus.
/// used by a parachain or PDK such as pezcumulus.
#[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)]
#[cfg_attr(feature = "std", derive(PartialEq))]
pub struct AbridgedHrmpChannel {
@@ -1395,7 +1395,7 @@ pub enum UpgradeGoAhead {
}
/// Consensus engine id for pezkuwi v1 consensus engine.
pub const PEZKUWI_ENGINE_ID: sp_runtime::ConsensusEngineId = *b"POL1";
pub const PEZKUWI_ENGINE_ID: pezsp_runtime::ConsensusEngineId = *b"POL1";
/// A consensus log item for pezkuwi validation. To be used with [`PEZKUWI_ENGINE_ID`].
#[derive(Decode, Encode, Clone, PartialEq, Eq)]
@@ -1425,18 +1425,18 @@ pub enum ConsensusLog {
impl ConsensusLog {
/// Attempt to convert a reference to a generic digest item into a consensus log.
pub fn from_digest_item(
digest_item: &sp_runtime::DigestItem,
digest_item: &pezsp_runtime::DigestItem,
) -> Result<Option<Self>, codec::Error> {
match digest_item {
sp_runtime::DigestItem::Consensus(id, encoded) if id == &PEZKUWI_ENGINE_ID =>
pezsp_runtime::DigestItem::Consensus(id, encoded) if id == &PEZKUWI_ENGINE_ID =>
Ok(Some(Self::decode(&mut &encoded[..])?)),
_ => Ok(None),
}
}
}
impl From<ConsensusLog> for sp_runtime::DigestItem {
fn from(c: ConsensusLog) -> sp_runtime::DigestItem {
impl From<ConsensusLog> for pezsp_runtime::DigestItem {
fn from(c: ConsensusLog) -> pezsp_runtime::DigestItem {
Self::Consensus(PEZKUWI_ENGINE_ID, c.encode())
}
}
@@ -1735,7 +1735,7 @@ impl ValidityAttestation {
#[derive(Clone, Eq, PartialEq, Default, Decode, Encode, RuntimeDebug)]
pub struct SigningContext<H = Hash> {
/// Current session index.
pub session_index: sp_staking::SessionIndex,
pub session_index: pezsp_staking::SessionIndex,
/// Hash of the parent.
pub parent_hash: H,
}
@@ -2018,7 +2018,7 @@ impl<T> AsRef<[u8]> for WellKnownKey<T> {
impl<T: Decode> WellKnownKey<T> {
/// Gets the value or `None` if it does not exist or decoding failed.
pub fn get(&self) -> Option<T> {
sp_io::storage::get(&self.key)
pezsp_io::storage::get(&self.key)
.and_then(|raw| codec::DecodeAll::decode_all(&mut raw.as_ref()).ok())
}
}
@@ -2026,7 +2026,7 @@ impl<T: Decode> WellKnownKey<T> {
impl<T: Encode> WellKnownKey<T> {
/// Sets the value.
pub fn set(&self, value: T) {
sp_io::storage::set(&self.key, &value.encode());
pezsp_io::storage::set(&self.key, &value.encode());
}
}
@@ -2084,7 +2084,7 @@ pub mod node_features {
#[derive(Clone, Copy)]
pub enum FeatureIndex {
/// Tells if tranch0 assignments could be sent in a single certificate.
/// Reserved for: `<https://github.com/paritytech/polkadot-sdk/issues/628>`
/// Reserved for: `<https://github.com/pezkuwichain/kurdistan-sdk/issues/99>`
EnableAssignmentsV2 = 0,
/// This feature enables the extension of `BackedCandidate::validator_indices` by 8 bits.
/// The value stored there represents the assumed core index where the candidates
@@ -2149,7 +2149,7 @@ pub struct SchedulerParams<BlockNumber> {
/// How many cores are managed by the coretime chain.
pub num_cores: u32,
/// Deprecated and no longer used by the runtime.
/// Removal is tracked by <https://github.com/paritytech/polkadot-sdk/issues/6067>.
/// Removal is tracked by <https://github.com/pezkuwichain/kurdistan-sdk/issues/98>.
#[deprecated]
pub max_availability_timeouts: u32,
/// The maximum queue size of the pay as you go module.
@@ -2162,7 +2162,7 @@ pub struct SchedulerParams<BlockNumber> {
/// The minimum amount needed to claim a slot in the spot pricing queue.
pub on_demand_base_fee: Balance,
/// Deprecated and no longer used by the runtime.
/// Removal is tracked by <https://github.com/paritytech/polkadot-sdk/issues/6067>.
/// Removal is tracked by <https://github.com/pezkuwichain/kurdistan-sdk/issues/98>.
#[deprecated]
pub ttl: BlockNumber,
}
@@ -2191,7 +2191,7 @@ impl<BlockNumber: Default + From<u32>> Default for SchedulerParams<BlockNumber>
pub mod tests {
use super::*;
use bitvec::bitvec;
use sp_core::sr25519;
use pezsp_core::sr25519;
/// Create a dummy committed candidate receipt
pub fn dummy_committed_candidate_receipt() -> CommittedCandidateReceipt {
+5 -5
View File
@@ -19,12 +19,12 @@ use scale_info::TypeInfo;
use alloc::vec::Vec;
#[cfg(feature = "std")]
use sp_application_crypto::AppCrypto;
use pezsp_application_crypto::AppCrypto;
#[cfg(feature = "std")]
use sp_keystore::{Error as KeystoreError, KeystorePtr};
use pezsp_keystore::{Error as KeystoreError, KeystorePtr};
use sp_core::RuntimeDebug;
use sp_runtime::traits::AppVerify;
use pezsp_core::RuntimeDebug;
use pezsp_runtime::traits::AppVerify;
use super::{SigningContext, ValidatorId, ValidatorIndex, ValidatorSignature};
@@ -312,7 +312,7 @@ impl<Payload: EncodeAs<RealPayload>, RealPayload: Encode> UncheckedSigned<Payloa
context: &SigningContext<H>,
validator_index: ValidatorIndex,
) -> Self {
use sp_application_crypto::RuntimeAppPublic;
use pezsp_application_crypto::RuntimeAppPublic;
let data = Self::payload_data(&payload, context);
let signature = public.sign(&data).unwrap();
+1 -1
View File
@@ -21,7 +21,7 @@ use super::*;
use alloc::vec::Vec;
use codec::{Decode, DecodeWithMemTracking, Encode};
use scale_info::TypeInfo;
use sp_core::RuntimeDebug;
use pezsp_core::RuntimeDebug;
use crate::CandidateDescriptorV2;
+27 -27
View File
@@ -32,25 +32,25 @@ use core::{
slice::{Iter, IterMut},
};
use sp_application_crypto::{ByteArray, KeyTypeId};
use sp_arithmetic::{
use pezsp_application_crypto::{ByteArray, KeyTypeId};
use pezsp_arithmetic::{
traits::{BaseArithmetic, Saturating},
Perbill,
};
use bounded_collections::BoundedVec;
use serde::{Deserialize, Serialize};
use sp_core::{ConstU32, RuntimeDebug};
use sp_inherents::InherentIdentifier;
use pezsp_core::{ConstU32, RuntimeDebug};
use pezsp_inherents::InherentIdentifier;
// ==========
// PUBLIC RE-EXPORTS
// ==========
pub use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
pub use sp_consensus_slots::Slot;
pub use sp_runtime::traits::{AppVerify, BlakeTwo256, Hash as HashT, Header as HeaderT};
pub use sp_staking::SessionIndex;
pub use pezsp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
pub use pezsp_consensus_slots::Slot;
pub use pezsp_runtime::traits::{AppVerify, BlakeTwo256, Hash as HashT, Header as HeaderT};
pub use pezsp_staking::SessionIndex;
// Export some core primitives.
pub use pezkuwi_core_primitives::v2::{
@@ -89,7 +89,7 @@ pub const COLLATOR_KEY_TYPE_ID: KeyTypeId = KeyTypeId(*b"coll");
const LOG_TARGET: &str = "runtime::primitives";
mod collator_app {
use sp_application_crypto::{app_crypto, sr25519};
use pezsp_application_crypto::{app_crypto, sr25519};
app_crypto!(sr25519, super::COLLATOR_KEY_TYPE_ID);
}
@@ -107,7 +107,7 @@ pub type CollatorSignature = collator_app::Signature;
pub const TEYRCHAIN_KEY_TYPE_ID: KeyTypeId = KeyTypeId(*b"para");
mod validator_app {
use sp_application_crypto::{app_crypto, sr25519};
use pezsp_application_crypto::{app_crypto, sr25519};
app_crypto!(sr25519, super::TEYRCHAIN_KEY_TYPE_ID);
}
@@ -169,7 +169,7 @@ impl From<u32> for ChunkIndex {
}
}
// We should really get https://github.com/paritytech/polkadot/issues/2403 going ..
// We should really get https://github.com/pezkuwichain/kurdistan-sdk/issues/133 going ..
impl From<u32> for ValidatorIndex {
fn from(n: u32) -> Self {
ValidatorIndex(n)
@@ -182,7 +182,7 @@ impl TypeIndex for ValidatorIndex {
}
}
sp_application_crypto::with_pair! {
pezsp_application_crypto::with_pair! {
/// A Teyrchain validator keypair.
pub type ValidatorPair = validator_app::Pair;
}
@@ -199,7 +199,7 @@ pub mod well_known_keys {
use alloc::vec::Vec;
use codec::Encode as _;
use hex_literal::hex;
use sp_io::hashing::twox_64;
use pezsp_io::hashing::twox_64;
// A note on generating these magic values below:
//
@@ -484,7 +484,7 @@ pub const DEFAULT_SCHEDULING_LOOKAHEAD: u32 = 3;
// The public key of a keypair used by a validator for determining assignments
/// to approve included teyrchain candidates.
mod assignment_app {
use sp_application_crypto::{app_crypto, sr25519};
use pezsp_application_crypto::{app_crypto, sr25519};
app_crypto!(sr25519, super::ASSIGNMENT_KEY_TYPE_ID);
}
@@ -492,7 +492,7 @@ mod assignment_app {
/// to approve included teyrchain candidates.
pub type AssignmentId = assignment_app::Public;
sp_application_crypto::with_pair! {
pezsp_application_crypto::with_pair! {
/// The full keypair used by a validator for determining assignments to approve included
/// teyrchain candidates.
pub type AssignmentPair = assignment_app::Pair;
@@ -838,7 +838,7 @@ impl<N: Saturating + BaseArithmetic + Copy> GroupRotationInfo<N> {
pub struct ScheduledCore {
/// The ID of a para scheduled.
pub para_id: Id,
/// DEPRECATED: see: <https://github.com/paritytech/polkadot/issues/7575>
/// DEPRECATED: see: <https://github.com/pezkuwichain/kurdistan-sdk/issues/171>
///
/// Will be removed in a future version.
pub collator: Option<CollatorId>,
@@ -939,7 +939,7 @@ impl From<ValidityError> for u8 {
}
/// Abridged version of `HostConfiguration` (from the `Configuration` teyrchains host runtime
/// module) meant to be used by a teyrchain or PDK such as cumulus.
/// module) meant to be used by a teyrchain or PDK such as pezcumulus.
#[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)]
#[cfg_attr(feature = "std", derive(PartialEq))]
pub struct AbridgedHostConfiguration {
@@ -974,7 +974,7 @@ pub struct AbridgedHostConfiguration {
}
/// Abridged version of `HrmpChannel` (from the `Hrmp` teyrchains host runtime module) meant to be
/// used by a teyrchain or PDK such as cumulus.
/// used by a teyrchain or PDK such as pezcumulus.
#[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)]
#[cfg_attr(feature = "std", derive(Default, PartialEq))]
pub struct AbridgedHrmpChannel {
@@ -1034,7 +1034,7 @@ pub enum UpgradeGoAhead {
}
/// Consensus engine id for pezkuwi v1 consensus engine.
pub const PEZKUWI_ENGINE_ID: sp_runtime::ConsensusEngineId = *b"POL1";
pub const PEZKUWI_ENGINE_ID: pezsp_runtime::ConsensusEngineId = *b"POL1";
/// A consensus log item for pezkuwi validation. To be used with [`PEZKUWI_ENGINE_ID`].
#[derive(Decode, Encode, Clone, PartialEq, Eq)]
@@ -1064,18 +1064,18 @@ pub enum ConsensusLog {
impl ConsensusLog {
/// Attempt to convert a reference to a generic digest item into a consensus log.
pub fn from_digest_item(
digest_item: &sp_runtime::DigestItem,
digest_item: &pezsp_runtime::DigestItem,
) -> Result<Option<Self>, codec::Error> {
match digest_item {
sp_runtime::DigestItem::Consensus(id, encoded) if id == &PEZKUWI_ENGINE_ID =>
pezsp_runtime::DigestItem::Consensus(id, encoded) if id == &PEZKUWI_ENGINE_ID =>
Ok(Some(Self::decode(&mut &encoded[..])?)),
_ => Ok(None),
}
}
}
impl From<ConsensusLog> for sp_runtime::DigestItem {
fn from(c: ConsensusLog) -> sp_runtime::DigestItem {
impl From<ConsensusLog> for pezsp_runtime::DigestItem {
fn from(c: ConsensusLog) -> pezsp_runtime::DigestItem {
Self::Consensus(PEZKUWI_ENGINE_ID, c.encode())
}
}
@@ -1361,7 +1361,7 @@ impl ValidityAttestation {
#[derive(Clone, Eq, PartialEq, Default, Decode, Encode, RuntimeDebug)]
pub struct SigningContext<H = Hash> {
/// Current session index.
pub session_index: sp_staking::SessionIndex,
pub session_index: pezsp_staking::SessionIndex,
/// Hash of the parent.
pub parent_hash: H,
}
@@ -1536,7 +1536,7 @@ pub fn effective_minimum_backing_votes(
/// Information about validator sets of a session.
///
/// NOTE: `SessionInfo` is frozen. Do not include new fields, consider creating a separate runtime
/// API. Reasoning and further outlook [here](https://github.com/paritytech/polkadot/issues/6586).
/// API. Reasoning and further outlook [here](https://github.com/pezkuwichain/kurdistan-sdk/issues/167).
#[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)]
#[cfg_attr(feature = "std", derive(PartialEq))]
pub struct SessionInfo {
@@ -1644,7 +1644,7 @@ impl<T> AsRef<[u8]> for WellKnownKey<T> {
impl<T: Decode> WellKnownKey<T> {
/// Gets the value or `None` if it does not exist or decoding failed.
pub fn get(&self) -> Option<T> {
sp_io::storage::get(&self.key)
pezsp_io::storage::get(&self.key)
.and_then(|raw| codec::DecodeAll::decode_all(&mut raw.as_ref()).ok())
}
}
@@ -1652,7 +1652,7 @@ impl<T: Decode> WellKnownKey<T> {
impl<T: Encode> WellKnownKey<T> {
/// Sets the value.
pub fn set(&self, value: T) {
sp_io::storage::set(&self.key, &value.encode());
pezsp_io::storage::set(&self.key, &value.encode());
}
}
+5 -5
View File
@@ -19,12 +19,12 @@ use scale_info::TypeInfo;
use alloc::vec::Vec;
#[cfg(feature = "std")]
use sp_application_crypto::AppCrypto;
use pezsp_application_crypto::AppCrypto;
#[cfg(feature = "std")]
use sp_keystore::{Error as KeystoreError, KeystorePtr};
use pezsp_keystore::{Error as KeystoreError, KeystorePtr};
use sp_core::RuntimeDebug;
use sp_runtime::traits::AppVerify;
use pezsp_core::RuntimeDebug;
use pezsp_runtime::traits::AppVerify;
use super::{SigningContext, ValidatorId, ValidatorIndex, ValidatorSignature};
@@ -312,7 +312,7 @@ impl<Payload: EncodeAs<RealPayload>, RealPayload: Encode> UncheckedSigned<Payloa
context: &SigningContext<H>,
validator_index: ValidatorIndex,
) -> Self {
use sp_application_crypto::RuntimeAppPublic;
use pezsp_application_crypto::RuntimeAppPublic;
let data = Self::payload_data(&payload, context);
let signature = public.sign(&data).unwrap();
@@ -19,7 +19,7 @@ use super::*;
use alloc::vec::Vec;
use codec::{Decode, Encode};
use scale_info::TypeInfo;
use sp_core::RuntimeDebug;
use pezsp_core::RuntimeDebug;
/// A candidate pending availability.
#[derive(RuntimeDebug, Clone, PartialEq, Encode, Decode, TypeInfo)]
+6 -6
View File
@@ -18,10 +18,10 @@ pezkuwi-primitives = { features = [
], workspace = true, default-features = true }
rand = { workspace = true, default-features = true }
scale-info = { features = ["bit-vec", "derive", "serde"], workspace = true }
sp-application-crypto = { workspace = true }
sp-core = { features = ["std"], workspace = true, default-features = true }
sp-keyring = { workspace = true, default-features = true }
sp-runtime = { workspace = true, default-features = true }
pezsp-application-crypto = { workspace = true }
pezsp-core = { features = ["std"], workspace = true, default-features = true }
pezsp-keyring = { workspace = true, default-features = true }
pezsp-runtime = { workspace = true, default-features = true }
[dev-dependencies]
bitvec = { features = ["alloc", "serde"], workspace = true }
@@ -29,6 +29,6 @@ bitvec = { features = ["alloc", "serde"], workspace = true }
[features]
runtime-benchmarks = [
"pezkuwi-primitives/runtime-benchmarks",
"sp-keyring/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"pezsp-keyring/runtime-benchmarks",
"pezsp-runtime/runtime-benchmarks",
]
+6 -6
View File
@@ -31,9 +31,9 @@ use pezkuwi_primitives::{
};
pub use rand;
use scale_info::TypeInfo;
use sp_application_crypto::{sr25519, ByteArray};
use sp_keyring::Sr25519Keyring;
use sp_runtime::{generic::Digest, traits::BlakeTwo256};
use pezsp_application_crypto::{sr25519, ByteArray};
use pezsp_keyring::Sr25519Keyring;
use pezsp_runtime::{generic::Digest, traits::BlakeTwo256};
const MAX_POV_SIZE: u32 = 1_000_000;
@@ -168,7 +168,7 @@ impl PartialOrd for CommittedCandidateReceipt {
impl Ord for CommittedCandidateReceipt {
fn cmp(&self, other: &Self) -> core::cmp::Ordering {
// TODO: compare signatures or something more sane
// https://github.com/paritytech/polkadot/issues/222
// https://github.com/pezkuwichain/kurdistan-sdk/issues/132
self.descriptor()
.para_id
.cmp(&other.descriptor().para_id)
@@ -389,7 +389,7 @@ pub fn dummy_candidate_descriptor_bad_sig(relay_parent: Hash) -> CandidateDescri
/// Create a candidate descriptor with filler data.
pub fn dummy_candidate_descriptor<H: AsRef<[u8]>>(relay_parent: H) -> CandidateDescriptor<H> {
let collator = sp_keyring::Sr25519Keyring::Ferdie;
let collator = pezsp_keyring::Sr25519Keyring::Ferdie;
let invalid = Hash::zero();
let descriptor = make_valid_candidate_descriptor(
1.into(),
@@ -467,7 +467,7 @@ pub fn dummy_pvd(parent_head: HeadData, relay_parent_number: u32) -> PersistedVa
/// Creates a meaningless signature
pub fn dummy_signature() -> pezkuwi_primitives::ValidatorSignature {
sp_core::crypto::UncheckedFrom::unchecked_from([1u8; 64])
pezsp_core::crypto::UncheckedFrom::unchecked_from([1u8; 64])
}
/// Create a meaningless candidate, returning its receipt and PVD.