rebrand: kusama → dicle

- Replace all kusama/Kusama references with dicle/Dicle
- Rename weight files from ksm_size to dcl_size
- Update papi-tests files from ksm to dcl
- Remove chain-specs/kusama.json files
- cargo check --workspace successful (Finished output)
- Update MAINNET_ROADMAP.md: FAZ 8 completed
This commit is contained in:
2026-01-07 09:40:42 +03:00
parent 7d147277f2
commit 954e2703e2
190 changed files with 747 additions and 11058 deletions
+8 -8
View File
@@ -108,7 +108,7 @@ If you want to reproduce other steps of CI process you can use the following
## Networks
This repo supports runtimes for PezkuwiChain, Kusama, and Zagros.
This repo supports runtimes for PezkuwiChain, Dicle, and Zagros.
### Connect to Pezkuwi Mainnet
@@ -121,15 +121,15 @@ Connect to the global Pezkuwi Mainnet network by running:
You can see your node on [Pezkuwi telemetry](https://telemetry.pezkuwichain.app/#list/0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3)
(set a custom name with `--name "my custom name"`).
### Connect to the "Kusama" Canary Network
### Connect to the "Dicle" Canary Network
Connect to the global Kusama canary network by running:
Connect to the global Dicle canary network by running:
```bash
../target/release/pezkuwi --chain=kusama
../target/release/pezkuwi --chain=dicle
```
You can see your node on [Kusama telemetry](https://telemetry.polkadot.io/#list/0xb0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe)
You can see your node on [Dicle telemetry](https://telemetry.polkadot.io/#list/0xb0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe)
(set a custom name with `--name "my custom name"`).
### Connect to the Zagros Testnet
@@ -143,10 +143,10 @@ Connect to the global Zagros testnet by running:
You can see your node on [Zagros telemetry](https://telemetry.pezkuwichain.app/#list/0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e)
(set a custom name with `--name "my custom name"`).
### Obtaining HEZ, KSM, or TYR
### Obtaining HEZ, DCL, or TYR
If you want to do anything on PezkuwiChain, Kusama, or Zagros, then you'll need to get an account and
some HEZ, KSM, or TYR tokens, respectively. Follow the
If you want to do anything on PezkuwiChain, Dicle, or Zagros, then you'll need to get an account and
some HEZ, DCL, or TYR tokens, respectively. Follow the
[instructions](https://wiki.network.pezkuwichain.io/docs/learn-HEZ#obtaining-testnet-tokens) on the Wiki to obtain tokens for
your testnet of choice.
+3 -3
View File
@@ -73,9 +73,9 @@ pub struct RunCmd {
#[clap(flatten)]
pub base: pezsc_cli::RunCmd,
/// Force using Kusama native runtime.
#[arg(long = "force-kusama")]
pub force_kusama: bool,
/// Force using Dicle native runtime.
#[arg(long = "force-dicle")]
pub force_dicle: bool,
/// Force using Zagros native runtime.
#[arg(long = "force-zagros")]
+10 -10
View File
@@ -50,7 +50,7 @@ fn get_invulnerable_ah_collators(
chain_spec: &Box<dyn pezkuwi_service::ChainSpec>,
) -> HashSet<PeerId> {
// A default set of invulnerable asset hub collators
const KUSAMA: [&str; 11] = [
const DICLE: [&str; 11] = [
"12D3KooWHNEENyCc4R3iDLLFaJiynUp9eDZp7TtS1G6DCp459vVK",
"12D3KooWAVqLdQEjSezy7CPEgMLMSTuyfSBdbxPGkmik5x2aL8u4",
"12D3KooWBxMiVQdYa5MaQjSWAu3YsfKdrs7vgX9cPk4cCwFVAXEu",
@@ -74,8 +74,8 @@ fn get_invulnerable_ah_collators(
"12D3KooWMRyTLrCEPcAQD6c4EnudL3vVzg9zji3whvsMYPUYevpq",
];
let invulnerables = if chain_spec.is_kusama() {
KUSAMA.to_vec()
let invulnerables = if chain_spec.is_dicle() {
DICLE.to_vec()
} else if chain_spec.is_pezkuwi() {
PEZKUWI.to_vec()
} else {
@@ -131,7 +131,7 @@ impl BizinikiwiCli for Cli {
) -> std::result::Result<Box<dyn pezsc_service::ChainSpec>, String> {
let id = if id == "" {
let n = get_exec_name().unwrap_or_default();
["pezkuwi", "kusama", "zagros", "pezkuwichain", "versi"]
["pezkuwi", "dicle", "zagros", "pezkuwichain", "versi"]
.iter()
.cloned()
.find(|&chain| n.starts_with(chain))
@@ -140,9 +140,9 @@ impl BizinikiwiCli for Cli {
id
};
Ok(match id {
"kusama" => Box::new(pezkuwi_service::chain_spec::kusama_config()?),
name if name.starts_with("kusama-") && !name.ends_with(".json") =>
Err(format!("`{name}` is not supported anymore as the kusama native runtime no longer part of the node."))?,
"dicle" => Box::new(pezkuwi_service::chain_spec::dicle_config()?),
name if name.starts_with("dicle-") && !name.ends_with(".json") =>
Err(format!("`{name}` is not supported anymore as the dicle native runtime no longer part of the node."))?,
"pezkuwi" => Box::new(pezkuwi_service::chain_spec::pezkuwi_config()?),
name if name.starts_with("pezkuwi-") && !name.ends_with(".json") =>
Err(format!("`{name}` is not supported anymore as the pezkuwi native runtime no longer part of the node."))?,
@@ -186,7 +186,7 @@ impl BizinikiwiCli for Cli {
chain_spec.is_versi()
{
Box::new(pezkuwi_service::PezkuwichainChainSpec::from_json_file(path)?)
} else if self.run.force_kusama || chain_spec.is_kusama() {
} else if self.run.force_dicle || chain_spec.is_dicle() {
Box::new(pezkuwi_service::GenericChainSpec::from_json_file(path)?)
} else if self.run.force_zagros || chain_spec.is_zagros() {
Box::new(pezkuwi_service::ZagrosChainSpec::from_json_file(path)?)
@@ -242,11 +242,11 @@ where
set_default_ss58_version(chain_spec);
if chain_spec.is_kusama() {
if chain_spec.is_dicle() {
info!("----------------------------");
info!("This chain is not in any way");
info!(" endorsed by the ");
info!(" KUSAMA FOUNDATION ");
info!(" DICLE FOUNDATION ");
info!("----------------------------");
}
+2 -2
View File
@@ -49,13 +49,13 @@ track node warning and error log rates. These can be further investigated in Gra
Requires Loki for log aggregation and querying.
[Dashboard JSON](general/kusama_deployment.json)
[Dashboard JSON](general/dicle_deployment.json)
## Teyrchain Status
This dashboard allows you to see at a glance how fast are candidates approved, disputed and
finalized. It was originally designed for observing liveliness after teyrchain deployment in
Kusama/PezkuwiChain, but can be useful generally in production or testing.
Dicle/PezkuwiChain, but can be useful generally in production or testing.
It includes panels covering key subsystems of the teyrchain node side implementation:
- Backing
+11 -11
View File
@@ -97,7 +97,7 @@
"uid": "P5CA6DFE95AABF258"
},
"exemplar": false,
"expr": "sort_desc (count by (version) (pezkuwi_build_info{chain=\"kusama\", instance=~\".*validator.*\"}))",
"expr": "sort_desc (count by (version) (pezkuwi_build_info{chain=\"dicle\", instance=~\".*validator.*\"}))",
"instant": true,
"interval": "",
"intervalFactor": 1,
@@ -163,7 +163,7 @@
"type": "loki",
"uid": "P367D1C7027A603FA"
},
"expr": "sum(count_over_time({host=~\"kusama-validator.*\", level=\"WARN\"} [1h])) by (target)",
"expr": "sum(count_over_time({host=~\"dicle-validator.*\", level=\"WARN\"} [1h])) by (target)",
"instant": false,
"legendFormat": "{{ target }}",
"range": true,
@@ -229,7 +229,7 @@
"type": "loki",
"uid": "P367D1C7027A603FA"
},
"expr": "sum(count_over_time({host=~\"kusama-validator.*\", level=\"ERROR\"} [1h])) by (target)",
"expr": "sum(count_over_time({host=~\"dicle-validator.*\", level=\"ERROR\"} [1h])) by (target)",
"instant": false,
"legendFormat": "{{ target }}",
"range": true,
@@ -312,7 +312,7 @@
"uid": "P5CA6DFE95AABF258"
},
"exemplar": false,
"expr": "sort_desc (count by (version) (pezkuwi_build_info{chain=\"kusama\", instance=~\".*validator.*\"}))",
"expr": "sort_desc (count by (version) (pezkuwi_build_info{chain=\"dicle\", instance=~\".*validator.*\"}))",
"instant": true,
"interval": "",
"intervalFactor": 1,
@@ -411,7 +411,7 @@
"uid": "P5CA6DFE95AABF258"
},
"exemplar": false,
"expr": "pezkuwi_build_info{instance=~\".*validator.*\",chain=\"kusama\"}",
"expr": "pezkuwi_build_info{instance=~\".*validator.*\",chain=\"dicle\"}",
"format": "table",
"instant": false,
"interval": "",
@@ -539,7 +539,7 @@
"type": "loki",
"uid": "P367D1C7027A603FA"
},
"expr": "sum(count_over_time({host=~\"kusama-validator.*\", level=\"WARN\"} [1h])) by (target)",
"expr": "sum(count_over_time({host=~\"dicle-validator.*\", level=\"WARN\"} [1h])) by (target)",
"instant": false,
"legendFormat": "{{target}}",
"range": true,
@@ -636,7 +636,7 @@
"type": "loki",
"uid": "P367D1C7027A603FA"
},
"expr": "sum(count_over_time({host=~\"kusama-validator.*\", level=\"WARN\", target=\"teyrchain\"}[1h])) by (subtarget)",
"expr": "sum(count_over_time({host=~\"dicle-validator.*\", level=\"WARN\", target=\"teyrchain\"}[1h])) by (subtarget)",
"hide": false,
"instant": false,
"legendFormat": "{{subtarget}}",
@@ -729,7 +729,7 @@
"type": "loki",
"uid": "P367D1C7027A603FA"
},
"expr": "sum(count_over_time({host=~\"kusama-validator.*\", level=\"ERROR\"} [1h])) by (target)",
"expr": "sum(count_over_time({host=~\"dicle-validator.*\", level=\"ERROR\"} [1h])) by (target)",
"instant": false,
"legendFormat": "{{target}}",
"range": true,
@@ -826,7 +826,7 @@
"type": "loki",
"uid": "P367D1C7027A603FA"
},
"expr": "sum(count_over_time({host=~\"kusama-validator.*\", level=\"ERROR\", target=\"teyrchain\"}[1h])) by (subtarget)",
"expr": "sum(count_over_time({host=~\"dicle-validator.*\", level=\"ERROR\", target=\"teyrchain\"}[1h])) by (subtarget)",
"hide": false,
"instant": false,
"legendFormat": "{{subtarget}}",
@@ -843,7 +843,7 @@
"schemaVersion": 34,
"style": "dark",
"tags": [
"Kusama",
"Dicle",
"Loki",
"Logs"
],
@@ -921,7 +921,7 @@
},
"timepicker": {},
"timezone": "",
"title": "Kusama Validators Overview",
"title": "Dicle Validators Overview",
"uid": "0i-QjQ82j",
"version": 29,
"weekStart": ""
+6 -6
View File
@@ -1757,7 +1757,7 @@
"schemaVersion": 34,
"style": "dark",
"tags": [
"Kusama",
"Dicle",
"Pezkuwi",
"Teyrchains",
"On-call"
@@ -1786,8 +1786,8 @@
{
"current": {
"selected": false,
"text": "kusama",
"value": "kusama"
"text": "dicle",
"value": "dicle"
},
"hide": 0,
"includeAll": false,
@@ -1797,8 +1797,8 @@
"options": [
{
"selected": true,
"text": "kusama",
"value": "kusama"
"text": "dicle",
"value": "dicle"
},
{
"selected": false,
@@ -1806,7 +1806,7 @@
"value": "pezkuwi"
}
],
"query": "kusama,pezkuwi",
"query": "dicle,pezkuwi",
"queryValue": "",
"skipUrlSync": false,
"type": "custom"
@@ -16,7 +16,7 @@
//! approval-voting throughput test
//!
//! Approval Voting benchmark based on Kusama parameters and scale.
//! Approval Voting benchmark based on Dicle parameters and scale.
//!
//! Subsystems involved:
//! - approval-distribution
@@ -530,7 +530,7 @@ where
.iter()
.any(|v| keystore.has_keys(&[(v.to_raw_vec(), AuthorityDiscoveryId::ID)]));
// We could've checked discovery_keys but on Kusama validators.len() < discovery_keys.len().
// We could've checked discovery_keys but on Dicle validators.len() < discovery_keys.len().
let is_present_validator = session_info
.validators
.iter()
@@ -16,7 +16,7 @@
//! dispute-coordinator throughput test
//!
//! Dispute Coordinator benchmark based on Kusama parameters and scale.
//! Dispute Coordinator benchmark based on Dicle parameters and scale.
//!
//! Subsystems involved:
//! - dispute-coordinator
@@ -54,7 +54,7 @@ const CLEANED_VOTES_WATERMARK_KEY: &[u8; 23] = b"cleaned-votes-watermark";
///
/// 300 is with session duration of 1 hour and 30 teyrchains around <3_000_000 key purges in the
/// worst case. Which is already quite a lot, at the same time we have around 21_000 sessions on
/// Kusama. This means at 300 purged sessions per session, cleaning everything up will take
/// Dicle. This means at 300 purged sessions per session, cleaning everything up will take
/// around 3 days. Depending on how severe disk usage becomes, we might want to bump the batch
/// size, at the cost of risking issues at session boundaries (performance).
#[cfg(test)]
@@ -186,7 +186,7 @@ impl Default for TestState {
fn default() -> TestState {
let p1 = Pair::from_string("//Polka", None).unwrap();
let p2 = Pair::from_string("//Hez", None).unwrap();
let p3 = Pair::from_string("//Kusama", None).unwrap();
let p3 = Pair::from_string("//Dicle", None).unwrap();
let validators = vec![
(Sr25519Keyring::Alice.pair(), Sr25519Keyring::Alice.to_seed()),
(Sr25519Keyring::Bob.pair(), Sr25519Keyring::Bob.to_seed()),
@@ -198,7 +198,7 @@ impl Default for TestState {
// Two more keys needed so disputes are not confirmed already with only 3 statements.
(p1, "//Polka".into()),
(p2, "//Hez".into()),
(p3, "//Kusama".into()),
(p3, "//Dicle".into()),
];
let validator_public = validators
+1 -1
View File
@@ -30,7 +30,7 @@ struct MetricsInner {
/// The following metrics track how many disputes/votes the runtime will have to process. These
/// will count all recent statements meaning every dispute from last sessions: 10 min on
/// Pezkuwichain, 60 min on Kusama and 4 hours on Pezkuwi. The metrics are updated only when
/// Pezkuwichain, 60 min on Dicle and 4 hours on Pezkuwi. The metrics are updated only when
/// the node authors a block, so values vary across nodes.
inherent_data_dispute_statement_sets: prometheus::Counter<prometheus::U64>,
inherent_data_dispute_statements: prometheus::CounterVec<prometheus::U64>,
@@ -16,7 +16,7 @@
//! availability-read regression tests
//!
//! Availability read benchmark based on Kusama parameters and scale.
//! Availability read benchmark based on Dicle parameters and scale.
//!
//! Subsystems involved:
//! - availability-distribution
@@ -16,7 +16,7 @@
//! availability-read regression tests
//!
//! Availability read benchmark based on Kusama parameters and scale.
//! Availability read benchmark based on Dicle parameters and scale.
//!
//! Subsystems involved:
//! - availability-recovery
@@ -90,7 +90,7 @@ const COST_INVALID_REQUEST: Rep = Rep::CostMajor("Peer sent unparsable request")
/// PoV size limit in bytes for which prefer fetching from backers. (conservative, Pezkuwi for now)
pub(crate) const CONSERVATIVE_FETCH_CHUNKS_THRESHOLD: usize = 1 * 1024 * 1024;
/// PoV size limit in bytes for which prefer fetching from backers. (Kusama and all testnets)
/// PoV size limit in bytes for which prefer fetching from backers. (Dicle and all testnets)
pub const FETCH_CHUNKS_THRESHOLD: usize = 4 * 1024 * 1024;
#[derive(Clone, PartialEq)]
@@ -72,7 +72,7 @@ use collation::{
};
use error::{Error, FetchError, HoldOffError, Result, SecondingError};
const ASSET_HUB_PARA_ID: ParaId = ParaId::new(1000); // Asset Hub's para id is 1000 on both Kusama and Pezkuwi.
const ASSET_HUB_PARA_ID: ParaId = ParaId::new(1000); // Asset Hub's para id is 1000 on both Dicle and Pezkuwi.
#[cfg(test)]
mod tests;
@@ -98,7 +98,7 @@ const BENEFIT_NOTIFY_GOOD: Rep =
///
/// This is to protect from a single slow collator preventing collations from happening.
///
/// With a collation size of 5MB and bandwidth of 500Mbit/s (requirement for Kusama validators),
/// With a collation size of 5MB and bandwidth of 500Mbit/s (requirement for Dicle validators),
/// the transfer should be possible within 0.1 seconds. 400 milliseconds should therefore be
/// plenty, even with multiple heads and should be low enough for later collators to still be able
/// to finish on time.
@@ -83,7 +83,7 @@ const TRY_RERESOLVE_AUTHORITIES: Duration = Duration::from_secs(2);
/// Duration after which we consider low connectivity a problem.
///
/// Especially at startup low connectivity is expected (authority discovery cache needs to be
/// populated). Authority discovery on Kusama takes around 8 minutes, so warning after 10 minutes
/// populated). Authority discovery on Dicle takes around 8 minutes, so warning after 10 minutes
/// should be fine:
///
/// https://github.com/pezkuwichain/pezkuwi-sdk/blob/main/bizinikiwi/client/authority-discovery/src/lib.rs#L88
@@ -16,7 +16,7 @@
//! statement-distribution regression tests
//!
//! Statement distribution benchmark based on Kusama parameters and scale.
//! Statement distribution benchmark based on Dicle parameters and scale.
use pezkuwi_subsystem_bench::{
configuration::TestConfiguration,
@@ -325,7 +325,7 @@ impl RequestManager {
// found out that this requests take around 100ms to fulfill, so it
// would make sense to try to request things as early as we can, given
// we would need to request it for each candidate, around 25 right now
// on kusama.
// on dicle.
if response_manager.len() >= 2 * MAX_PARALLEL_ATTESTED_CANDIDATE_REQUESTS as usize {
return None;
}
+1 -1
View File
@@ -135,7 +135,7 @@ macro_rules! new_session_window_size {
}
/// It would be nice to draw this from the chain state, but we have no tools for it right now.
/// On Pezkuwi this is 1 day, and on Kusama it's 6 hours.
/// On Pezkuwi this is 1 day, and on Dicle it's 6 hours.
///
/// Number of sessions we want to consider in disputes.
pub const DISPUTE_WINDOW: SessionWindowSize = new_session_window_size!(6);
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -35,7 +35,7 @@ macro_rules! identify_chain {
) => {
match $chain {
Chain::Pezkuwi => Err("Pezkuwi runtimes are currently not supported"),
Chain::Kusama => Err("Kusama runtimes are currently not supported"),
Chain::Dicle => Err("Dicle runtimes are currently not supported"),
Chain::Pezkuwichain => {
#[cfg(feature = "pezkuwichain-native")]
{
@@ -252,7 +252,7 @@ fn pezkuwichain_sign_call(
.into()
}
/// Generates inherent data for benchmarking Pezkuwi, Kusama, Zagros and Pezkuwichain.
/// Generates inherent data for benchmarking Pezkuwi, Dicle, Zagros and Pezkuwichain.
///
/// Not to be used outside of benchmarking since it returns mocked values.
pub fn benchmark_inherent_data(
+4 -4
View File
@@ -232,7 +232,7 @@ where
let disable_grandpa = config.disable_grandpa;
let name = config.network.node_name.clone();
let backoff_authoring_blocks = if !force_authoring_backoff
&& (config.chain_spec.is_pezkuwi() || config.chain_spec.is_kusama())
&& (config.chain_spec.is_pezkuwi() || config.chain_spec.is_dicle())
{
// the block authoring backoff is disabled by default on production networks
None
@@ -359,8 +359,8 @@ where
IncomingRequest::get_config_receiver::<_, Network>(&req_protocol_names);
net_config.add_request_response_protocol(cfg);
let grandpa_hard_forks = if config.chain_spec.is_kusama() {
grandpa_support::kusama_hard_forks()
let grandpa_hard_forks = if config.chain_spec.is_dicle() {
grandpa_support::dicle_hard_forks()
} else {
Vec::new()
};
@@ -422,7 +422,7 @@ where
stagnant_check_mode: chain_selection_subsystem::StagnantCheckMode::PruneOnly,
};
// Kusama + testnets get a higher threshold, we are conservative on Pezkuwi for now.
// Dicle + testnets get a higher threshold, we are conservative on Pezkuwi for now.
let fetch_chunks_threshold =
if config.chain_spec.is_pezkuwi() { None } else { Some(FETCH_CHUNKS_THRESHOLD) };
+2 -2
View File
@@ -163,8 +163,8 @@ where
.build(),
);
let grandpa_hard_forks = if config.chain_spec.is_kusama() {
grandpa_support::kusama_hard_forks()
let grandpa_hard_forks = if config.chain_spec.is_dicle() {
grandpa_support::dicle_hard_forks()
} else {
Vec::new()
};
+2 -2
View File
@@ -78,8 +78,8 @@ pub fn pezkuwi_config() -> Result<GenericChainSpec, String> {
GenericChainSpec::from_json_bytes(&include_bytes!("../chain-specs/pezkuwi.json")[..])
}
pub fn kusama_config() -> Result<GenericChainSpec, String> {
GenericChainSpec::from_json_bytes(&include_bytes!("../chain-specs/kusama.json")[..])
pub fn dicle_config() -> Result<GenericChainSpec, String> {
GenericChainSpec::from_json_bytes(&include_bytes!("../chain-specs/dicle.json")[..])
}
pub fn zagros_config() -> Result<ZagrosChainSpec, String> {
+1 -1
View File
@@ -64,7 +64,7 @@ where
/// w3f validators and randomly selected validators from the latest session (at
/// #1500988).
#[cfg(feature = "full-node")]
pub(crate) fn kusama_hard_forks() -> Vec<pezsc_consensus_grandpa::AuthoritySetHardFork<Block>> {
pub(crate) fn dicle_hard_forks() -> Vec<pezsc_consensus_grandpa::AuthoritySetHardFork<Block>> {
use pezsp_core::crypto::Ss58Codec;
use std::str::FromStr;
+11 -11
View File
@@ -220,7 +220,7 @@ pub enum Error {
DatabasePathRequired,
#[cfg(feature = "full-node")]
#[error("Expected at least one of pezkuwi, kusama, zagros or pezkuwichain runtime feature")]
#[error("Expected at least one of pezkuwi, dicle, zagros or pezkuwichain runtime feature")]
NoRuntime,
#[cfg(feature = "full-node")]
@@ -249,8 +249,8 @@ pub enum Error {
pub enum Chain {
/// Pezkuwi.
Pezkuwi,
/// Kusama.
Kusama,
/// Dicle.
Dicle,
/// Pezkuwichain or one of its derivations.
Pezkuwichain,
/// Zagros.
@@ -264,8 +264,8 @@ pub trait IdentifyVariant {
/// Returns if this is a configuration for the `Pezkuwi` network.
fn is_pezkuwi(&self) -> bool;
/// Returns if this is a configuration for the `Kusama` network.
fn is_kusama(&self) -> bool;
/// Returns if this is a configuration for the `Dicle` network.
fn is_dicle(&self) -> bool;
/// Returns if this is a configuration for the `Zagros` network.
fn is_zagros(&self) -> bool;
@@ -287,8 +287,8 @@ impl IdentifyVariant for Box<dyn ChainSpec> {
fn is_pezkuwi(&self) -> bool {
self.id().starts_with("pezkuwi") || self.id().starts_with("hez")
}
fn is_kusama(&self) -> bool {
self.id().starts_with("kusama") || self.id().starts_with("ksm")
fn is_dicle(&self) -> bool {
self.id().starts_with("dicle") || self.id().starts_with("dcl")
}
fn is_zagros(&self) -> bool {
self.id().starts_with("zagros") || self.id().starts_with("wnd")
@@ -305,8 +305,8 @@ impl IdentifyVariant for Box<dyn ChainSpec> {
fn identify_chain(&self) -> Chain {
if self.is_pezkuwi() {
Chain::Pezkuwi
} else if self.is_kusama() {
Chain::Kusama
} else if self.is_dicle() {
Chain::Dicle
} else if self.is_zagros() {
Chain::Zagros
} else if self.is_pezkuwichain() || self.is_versi() {
@@ -421,7 +421,7 @@ pub fn new_chain_ops(
if config.chain_spec.is_pezkuwichain() || config.chain_spec.is_versi() {
chain_ops!(config, None)
} else if config.chain_spec.is_kusama() {
} else if config.chain_spec.is_dicle() {
chain_ops!(config, None)
} else if config.chain_spec.is_zagros() {
return chain_ops!(config, None);
@@ -432,7 +432,7 @@ pub fn new_chain_ops(
/// Build a full node.
///
/// The actual "flavor", aka if it will use `Pezkuwi`, `Pezkuwichain` or `Kusama` is determined
/// The actual "flavor", aka if it will use `Pezkuwi`, `Pezkuwichain` or `Dicle` is determined
/// based on [`IdentifyVariant`] using the chain spec.
#[cfg(feature = "full-node")]
pub fn build_full<OverseerGenerator: OverseerGen>(
@@ -38,12 +38,12 @@ pub struct PeerLatency {
pub std_dev: f64,
}
// Based on Kusama `max_validators`
// Based on Dicle `max_validators`
fn default_n_validators() -> usize {
300
}
// Based on Kusama cores
// Based on Dicle cores
fn default_n_cores() -> usize {
60
}
@@ -53,7 +53,7 @@ fn default_pov_size() -> usize {
5 * 1024
}
// Default bandwidth in bytes, based stats from Kusama validators
// Default bandwidth in bytes, based stats from Dicle validators
fn default_bandwidth() -> usize {
42 * 1024 * 1024
}
+1 -1
View File
@@ -89,7 +89,7 @@
//! # How versioned methods are used for `TeyrchainHost`
//!
//! Let's introduce two types of `TeyrchainHost` API implementation:
//! * stable - used on stable production networks like Pezkuwi and Kusama. There is only one stable
//! * stable - used on stable production networks like Pezkuwi and Dicle. There is only one stable
//! API at a single point in time.
//! * staging - methods that are ready for production, but will be released on Pezkuwichain first.
//! We can batch together multiple changes and then release all of them to production, by making
+1 -1
View File
@@ -111,7 +111,7 @@ pub struct Constraints<N = BlockNumber> {
}
impl<N> Constraints<N> {
/// Equal to Pezkuwi/Kusama config.
/// Equal to Pezkuwi/Dicle config.
pub const DEFAULT_MAX_HEAD_DATA_SIZE: u32 = 20480;
}
@@ -10,7 +10,7 @@ As established in the [approval process](protocol-approval.md) dealing with bad
The main system responsible for dispensing **consequences** for malicious actors is the [dispute
system](protocol-disputes.md) which eventually dispenses slash events. The slashes itself can be dispensed quickly (a
matter of blocks) but for an extra layer of auditing all slashes are deferred for 27 days (in Pezkuwi/Kusama) which
matter of blocks) but for an extra layer of auditing all slashes are deferred for 27 days (in Pezkuwi/Dicle) which
gives time for Governance to investigate and potentially alter the punishment. Dispute concluding by itself does not
immediately remove the validator from the active validator set.
@@ -140,7 +140,7 @@ The filtering is performed on the whole statement set which is about to be impor
applied:
1. Remove ancient disputes - if a dispute is concluded before the block number indicated in `OLDEST_ACCEPTED` parameter
it is removed from the set. `OLDEST_ACCEPTED` is a runtime configuration option. *Implementation note*:
`dispute_post_conclusion_acceptance_period` from `HostConfiguration` is used in the current Pezkuwi/Kusama
`dispute_post_conclusion_acceptance_period` from `HostConfiguration` is used in the current Pezkuwi/Dicle
implementation.
2. Remove votes from unknown validators. If there is a vote from a validator which wasn't an authority in the session
where the dispute was raised - they are removed. Please note that this step removes only single votes instead of
+1 -1
View File
@@ -93,7 +93,7 @@ pub struct EraPayoutParams {
}
/// A specialized function to compute the inflation of the staking system, tailored for pezkuwi
/// relay chains, such as Pezkuwi, Kusama and Zagros.
/// relay chains, such as Pezkuwi, Dicle and Zagros.
pub fn relay_era_payout(params: EraPayoutParams) -> (Balance, Balance) {
use pezsp_runtime::traits::Saturating;
+1 -1
View File
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Pezkuwi. If not, see <http://www.gnu.org/licenses/>.
//! Common runtime code for the Relay Chain, e.g. Pezkuwichain, Zagros, Pezkuwi, Kusama ...
//! Common runtime code for the Relay Chain, e.g. Pezkuwichain, Zagros, Pezkuwi, Dicle ...
#![cfg_attr(not(feature = "std"), no_std)]
+1 -1
View File
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Pezkuwi. If not, see <http://www.gnu.org/licenses/>.
//! New governance configurations for the Kusama runtime.
//! New governance configurations for the Dicle runtime.
use super::*;
use crate::xcm_config::Collectives;
@@ -20,13 +20,13 @@
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dicle-dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/pezkuwi
// benchmark
// pezpallet
// --chain=kusama-dev
// --chain=dicle-dev
// --steps=50
// --repeat=20
// --no-storage-info
@@ -37,7 +37,7 @@
// --execution=wasm
// --wasm-execution=compiled
// --header=./file_header.txt
// --output=./runtime/kusama/src/weights/
// --output=./runtime/dicle/src/weights/
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
+2 -2
View File
@@ -124,9 +124,9 @@
//!
//! Asset Hub also has another type of assets called `ForeignAssets`.
//! These assets are identified by the XCM Location to their origin.
//! Two such assets are a Teyrchain asset, like Moonbeam's GLMR, and KSM, from the cousin Kusama
//! Two such assets are a Teyrchain asset, like Moonbeam's GLMR, and DCL, from the cousin Dicle
//! network. These are represented as `../Teyrchain(2004)/PalletInstance(10)` and
//! `../../GlobalConsensus(Kusama)` respectively.
//! `../../GlobalConsensus(Dicle)` respectively.
//!
//! The whole type can be seen in the [format](https://github.com/polkadot-fellows/xcm-format#6-universal-asset-identifiers)
//! and [rust docs](xcm::v4::prelude::Asset).
@@ -106,7 +106,7 @@ impl<T: Config> Pezpallet<T> {
/// Check if the given asset ID represents a network native asset based on our
/// UniversalLocation.
///
/// Returns true if the asset is a native network asset (HEZ, KSM, ZGR, PAS) that should be
/// Returns true if the asset is a native network asset (HEZ, DCL, ZGR, PAS) that should be
/// blocked during Asset Hub Migration.
fn is_network_native_asset(asset_id: &AssetId) -> bool {
let universal_location = T::UniversalLocation::get();
@@ -119,7 +119,7 @@ impl<T: Config> Pezpallet<T> {
1 => {
if let Some(Junction::GlobalConsensus(network)) = universal_location.first() {
let is_target_network = match network {
NetworkId::Pezkuwi | NetworkId::Kusama => true,
NetworkId::Pezkuwi | NetworkId::Dicle => true,
NetworkId::ByGenesis(genesis_hash) => {
// Check if this is Zagros by genesis hash
*genesis_hash == xcm::v5::ZAGROS_GENESIS_HASH
@@ -141,7 +141,7 @@ impl<T: Config> Pezpallet<T> {
(universal_location.first(), universal_location.last())
{
let is_target_network = match network {
NetworkId::Pezkuwi | NetworkId::Kusama => true,
NetworkId::Pezkuwi | NetworkId::Dicle => true,
NetworkId::ByGenesis(genesis_hash) => {
// Check if this is Zagros by genesis hash
*genesis_hash == xcm::v5::ZAGROS_GENESIS_HASH
+3 -3
View File
@@ -55,8 +55,8 @@ pub enum NetworkId {
ByFork { block_number: u64, block_hash: [u8; 32] },
/// The Pezkuwi mainnet Relay-chain.
Pezkuwi,
/// The Kusama canary-net Relay-chain.
Kusama,
/// The Dicle canary-net Relay-chain.
Dicle,
/// The Zagros testnet Relay-chain.
Zagros,
/// The Pezkuwichain testnet Relay-chain.
@@ -90,7 +90,7 @@ impl From<NewNetworkId> for NetworkId {
ByGenesis(hash) => Self::ByGenesis(hash),
ByFork { block_number, block_hash } => Self::ByFork { block_number, block_hash },
Pezkuwi => Self::Pezkuwi,
Kusama => Self::Kusama,
Dicle => Self::Dicle,
Zagros => Self::Zagros,
Pezkuwichain => Self::Pezkuwichain,
Wococo => Self::Wococo,
+15 -15
View File
@@ -667,30 +667,30 @@ mod tests {
fn relative_to_works() {
use Junctions::*;
use NetworkId::*;
assert_eq!(X1(Pezkuwi.into()).relative_to(&X1(Kusama.into())), (Parent, Pezkuwi).into());
let base = X3(Kusama.into(), Teyrchain(1), PalletInstance(1));
assert_eq!(X1(Pezkuwi.into()).relative_to(&X1(Dicle.into())), (Parent, Pezkuwi).into());
let base = X3(Dicle.into(), Teyrchain(1), PalletInstance(1));
// Ancestors.
assert_eq!(Here.relative_to(&base), (Parent, Parent, Parent).into());
assert_eq!(X1(Kusama.into()).relative_to(&base), (Parent, Parent).into());
assert_eq!(X2(Kusama.into(), Teyrchain(1)).relative_to(&base), (Parent,).into());
assert_eq!(X1(Dicle.into()).relative_to(&base), (Parent, Parent).into());
assert_eq!(X2(Dicle.into(), Teyrchain(1)).relative_to(&base), (Parent,).into());
assert_eq!(
X3(Kusama.into(), Teyrchain(1), PalletInstance(1)).relative_to(&base),
X3(Dicle.into(), Teyrchain(1), PalletInstance(1)).relative_to(&base),
Here.into()
);
// Ancestors with one child.
assert_eq!(X1(Pezkuwi.into()).relative_to(&base), (Parent, Parent, Parent, Pezkuwi).into());
assert_eq!(
X2(Kusama.into(), Teyrchain(2)).relative_to(&base),
X2(Dicle.into(), Teyrchain(2)).relative_to(&base),
(Parent, Parent, Teyrchain(2)).into()
);
assert_eq!(
X3(Kusama.into(), Teyrchain(1), PalletInstance(2)).relative_to(&base),
X3(Dicle.into(), Teyrchain(1), PalletInstance(2)).relative_to(&base),
(Parent, PalletInstance(2)).into()
);
assert_eq!(
X4(Kusama.into(), Teyrchain(1), PalletInstance(1), [1u8; 32].into()).relative_to(&base),
X4(Dicle.into(), Teyrchain(1), PalletInstance(1), [1u8; 32].into()).relative_to(&base),
([1u8; 32],).into()
);
@@ -700,15 +700,15 @@ mod tests {
(Parent, Parent, Parent, Pezkuwi, Teyrchain(1)).into()
);
assert_eq!(
X3(Kusama.into(), Teyrchain(2), PalletInstance(1)).relative_to(&base),
X3(Dicle.into(), Teyrchain(2), PalletInstance(1)).relative_to(&base),
(Parent, Parent, Teyrchain(2), PalletInstance(1)).into()
);
assert_eq!(
X4(Kusama.into(), Teyrchain(1), PalletInstance(2), [1u8; 32].into()).relative_to(&base),
X4(Dicle.into(), Teyrchain(1), PalletInstance(2), [1u8; 32].into()).relative_to(&base),
(Parent, PalletInstance(2), [1u8; 32]).into()
);
assert_eq!(
X5(Kusama.into(), Teyrchain(1), PalletInstance(1), [1u8; 32].into(), 1u128.into())
X5(Dicle.into(), Teyrchain(1), PalletInstance(1), [1u8; 32].into(), 1u128.into())
.relative_to(&base),
([1u8; 32], 1u128).into()
);
@@ -719,10 +719,10 @@ mod tests {
use Junctions::*;
use NetworkId::*;
assert_eq!(X1(Pezkuwi.into()).global_consensus(), Ok(Pezkuwi));
assert_eq!(X2(Kusama.into(), 1u64.into()).global_consensus(), Ok(Kusama));
assert_eq!(X2(Dicle.into(), 1u64.into()).global_consensus(), Ok(Dicle));
assert_eq!(Here.global_consensus(), Err(()));
assert_eq!(X1(1u64.into()).global_consensus(), Err(()));
assert_eq!(X2(1u64.into(), Kusama.into()).global_consensus(), Err(()));
assert_eq!(X2(1u64.into(), Dicle.into()).global_consensus(), Err(()));
}
#[test]
@@ -732,7 +732,7 @@ mod tests {
assert_eq!(x, X1(GlobalConsensus(Pezkuwi)));
let x: Junctions = Pezkuwi.into();
assert_eq!(x, X1(GlobalConsensus(Pezkuwi)));
let x: Junctions = (Pezkuwi, Kusama).into();
assert_eq!(x, X2(GlobalConsensus(Pezkuwi), GlobalConsensus(Kusama)));
let x: Junctions = (Pezkuwi, Dicle).into();
assert_eq!(x, X2(GlobalConsensus(Pezkuwi), GlobalConsensus(Dicle)));
}
}
+1 -1
View File
@@ -1016,7 +1016,7 @@ pub enum Instruction<Call> {
/// - `xcm`: The message to be exported.
///
/// As an example, to export a message for execution on Asset Hub (teyrchain #1000 in the
/// Kusama network), you would call with `network: NetworkId::Kusama` and
/// Dicle network), you would call with `network: NetworkId::Dicle` and
/// `destination: X1(Teyrchain(1000))`. Alternatively, to export a message for execution on
/// Pezkuwi, you would call with `network: NetworkId:: Pezkuwi` and `destination: Here`.
///
+8 -8
View File
@@ -715,16 +715,16 @@ mod tests {
// Relay-chain context pointing to different consensus relay,
let relay_to_remote_relay =
MultiLocation::new(1, (GlobalConsensus(Kusama), PalletInstance(42), GeneralIndex(42)));
let expected = MultiLocation::new(1, GlobalConsensus(Kusama));
MultiLocation::new(1, (GlobalConsensus(Dicle), PalletInstance(42), GeneralIndex(42)));
let expected = MultiLocation::new(1, GlobalConsensus(Dicle));
assert_eq!(relay_to_remote_relay.chain_location(), expected);
// Relay-chain context pointing to different consensus teyrchain,
let relay_to_remote_para = MultiLocation::new(
1,
(GlobalConsensus(Kusama), Teyrchain(42), PalletInstance(42), GeneralIndex(42)),
(GlobalConsensus(Dicle), Teyrchain(42), PalletInstance(42), GeneralIndex(42)),
);
let expected = MultiLocation::new(1, (GlobalConsensus(Kusama), Teyrchain(42)));
let expected = MultiLocation::new(1, (GlobalConsensus(Dicle), Teyrchain(42)));
assert_eq!(relay_to_remote_para.chain_location(), expected);
// Teyrchain context pointing to relay chain,
@@ -739,16 +739,16 @@ mod tests {
// Teyrchain context pointing to different consensus relay,
let para_to_remote_relay =
MultiLocation::new(2, (GlobalConsensus(Kusama), PalletInstance(42), GeneralIndex(42)));
let expected = MultiLocation::new(2, GlobalConsensus(Kusama));
MultiLocation::new(2, (GlobalConsensus(Dicle), PalletInstance(42), GeneralIndex(42)));
let expected = MultiLocation::new(2, GlobalConsensus(Dicle));
assert_eq!(para_to_remote_relay.chain_location(), expected);
// Teyrchain context pointing to different consensus teyrchain,
let para_to_remote_para = MultiLocation::new(
2,
(GlobalConsensus(Kusama), Teyrchain(42), PalletInstance(42), GeneralIndex(42)),
(GlobalConsensus(Dicle), Teyrchain(42), PalletInstance(42), GeneralIndex(42)),
);
let expected = MultiLocation::new(2, (GlobalConsensus(Kusama), Teyrchain(42)));
let expected = MultiLocation::new(2, (GlobalConsensus(Dicle), Teyrchain(42)));
assert_eq!(para_to_remote_para.chain_location(), expected);
}
}
+4 -4
View File
@@ -117,7 +117,7 @@ impl From<NewNetworkId> for NetworkId {
ByGenesis(hash) => Self::ByGenesis(hash),
ByFork { block_number, block_hash } => Self::ByFork { block_number, block_hash },
Pezkuwi => Self::Pezkuwi,
Kusama => Self::Kusama,
Dicle => Self::Dicle,
Ethereum { chain_id } => Self::Ethereum { chain_id },
BitcoinCore => Self::BitcoinCore,
BitcoinCash => Self::BitcoinCash,
@@ -153,8 +153,8 @@ pub enum NetworkId {
ByFork { block_number: u64, block_hash: [u8; 32] },
/// The Pezkuwi mainnet Relay-chain.
Pezkuwi,
/// The Kusama canary-net Relay-chain.
Kusama,
/// The Dicle canary-net Relay-chain.
Dicle,
/// The Zagros testnet Relay-chain.
Zagros,
/// The Pezkuwichain testnet Relay-chain.
@@ -188,7 +188,7 @@ impl From<OldNetworkId> for NetworkId {
ByGenesis(hash) => Self::ByGenesis(hash),
ByFork { block_number, block_hash } => Self::ByFork { block_number, block_hash },
Pezkuwi => Self::Pezkuwi,
Kusama => Self::Kusama,
Dicle => Self::Dicle,
Zagros => Self::Zagros,
Pezkuwichain => Self::Pezkuwichain,
Wococo => Self::Wococo,
+16 -16
View File
@@ -622,20 +622,20 @@ mod tests {
fn relative_to_works() {
use NetworkId::*;
assert_eq!(
Junctions::from([Pezkuwi.into()]).relative_to(&Junctions::from([Kusama.into()])),
Junctions::from([Pezkuwi.into()]).relative_to(&Junctions::from([Dicle.into()])),
(Parent, Pezkuwi).into()
);
let base = Junctions::from([Kusama.into(), Teyrchain(1), PalletInstance(1)]);
let base = Junctions::from([Dicle.into(), Teyrchain(1), PalletInstance(1)]);
// Ancestors.
assert_eq!(Here.relative_to(&base), (Parent, Parent, Parent).into());
assert_eq!(Junctions::from([Kusama.into()]).relative_to(&base), (Parent, Parent).into());
assert_eq!(Junctions::from([Dicle.into()]).relative_to(&base), (Parent, Parent).into());
assert_eq!(
Junctions::from([Kusama.into(), Teyrchain(1)]).relative_to(&base),
Junctions::from([Dicle.into(), Teyrchain(1)]).relative_to(&base),
(Parent,).into()
);
assert_eq!(
Junctions::from([Kusama.into(), Teyrchain(1), PalletInstance(1)]).relative_to(&base),
Junctions::from([Dicle.into(), Teyrchain(1), PalletInstance(1)]).relative_to(&base),
Here.into()
);
@@ -645,15 +645,15 @@ mod tests {
(Parent, Parent, Parent, Pezkuwi).into()
);
assert_eq!(
Junctions::from([Kusama.into(), Teyrchain(2)]).relative_to(&base),
Junctions::from([Dicle.into(), Teyrchain(2)]).relative_to(&base),
(Parent, Parent, Teyrchain(2)).into()
);
assert_eq!(
Junctions::from([Kusama.into(), Teyrchain(1), PalletInstance(2)]).relative_to(&base),
Junctions::from([Dicle.into(), Teyrchain(1), PalletInstance(2)]).relative_to(&base),
(Parent, PalletInstance(2)).into()
);
assert_eq!(
Junctions::from([Kusama.into(), Teyrchain(1), PalletInstance(1), [1u8; 32].into()])
Junctions::from([Dicle.into(), Teyrchain(1), PalletInstance(1), [1u8; 32].into()])
.relative_to(&base),
([1u8; 32],).into()
);
@@ -664,17 +664,17 @@ mod tests {
(Parent, Parent, Parent, Pezkuwi, Teyrchain(1)).into()
);
assert_eq!(
Junctions::from([Kusama.into(), Teyrchain(2), PalletInstance(1)]).relative_to(&base),
Junctions::from([Dicle.into(), Teyrchain(2), PalletInstance(1)]).relative_to(&base),
(Parent, Parent, Teyrchain(2), PalletInstance(1)).into()
);
assert_eq!(
Junctions::from([Kusama.into(), Teyrchain(1), PalletInstance(2), [1u8; 32].into()])
Junctions::from([Dicle.into(), Teyrchain(1), PalletInstance(2), [1u8; 32].into()])
.relative_to(&base),
(Parent, PalletInstance(2), [1u8; 32]).into()
);
assert_eq!(
Junctions::from([
Kusama.into(),
Dicle.into(),
Teyrchain(1),
PalletInstance(1),
[1u8; 32].into(),
@@ -689,10 +689,10 @@ mod tests {
fn global_consensus_works() {
use NetworkId::*;
assert_eq!(Junctions::from([Pezkuwi.into()]).global_consensus(), Ok(Pezkuwi));
assert_eq!(Junctions::from([Kusama.into(), 1u64.into()]).global_consensus(), Ok(Kusama));
assert_eq!(Junctions::from([Dicle.into(), 1u64.into()]).global_consensus(), Ok(Dicle));
assert_eq!(Here.global_consensus(), Err(()));
assert_eq!(Junctions::from([1u64.into()]).global_consensus(), Err(()));
assert_eq!(Junctions::from([1u64.into(), Kusama.into()]).global_consensus(), Err(()));
assert_eq!(Junctions::from([1u64.into(), Dicle.into()]).global_consensus(), Err(()));
}
#[test]
@@ -702,15 +702,15 @@ mod tests {
assert_eq!(x, Junctions::from([GlobalConsensus(Pezkuwi)]));
let x: Junctions = Pezkuwi.into();
assert_eq!(x, Junctions::from([GlobalConsensus(Pezkuwi)]));
let x: Junctions = (Pezkuwi, Kusama).into();
assert_eq!(x, Junctions::from([GlobalConsensus(Pezkuwi), GlobalConsensus(Kusama)]));
let x: Junctions = (Pezkuwi, Dicle).into();
assert_eq!(x, Junctions::from([GlobalConsensus(Pezkuwi), GlobalConsensus(Dicle)]));
}
#[test]
fn encode_decode_junctions_works() {
let original = Junctions::from([
Pezkuwi.into(),
Kusama.into(),
Dicle.into(),
1u64.into(),
GlobalConsensus(Pezkuwi),
Teyrchain(123),
+1 -1
View File
@@ -977,7 +977,7 @@ pub enum Instruction<Call> {
/// - `xcm`: The message to be exported.
///
/// As an example, to export a message for execution on Statemine (teyrchain #1000 in the
/// Kusama network), you would call with `network: NetworkId::Kusama` and
/// Dicle network), you would call with `network: NetworkId::Dicle` and
/// `destination: [Teyrchain(1000)].into()`. Alternatively, to export a message for execution
/// on Pezkuwi, you would call with `network: NetworkId:: Pezkuwi` and `destination: Here`.
///
+3 -3
View File
@@ -142,8 +142,8 @@ pub enum NetworkId {
ByFork { block_number: u64, block_hash: [u8; 32] },
/// The Pezkuwi mainnet Relay-chain.
Pezkuwi,
/// The Kusama canary-net Relay-chain.
Kusama,
/// The Dicle canary-net Relay-chain.
Dicle,
/// An Ethereum network specified by its chain ID.
#[codec(index = 7)]
Ethereum {
@@ -175,7 +175,7 @@ impl From<OldNetworkId> for NetworkId {
ByGenesis(hash) => Self::ByGenesis(hash),
ByFork { block_number, block_hash } => Self::ByFork { block_number, block_hash },
Pezkuwi => Self::Pezkuwi,
Kusama => Self::Kusama,
Dicle => Self::Dicle,
Zagros => Self::ByGenesis(ZAGROS_GENESIS_HASH),
Pezkuwichain => Self::ByGenesis(PEZKUWICHAIN_GENESIS_HASH),
Wococo => Self::ByGenesis(DUMMY_GENESIS_HASH),
+16 -16
View File
@@ -622,20 +622,20 @@ mod tests {
fn relative_to_works() {
use NetworkId::*;
assert_eq!(
Junctions::from([Pezkuwi.into()]).relative_to(&Junctions::from([Kusama.into()])),
Junctions::from([Pezkuwi.into()]).relative_to(&Junctions::from([Dicle.into()])),
(Parent, Pezkuwi).into()
);
let base = Junctions::from([Kusama.into(), Teyrchain(1), PalletInstance(1)]);
let base = Junctions::from([Dicle.into(), Teyrchain(1), PalletInstance(1)]);
// Ancestors.
assert_eq!(Here.relative_to(&base), (Parent, Parent, Parent).into());
assert_eq!(Junctions::from([Kusama.into()]).relative_to(&base), (Parent, Parent).into());
assert_eq!(Junctions::from([Dicle.into()]).relative_to(&base), (Parent, Parent).into());
assert_eq!(
Junctions::from([Kusama.into(), Teyrchain(1)]).relative_to(&base),
Junctions::from([Dicle.into(), Teyrchain(1)]).relative_to(&base),
(Parent,).into()
);
assert_eq!(
Junctions::from([Kusama.into(), Teyrchain(1), PalletInstance(1)]).relative_to(&base),
Junctions::from([Dicle.into(), Teyrchain(1), PalletInstance(1)]).relative_to(&base),
Here.into()
);
@@ -645,15 +645,15 @@ mod tests {
(Parent, Parent, Parent, Pezkuwi).into()
);
assert_eq!(
Junctions::from([Kusama.into(), Teyrchain(2)]).relative_to(&base),
Junctions::from([Dicle.into(), Teyrchain(2)]).relative_to(&base),
(Parent, Parent, Teyrchain(2)).into()
);
assert_eq!(
Junctions::from([Kusama.into(), Teyrchain(1), PalletInstance(2)]).relative_to(&base),
Junctions::from([Dicle.into(), Teyrchain(1), PalletInstance(2)]).relative_to(&base),
(Parent, PalletInstance(2)).into()
);
assert_eq!(
Junctions::from([Kusama.into(), Teyrchain(1), PalletInstance(1), [1u8; 32].into()])
Junctions::from([Dicle.into(), Teyrchain(1), PalletInstance(1), [1u8; 32].into()])
.relative_to(&base),
([1u8; 32],).into()
);
@@ -664,17 +664,17 @@ mod tests {
(Parent, Parent, Parent, Pezkuwi, Teyrchain(1)).into()
);
assert_eq!(
Junctions::from([Kusama.into(), Teyrchain(2), PalletInstance(1)]).relative_to(&base),
Junctions::from([Dicle.into(), Teyrchain(2), PalletInstance(1)]).relative_to(&base),
(Parent, Parent, Teyrchain(2), PalletInstance(1)).into()
);
assert_eq!(
Junctions::from([Kusama.into(), Teyrchain(1), PalletInstance(2), [1u8; 32].into()])
Junctions::from([Dicle.into(), Teyrchain(1), PalletInstance(2), [1u8; 32].into()])
.relative_to(&base),
(Parent, PalletInstance(2), [1u8; 32]).into()
);
assert_eq!(
Junctions::from([
Kusama.into(),
Dicle.into(),
Teyrchain(1),
PalletInstance(1),
[1u8; 32].into(),
@@ -689,10 +689,10 @@ mod tests {
fn global_consensus_works() {
use NetworkId::*;
assert_eq!(Junctions::from([Pezkuwi.into()]).global_consensus(), Ok(Pezkuwi));
assert_eq!(Junctions::from([Kusama.into(), 1u64.into()]).global_consensus(), Ok(Kusama));
assert_eq!(Junctions::from([Dicle.into(), 1u64.into()]).global_consensus(), Ok(Dicle));
assert_eq!(Here.global_consensus(), Err(()));
assert_eq!(Junctions::from([1u64.into()]).global_consensus(), Err(()));
assert_eq!(Junctions::from([1u64.into(), Kusama.into()]).global_consensus(), Err(()));
assert_eq!(Junctions::from([1u64.into(), Dicle.into()]).global_consensus(), Err(()));
}
#[test]
@@ -702,15 +702,15 @@ mod tests {
assert_eq!(x, Junctions::from([GlobalConsensus(Pezkuwi)]));
let x: Junctions = Pezkuwi.into();
assert_eq!(x, Junctions::from([GlobalConsensus(Pezkuwi)]));
let x: Junctions = (Pezkuwi, Kusama).into();
assert_eq!(x, Junctions::from([GlobalConsensus(Pezkuwi), GlobalConsensus(Kusama)]));
let x: Junctions = (Pezkuwi, Dicle).into();
assert_eq!(x, Junctions::from([GlobalConsensus(Pezkuwi), GlobalConsensus(Dicle)]));
}
#[test]
fn encode_decode_junctions_works() {
let original = Junctions::from([
Pezkuwi.into(),
Kusama.into(),
Dicle.into(),
1u64.into(),
GlobalConsensus(Pezkuwi),
Teyrchain(123),
+1 -1
View File
@@ -933,7 +933,7 @@ pub enum Instruction<Call> {
/// - `xcm`: The message to be exported.
///
/// As an example, to export a message for execution on Statemine (teyrchain #1000 in the
/// Kusama network), you would call with `network: NetworkId::Kusama` and
/// Dicle network), you would call with `network: NetworkId::Dicle` and
/// `destination: [Teyrchain(1000)].into()`. Alternatively, to export a message for execution
/// on Pezkuwi, you would call with `network: NetworkId:: Pezkuwi` and `destination: Here`.
///
+2 -2
View File
@@ -146,8 +146,8 @@ fn alias_child_location() {
&Location::new(0, PalletInstance(42)),
));
assert!(AliasChildLocation::contains(
&Location::new(2, GlobalConsensus(Kusama)),
&Location::new(2, [GlobalConsensus(Kusama), Teyrchain(42), GeneralIndex(12)]),
&Location::new(2, GlobalConsensus(Dicle)),
&Location::new(2, [GlobalConsensus(Dicle), Teyrchain(42), GeneralIndex(12)]),
));
}
@@ -50,7 +50,7 @@ fn take_weight_credit_barrier_should_work() {
#[test]
fn computed_origin_should_work() {
let mut message = Xcm::<()>(vec![
UniversalOrigin(GlobalConsensus(Kusama)),
UniversalOrigin(GlobalConsensus(Dicle)),
DescendOrigin(Teyrchain(100).into()),
DescendOrigin(PalletInstance(69).into()),
WithdrawAsset((Parent, 100).into()),
@@ -64,7 +64,7 @@ fn computed_origin_should_work() {
AllowPaidFrom::set(vec![(
Parent,
Parent,
GlobalConsensus(Kusama),
GlobalConsensus(Dicle),
Teyrchain(100),
PalletInstance(69),
)
+1 -1
View File
@@ -302,7 +302,7 @@ pub fn to_account(l: impl Into<Location>) -> Result<u64, Location> {
return Err(l);
}
match l.first_interior() {
Some(GlobalConsensus(Kusama)) => 4000,
Some(GlobalConsensus(Dicle)) => 4000,
Some(GlobalConsensus(Pezkuwi)) => 4001,
_ => return Err(l),
}
+7 -7
View File
@@ -20,13 +20,13 @@ use super::*;
fn universal_origin_should_work() {
AllowUnpaidFrom::set(vec![[Teyrchain(1)].into(), [Teyrchain(2)].into()]);
clear_universal_aliases();
// Teyrchain 1 may represent Kusama to us
add_universal_alias(Teyrchain(1), Kusama);
// Teyrchain 1 may represent Dicle to us
add_universal_alias(Teyrchain(1), Dicle);
// Teyrchain 2 may represent Pezkuwi to us
add_universal_alias(Teyrchain(2), Pezkuwi);
let message = Xcm(vec![
UniversalOrigin(GlobalConsensus(Kusama)),
UniversalOrigin(GlobalConsensus(Dicle)),
TransferAsset { assets: (Parent, 100u128).into(), beneficiary: Here.into() },
]);
let mut hash = fake_message_hash(&message);
@@ -46,7 +46,7 @@ fn universal_origin_should_work() {
);
let message = Xcm(vec![
UniversalOrigin(GlobalConsensus(Kusama)),
UniversalOrigin(GlobalConsensus(Dicle)),
TransferAsset { assets: (Parent, 100u128).into(), beneficiary: Here.into() },
]);
let mut hash = fake_message_hash(&message);
@@ -65,9 +65,9 @@ fn universal_origin_should_work() {
}
);
add_asset((Ancestor(2), GlobalConsensus(Kusama)), (Parent, 100));
add_asset((Ancestor(2), GlobalConsensus(Dicle)), (Parent, 100));
let message = Xcm(vec![
UniversalOrigin(GlobalConsensus(Kusama)),
UniversalOrigin(GlobalConsensus(Dicle)),
TransferAsset { assets: (Parent, 100u128).into(), beneficiary: Here.into() },
]);
let mut hash = fake_message_hash(&message);
@@ -79,7 +79,7 @@ fn universal_origin_should_work() {
Weight::zero(),
);
assert_eq!(r, Outcome::Complete { used: Weight::from_parts(20, 20) });
assert_eq!(asset_list((Ancestor(2), GlobalConsensus(Kusama))), vec![]);
assert_eq!(asset_list((Ancestor(2), GlobalConsensus(Dicle))), vec![]);
}
#[test]
@@ -684,12 +684,12 @@ mod tests {
#[test]
fn ensure_is_remote_works() {
// A Kusama teyrchain is remote from the Pezkuwi Relay.
let x = ensure_is_remote(Pezkuwi, (Parent, Kusama, Teyrchain(1000)));
assert_eq!(x, Ok((Kusama, Teyrchain(1000).into())));
// A Dicle teyrchain is remote from the Pezkuwi Relay.
let x = ensure_is_remote(Pezkuwi, (Parent, Dicle, Teyrchain(1000)));
assert_eq!(x, Ok((Dicle, Teyrchain(1000).into())));
// Pezkuwi Relay is remote from a Kusama teyrchain.
let x = ensure_is_remote((Kusama, Teyrchain(1000)), (Parent, Parent, Pezkuwi));
// Pezkuwi Relay is remote from a Dicle teyrchain.
let x = ensure_is_remote((Dicle, Teyrchain(1000)), (Parent, Parent, Pezkuwi));
assert_eq!(x, Ok((Pezkuwi, Here)));
// Our own teyrchain is local.
+10 -10
View File
@@ -70,7 +70,7 @@ impl SendXcm for TestSendXcm {
pub type TestXcmRouter = EnsureDecodableXcm<TestSendXcm>;
// copied from kusama constants
// copied from dicle constants
pub const UNITS: Balance = 1_000_000_000_000;
pub const CENTS: Balance = UNITS / 30_000;
@@ -120,16 +120,16 @@ impl configuration::Config for Runtime {
type WeightInfo = configuration::TestWeightInfo;
}
// aims to closely emulate the Kusama XcmConfig
// aims to closely emulate the Dicle XcmConfig
parameter_types! {
pub const KsmLocation: Location = Location::here();
pub const KusamaNetwork: NetworkId = NetworkId::Kusama;
pub UniversalLocation: InteriorLocation = KusamaNetwork::get().into();
pub const DicleNetwork: NetworkId = NetworkId::Dicle;
pub UniversalLocation: InteriorLocation = DicleNetwork::get().into();
pub CheckAccount: (AccountId, MintLocation) = (XcmPallet::check_account(), MintLocation::Local);
}
pub type SovereignAccountOf =
(ChildTeyrchainConvertsVia<ParaId, AccountId>, AccountId32Aliases<KusamaNetwork, AccountId>);
(ChildTeyrchainConvertsVia<ParaId, AccountId>, AccountId32Aliases<DicleNetwork, AccountId>);
pub type LocalCurrencyAdapter =
FungibleAdapter<Balances, IsConcrete<KsmLocation>, SovereignAccountOf, AccountId, CheckAccount>;
@@ -139,7 +139,7 @@ pub type LocalAssetTransactor = (LocalCurrencyAdapter,);
type LocalOriginConverter = (
SovereignSignedViaLocation<SovereignAccountOf, RuntimeOrigin>,
ChildTeyrchainAsNative<origin::Origin, RuntimeOrigin>,
SignedAccountId32AsNative<KusamaNetwork, RuntimeOrigin>,
SignedAccountId32AsNative<DicleNetwork, RuntimeOrigin>,
ChildSystemTeyrchainAsSuperuser<ParaId, RuntimeOrigin>,
);
@@ -156,13 +156,13 @@ pub type Barrier = (
);
parameter_types! {
pub KusamaForAssetHub: (AssetFilter, Location) =
pub DicleForAssetHub: (AssetFilter, Location) =
(Wild(AllOf { id: AssetId(Here.into()), fun: WildFungible }), Teyrchain(1000).into());
pub const MaxInstructions: u32 = 100;
pub const MaxAssetsIntoHolding: u32 = 4;
}
pub type TrustedTeleporters = (xcm_builder::Case<KusamaForAssetHub>,);
pub type TrustedTeleporters = (xcm_builder::Case<DicleForAssetHub>,);
pub struct XcmConfig;
impl xcm_executor::Config for XcmConfig {
@@ -200,7 +200,7 @@ impl xcm_executor::Config for XcmConfig {
/// Converts a local signed origin into an XCM location. Forms the basis for local origins
/// sending/executing XCMs.
pub type LocalOriginToLocation = SignedToAccountId32<RuntimeOrigin, AccountId, KusamaNetwork>;
pub type LocalOriginToLocation = SignedToAccountId32<RuntimeOrigin, AccountId, DicleNetwork>;
impl pezpallet_xcm::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
@@ -245,7 +245,7 @@ construct_runtime!(
}
);
pub fn kusama_like_with_balances(
pub fn dicle_like_with_balances(
balances: Vec<(AccountId, Balance)>,
) -> pezsp_io::TestExternalities {
let mut t = pezframe_system::GenesisConfig::<Runtime>::default().build_storage().unwrap();
+11 -11
View File
@@ -17,7 +17,7 @@
mod mock;
use mock::{
kusama_like_with_balances, AccountId, Balance, Balances, BaseXcmWeight, System, XcmConfig,
dicle_like_with_balances, AccountId, Balance, Balances, BaseXcmWeight, System, XcmConfig,
CENTS,
};
use pezkuwi_teyrchain_primitives::primitives::Id as ParaId;
@@ -44,7 +44,7 @@ fn buy_execution<C>() -> Instruction<C> {
fn withdraw_and_deposit_works() {
let para_acc: AccountId = ParaId::from(PARA_ID).into_account_truncating();
let balances = vec![(ALICE, INITIAL_BALANCE), (para_acc.clone(), INITIAL_BALANCE)];
kusama_like_with_balances(balances).execute_with(|| {
dicle_like_with_balances(balances).execute_with(|| {
let other_para_id = 3000;
let amount = REGISTER_AMOUNT;
let weight = BaseXcmWeight::get() * 3;
@@ -79,7 +79,7 @@ fn withdraw_and_deposit_works() {
fn transfer_asset_works() {
let bob = AccountId::new([1u8; 32]);
let balances = vec![(ALICE, INITIAL_BALANCE), (bob.clone(), INITIAL_BALANCE)];
kusama_like_with_balances(balances).execute_with(|| {
dicle_like_with_balances(balances).execute_with(|| {
let amount = REGISTER_AMOUNT;
let weight = BaseXcmWeight::get();
let message = Xcm(vec![TransferAsset {
@@ -117,7 +117,7 @@ fn report_holding_works() {
use xcm::opaque::latest::prelude::*;
let para_acc: AccountId = ParaId::from(PARA_ID).into_account_truncating();
let balances = vec![(ALICE, INITIAL_BALANCE), (para_acc.clone(), INITIAL_BALANCE)];
kusama_like_with_balances(balances).execute_with(|| {
dicle_like_with_balances(balances).execute_with(|| {
let other_para_id = 3000;
let amount = REGISTER_AMOUNT;
let weight = BaseXcmWeight::get() * 4;
@@ -195,11 +195,11 @@ fn report_holding_works() {
}
/// Scenario:
/// A teyrchain wants to move KSM from Kusama to Asset Hub.
/// A teyrchain wants to move DCL from Dicle to Asset Hub.
/// The teyrchain sends an XCM to withdraw funds combined with a teleport to the destination.
///
/// This way of moving funds from a relay to a teyrchain will only work for trusted chains.
/// Reserve based transfer should be used to move KSM to a community teyrchain.
/// Reserve based transfer should be used to move DCL to a community teyrchain.
///
/// Asserts that the balances are updated accordingly and the correct XCM is sent.
#[test]
@@ -207,7 +207,7 @@ fn teleport_to_asset_hub_works() {
use xcm::opaque::latest::prelude::*;
let para_acc: AccountId = ParaId::from(PARA_ID).into_account_truncating();
let balances = vec![(ALICE, INITIAL_BALANCE), (para_acc.clone(), INITIAL_BALANCE)];
kusama_like_with_balances(balances).execute_with(|| {
dicle_like_with_balances(balances).execute_with(|| {
let asset_hub_id = 1000;
let other_para_id = 3000;
let amount = REGISTER_AMOUNT;
@@ -246,7 +246,7 @@ fn teleport_to_asset_hub_works() {
}
);
// teleports are allowed from asset hub to kusama.
// teleports are allowed from asset hub to dicle.
let message = Xcm(vec![
WithdrawAsset((Here, amount).into()),
buy_execution(),
@@ -277,7 +277,7 @@ fn teleport_to_asset_hub_works() {
}
/// Scenario:
/// A teyrchain wants to move KSM from Kusama to the teyrchain.
/// A teyrchain wants to move DCL from Dicle to the teyrchain.
/// It withdraws funds and then deposits them into the reserve account of the destination chain.
/// to the destination.
///
@@ -287,7 +287,7 @@ fn reserve_based_transfer_works() {
use xcm::opaque::latest::prelude::*;
let para_acc: AccountId = ParaId::from(PARA_ID).into_account_truncating();
let balances = vec![(ALICE, INITIAL_BALANCE), (para_acc.clone(), INITIAL_BALANCE)];
kusama_like_with_balances(balances).execute_with(|| {
dicle_like_with_balances(balances).execute_with(|| {
let other_para_id = 3000;
let amount = REGISTER_AMOUNT;
let transfer_effects = vec![
@@ -412,7 +412,7 @@ fn recursive_xcm_execution_fail() {
let mut hash = fake_message_hash(&message);
let weight = BaseXcmWeight::get() * 3;
kusama_like_with_balances(balances).execute_with(|| {
dicle_like_with_balances(balances).execute_with(|| {
let outcome = XcmExecutor::<XcmTestConfig>::prepare_and_execute(
origin,
message,
@@ -26,6 +26,6 @@ parameter_types! {
parameter_types! {
pub const KsmLocation: Location = Location::parent();
pub const RelayNetwork: NetworkId = NetworkId::Kusama;
pub const RelayNetwork: NetworkId = NetworkId::Dicle;
pub UniversalLocation: InteriorLocation = [GlobalConsensus(RelayNetwork::get()), Teyrchain(TeyrchainId::<Runtime>::get().into())].into();
}
@@ -87,7 +87,7 @@ parameter_types! {
parameter_types! {
pub const KsmLocation: Location = Location::parent();
pub const RelayNetwork: NetworkId = NetworkId::Kusama;
pub const RelayNetwork: NetworkId = NetworkId::Dicle;
pub UniversalLocation: InteriorLocation = [GlobalConsensus(RelayNetwork::get()), Teyrchain(MsgQueue::teyrchain_id().into())].into();
}