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:
Generated
+1
@@ -21412,6 +21412,7 @@ dependencies = [
|
||||
"pezframe-benchmarking-cli",
|
||||
"pezframe-remote-externalities",
|
||||
"pezframe-support-procedural-tools",
|
||||
"pezkuwi-sdk",
|
||||
"pezkuwi-subxt-signer",
|
||||
"pezmmr-gadget",
|
||||
"pezmmr-rpc",
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
/// Kusama value size distribution
|
||||
pub const KUSAMA_STATE_DISTRIBUTION: &[(u32, u32)] = &[
|
||||
/// Dicle value size distribution
|
||||
pub const DICLE_STATE_DISTRIBUTION: &[(u32, u32)] = &[
|
||||
(32, 35),
|
||||
(33, 20035),
|
||||
(34, 5369),
|
||||
|
||||
@@ -60,8 +60,8 @@ pub enum DatabaseSize {
|
||||
Huge,
|
||||
}
|
||||
|
||||
static KUSAMA_STATE_DISTRIBUTION: LazyLock<SizePool> =
|
||||
LazyLock::new(|| SizePool::from_histogram(crate::state_sizes::KUSAMA_STATE_DISTRIBUTION));
|
||||
static DICLE_STATE_DISTRIBUTION: LazyLock<SizePool> =
|
||||
LazyLock::new(|| SizePool::from_histogram(crate::state_sizes::DICLE_STATE_DISTRIBUTION));
|
||||
|
||||
impl DatabaseSize {
|
||||
/// Should be multiple of SAMPLE_SIZE!
|
||||
@@ -116,7 +116,7 @@ impl core::BenchmarkDescription for TrieReadBenchmarkDescription {
|
||||
let mut database = TempDatabase::new();
|
||||
|
||||
let mut rng = rand::thread_rng();
|
||||
let warmup_prefix = KUSAMA_STATE_DISTRIBUTION.key(&mut rng);
|
||||
let warmup_prefix = DICLE_STATE_DISTRIBUTION.key(&mut rng);
|
||||
|
||||
let mut key_values = KeyValues::new();
|
||||
let mut warmup_keys = KeyValues::new();
|
||||
@@ -124,8 +124,8 @@ impl core::BenchmarkDescription for TrieReadBenchmarkDescription {
|
||||
let every_x_key = self.database_size.keys() / SAMPLE_SIZE;
|
||||
for idx in 0..self.database_size.keys() {
|
||||
let kv = (
|
||||
KUSAMA_STATE_DISTRIBUTION.key(&mut rng).to_vec(),
|
||||
KUSAMA_STATE_DISTRIBUTION.value(&mut rng),
|
||||
DICLE_STATE_DISTRIBUTION.key(&mut rng).to_vec(),
|
||||
DICLE_STATE_DISTRIBUTION.value(&mut rng),
|
||||
);
|
||||
if idx % every_x_key == 0 {
|
||||
// warmup keys go to separate tree with high prob
|
||||
@@ -226,15 +226,15 @@ impl core::BenchmarkDescription for TrieWriteBenchmarkDescription {
|
||||
let mut database = TempDatabase::new();
|
||||
|
||||
let mut rng = rand::thread_rng();
|
||||
let warmup_prefix = KUSAMA_STATE_DISTRIBUTION.key(&mut rng);
|
||||
let warmup_prefix = DICLE_STATE_DISTRIBUTION.key(&mut rng);
|
||||
|
||||
let mut key_values = KeyValues::new();
|
||||
let mut warmup_keys = KeyValues::new();
|
||||
let every_x_key = self.database_size.keys() / SAMPLE_SIZE;
|
||||
for idx in 0..self.database_size.keys() {
|
||||
let kv = (
|
||||
KUSAMA_STATE_DISTRIBUTION.key(&mut rng).to_vec(),
|
||||
KUSAMA_STATE_DISTRIBUTION.value(&mut rng),
|
||||
DICLE_STATE_DISTRIBUTION.key(&mut rng).to_vec(),
|
||||
DICLE_STATE_DISTRIBUTION.value(&mut rng),
|
||||
);
|
||||
if idx % every_x_key == 0 {
|
||||
// warmup keys go to separate tree with high prob
|
||||
|
||||
@@ -49,6 +49,9 @@ name = "executor"
|
||||
harness = false
|
||||
|
||||
[dependencies]
|
||||
# Umbrella crate for re-exports
|
||||
pezkuwi-sdk = { workspace = true, default-features = true, features = ["node", "runtime"] }
|
||||
|
||||
# third-party dependencies
|
||||
array-bytes = { workspace = true, default-features = true }
|
||||
clap = { features = ["derive"], optional = true, workspace = true }
|
||||
@@ -192,15 +195,25 @@ pez-node-testing = { workspace = true }
|
||||
pezsc-service-test = { workspace = true }
|
||||
|
||||
[build-dependencies]
|
||||
bizinikiwi-build-script-utils = { workspace = true, default-features = true }
|
||||
clap = { optional = true, workspace = true }
|
||||
clap_complete = { optional = true, workspace = true }
|
||||
|
||||
node-inspect = { optional = true, workspace = true, default-features = true }
|
||||
pezframe-benchmarking-cli = { optional = true, workspace = true }
|
||||
pezsc-cli = { optional = true, workspace = true, default-features = true }
|
||||
pezsc-storage-monitor = { optional = true, workspace = true, default-features = true }
|
||||
|
||||
# Build dependencies use dep: syntax for optional dependencies
|
||||
[features]
|
||||
default = ["cli"]
|
||||
cli = ["clap", "clap_complete", "dep:node-inspect"]
|
||||
cli = [
|
||||
"clap",
|
||||
"clap_complete",
|
||||
"dep:node-inspect",
|
||||
"dep:pezframe-benchmarking-cli",
|
||||
"dep:pezsc-cli",
|
||||
"dep:pezsc-storage-monitor",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"bizinikiwi-cli-test-utils/runtime-benchmarks",
|
||||
"bizinikiwi-frame-rpc-support/runtime-benchmarks",
|
||||
|
||||
@@ -27,9 +27,7 @@ mod cli {
|
||||
|
||||
use clap::{CommandFactory, ValueEnum};
|
||||
use clap_complete::{generate_to, Shell};
|
||||
use pezkuwi_sdk::bizinikiwi_build_script_utils::{
|
||||
generate_cargo_keys, rerun_if_git_head_changed,
|
||||
};
|
||||
use bizinikiwi_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed};
|
||||
use std::{env, fs, path::Path};
|
||||
|
||||
pub fn main() {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
use pezkuwi_sdk::*;
|
||||
|
||||
use crate::chain_spec::pezsc_service::Properties;
|
||||
use pezsc_service::Properties;
|
||||
use pez_kitchensink_runtime::{
|
||||
genesis_config_presets::{Staker, ENDOWMENT, STASH},
|
||||
wasm_binary_unwrap, Block, MaxNominations, StakerStatus,
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use pezkuwi_sdk::*;
|
||||
|
||||
/// An overarching CLI command definition.
|
||||
#[derive(Debug, clap::Parser)]
|
||||
pub struct Cli {
|
||||
|
||||
@@ -33,7 +33,7 @@ use pez_kitchensink_runtime::RuntimeApi;
|
||||
use pez_node_primitives::Block;
|
||||
use pezframe_benchmarking_cli::BIZINIKIWI_REFERENCE_HARDWARE;
|
||||
use pezframe_system_rpc_runtime_api::AccountNonceApi;
|
||||
use pezkuwi_sdk::{pezsp_api::ProvideRuntimeApi, pezsp_core::crypto::Pair};
|
||||
use pezkuwi_sdk::{pezsp_api::ProvideRuntimeApi, pezsp_core::Pair};
|
||||
use pezsc_client_api::{Backend, BlockBackend};
|
||||
use pezsc_consensus_babe::{self, SlotProportion};
|
||||
use pezsc_network::{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "pez-subkey"
|
||||
version = "9.0.0"
|
||||
authors.workspace = true
|
||||
description = "Generate and restore keys for Bizinikiwi based chains such as Pezkuwi, Kusama and a growing number of teyrchains and Bizinikiwi based projects."
|
||||
description = "Generate and restore keys for Bizinikiwi based chains such as Pezkuwi, Dicle and a growing number of teyrchains and Bizinikiwi based projects."
|
||||
edition.workspace = true
|
||||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
||||
homepage.workspace = true
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Subkey
|
||||
|
||||
Subkey is a commandline utility included with Bizinikiwi. It allows generating and restoring keys for Bizinikiwi based
|
||||
chains such as PezkuwiChain, Kusama and a growing number of teyrchains and Bizinikiwi based projects.
|
||||
chains such as PezkuwiChain, Dicle and a growing number of teyrchains and Bizinikiwi based projects.
|
||||
|
||||
`pez_subkey` provides a few sub-commands to generate keys, check keys, sign messages, verify messages, etc...
|
||||
|
||||
@@ -78,7 +78,7 @@ The output above also shows the **public key** and the **Account ID**. Those are
|
||||
you will use the key.
|
||||
|
||||
The **SS58 address** (or **Public Address**) of a new account is a representation of the public keys of an account for
|
||||
a given network (for instance Kusama or PezkuwiChain).
|
||||
a given network (for instance Dicle or PezkuwiChain).
|
||||
|
||||
You can read more about the [SS58 format in the Bizinikiwi Docs](https://docs.pezkuwichain.io/reference/address-formats/) and see the list of reserved prefixes in the [SS58 Registry](https://docs.pezkuwichain.io/ss58-registry).
|
||||
|
||||
@@ -86,7 +86,7 @@ For instance, considering the previous seed `0xa05c75731970cc7868a2fb7cb577353cd
|
||||
SS58 addresses are:
|
||||
|
||||
- PezkuwiChain: `16m4J167Mptt8UXL8aGSAi7U2FnPpPxZHPrCgMG9KJzVoFqM`
|
||||
- Kusama: `JLNozAv8QeLSbLFwe2UvWeKKE4yvmDbfGxTuiYkF2BUMx4M`
|
||||
- Dicle: `JLNozAv8QeLSbLFwe2UvWeKKE4yvmDbfGxTuiYkF2BUMx4M`
|
||||
|
||||
### Json output
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
//! # Subkey
|
||||
//!
|
||||
//! Subkey is a commandline utility included with Bizinikiwi. It allows generating and restoring
|
||||
//! keys for Bizinikiwi based chains such as Pezkuwi, Kusama and a growing number of teyrchains and
|
||||
//! keys for Bizinikiwi based chains such as Pezkuwi, Dicle and a growing number of teyrchains and
|
||||
//! Bizinikiwi based projects.
|
||||
|
||||
//! `pez_subkey` provides a few sub-commands to generate keys, check keys, sign messages, verify
|
||||
@@ -98,7 +98,7 @@
|
||||
//! from the network where you will use the key.
|
||||
//!
|
||||
//! The **SS58 address** (or **Public Address**) of a new account is a representation of the public
|
||||
//! keys of an account for a given network (for instance Kusama or Pezkuwi).
|
||||
//! keys of an account for a given network (for instance Dicle or Pezkuwi).
|
||||
//!
|
||||
//! You can read more about the [SS58 format in the Bizinikiwi Docs](https://docs.pezkuwichain.io/reference/address-formats/) and see the list of reserved prefixes in the [SS58 Registry](https://docs.pezkuwichain.io/ss58-registry).
|
||||
//!
|
||||
@@ -106,7 +106,7 @@
|
||||
//! `0xa05c75731970cc7868a2fb7cb577353cd5b31f62dccced92c441acd8fee0c92d` the SS58 addresses are:
|
||||
//!
|
||||
//! - Pezkuwi: `16m4J167Mptt8UXL8aGSAi7U2FnPpPxZHPrCgMG9KJzVoFqM`
|
||||
//! - Kusama: `JLNozAv8QeLSbLFwe2UvWeKKE4yvmDbfGxTuiYkF2BUMx4M`
|
||||
//! - Dicle: `JLNozAv8QeLSbLFwe2UvWeKKE4yvmDbfGxTuiYkF2BUMx4M`
|
||||
//!
|
||||
//! ### Json output
|
||||
//!
|
||||
|
||||
@@ -108,7 +108,7 @@ impl Default for WorkerConfig {
|
||||
// interval on which to trigger new queries for the current and next authorities is a
|
||||
// trade off between efficiency and performance.
|
||||
//
|
||||
// Querying 700 [`AuthorityId`]s takes ~8m on the Kusama DHT (16th Nov 2020) when
|
||||
// Querying 700 [`AuthorityId`]s takes ~8m on the Dicle DHT (16th Nov 2020) when
|
||||
// comparing `authority_discovery_authority_addresses_requested_total` and
|
||||
// `authority_discovery_dht_event_received`.
|
||||
max_query_interval: Duration::from_secs(10 * 60),
|
||||
|
||||
@@ -54,7 +54,7 @@ pub struct GenerateNodeKeyCmd {
|
||||
pub common: GenerateKeyCmdCommon,
|
||||
/// Specify the chain specification.
|
||||
///
|
||||
/// It can be any of the predefined chains like dev, local, staging, pezkuwi, kusama.
|
||||
/// It can be any of the predefined chains like dev, local, staging, pezkuwi, dicle.
|
||||
#[arg(long, value_name = "CHAIN_SPEC")]
|
||||
pub chain: Option<String>,
|
||||
/// A directory where the key should be saved. If a key already
|
||||
|
||||
@@ -718,7 +718,7 @@ pub fn grandpa_peers_set_config<B: BlockT, N: NetworkBackend<B, <B as BlockT>::H
|
||||
N::notification_config(
|
||||
protocol_name,
|
||||
grandpa_protocol_name::LEGACY_NAMES.iter().map(|&n| n.into()).collect(),
|
||||
// Notifications reach ~256kiB in size at the time of writing on Kusama and Pezkuwi.
|
||||
// Notifications reach ~256kiB in size at the time of writing on Dicle and Pezkuwi.
|
||||
1024 * 1024,
|
||||
None,
|
||||
pezsc_network::config::SetConfig {
|
||||
|
||||
@@ -36,11 +36,11 @@ enum Method {
|
||||
Compiled { instantiation_strategy: InstantiationStrategy, precompile: bool },
|
||||
}
|
||||
|
||||
// This is just a bog-standard Kusama runtime with an extra
|
||||
// This is just a bog-standard Dicle runtime with an extra
|
||||
// `test_empty_return` and `test_dirty_plenty_memory` functions
|
||||
// copy-pasted from the test runtime.
|
||||
fn kusama_runtime() -> &'static [u8] {
|
||||
include_bytes!("kusama_runtime.wasm")
|
||||
fn dicle_runtime() -> &'static [u8] {
|
||||
include_bytes!("dicle_runtime.wasm")
|
||||
}
|
||||
|
||||
fn initialize(
|
||||
@@ -204,7 +204,7 @@ fn bench_call_instance(c: &mut Criterion) {
|
||||
),
|
||||
];
|
||||
|
||||
let runtimes = [("kusama_runtime", kusama_runtime()), ("test_runtime", test_runtime())];
|
||||
let runtimes = [("dicle_runtime", dicle_runtime()), ("test_runtime", test_runtime())];
|
||||
|
||||
let thread_counts = [1, 2, 4, 8, 16];
|
||||
|
||||
|
||||
@@ -296,7 +296,7 @@ fn common_config(semantics: &Semantics) -> std::result::Result<wasmtime::Config,
|
||||
// Pooling needs a bunch of hard limits to be set; if we go over
|
||||
// any of these then the instantiation will fail.
|
||||
//
|
||||
// Current minimum values for kusama (as of 2022-04-14):
|
||||
// Current minimum values for dicle (as of 2022-04-14):
|
||||
// size: 32384
|
||||
// table_elements: 1249
|
||||
// memory_pages: 2070
|
||||
|
||||
@@ -29,8 +29,8 @@ use prometheus_endpoint::{register, Counter, PrometheusError, Registry, U64};
|
||||
use std::{collections::HashMap, iter, sync::Arc, time, time::Instant};
|
||||
|
||||
// FIXME: Add additional spam/DoS attack protection: https://github.com/pezkuwichain/pezkuwi-sdk/issues/7
|
||||
// NOTE: The current value is adjusted based on largest production network deployment (Kusama) and
|
||||
// the current main gossip user (GRANDPA). Currently there are ~800 validators on Kusama, as such,
|
||||
// NOTE: The current value is adjusted based on largest production network deployment (Dicle) and
|
||||
// the current main gossip user (GRANDPA). Currently there are ~800 validators on Dicle, as such,
|
||||
// each GRANDPA round should generate ~1600 messages, and we currently keep track of the last 2
|
||||
// completed rounds and the current live one. That makes it so that at any point we will be holding
|
||||
// ~4800 live messages.
|
||||
|
||||
@@ -148,7 +148,7 @@ pub trait StateApi<Hash> {
|
||||
/// interpretation of the traces requires an understanding of the Bizinikiwi chain's block
|
||||
/// execution.
|
||||
///
|
||||
/// [Link to conceptual map of trace structure for Pezkuwi and Kusama block execution.][2]
|
||||
/// [Link to conceptual map of trace structure for Pezkuwi and Dicle block execution.][2]
|
||||
///
|
||||
/// [1]: https://crates.io/crates/tracing
|
||||
/// [2]: https://docs.google.com/drawings/d/1vZoJo9jaXlz0LmrdTOgHck9_1LsfuQPRmTr-5g1tOis/edit?usp=sharing
|
||||
@@ -263,7 +263,7 @@ pub trait StateApi<Hash> {
|
||||
/// will be filtered by storage key (so non-storage events will **not** show up).
|
||||
/// You can specify any length of a storage key prefix (i.e. if a specified storage
|
||||
/// key is in the beginning of an events storage key it is considered a match).
|
||||
/// Example: for balance tracking on Pezkuwi & Kusama you would likely want
|
||||
/// Example: for balance tracking on Pezkuwi & Dicle you would likely want
|
||||
/// to track changes to account balances with the pezframe_system::Account storage item,
|
||||
/// which is a map from `AccountId` to `AccountInfo`. The key filter for this would be
|
||||
/// the storage prefix for the map:
|
||||
|
||||
@@ -70,7 +70,7 @@ pub fn display_and_check_bags<Runtime: RuntimeT<Instance1>>(
|
||||
.try_into()
|
||||
.map_err(|_| "runtime must configure score to at most u64 to use this test")
|
||||
.unwrap();
|
||||
// threshold in terms of UNITS (e.g. KSM, HEZ etc)
|
||||
// threshold in terms of UNITS (e.g. DCL, HEZ etc)
|
||||
let vote_weight_thresh_as_unit = vote_weight_thresh_u64 as f64 / currency_unit as f64;
|
||||
let pretty_thresh = format!("Threshold: {}. {}", vote_weight_thresh_as_unit, currency_name);
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ use pezsp_runtime::{traits::Block as BlockT, DeserializeOwned};
|
||||
use remote_externalities::{Builder, Mode, OnlineConfig};
|
||||
|
||||
/// Test voter bags migration. `currency_unit` is the number of planks per the the runtimes `UNITS`
|
||||
/// (i.e. number of decimal places per HEZ, KSM etc)
|
||||
/// (i.e. number of decimal places per HEZ, DCL etc)
|
||||
pub async fn execute<Runtime, Block>(
|
||||
currency_unit: u64,
|
||||
currency_name: &'static str,
|
||||
|
||||
@@ -171,7 +171,7 @@ pub trait MinerConfig {
|
||||
///
|
||||
/// Must be the same as configured in the [`crate::Config::DataProvider`].
|
||||
///
|
||||
/// For simplicity, this is 16 in Pezkuwi and 24 in Kusama.
|
||||
/// For simplicity, this is 16 in Pezkuwi and 24 in Dicle.
|
||||
type MaxVotesPerVoter: Get<u32>;
|
||||
/// Maximum number of winners to select per page.
|
||||
///
|
||||
|
||||
@@ -22,10 +22,10 @@ mod pezpallet_election_provider_multi_block_signed_hez_size;
|
||||
mod pezpallet_election_provider_multi_block_unsigned_hez_size;
|
||||
mod pezpallet_election_provider_multi_block_verifier_hez_size;
|
||||
|
||||
mod pezpallet_election_provider_multi_block_ksm_size;
|
||||
mod pezpallet_election_provider_multi_block_signed_ksm_size;
|
||||
mod pezpallet_election_provider_multi_block_unsigned_ksm_size;
|
||||
mod pezpallet_election_provider_multi_block_verifier_ksm_size;
|
||||
mod pezpallet_election_provider_multi_block_dcl_size;
|
||||
mod pezpallet_election_provider_multi_block_signed_dcl_size;
|
||||
mod pezpallet_election_provider_multi_block_unsigned_dcl_size;
|
||||
mod pezpallet_election_provider_multi_block_verifier_dcl_size;
|
||||
|
||||
use pezframe_support::pezpallet_prelude::Weight;
|
||||
|
||||
@@ -168,13 +168,13 @@ pub mod traits {
|
||||
}
|
||||
}
|
||||
|
||||
/// Kusama-esque weights only be used in testing runtimes.
|
||||
pub mod kusama {
|
||||
/// Dicle-esque weights only be used in testing runtimes.
|
||||
pub mod dicle {
|
||||
pub use super::{
|
||||
pezpallet_election_provider_multi_block_ksm_size::WeightInfo as MultiBlockWeightInfo,
|
||||
pezpallet_election_provider_multi_block_signed_ksm_size::WeightInfo as MultiBlockSignedWeightInfo,
|
||||
pezpallet_election_provider_multi_block_unsigned_ksm_size::WeightInfo as MultiBlockUnsignedWeightInfo,
|
||||
pezpallet_election_provider_multi_block_verifier_ksm_size::WeightInfo as MultiBlockVerifierWeightInfo,
|
||||
pezpallet_election_provider_multi_block_dcl_size::WeightInfo as MultiBlockWeightInfo,
|
||||
pezpallet_election_provider_multi_block_signed_dcl_size::WeightInfo as MultiBlockSignedWeightInfo,
|
||||
pezpallet_election_provider_multi_block_unsigned_dcl_size::WeightInfo as MultiBlockUnsignedWeightInfo,
|
||||
pezpallet_election_provider_multi_block_verifier_dcl_size::WeightInfo as MultiBlockVerifierWeightInfo,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -43,13 +43,13 @@
|
||||
// --repeat
|
||||
// 5
|
||||
// --genesis-builder-preset
|
||||
// fake-ksm
|
||||
// fake-dcl
|
||||
// --template
|
||||
// ../../../../../bizinikiwi/pezframe/election-provider-multi-block/src/template.hbs
|
||||
// --heap-pages
|
||||
// 65000
|
||||
// --output
|
||||
// ./pezpallet_election_provider_multi_block_fake-ksm.rs
|
||||
// ./pezpallet_election_provider_multi_block_fake-dcl.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
+2
-2
@@ -43,13 +43,13 @@
|
||||
// --repeat
|
||||
// 5
|
||||
// --genesis-builder-preset
|
||||
// fake-ksm
|
||||
// fake-dcl
|
||||
// --template
|
||||
// ../../../../../bizinikiwi/pezframe/election-provider-multi-block/src/template.hbs
|
||||
// --heap-pages
|
||||
// 65000
|
||||
// --output
|
||||
// ./pezpallet_election_provider_multi_block_signed_fake-ksm.rs
|
||||
// ./pezpallet_election_provider_multi_block_signed_fake-dcl.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
+2
-2
@@ -43,14 +43,14 @@
|
||||
// --repeat
|
||||
// 3
|
||||
// --genesis-builder-preset
|
||||
// fake-ksm
|
||||
// fake-dcl
|
||||
// --template
|
||||
// ../../../../../bizinikiwi/pezframe/election-provider-multi-block/src/template.hbs
|
||||
// --heap-pages
|
||||
// 65000
|
||||
// --extra
|
||||
// --output
|
||||
// ./pezpallet_election_provider_multi_block_unsigned_fake-ksm.rs
|
||||
// ./pezpallet_election_provider_multi_block_unsigned_fake-dcl.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
+2
-2
@@ -43,13 +43,13 @@
|
||||
// --repeat
|
||||
// 5
|
||||
// --genesis-builder-preset
|
||||
// fake-ksm
|
||||
// fake-dcl
|
||||
// --template
|
||||
// ../../../../../bizinikiwi/pezframe/election-provider-multi-block/src/template.hbs
|
||||
// --heap-pages
|
||||
// 65000
|
||||
// --output
|
||||
// ./pezpallet_election_provider_multi_block_verifier_fake-ksm.rs
|
||||
// ./pezpallet_election_provider_multi_block_verifier_fake-dcl.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
@@ -15,7 +15,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//! Remote mining tests for Kusama and Pezkuwi.
|
||||
//! Remote mining tests for Dicle and Pezkuwi.
|
||||
//!
|
||||
//! Run like this:
|
||||
//!
|
||||
@@ -84,7 +84,7 @@ pub mod pezkuwi {
|
||||
}
|
||||
}
|
||||
|
||||
pub mod kusama {
|
||||
pub mod dicle {
|
||||
use super::*;
|
||||
pub struct MinerConfig;
|
||||
|
||||
@@ -235,13 +235,13 @@ async fn mine_for_pezkuwi() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn mine_for_kusama() {
|
||||
async fn mine_for_dicle() {
|
||||
pezsp_tracing::try_init_simple();
|
||||
|
||||
// good way to find good block hashes: https://kusama.subscan.io/event?page=1&time_dimension=date&module=electionprovidermultiphase&event_id=solutionstored
|
||||
// good way to find good block hashes: https://dicle.subscan.io/event?page=1&time_dimension=date&module=electionprovidermultiphase&event_id=solutionstored
|
||||
// we are just looking for blocks with snapshot present, that's all.
|
||||
let block_hash_str = std::option_env!("BLOCK_HASH")
|
||||
// known good kusama hash
|
||||
// known good dicle hash
|
||||
.unwrap_or("d5d9f5e098fcb41915c85e6695eddc18c0bc4aa4976ad0d9bf5f4713039bca26")
|
||||
.to_string();
|
||||
let block_hash = H256::from_slice(hex::decode(block_hash_str).unwrap().as_ref());
|
||||
@@ -260,6 +260,6 @@ async fn mine_for_kusama() {
|
||||
.await
|
||||
.unwrap()
|
||||
.execute_with(|| {
|
||||
test_for_network::<kusama::MinerConfig>();
|
||||
test_for_network::<dicle::MinerConfig>();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ fn offchainify_works() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
/// Inspired by the Kusama incident of 8th Dec 2022 and its resolution through the governance
|
||||
/// Inspired by the Dicle incident of 8th Dec 2022 and its resolution through the governance
|
||||
/// fallback.
|
||||
///
|
||||
/// Mass slash of validators shouldn't disable more than 1/3 of them (the byzantine threshold). Also
|
||||
|
||||
@@ -1112,7 +1112,7 @@ mod batched {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn kusama_estimate() {
|
||||
fn dicle_estimate() {
|
||||
use crate::WeightInfo;
|
||||
let block_time = pezframe_support::weights::Weight::from_parts(
|
||||
pezframe_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND * 2,
|
||||
|
||||
@@ -1696,7 +1696,7 @@ pub mod pezpallet {
|
||||
///
|
||||
/// See the inline code docs of `Member::pending_rewards` and `RewardPool::update_recorded`
|
||||
/// for example analysis. A [`pezsp_runtime::FixedU128`] should be fine for chains with
|
||||
/// balance types similar to that of Pezkuwi and Kusama, in the absence of severe slashing
|
||||
/// balance types similar to that of Pezkuwi and Dicle, in the absence of severe slashing
|
||||
/// (or prevented via a reasonable `MaxPointsToBalance`), for many many years to come.
|
||||
type RewardCounter: FixedPointNumber + MaxEncodedLen + TypeInfo + Default + codec::FullCodec;
|
||||
|
||||
|
||||
@@ -2374,7 +2374,7 @@ mod claim_payout {
|
||||
|
||||
#[test]
|
||||
fn claim_payout_large_numbers() {
|
||||
let unit = 10u128.pow(12); // akin to KSM
|
||||
let unit = 10u128.pow(12); // akin to DCL
|
||||
ExistentialDeposit::set(unit);
|
||||
StakingMinBond::set(unit * 1000);
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@ mod test {
|
||||
use std::fs;
|
||||
|
||||
fn load_metadata(version: u32) -> Vec<u8> {
|
||||
fs::read(format!("./test_data/ksm_metadata_v{}.bin", version)).unwrap()
|
||||
fs::read(format!("./test_data/dcl_metadata_v{}.bin", version)).unwrap()
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//! Metadata Version 10. Networks like Kusama contain this version on-chain.
|
||||
//! Metadata Version 10. Networks like Dicle contain this version on-chain.
|
||||
//! Chains old enough to contain this metadata need a way to decode it.
|
||||
|
||||
#![allow(missing_docs)]
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//! Metadata Version 11. Networks like Kusama contain this version on-chain.
|
||||
//! Metadata Version 11. Networks like Dicle contain this version on-chain.
|
||||
//! Chains old enough to contain this metadata need a way to decode it.
|
||||
|
||||
#![allow(missing_docs)]
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//! Metadata Version 12. Networks like Kusama contain this version on-chain.
|
||||
//! Metadata Version 12. Networks like Dicle contain this version on-chain.
|
||||
//! Chains old enough to contain this metadata need a way to decode it.
|
||||
|
||||
#![allow(missing_docs)]
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//! Metadata Version 13. Networks like Kusama contain this version on-chain.
|
||||
//! Metadata Version 13. Networks like Dicle contain this version on-chain.
|
||||
//! Chains old enough to contain this metadata need a way to decode it.
|
||||
|
||||
use crate::decode_different::*;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//! Metadata Version 9. Networks like/as old as Kusama start here.
|
||||
//! Metadata Version 9. Networks like/as old as Dicle start here.
|
||||
//! Chains old enough to contain this metadata need a way to decode it.
|
||||
|
||||
#![allow(missing_docs)]
|
||||
|
||||
@@ -887,7 +887,7 @@ mod tests {
|
||||
assert_eq!(encoded_size, 74);
|
||||
}
|
||||
|
||||
// Kusama has the same configurations as of now.
|
||||
// Dicle has the same configurations as of now.
|
||||
const PEZKUWI_MAX_DOWNWARD_MESSAGE_SIZE: u32 = 51200; // 50 Kib
|
||||
const PEZKUWI_MAX_UPWARD_MESSAGE_SIZE: u32 = 65531; // 64 Kib
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ This type looks into `parameter_types! { pub storage UsePreviousValidators: bool
|
||||
validators run by ZN (often alice and bob). If AH sends us back a validator set that contains a
|
||||
large new validator set, the setup will break. As seen in the next section, a number of runtime
|
||||
presets are designed to generate large validator/nominator sets to mimic the behavior of PezkuwiChain
|
||||
and Kusama. We thereofre must use this hack in such cases.
|
||||
and Dicle. We thereofre must use this hack in such cases.
|
||||
- If set to `false`, it will use the new validator set.
|
||||
|
||||
#### Presets
|
||||
@@ -99,7 +99,7 @@ More concretely, the presets are:
|
||||
- Teyrchain:
|
||||
- `fake-dev`: 4 page, small number of fake validators and nominators.
|
||||
- `fake-hez`: 32 pages, large number of fake validators and nominators.
|
||||
- `fake-ksm`: 16 pages, large number of fake validators and nominators.
|
||||
- `fake-dcl`: 16 pages, large number of fake validators and nominators.
|
||||
- `real-s`: 4 pages, alice and bob as validators, 500 fake nominators
|
||||
- `real-m`: 4 pages, alice, bob, dave, eve as validators, 2000 fake nominators.
|
||||
- Relay Chain
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Bizinikiwi. 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;
|
||||
|
||||
@@ -59,15 +59,15 @@ pub mod pezpallet_custom_origins {
|
||||
ReferendumCanceller,
|
||||
/// Origin able to kill referenda.
|
||||
ReferendumKiller,
|
||||
/// Origin able to spend up to 1 KSM from the treasury at once.
|
||||
/// Origin able to spend up to 1 DCL from the treasury at once.
|
||||
SmallTipper,
|
||||
/// Origin able to spend up to 5 KSM from the treasury at once.
|
||||
/// Origin able to spend up to 5 DCL from the treasury at once.
|
||||
BigTipper,
|
||||
/// Origin able to spend up to 50 KSM from the treasury at once.
|
||||
/// Origin able to spend up to 50 DCL from the treasury at once.
|
||||
SmallSpender,
|
||||
/// Origin able to spend up to 500 KSM from the treasury at once.
|
||||
/// Origin able to spend up to 500 DCL from the treasury at once.
|
||||
MediumSpender,
|
||||
/// Origin able to spend up to 5,000 KSM from the treasury at once.
|
||||
/// Origin able to spend up to 5,000 DCL from the treasury at once.
|
||||
BigSpender,
|
||||
/// Origin able to dispatch a whitelisted call.
|
||||
WhitelistedCaller,
|
||||
|
||||
@@ -1179,7 +1179,7 @@ where
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
// Minimum 100 bytes/KSM deposited (1 CENT/byte)
|
||||
// Minimum 100 bytes/DCL deposited (1 CENT/byte)
|
||||
pub const BasicDeposit: Balance = 1000 * CENTS; // 258 bytes on-chain
|
||||
pub const ByteDeposit: Balance = deposit(0, 1);
|
||||
pub const UsernameDeposit: Balance = deposit(0, 32);
|
||||
|
||||
+3
-3
@@ -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)]
|
||||
|
||||
@@ -146,7 +146,7 @@ pub fn get_preset(id: &PresetId) -> Option<Vec<u8>> {
|
||||
params.dev_stakers = Some((2_500, 25_000));
|
||||
staking_async_teyrchain_genesis(params, id.to_string())
|
||||
},
|
||||
"fake-ksm" => {
|
||||
"fake-dcl" => {
|
||||
params.validator_count = 1_000;
|
||||
params.dev_stakers = Some((4_500, 15_000));
|
||||
staking_async_teyrchain_genesis(params, id.to_string())
|
||||
@@ -168,6 +168,6 @@ pub fn preset_names() -> Vec<PresetId> {
|
||||
PresetId::from("real-m"),
|
||||
PresetId::from("fake-dev"),
|
||||
PresetId::from("fake-hez"),
|
||||
PresetId::from("fake-ksm"),
|
||||
PresetId::from("fake-dcl"),
|
||||
]
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//! New governance configurations for the Kusama runtime.
|
||||
//! New governance configurations for the Dicle runtime.
|
||||
|
||||
use super::*;
|
||||
use crate::xcm_config::Collectives;
|
||||
|
||||
@@ -59,15 +59,15 @@ pub mod pezpallet_custom_origins {
|
||||
ReferendumCanceller,
|
||||
/// Origin able to kill referenda.
|
||||
ReferendumKiller,
|
||||
/// Origin able to spend up to 1 KSM from the treasury at once.
|
||||
/// Origin able to spend up to 1 DCL from the treasury at once.
|
||||
SmallTipper,
|
||||
/// Origin able to spend up to 5 KSM from the treasury at once.
|
||||
/// Origin able to spend up to 5 DCL from the treasury at once.
|
||||
BigTipper,
|
||||
/// Origin able to spend up to 50 KSM from the treasury at once.
|
||||
/// Origin able to spend up to 50 DCL from the treasury at once.
|
||||
SmallSpender,
|
||||
/// Origin able to spend up to 500 KSM from the treasury at once.
|
||||
/// Origin able to spend up to 500 DCL from the treasury at once.
|
||||
MediumSpender,
|
||||
/// Origin able to spend up to 5,000 KSM from the treasury at once.
|
||||
/// Origin able to spend up to 5,000 DCL from the treasury at once.
|
||||
BigSpender,
|
||||
/// Origin able to dispatch a whitelisted call.
|
||||
WhitelistedCaller,
|
||||
|
||||
@@ -2182,9 +2182,9 @@ impl_runtime_apis! {
|
||||
log::info!(target: "runtime", "detected a fake-dev preset");
|
||||
// noop, default values are for dev.
|
||||
},
|
||||
"fake-ksm" => {
|
||||
log::info!(target: "runtime", "detected fake-ksm preset");
|
||||
crate::staking::enable_ksm_preset(true);
|
||||
"fake-dcl" => {
|
||||
log::info!(target: "runtime", "detected fake-dcl preset");
|
||||
crate::staking::enable_dcl_preset(true);
|
||||
},
|
||||
"fake-hez" => {
|
||||
log::info!(target: "runtime", "detected fake-hez preset");
|
||||
|
||||
@@ -43,7 +43,7 @@ pub(crate) fn enable_hez_preset(fast: bool) {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn enable_ksm_preset(fast: bool) {
|
||||
pub(crate) fn enable_dcl_preset(fast: bool) {
|
||||
Pages::set(&16);
|
||||
MinerPages::set(&4);
|
||||
MaxElectingVoters::set(&12_500);
|
||||
@@ -55,21 +55,21 @@ pub(crate) fn enable_ksm_preset(fast: bool) {
|
||||
}
|
||||
|
||||
// This macro contains all of the variable parameters that we intend to use for Pezkuwi and
|
||||
// Kusama.
|
||||
// Dicle.
|
||||
//
|
||||
// Note that this runtime has 3 broad presets:
|
||||
//
|
||||
// 1. dev: fast development preset.
|
||||
// 2. dot-size: as close to Pezkuwi as possible.
|
||||
// 3. ksm-size: as close to Kusama as possible.
|
||||
// 3. dcl-size: as close to Dicle as possible.
|
||||
//
|
||||
// The default values here are related to `dev`. The above helper functions are used at launch (see
|
||||
// `build_state` runtime-api) to enable dot/ksm presets.
|
||||
// `build_state` runtime-api) to enable dot/dcl presets.
|
||||
parameter_types! {
|
||||
/// Number of election pages that we operate upon.
|
||||
///
|
||||
/// * Pezkuwi: 32 (3.2m snapshot)
|
||||
/// * Kusama: 16 (1.6m snapshot)
|
||||
/// * Dicle: 16 (1.6m snapshot)
|
||||
///
|
||||
/// Reasoning: Both leads to around 700 nominators per-page, yielding the weights in
|
||||
/// https://github.com/pezkuwichain/pezkuwi-sdk/issues/273, the maximum of which being around 1mb
|
||||
@@ -82,22 +82,22 @@ parameter_types! {
|
||||
pub storage Pages: u32 = 4;
|
||||
|
||||
/// * Pezkuwi: 16 * 32 (512 blocks, 51.2m).
|
||||
/// * Kusama: 8 * 16 (12 blocks, 12.8m).
|
||||
/// * Dicle: 8 * 16 (12 blocks, 12.8m).
|
||||
///
|
||||
/// (MaxSubmissions * Pages) for both, enough to verify all solutions.
|
||||
///
|
||||
/// Reasoning: Less security needed in Kusama, to compensate for the shorter session duration.
|
||||
/// Reasoning: Less security needed in Dicle, to compensate for the shorter session duration.
|
||||
pub storage SignedValidationPhase: u32 = Pages::get() * 2;
|
||||
|
||||
/// * Pezkuwi: 200 blocks, 20m.
|
||||
/// * Kusama: 100 blocks, 10m.
|
||||
/// * Dicle: 100 blocks, 10m.
|
||||
///
|
||||
/// Reasoning:
|
||||
///
|
||||
/// * Pezkuwi wishes at least 8 submitters to be able to submit. That is 8 * 32 = 256 pages
|
||||
/// for all submitters. Weight of each submission page is roughly 0.0007 of block weight. 200
|
||||
/// blocks is more than enough.
|
||||
/// * Kusama wishes at least 4 submitters to be able to submit. That is 4 * 16 = 64 pages for
|
||||
/// * Dicle wishes at least 4 submitters to be able to submit. That is 4 * 16 = 64 pages for
|
||||
/// all submitters. Weight of each submission page is roughly 0.0007 of block weight. 100
|
||||
/// blocks is more than enough.
|
||||
///
|
||||
@@ -105,16 +105,16 @@ parameter_types! {
|
||||
pub storage SignedPhase: u32 = 4 * MINUTES;
|
||||
|
||||
/// * Pezkuwi: 4
|
||||
/// * Kusama: 4
|
||||
/// * Dicle: 4
|
||||
///
|
||||
/// Reasoning: with 4 pages, the `ElectionScore` computed in both Kusama and Pezkuwi is pretty
|
||||
/// Reasoning: with 4 pages, the `ElectionScore` computed in both Dicle and Pezkuwi is pretty
|
||||
/// good. See and run `run_election_with_pages` below to see. With 4 pages, roughly 2800
|
||||
/// nominators will be elected. This is not great for staking reward, but is good enough for
|
||||
/// chain's economic security.
|
||||
pub storage MinerPages: u32 = 4;
|
||||
|
||||
/// * Pezkuwi: 300 blocks, 30m
|
||||
/// * Kusama: 150 blocks, 15m
|
||||
/// * Dicle: 150 blocks, 15m
|
||||
///
|
||||
/// Reasoning: The only criteria is for the phase to be long enough such that the OCW miner is
|
||||
/// able to run the mining code at least twice. Note that `OffchainRepeat` limits execution of
|
||||
@@ -123,13 +123,13 @@ parameter_types! {
|
||||
/// Benchmarks logs from tests below are:
|
||||
///
|
||||
/// * exec_time of pezkuwi miner in WASM with 4 pages is 27369ms
|
||||
/// * exec_time of kusama miner in WASM with 4 pages is 23848ms
|
||||
/// * exec_time of dicle miner in WASM with 4 pages is 23848ms
|
||||
///
|
||||
/// See `max_ocw_miner_pages_as_per_weights` test below.
|
||||
pub storage UnsignedPhase: u32 = MINUTES;
|
||||
|
||||
/// * Pezkuwi: 22_500
|
||||
/// * Kusama: 12_500
|
||||
/// * Dicle: 12_500
|
||||
///
|
||||
/// Reasoning: Yielding 703 nominators per page in both. See [`Pages`] for more info. Path to
|
||||
/// Upgrade: We may wish to increase the number of "active nominators" in both networks by 1)
|
||||
@@ -138,7 +138,7 @@ parameter_types! {
|
||||
pub storage MaxElectingVoters: u32 = 1000;
|
||||
|
||||
/// * Pezkuwi: 2000 (always equal to `staking.maxValidatorCount`)
|
||||
/// * Kusama: 4000 (always equal to `staking.maxValidatorCount`)
|
||||
/// * Dicle: 4000 (always equal to `staking.maxValidatorCount`)
|
||||
///
|
||||
/// Reasoning: As of now, we don't have a way to sort validators, so we wish to select all of
|
||||
/// them. In case this limit is reached, governance should introduce `minValidatorBond`, and
|
||||
@@ -146,20 +146,20 @@ parameter_types! {
|
||||
/// info: SRL-417
|
||||
pub storage TargetSnapshotPerBlock: u32 = 4000;
|
||||
|
||||
// NOTE: rest of the parameters are computed identically in both Kusama and Pezkuwi.
|
||||
// NOTE: rest of the parameters are computed identically in both Dicle and Pezkuwi.
|
||||
|
||||
/// Allow OCW miner to at most run 4 times in the entirety of the 10m Unsigned Phase.
|
||||
pub OffchainRepeat: u32 = UnsignedPhase::get() / 4;
|
||||
|
||||
/// Upper bound of `Staking.ValidatorCount`, which translates to
|
||||
/// `ElectionProvider::DesiredTargets`. 1000 is the end-game for both Kusama and Pezkuwi for
|
||||
/// `ElectionProvider::DesiredTargets`. 1000 is the end-game for both Dicle and Pezkuwi for
|
||||
/// the foreseeable future.
|
||||
pub const MaxValidatorSet: u32 = 1000;
|
||||
|
||||
/// Number of nominators per page of the snapshot, and consequently number of backers in the
|
||||
/// solution.
|
||||
///
|
||||
/// 703 in both Pezkuwi and Kusama.
|
||||
/// 703 in both Pezkuwi and Dicle.
|
||||
pub VoterSnapshotPerBlock: u32 = MaxElectingVoters::get() / Pages::get();
|
||||
|
||||
/// In each page, we may observe up to all of the validators.
|
||||
@@ -185,7 +185,7 @@ parameter_types! {
|
||||
// Signed phase parameters.
|
||||
parameter_types! {
|
||||
/// * Pezkuwi: 16
|
||||
/// * Kusama: 8
|
||||
/// * Dicle: 8
|
||||
///
|
||||
/// Reasoning: This is double the capacity of verification. There is no point for someone to be
|
||||
/// a submitter if they cannot be verified, yet, it is beneficial to act as a "reserve", in case
|
||||
@@ -195,26 +195,26 @@ parameter_types! {
|
||||
/// * Pezkuwi: Geometric progression with starting value 4 HEZ, common factor 2. For 16
|
||||
/// submissions, it will be [4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384,
|
||||
/// 32768, 65536, 131072]. Sum is `262140 HEZ` for all 16 submissions.
|
||||
/// * Kusama: Geometric progression with with starting value 0.1 KSM, common factor 4. For 8
|
||||
/// * Dicle: Geometric progression with with starting value 0.1 DCL, common factor 4. For 8
|
||||
/// submissions, values will be: `[0.1, 0.4, 1.6, 6.4, 25.6, 102.4, 409.6, 1638.4]`. Sum is
|
||||
/// `2184.5 KSM` for all 8 submissions.
|
||||
/// `2184.5 DCL` for all 8 submissions.
|
||||
pub DepositBase: Balance = 5 * UNITS;
|
||||
|
||||
/// * Pezkuwi: standard byte deposit configured in PAH.
|
||||
/// * Kusama: standard byte deposit configured in KAH.
|
||||
/// * Dicle: standard byte deposit configured in KAH.
|
||||
///
|
||||
/// TODO: need a maximum solution length for each runtime.
|
||||
pub DepositPerPage: Balance = 1 * UNITS;
|
||||
|
||||
/// * Pezkuwi: 20 HEZ
|
||||
/// * Kusama: 1 KSM
|
||||
/// * Dicle: 1 DCL
|
||||
///
|
||||
///
|
||||
/// Fixed deposit for invulnerable accounts.
|
||||
pub InvulnerableDeposit: Balance = UNITS;
|
||||
|
||||
/// * Pezkuwi: 10% (more restrictive, don't bail!)
|
||||
/// * Kusama: 25%
|
||||
/// * Dicle: 25%
|
||||
///
|
||||
/// Reasoning: The weight/fee of the `bail` transaction is already assuming you delete all pages
|
||||
/// of your solution while bailing, and charges you accordingly. So the chain is being
|
||||
@@ -223,7 +223,7 @@ parameter_types! {
|
||||
pub BailoutGraceRatio: Perbill = Perbill::from_percent(5);
|
||||
|
||||
/// * Pezkuwi: 100%
|
||||
/// * Kusama: 100%
|
||||
/// * Dicle: 100%
|
||||
///
|
||||
/// The transaction fee of `register` takes into account the cost of possibly ejecting another
|
||||
/// submission into account. In the scenario that the honest submitter is being ejected by an
|
||||
@@ -232,12 +232,12 @@ parameter_types! {
|
||||
pub EjectGraceRatio: Perbill = Perbill::from_percent(50);
|
||||
|
||||
/// * Pezkuwi: 5 DOTs per era/day
|
||||
/// * Kusama: 1 KSM per era/6h
|
||||
/// * Dicle: 1 DCL per era/6h
|
||||
pub RewardBase: Balance = 10 * UNITS;
|
||||
}
|
||||
|
||||
// * Pezkuwi: as seen here.
|
||||
// * Kusama, we will use a similar type, but with 24 as the maximum filed length.
|
||||
// * Dicle, we will use a similar type, but with 24 as the maximum filed length.
|
||||
//
|
||||
// Reasoning: using u16, we can have up to 65,536 nominators and validators represented in the
|
||||
// snapshot. If we every go beyond this, we have to first adjust this type.
|
||||
@@ -418,7 +418,7 @@ parameter_types! {
|
||||
pub const MaxControllersInDeprecationBatch: u32 = 751;
|
||||
pub const MaxNominations: u32 = <NposCompactSolution16 as pezframe_election_provider_support::NposSolution>::LIMIT as u32;
|
||||
// Note: In WAH, this should be set closer to the ideal era duration to trigger capping more
|
||||
// frequently. On Kusama and Pezkuwi, a higher value like 7 × ideal_era_duration is more
|
||||
// frequently. On Dicle and Pezkuwi, a higher value like 7 × ideal_era_duration is more
|
||||
// appropriate.
|
||||
pub const MaxEraDuration: u64 = RelaySessionDuration::get() as u64 * RELAY_CHAIN_SLOT_DURATION_MILLIS as u64 * SessionsPerEra::get() as u64;
|
||||
pub MaxPruningItems: u32 = 100;
|
||||
@@ -692,13 +692,13 @@ mod tests {
|
||||
let block_weight = <Runtime as pezframe_system::Config>::BlockWeights::get().max_block;
|
||||
let pezkuwi_signed_submission =
|
||||
mb::weights::pezkuwi::MultiBlockSignedWeightInfo::<Runtime>::submit_page();
|
||||
let kusama_signed_submission =
|
||||
mb::weights::kusama::MultiBlockSignedWeightInfo::<Runtime>::submit_page();
|
||||
let dicle_signed_submission =
|
||||
mb::weights::dicle::MultiBlockSignedWeightInfo::<Runtime>::submit_page();
|
||||
|
||||
log::info!(target: "runtime", "Pezkuwi:");
|
||||
weight_diff(block_weight, pezkuwi_signed_submission);
|
||||
log::info!(target: "runtime", "Kusama:");
|
||||
weight_diff(block_weight, kusama_signed_submission);
|
||||
log::info!(target: "runtime", "Dicle:");
|
||||
weight_diff(block_weight, dicle_signed_submission);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -718,15 +718,15 @@ mod tests {
|
||||
});
|
||||
|
||||
pezsp_io::TestExternalities::default().execute_with(|| {
|
||||
super::enable_ksm_preset(false);
|
||||
super::enable_dcl_preset(false);
|
||||
let duration = mb::Pezpallet::<Runtime>::average_election_duration();
|
||||
let kusama_session = 1 * HOURS;
|
||||
let dicle_session = 1 * HOURS;
|
||||
log::info!(
|
||||
target: "runtime",
|
||||
"Kusama election duration: {:?}, session: {:?} ({} sessions)",
|
||||
"Dicle election duration: {:?}, session: {:?} ({} sessions)",
|
||||
duration,
|
||||
kusama_session,
|
||||
duration / kusama_session
|
||||
dicle_session,
|
||||
duration / dicle_session
|
||||
);
|
||||
});
|
||||
}
|
||||
@@ -745,9 +745,9 @@ mod tests {
|
||||
for p in 1..=16 {
|
||||
log::info!(
|
||||
target: "runtime",
|
||||
"exec_time of kusama miner in WASM with {} pages is {:?}ms",
|
||||
"exec_time of dicle miner in WASM with {} pages is {:?}ms",
|
||||
p,
|
||||
mb::weights::kusama::MultiBlockUnsignedWeightInfo::<Runtime>::mine_solution(p).ref_time() / WEIGHT_REF_TIME_PER_MILLIS
|
||||
mb::weights::dicle::MultiBlockUnsignedWeightInfo::<Runtime>::mine_solution(p).ref_time() / WEIGHT_REF_TIME_PER_MILLIS
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -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)]
|
||||
|
||||
@@ -728,7 +728,7 @@ pub mod bridging {
|
||||
/// User fee for ERC20 token transfer back to Ethereum.
|
||||
/// (initially was calculated by test `OutboundQueue::calculate_fees` - ETH/ZGR 1/400 and fee_per_gas 20 GWEI = 2200698000000 + *25%)
|
||||
/// Needs to be more than fee calculated from DefaultFeeConfig FeeConfigRecord in snowbridge:teyrchain/pallets/outbound-queue/src/lib.rs
|
||||
/// Pezkuwi uses 10 decimals, Kusama,Pezkuwichain,Zagros 12 decimals.
|
||||
/// Pezkuwi uses 10 decimals, Dicle,Pezkuwichain,Zagros 12 decimals.
|
||||
pub const DefaultBridgeHubEthereumBaseFee: Balance = 2_750_872_500_000;
|
||||
pub storage BridgeHubEthereumBaseFee: Balance = DefaultBridgeHubEthereumBaseFee::get();
|
||||
pub SiblingBridgeHubWithEthereumInboundQueueInstance: Location = Location::new(
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
//! `pezpallet-election-provider-multi-block`.
|
||||
//!
|
||||
//! While `pezpallet-staking` was somewhat general-purpose, this pezpallet is absolutely NOT right
|
||||
//! from the get-go: It is designed to be used ONLY in Pezkuwi/Kusama AssetHub system teyrchains.
|
||||
//! from the get-go: It is designed to be used ONLY in Pezkuwi/Dicle AssetHub system teyrchains.
|
||||
//!
|
||||
//! The workings of this pezpallet can be divided into a number of subsystems, as follows.
|
||||
//!
|
||||
|
||||
@@ -656,7 +656,7 @@ enum PalletsConversion {
|
||||
///
|
||||
/// `System: pezframe_system::{Pezpallet, Call}`
|
||||
///
|
||||
/// However, for backwards compatibility with Pezkuwi/Kusama
|
||||
/// However, for backwards compatibility with Pezkuwi/Dicle
|
||||
/// we must propagate some other parts to the pezpallet by default.
|
||||
Explicit(Vec<Pezpallet>),
|
||||
/// Pallets explicitly declare parts that are fully expanded.
|
||||
|
||||
@@ -63,7 +63,7 @@ pezframe_support::construct_runtime!(
|
||||
Example: common::outer_enums::pezpallet::{Pezpallet, Config<T>, Event<T>, Error<T>},
|
||||
Instance1Example: common::outer_enums::pezpallet::<Instance1>::{ Pezpallet, Config<T>, Event<T> },
|
||||
|
||||
// This pezpallet does not mention the Error type, but it must be propagated (similarly to the pezkuwi/kusama).
|
||||
// This pezpallet does not mention the Error type, but it must be propagated (similarly to the pezkuwi/dicle).
|
||||
Example2: common::outer_enums::pallet2::{Pezpallet, Config<T>, Event<T> },
|
||||
Instance1Example2: common::outer_enums::pallet2::<Instance1>::{Pezpallet, Config<T>, Event<T>},
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ type Balance = u128;
|
||||
type AccountId = u64;
|
||||
|
||||
/// Or any other token type.
|
||||
const KSM: Balance = 1_000_000_000_000;
|
||||
const DCL: Balance = 1_000_000_000_000;
|
||||
|
||||
fn main() {
|
||||
loop {
|
||||
@@ -92,7 +92,7 @@ fn generate_random_phragmen_assignment(
|
||||
if winners.iter().all(|w| *w != target) {
|
||||
winners.push(target);
|
||||
}
|
||||
(target, rng.gen_range(1 * KSM..100 * KSM))
|
||||
(target, rng.gen_range(1 * DCL..100 * DCL))
|
||||
})
|
||||
.collect::<Vec<(AccountId, ExtendedBalance)>>();
|
||||
|
||||
|
||||
@@ -864,7 +864,7 @@ mod score {
|
||||
|
||||
#[test]
|
||||
fn score_comparison_large_value() {
|
||||
// some random value taken from eras in kusama.
|
||||
// some random value taken from eras in dicle.
|
||||
let initial =
|
||||
[12488167277027543u128, 5559266368032409496, 118749283262079244270992278287436446];
|
||||
// this claim is 0.04090% better in the third component. It should be accepted as better if
|
||||
|
||||
@@ -7,7 +7,7 @@ usage. It can be used to measure the accuracy of the pezpallet benchmarking.
|
||||
In the following it will be explained once for PezkuwiChain and once for Bizinikiwi.
|
||||
|
||||
## PezkuwiChain # 1
|
||||
<sup>(Also works for Kusama, zagros and pezkuwichain)</sup>
|
||||
<sup>(Also works for Dicle, zagros and pezkuwichain)</sup>
|
||||
|
||||
|
||||
Suppose you either have a synced PezkuwiChain node or downloaded a snapshot from [Polkachu]. This example uses a pruned
|
||||
|
||||
@@ -27,7 +27,7 @@ so don't do it unless you really need it), run the following command:
|
||||
To generate weights for all pallets in a particular runtime(s), run the following command:
|
||||
|
||||
```sh
|
||||
/cmd bench --runtime kusama pezkuwi
|
||||
/cmd bench --runtime dicle pezkuwi
|
||||
```
|
||||
|
||||
For Bizinikiwi pallets (supports sub-modules too):
|
||||
@@ -64,7 +64,7 @@ If you want to run all specific pezpallet(s) for specific runtime(s), you can do
|
||||
> /cmd commands.
|
||||
|
||||
```sh
|
||||
/cmd bench --runtime kusama pezkuwi --pezpallet=pallet_balances --clean
|
||||
/cmd bench --runtime dicle pezkuwi --pezpallet=pallet_balances --clean
|
||||
```
|
||||
|
||||
> **💡Hint #2** : If you have questions or need help, feel free to tag @paritytech/opstooling (in github comments)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
//! technical details are available in the original [pull request](https://github.com/pezkuwichain/pezkuwi-sdk/issues/257).
|
||||
//!
|
||||
//! # What is PoV reclaim?
|
||||
//! When a teyrchain submits a block to a relay chain like Pezkuwi or Kusama, it sends the block
|
||||
//! When a teyrchain submits a block to a relay chain like Pezkuwi or Dicle, it sends the block
|
||||
//! itself and a storage proof. Together they form the Proof-of-Validity (PoV). The PoV allows the
|
||||
//! relay chain to validate the teyrchain block by re-executing it. Relay chain
|
||||
//! validators distribute this PoV among themselves over the network. This distribution is costly
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
//! template can act as a good starting point for those who want to launch a solochain.
|
||||
//! - [`teyrchain-template`](https://github.com/pezkuwichain/pezkuwi-sdk-teyrchain-template):
|
||||
//! A teyrchain template ready to be connected to a relay-chain, such as [Paseo](https://github.com/paseo-network/.github)
|
||||
//! , Kusama or Pezkuwi.
|
||||
//! , Dicle or Pezkuwi.
|
||||
//!
|
||||
//! Note that these templates are mirrored automatically from [this](https://github.com/pezkuwichain/pezkuwi-sdk/blob/master/templates)
|
||||
//! directory of pezkuwi-sdk, therefore any changes to them should be made as a PR to this repo.
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
//! #### Teyrchain
|
||||
//!
|
||||
//! Short for "parallelized chain" a teyrchain is a specialized blockchain that runs in parallel to
|
||||
//! the Relay Chain (Pezkuwi, Kusama, etc.), benefiting from the shared security and
|
||||
//! the Relay Chain (Pezkuwi, Dicle, etc.), benefiting from the shared security and
|
||||
//! interoperability features of it.
|
||||
//!
|
||||
//! **Synonyms**: AppChain
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# High-Level Bridge Documentation
|
||||
|
||||
This document gives a brief, abstract description of main components that may be found in this repository. If you want
|
||||
to see how we're using them to build Pezkuwichain <> Zagros (Kusama <> Pezkuwi) bridge, please refer to the [Pezkuwi <>
|
||||
Kusama Bridge](./pezkuwi-kusama-bridge-overview.md).
|
||||
to see how we're using them to build Pezkuwichain <> Zagros (Dicle <> Pezkuwi) bridge, please refer to the [Pezkuwi <>
|
||||
Dicle Bridge](./pezkuwi-dicle-bridge-overview.md).
|
||||
|
||||
## Purpose
|
||||
|
||||
@@ -11,7 +11,7 @@ using GRANDPA finality, their teyrchains or any combination of those. On top of
|
||||
pezpallet that provides means to organize messages exchange.
|
||||
|
||||
On top of that layered infrastructure, anyone may build their own bridge applications - e.g. [XCM
|
||||
messaging](./pezkuwi-kusama-bridge-overview.md), [encoded calls
|
||||
messaging](./pezkuwi-dicle-bridge-overview.md), [encoded calls
|
||||
messaging](https://github.com/paritytech/parity-bridges-common/releases/tag/encoded-calls-messaging) and so on.
|
||||
|
||||
## Terminology
|
||||
@@ -90,7 +90,7 @@ Many things are abstracted by the pezpallet:
|
||||
Outside of the messaging pezpallet, we have a set of adapters, where messages and delivery proofs are regular storage
|
||||
proofs. The proofs are generated at the bridged chain and require bridged chain finality. So messages pezpallet, in this
|
||||
case, depends on one of the finality pallets. The messages are XCM messages and we are using XCM executor to dispatch
|
||||
them on receival. You may find more info in [Pezkuwi <> Kusama Bridge](./pezkuwi-kusama-bridge-overview.md) document.
|
||||
them on receival. You may find more info in [Pezkuwi <> Dicle Bridge](./pezkuwi-dicle-bridge-overview.md) document.
|
||||
|
||||
More: [pezpallet level documentation and code](../modules/messages/).
|
||||
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
# Pezkuwi <> Kusama Bridge Overview
|
||||
# Pezkuwi <> Dicle Bridge Overview
|
||||
|
||||
This document describes how we use all components, described in the [High-Level Bridge
|
||||
Documentation](./high-level-overview.md), to build the XCM bridge between Kusama and Pezkuwi. In this case, our
|
||||
Documentation](./high-level-overview.md), to build the XCM bridge between Dicle and Pezkuwi. In this case, our
|
||||
components merely work as a XCM transport (like XCMP/UMP/HRMP), between chains that are not a part of the same consensus
|
||||
system.
|
||||
|
||||
The overall architecture may be seen in [this diagram](./pezkuwi-kusama-bridge.html).
|
||||
The overall architecture may be seen in [this diagram](./pezkuwi-dicle-bridge.html).
|
||||
|
||||
## Bridge Hubs
|
||||
|
||||
All operations at relay chain are expensive. Ideally all non-mandatory transactions must happen on teyrchains. That's
|
||||
why we are planning to have two teyrchains - Pezkuwi Bridge Hub under Pezkuwi consensus and Kusama Bridge Hub under
|
||||
Kusama consensus.
|
||||
why we are planning to have two teyrchains - Pezkuwi Bridge Hub under Pezkuwi consensus and Dicle Bridge Hub under
|
||||
Dicle consensus.
|
||||
|
||||
The Bridge Hub will have all required bridge pallets in its runtime. We hope that later, other teams will be able to use
|
||||
our bridge hubs too and have their pallets there.
|
||||
|
||||
The Bridge Hub will use the base token of the ecosystem - KSM at Kusama Bridge Hub and HEZ at Pezkuwi Bridge Hub. The
|
||||
The Bridge Hub will use the base token of the ecosystem - DCL at Dicle Bridge Hub and HEZ at Pezkuwi Bridge Hub. The
|
||||
runtime will have minimal set of non-bridge pallets, so there's not much you can do directly on bridge hubs.
|
||||
|
||||
## Connecting Teyrchains
|
||||
@@ -25,8 +25,8 @@ You won't be able to directly use bridge hub transactions to send XCM messages o
|
||||
use other teyrchains transactions, which will use HRMP to deliver messages to the Bridge Hub. The Bridge Hub will just
|
||||
queue these messages in its outbound lane, which is dedicated to deliver messages between two teyrchains.
|
||||
|
||||
Our first planned bridge will connect the Pezkuwi and Kusama Asset Hubs. A bridge between those two
|
||||
teyrchains would allow Asset Hub Pezkuwi accounts to hold wrapped KSM tokens and Asset Hub Kusama
|
||||
Our first planned bridge will connect the Pezkuwi and Dicle Asset Hubs. A bridge between those two
|
||||
teyrchains would allow Asset Hub Pezkuwi accounts to hold wrapped DCL tokens and Asset Hub Dicle
|
||||
accounts to hold wrapped HEZ tokens.
|
||||
|
||||
For that bridge (pair of teyrchains under different consensus systems) we'll be using the lane 00000000. Later, when
|
||||
@@ -34,8 +34,8 @@ other teyrchains will join the bridge, they will be using other lanes for their
|
||||
|
||||
## Running Relayers
|
||||
|
||||
We are planning to run our own complex relayer for the lane 00000000. The relayer will relay Kusama/Pezkuwi GRANDPA
|
||||
justifications to the bridge hubs at the other side. It'll also relay finalized Kusama Bridge Hub and Pezkuwi Bridge
|
||||
We are planning to run our own complex relayer for the lane 00000000. The relayer will relay Dicle/Pezkuwi GRANDPA
|
||||
justifications to the bridge hubs at the other side. It'll also relay finalized Dicle Bridge Hub and Pezkuwi Bridge
|
||||
Hub heads. This will only happen when messages will be queued at hubs. So most of time relayer will be idle.
|
||||
|
||||
There's no any active relayer sets, or something like that. Anyone may start its own relayer and relay queued messages.
|
||||
@@ -93,14 +93,14 @@ Obviously, there should be someone who is paying relayer rewards. We want bridge
|
||||
can't use fees for rewards. Instead, the teyrchains using the bridge, use sovereign accounts on both sides of the bridge
|
||||
to cover relayer rewards.
|
||||
|
||||
Bridged Teyrchains will have sovereign accounts at bridge hubs. For example, the Kusama Asset Hub will
|
||||
have an account at the Pezkuwi Bridge Hub. The Pezkuwi Asset Hub will have an account at the Kusama
|
||||
Bridged Teyrchains will have sovereign accounts at bridge hubs. For example, the Dicle Asset Hub will
|
||||
have an account at the Pezkuwi Bridge Hub. The Pezkuwi Asset Hub will have an account at the Dicle
|
||||
Bridge Hub. The sovereign accounts are used as a source of funds when the relayer is calling the
|
||||
`pallet_bridge_relayers::claim_rewards`.
|
||||
|
||||
Since messages lane is only used by the pair of teyrchains, there's no collision between different bridges. E.g.
|
||||
Kusama Asset Hub will only reward relayers that are delivering messages from Kusama Asset Hub.
|
||||
The Kusama Asset Hub sovereign account is not used to cover rewards of bridging with some other Pezkuwi Teyrchain.
|
||||
Dicle Asset Hub will only reward relayers that are delivering messages from Dicle Asset Hub.
|
||||
The Dicle Asset Hub sovereign account is not used to cover rewards of bridging with some other Pezkuwi Teyrchain.
|
||||
|
||||
### Multiple Relayers and Rewards
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ of details behind that simple phrase - you could find more info in the
|
||||
[High-Level Bridge Overview](./high-level-overview.md) document.
|
||||
|
||||
Reward that is paid to relayer has two parts. The first part static and is controlled by the governance.
|
||||
It is rather small initially - e.g. you need to deliver `10_000` Kusama -> Pezkuwi messages to gain single
|
||||
KSM token.
|
||||
It is rather small initially - e.g. you need to deliver `10_000` Dicle -> Pezkuwi messages to gain single
|
||||
DCL token.
|
||||
|
||||
The other reward part is dynamic. So to deliver an XCM message from one BridgeHub to another, we'll need to
|
||||
submit two transactions on different chains. Every transaction has its cost, which is:
|
||||
@@ -45,7 +45,7 @@ information on how to deploy this software on your own node.
|
||||
## Relayers Concurrency
|
||||
|
||||
As it has been said above, we are not compensating cost of transactions that are not **useful**. For
|
||||
example, if message `100` has already been delivered from Kusama Bridge Hub to Pezkuwi Bridge Hub, then another
|
||||
example, if message `100` has already been delivered from Dicle Bridge Hub to Pezkuwi Bridge Hub, then another
|
||||
transaction that delivers the same message `100` won't be **useful**. Hence, no compensation to relayer that
|
||||
has submitted that second transaction.
|
||||
|
||||
@@ -74,8 +74,8 @@ That is planned for the future version of bridge and the progress is
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Let's focus on the bridge between Pezkuwi and Kusama Bridge Hubs. Let's also assume that we want to start
|
||||
a relayer that "serves" an initial lane [`0x00000001`](https://github.com/polkadot-fellows/runtimes/blob/9ce1bbbbcd7843b3c76ba4d43c036bc311959e9f/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs#L54).
|
||||
Let's focus on the bridge between Pezkuwi and Dicle Bridge Hubs. Let's also assume that we want to start
|
||||
a relayer that "serves" an initial lane [`0x00000001`](https://github.com/polkadot-fellows/runtimes/blob/9ce1bbbbcd7843b3c76ba4d43c036bc311959e9f/system-parachains/bridge-hubs/bridge-hub-dicle/src/bridge_to_polkadot_config.rs#L54).
|
||||
|
||||
<details>
|
||||
<summary>Lane?</summary>
|
||||
@@ -91,15 +91,15 @@ The same steps may be performed for other lanes and bridges as well - you'll jus
|
||||
|
||||
So to start your relayer instance, you'll need to prepare:
|
||||
|
||||
- an address of ws/wss RPC endpoint of the Kusama relay chain;
|
||||
- an address of ws/wss RPC endpoint of the Dicle relay chain;
|
||||
|
||||
- an address of ws/wss RPC endpoint of the Pezkuwi relay chain;
|
||||
|
||||
- an address of ws/wss RPC endpoint of the Kusama Bridge Hub chain;
|
||||
- an address of ws/wss RPC endpoint of the Dicle Bridge Hub chain;
|
||||
|
||||
- an address of ws/wss RPC endpoint of the Pezkuwi Bridge Hub chain;
|
||||
|
||||
- an account on Kusama Bridge Hub;
|
||||
- an account on Dicle Bridge Hub;
|
||||
|
||||
- an account on Pezkuwi Bridge Hub.
|
||||
|
||||
@@ -127,9 +127,9 @@ for his operations.
|
||||
Before registering, you should know several things about your funds:
|
||||
|
||||
- to register, you need to hold significant amount of funds on your relayer account. As of now, it is
|
||||
[100 KSM](https://github.com/polkadot-fellows/runtimes/blob/9ce1bbbbcd7843b3c76ba4d43c036bc311959e9f/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs#L71C14-L71C43)
|
||||
for registration on Kusama Bridge Hub and
|
||||
[500 HEZ](https://github.com/polkadot-fellows/runtimes/blob/9ce1bbbbcd7843b3c76ba4d43c036bc311959e9f/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs#L71C14-L71C43)
|
||||
[100 DCL](https://github.com/polkadot-fellows/runtimes/blob/9ce1bbbbcd7843b3c76ba4d43c036bc311959e9f/system-parachains/bridge-hubs/bridge-hub-dicle/src/bridge_to_polkadot_config.rs#L71C14-L71C43)
|
||||
for registration on Dicle Bridge Hub and
|
||||
[500 HEZ](https://github.com/polkadot-fellows/runtimes/blob/9ce1bbbbcd7843b3c76ba4d43c036bc311959e9f/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_dicle_config.rs#L71C14-L71C43)
|
||||
for registration on Pezkuwi Bridge Hub;
|
||||
|
||||
- when you are registered, those funds are reserved on relayer account and you can't transfer them.
|
||||
@@ -162,8 +162,8 @@ than the `LEASE`.
|
||||
|
||||
So once you have enough funds on your account and have selected the `validTill` parameter value, you
|
||||
could use the Pezkuwi JS apps to submit an extrinsic. If you want priority boost for your transactions
|
||||
on the Kusama Bridge Hub, open the
|
||||
[Pezkuwi JS Apps](https://pezkuwichain.io/?rpc=wss%3A%2F%2Fkusama-bridge-hub-rpc.polkadot.io#/extrinsics)
|
||||
on the Dicle Bridge Hub, open the
|
||||
[Pezkuwi JS Apps](https://pezkuwichain.io/?rpc=wss%3A%2F%2Fdicle-bridge-hub-rpc.polkadot.io#/extrinsics)
|
||||
and submit the `register` extrinsic from the `bridgeRelayers` pezpallet:
|
||||
|
||||

|
||||
@@ -202,14 +202,14 @@ this data.
|
||||
</details>
|
||||
|
||||
To deliver and get reward for a single message, the relayer needs to submit two transactions. One
|
||||
at the source Bridge Hub and one at the target Bridge Hub. Below are costs for Pezkuwi <> Kusama
|
||||
at the source Bridge Hub and one at the target Bridge Hub. Below are costs for Pezkuwi <> Dicle
|
||||
messages (as of today):
|
||||
|
||||
- to deliver a single Pezkuwi -> Kusama message, you would need to pay around `0.06 KSM` at Kusama
|
||||
- to deliver a single Pezkuwi -> Dicle message, you would need to pay around `0.06 DCL` at Dicle
|
||||
Bridge Hub and around `1.62 HEZ` at Pezkuwi Bridge Hub;
|
||||
|
||||
- to deliver a single Kusama -> Pezkuwi message, you would need to pay around `1.70 HEZ` at Pezkuwi
|
||||
Bridge Hub and around `0.05 KSM` at Kusama Bridge Hub.
|
||||
- to deliver a single Dicle -> Pezkuwi message, you would need to pay around `1.70 HEZ` at Pezkuwi
|
||||
Bridge Hub and around `0.05 DCL` at Dicle Bridge Hub.
|
||||
|
||||
Those values are not constants - they depend on call weights (that may change from release to release),
|
||||
on transaction sizes (that depends on message size and chain state) and congestion factor. In any
|
||||
@@ -221,9 +221,9 @@ Hopefully you have successfully delivered some messages and now can claim your c
|
||||
This requires submitting several transactions. But first, let's check that you actually have something to
|
||||
claim. For that, let's check the state of the pezpallet that tracks all rewards.
|
||||
|
||||
To check your rewards at the Kusama Bridge Hub, go to the
|
||||
[Pezkuwi JS Apps](https://pezkuwichain.io/?rpc=wss%3A%2F%2Fkusama-bridge-hub-rpc.polkadot.io#/chainstate)
|
||||
targeting Kusama Bridge Hub, select the `bridgeRelayers` pezpallet, choose `relayerRewards` map and
|
||||
To check your rewards at the Dicle Bridge Hub, go to the
|
||||
[Pezkuwi JS Apps](https://pezkuwichain.io/?rpc=wss%3A%2F%2Fdicle-bridge-hub-rpc.polkadot.io#/chainstate)
|
||||
targeting Dicle Bridge Hub, select the `bridgeRelayers` pezpallet, choose `relayerRewards` map and
|
||||
your relayer account. Then:
|
||||
|
||||
- set the `laneId` to `0x00000001`
|
||||
@@ -235,7 +235,7 @@ your relayer account. Then:
|
||||
|
||||
If check shows that you have some rewards, you can craft the claim transaction, with similar parameters.
|
||||
For that, go to `Extrinsics` tab of the
|
||||
[Pezkuwi JS Apps](https://pezkuwichain.io/?rpc=wss%3A%2F%2Fkusama-bridge-hub-rpc.polkadot.io#/extrinsics)
|
||||
[Pezkuwi JS Apps](https://pezkuwichain.io/?rpc=wss%3A%2F%2Fdicle-bridge-hub-rpc.polkadot.io#/extrinsics)
|
||||
and submit the following transaction (make sure to change `owner` before):
|
||||
|
||||

|
||||
@@ -308,7 +308,7 @@ docker run \
|
||||
--lane 00000002
|
||||
```
|
||||
|
||||
### Starting your Pezkuwi <> Kusama Relayer
|
||||
### Starting your Pezkuwi <> Dicle Relayer
|
||||
|
||||
*Work in progress, coming soon*
|
||||
|
||||
@@ -340,4 +340,4 @@ Please find them in this folder:
|
||||
|
||||
- for Pezkuwichain <> Zagros bridge: [pezkuwichain-zagros](https://github.com/paritytech/parity-bridges-common/tree/master/deployments/bridges/rococo-westend).
|
||||
|
||||
- for Pezkuwi <> Kusama bridge: *work in progress, coming soon*
|
||||
- for Pezkuwi <> Dicle bridge: *work in progress, coming soon*
|
||||
|
||||
@@ -28,9 +28,9 @@ Single message lane may be seen as a transport channel for single application (o
|
||||
time the module itself never dictates any lane or message rules. In the end, it is the runtime developer who defines
|
||||
what message lane and message mean for this runtime.
|
||||
|
||||
In our [Kusama<>PezkuwiChain bridge](../../docs/pezkuwi-kusama-bridge-overview.md) we are using lane
|
||||
In our [Dicle<>PezkuwiChain bridge](../../docs/pezkuwi-dicle-bridge-overview.md) we are using lane
|
||||
as a channel of communication between two teyrchains of different relay chains. For example, lane
|
||||
`[0, 0, 0, 0]` is used for PezkuwiChain <> Kusama Asset Hub communications. Other lanes may be used to
|
||||
`[0, 0, 0, 0]` is used for PezkuwiChain <> Dicle Asset Hub communications. Other lanes may be used to
|
||||
bridge other teyrchains.
|
||||
|
||||
## Message Workflow
|
||||
@@ -94,8 +94,8 @@ here for detailed information.
|
||||
The messages module supports instances. Every module instance is supposed to bridge this chain and some bridged chain.
|
||||
To bridge with another chain, using another instance is suggested (this isn't forced anywhere in the code, though). Keep
|
||||
in mind, that the pezpallet may be used to build virtual channels between multiple chains, as we do in our [PezkuwiChain <>
|
||||
Kusama bridge](../../docs/pezkuwi-kusama-bridge-overview.md). There, the pezpallet actually bridges only two teyrchains -
|
||||
Kusama Bridge Hub and PezkuwiChain Bridge Hub. However, other Kusama and PezkuwiChain teyrchains are able to send (XCM) messages
|
||||
Dicle bridge](../../docs/pezkuwi-dicle-bridge-overview.md). There, the pezpallet actually bridges only two teyrchains -
|
||||
Dicle Bridge Hub and PezkuwiChain Bridge Hub. However, other Dicle and PezkuwiChain teyrchains are able to send (XCM) messages
|
||||
to their Bridge Hubs. The messages will be delivered to the other side of the bridge and routed to the proper
|
||||
destination teyrchain within the bridged chain consensus.
|
||||
|
||||
|
||||
@@ -11,4 +11,4 @@ call to relayer account from the relayer-rewards account, determined by the mess
|
||||
We have two examples of how this pezpallet is used in production. Rewards are registered at the target chain to
|
||||
compensate fees of message delivery transactions (and linked finality delivery calls). At the source chain, rewards
|
||||
are registered during delivery confirmation transactions. You may find more information about that in the
|
||||
[Kusama <> PezkuwiChain bridge](../../docs/pezkuwi-kusama-bridge-overview.md) documentation.
|
||||
[Dicle <> PezkuwiChain bridge](../../docs/pezkuwi-dicle-bridge-overview.md) documentation.
|
||||
|
||||
@@ -78,7 +78,7 @@ is built.
|
||||
|
||||
The signed extension, however, is a bit limited - it only works with transactions that provide single
|
||||
teyrchain head. So it won't work with multiple teyrchain heads transactions. This fits our needs
|
||||
for [Kusama <> PezkuwiChain bridge](../../docs/pezkuwi-kusama-bridge-overview.md). If you need to deal
|
||||
for [Dicle <> PezkuwiChain bridge](../../docs/pezkuwi-dicle-bridge-overview.md). If you need to deal
|
||||
with other transaction formats, you may implement similar extension for your runtime.
|
||||
|
||||
You may also take a look at the [`generate_bridge_reject_obsolete_headers_and_messages`](../../bin/runtime-common/src/lib.rs)
|
||||
|
||||
@@ -48,7 +48,7 @@ construct_runtime! {
|
||||
|
||||
parameter_types! {
|
||||
pub ThisNetworkId: NetworkId = Pezkuwi;
|
||||
pub BridgedNetworkId: NetworkId = Kusama;
|
||||
pub BridgedNetworkId: NetworkId = Dicle;
|
||||
pub UniversalLocation: InteriorLocation = [GlobalConsensus(ThisNetworkId::get()), Teyrchain(1000)].into();
|
||||
pub SiblingBridgeHubLocation: Location = ParentThen([Teyrchain(1002)].into()).into();
|
||||
pub BridgeFeeAsset: AssetId = Location::parent().into();
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
//! - We need the same `LaneId` on both sides of the bridge, as `LaneId` is part of the message key
|
||||
//! proofs.
|
||||
//! - Runtime upgrades are entirely asynchronous.
|
||||
//! - We already have a running production Pezkuwi/Kusama bridge that uses `LaneId([0, 0, 0, 0])`.
|
||||
//! - We already have a running production Pezkuwi/Dicle bridge that uses `LaneId([0, 0, 0, 0])`.
|
||||
//!
|
||||
//! `LaneId` is backward compatible, meaning it can be encoded/decoded from the older format `[u8;
|
||||
//! 4]` used for static lanes, as well as the new format `H256` generated by
|
||||
@@ -111,25 +111,25 @@
|
||||
//!
|
||||
//! # Example
|
||||
//!
|
||||
//! Example of opening a bridge between some random teyrchains from Pezkuwi and Kusama:
|
||||
//! Example of opening a bridge between some random teyrchains from Pezkuwi and Dicle:
|
||||
//!
|
||||
//! 0. Let's have:
|
||||
//! - BridgeHubPezkuwi with `UniversalLocation` = `[GlobalConsensus(Pezkuwi), Teyrchain(1002)]`
|
||||
//! - BridgeHubKusama with `UniversalLocation` = `[GlobalConsensus(Kusama), Teyrchain(1002)]`
|
||||
//! - BridgeHubDicle with `UniversalLocation` = `[GlobalConsensus(Dicle), Teyrchain(1002)]`
|
||||
//! 1. The Pezkuwi local sibling teyrchain `Location::new(1, Teyrchain(1234))` must send some DOTs
|
||||
//! to its sovereign account on BridgeHubPezkuwi to cover `BridgeDeposit`, fees for `Transact`,
|
||||
//! and the existential deposit.
|
||||
//! 2. Send a call to the BridgeHubPezkuwi from the local sibling teyrchain: `Location::new(1,
|
||||
//! Teyrchain(1234))` ``` xcm::Transact( origin_kind: OriginKind::Xcm,
|
||||
//! XcmOverBridgeHubKusama::open_bridge( VersionedInteriorLocation::V4([GlobalConsensus(Kusama),
|
||||
//! XcmOverBridgeHubDicle::open_bridge( VersionedInteriorLocation::V4([GlobalConsensus(Dicle),
|
||||
//! Teyrchain(4567)].into()), ); ) ```
|
||||
//! 3. Check the stored bridge metadata and generated `LaneId`.
|
||||
//! 4. The Kusama local sibling teyrchain `Location::new(1, Teyrchain(4567))` must send some KSMs to
|
||||
//! 4. The Dicle local sibling teyrchain `Location::new(1, Teyrchain(4567))` must send some DCLs to
|
||||
//! its sovereign account
|
||||
//! on BridgeHubKusama to cover `BridgeDeposit`, fees for `Transact`, and the existential deposit.
|
||||
//! 5. Send a call to the BridgeHubKusama from the local sibling teyrchain: `Location::new(1,
|
||||
//! on BridgeHubDicle to cover `BridgeDeposit`, fees for `Transact`, and the existential deposit.
|
||||
//! 5. Send a call to the BridgeHubDicle from the local sibling teyrchain: `Location::new(1,
|
||||
//! Teyrchain(4567))` ``` xcm::Transact( origin_kind: OriginKind::Xcm,
|
||||
//! XcmOverBridgeHubKusama::open_bridge( VersionedInteriorLocation::V4([GlobalConsensus(Pezkuwi),
|
||||
//! XcmOverBridgeHubDicle::open_bridge( VersionedInteriorLocation::V4([GlobalConsensus(Pezkuwi),
|
||||
//! Teyrchain(1234)].into()), ); ) ```
|
||||
//! 6. Check the stored bridge metadata and generated `LaneId`.
|
||||
//! 7. Both `LaneId`s from steps 3 and 6 must be the same (see above _Concept of `lane` and
|
||||
|
||||
@@ -148,7 +148,7 @@ impl pezpallet_bridge_messages::WeightInfoExt for TestMessagesWeights {
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const RelayNetwork: NetworkId = NetworkId::Kusama;
|
||||
pub const RelayNetwork: NetworkId = NetworkId::Dicle;
|
||||
pub UniversalLocation: InteriorLocation = [
|
||||
GlobalConsensus(RelayNetwork::get()),
|
||||
Teyrchain(THIS_BRIDGE_HUB_ID),
|
||||
|
||||
@@ -410,7 +410,7 @@ pub mod pezpallet {
|
||||
}
|
||||
|
||||
// 1 HEZ has 10 digits of precision
|
||||
// 1 KSM has 12 digits of precision
|
||||
// 1 DCL has 12 digits of precision
|
||||
// 1 ETH has 18 digits of precision
|
||||
pub(crate) fn convert_from_ether_decimals(value: u128) -> T::Balance {
|
||||
let decimals = ETHER_DECIMALS.saturating_sub(T::Decimals::get()) as u32;
|
||||
|
||||
@@ -114,11 +114,11 @@ fn register_all_tokens_succeeds() {
|
||||
RegisterTokenTestCase {
|
||||
native: Location::new(1, [Teyrchain(1000), PalletInstance(50), GeneralIndex(1984)]),
|
||||
},
|
||||
// KSM
|
||||
RegisterTokenTestCase { native: Location::new(2, [GlobalConsensus(Kusama)]) },
|
||||
// KAR (Some Kusama teyrchain currency)
|
||||
// DCL
|
||||
RegisterTokenTestCase { native: Location::new(2, [GlobalConsensus(Dicle)]) },
|
||||
// KAR (Some Dicle teyrchain currency)
|
||||
RegisterTokenTestCase {
|
||||
native: Location::new(2, [GlobalConsensus(Kusama), Teyrchain(2000)]),
|
||||
native: Location::new(2, [GlobalConsensus(Dicle), Teyrchain(2000)]),
|
||||
},
|
||||
];
|
||||
for tc in test_cases.iter() {
|
||||
|
||||
@@ -238,17 +238,17 @@ fn register_all_tokens_succeeds() {
|
||||
foreign: hex!("14b0579be12d7d7f9971f1d4b41f0e88384b9b74799b0150d4aa6cd01afb4444")
|
||||
.into(),
|
||||
},
|
||||
// KSM
|
||||
// DCL
|
||||
RegisterTokenTestCase {
|
||||
native: Location::new(2, [GlobalConsensus(Kusama)]),
|
||||
reanchored: Location::new(1, [GlobalConsensus(Kusama)]),
|
||||
native: Location::new(2, [GlobalConsensus(Dicle)]),
|
||||
reanchored: Location::new(1, [GlobalConsensus(Dicle)]),
|
||||
foreign: hex!("03b6054d0c576dd8391e34e1609cf398f68050c23009d19ce93c000922bcd852")
|
||||
.into(),
|
||||
},
|
||||
// KAR (Some Kusama teyrchain currency)
|
||||
// KAR (Some Dicle teyrchain currency)
|
||||
RegisterTokenTestCase {
|
||||
native: Location::new(2, [GlobalConsensus(Kusama), Teyrchain(2000)]),
|
||||
reanchored: Location::new(1, [GlobalConsensus(Kusama), Teyrchain(2000)]),
|
||||
native: Location::new(2, [GlobalConsensus(Dicle), Teyrchain(2000)]),
|
||||
reanchored: Location::new(1, [GlobalConsensus(Dicle), Teyrchain(2000)]),
|
||||
foreign: hex!("d3e39ad6ea4cee68c9741181e94098823b2ea34a467577d0875c036f0fce5be0")
|
||||
.into(),
|
||||
},
|
||||
@@ -323,17 +323,17 @@ fn check_pna_token_id_compatibility() {
|
||||
foreign: hex!("14b0579be12d7d7f9971f1d4b41f0e88384b9b74799b0150d4aa6cd01afb4444")
|
||||
.into(),
|
||||
},
|
||||
// KSM
|
||||
// DCL
|
||||
RegisterTokenTestCase {
|
||||
native: Location::new(2, [GlobalConsensus(Kusama)]),
|
||||
reanchored: Location::new(1, [GlobalConsensus(Kusama)]),
|
||||
native: Location::new(2, [GlobalConsensus(Dicle)]),
|
||||
reanchored: Location::new(1, [GlobalConsensus(Dicle)]),
|
||||
foreign: hex!("03b6054d0c576dd8391e34e1609cf398f68050c23009d19ce93c000922bcd852")
|
||||
.into(),
|
||||
},
|
||||
// KAR (Some Kusama teyrchain currency)
|
||||
// KAR (Some Dicle teyrchain currency)
|
||||
RegisterTokenTestCase {
|
||||
native: Location::new(2, [GlobalConsensus(Kusama), Teyrchain(2000)]),
|
||||
reanchored: Location::new(1, [GlobalConsensus(Kusama), Teyrchain(2000)]),
|
||||
native: Location::new(2, [GlobalConsensus(Dicle), Teyrchain(2000)]),
|
||||
reanchored: Location::new(1, [GlobalConsensus(Dicle), Teyrchain(2000)]),
|
||||
foreign: hex!("d3e39ad6ea4cee68c9741181e94098823b2ea34a467577d0875c036f0fce5be0")
|
||||
.into(),
|
||||
},
|
||||
|
||||
@@ -545,10 +545,10 @@ mod tests {
|
||||
Location::new(1, [Teyrchain(2004)]),
|
||||
// AH asset
|
||||
Location::new(0, [PalletInstance(50), GeneralIndex(42)]),
|
||||
// KSM
|
||||
Location::new(2, [GlobalConsensus(Kusama)]),
|
||||
// KAR (Some Kusama teyrchain currency)
|
||||
Location::new(2, [GlobalConsensus(Kusama), Teyrchain(2000)]),
|
||||
// DCL
|
||||
Location::new(2, [GlobalConsensus(Dicle)]),
|
||||
// KAR (Some Dicle teyrchain currency)
|
||||
Location::new(2, [GlobalConsensus(Dicle), Teyrchain(2000)]),
|
||||
];
|
||||
for asset in assets.iter() {
|
||||
// reanchor logic in pezpallet_xcm on AH
|
||||
|
||||
@@ -190,7 +190,7 @@ fn exporter_validate_with_remote_universal_source_yields_not_applicable() {
|
||||
let network = BridgedNetwork::get();
|
||||
let channel: u32 = 0;
|
||||
let mut universal_source: Option<InteriorLocation> =
|
||||
Some([GlobalConsensus(Kusama), Teyrchain(1000)].into());
|
||||
Some([GlobalConsensus(Dicle), Teyrchain(1000)].into());
|
||||
let mut destination: Option<InteriorLocation> = Here.into();
|
||||
let mut message: Option<Xcm<()>> = None;
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ pub enum Command {
|
||||
SetPricingParameters {
|
||||
// ETH/HEZ exchange rate
|
||||
exchange_rate: UD60x18,
|
||||
// Cost of delivering a message from Ethereum to BridgeHub, in TYR/KSM/HEZ
|
||||
// Cost of delivering a message from Ethereum to BridgeHub, in TYR/DCL/HEZ
|
||||
delivery_cost: u128,
|
||||
// Fee multiplier
|
||||
multiplier: UD60x18,
|
||||
|
||||
@@ -190,7 +190,7 @@ fn exporter_validate_with_remote_universal_source_yields_not_applicable() {
|
||||
let network = BridgedNetwork::get();
|
||||
let channel: u32 = 0;
|
||||
let mut universal_source: Option<InteriorLocation> =
|
||||
Some([GlobalConsensus(Kusama), Teyrchain(1000)].into());
|
||||
Some([GlobalConsensus(Dicle), Teyrchain(1000)].into());
|
||||
let mut destination: Option<InteriorLocation> = Here.into();
|
||||
let mut message: Option<Xcm<()>> = None;
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ impl TypeId for LegacyLaneId {
|
||||
///
|
||||
/// ```nocompile
|
||||
/// let endpoint1 = X2(GlobalConsensus(NetworkId::Pezkuwi), Teyrchain(42));
|
||||
/// let endpoint2 = X2(GlobalConsensus(NetworkId::Kusama), Teyrchain(777));
|
||||
/// let endpoint2 = X2(GlobalConsensus(NetworkId::Dicle), Teyrchain(777));
|
||||
///
|
||||
/// let final_lane_key = if endpoint1 < endpoint2 {
|
||||
/// (endpoint1, VALUES_SEPARATOR, endpoint2)
|
||||
|
||||
@@ -59,7 +59,7 @@ pub mod teyrchains;
|
||||
/// configurations. But right now it is set to the `100_000`, which makes PoV size for
|
||||
/// our bridge hub teyrchains huge. So let's stick to the real-world value here.
|
||||
///
|
||||
/// Right now both Kusama and Pezkuwi aim to have around 1000 validators. Let's be safe here and
|
||||
/// Right now both Dicle and Pezkuwi aim to have around 1000 validators. Let's be safe here and
|
||||
/// take a bit more here.
|
||||
pub const MAX_AUTHORITIES_COUNT: u32 = 1_256;
|
||||
|
||||
@@ -67,7 +67,7 @@ pub const MAX_AUTHORITIES_COUNT: u32 = 1_256;
|
||||
///
|
||||
/// See [`bp-header-pez-chain::ChainWithGrandpa`] for more details.
|
||||
///
|
||||
/// This value comes from recent (December, 2023) Kusama and Pezkuwi headers. There are no
|
||||
/// This value comes from recent (December, 2023) Dicle and Pezkuwi headers. There are no
|
||||
/// justifications with any additional headers in votes ancestry, so reasonable headers may
|
||||
/// be set to zero. But we assume that there may be small GRANDPA lags, so we're leaving some
|
||||
/// reserve here.
|
||||
@@ -78,7 +78,7 @@ pub const REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY: u32 = 2;
|
||||
///
|
||||
/// See [`bp-header-pez-chain::ChainWithGrandpa`] for more details.
|
||||
///
|
||||
/// This value comes from recent (December, 2023) Kusama headers. Most of headers are `327` bytes
|
||||
/// This value comes from recent (December, 2023) Dicle headers. Most of headers are `327` bytes
|
||||
/// there, but let's have some reserve and make it 1024.
|
||||
pub const AVERAGE_HEADER_SIZE: u32 = 1024;
|
||||
|
||||
@@ -86,7 +86,7 @@ pub const AVERAGE_HEADER_SIZE: u32 = 1024;
|
||||
///
|
||||
/// See [`bp-header-pez-chain::ChainWithGrandpa`] for more details.
|
||||
///
|
||||
/// This value comes from recent (December, 2023) Kusama headers. Maximal header is a mandatory
|
||||
/// This value comes from recent (December, 2023) Dicle headers. Maximal header is a mandatory
|
||||
/// header. In its SCALE-encoded form it is `113407` bytes. Let's have some reserve here.
|
||||
pub const MAX_MANDATORY_HEADER_SIZE: u32 = 120 * 1024;
|
||||
|
||||
@@ -94,7 +94,7 @@ pub const MAX_MANDATORY_HEADER_SIZE: u32 = 120 * 1024;
|
||||
/// Pezkuwi-like chain. This mostly depends on number of entries in the storage trie.
|
||||
/// Some reserve is reserved to account future chain growth.
|
||||
///
|
||||
/// To compute this value, we've synced Kusama chain blocks [0; 6545733] to see if there were
|
||||
/// To compute this value, we've synced Dicle chain blocks [0; 6545733] to see if there were
|
||||
/// any significant changes of the storage proof size (NO):
|
||||
///
|
||||
/// - at block 3072 the storage proof size overhead was 579 bytes;
|
||||
|
||||
@@ -309,7 +309,7 @@ mod tests {
|
||||
(2_u16, "EoQBtnx69txxumxSJexVzxYD1Q4LWAuWmRq8LrBWb27nhYN"),
|
||||
),
|
||||
// Note: these accounts are used for integration tests within
|
||||
// `bridges_pezkuwi_kusama.sh` from fellows.
|
||||
// `bridges_pezkuwi_dicle.sh` from fellows.
|
||||
(
|
||||
LegacyLaneId([0, 0, 0, 2]),
|
||||
b"bhwd",
|
||||
|
||||
@@ -369,7 +369,7 @@ mod tests {
|
||||
use super::*;
|
||||
use xcm::latest::PEZKUWICHAIN_GENESIS_HASH;
|
||||
|
||||
const LOCAL_NETWORK: NetworkId = Kusama;
|
||||
const LOCAL_NETWORK: NetworkId = Dicle;
|
||||
const REMOTE_NETWORK: NetworkId = Pezkuwi;
|
||||
const UNREACHABLE_NETWORK: NetworkId = NetworkId::ByGenesis(PEZKUWICHAIN_GENESIS_HASH);
|
||||
const SIBLING_TEYRCHAIN: u32 = 1000;
|
||||
|
||||
@@ -384,44 +384,44 @@ mod tests {
|
||||
#[allow(dead_code)]
|
||||
fn should_parse_teyrchain_to_teyrchain_options() {
|
||||
// Chains.
|
||||
declare_chain_cli_schema!(Kusama, kusama);
|
||||
declare_chain_cli_schema!(BridgeHubKusama, bridge_hub_kusama);
|
||||
declare_chain_cli_schema!(Dicle, dicle);
|
||||
declare_chain_cli_schema!(BridgeHubDicle, bridge_hub_dicle);
|
||||
declare_chain_cli_schema!(Pezkuwi, pezkuwi);
|
||||
declare_chain_cli_schema!(BridgeHubPezkuwi, bridge_hub_pezkuwi);
|
||||
// Means to override signers of different layer transactions.
|
||||
declare_chain_cli_schema!(
|
||||
KusamaHeadersToBridgeHubPezkuwi,
|
||||
kusama_headers_to_bridge_hub_pezkuwi
|
||||
DicleHeadersToBridgeHubPezkuwi,
|
||||
dicle_headers_to_bridge_hub_pezkuwi
|
||||
);
|
||||
declare_chain_cli_schema!(
|
||||
KusamaTeyrchainsToBridgeHubPezkuwi,
|
||||
kusama_teyrchains_to_bridge_hub_pezkuwi
|
||||
DicleTeyrchainsToBridgeHubPezkuwi,
|
||||
dicle_teyrchains_to_bridge_hub_pezkuwi
|
||||
);
|
||||
declare_chain_cli_schema!(
|
||||
PezkuwiHeadersToBridgeHubKusama,
|
||||
pezkuwi_headers_to_bridge_hub_kusama
|
||||
PezkuwiHeadersToBridgeHubDicle,
|
||||
pezkuwi_headers_to_bridge_hub_dicle
|
||||
);
|
||||
declare_chain_cli_schema!(
|
||||
PezkuwiTeyrchainsToBridgeHubKusama,
|
||||
pezkuwi_teyrchains_to_bridge_hub_kusama
|
||||
PezkuwiTeyrchainsToBridgeHubDicle,
|
||||
pezkuwi_teyrchains_to_bridge_hub_dicle
|
||||
);
|
||||
// Bridges.
|
||||
declare_teyrchain_to_teyrchain_bridge_schema!(
|
||||
BridgeHubKusama,
|
||||
Kusama,
|
||||
BridgeHubDicle,
|
||||
Dicle,
|
||||
BridgeHubPezkuwi,
|
||||
Pezkuwi
|
||||
);
|
||||
|
||||
let res = BridgeHubKusamaBridgeHubPezkuwiHeadersAndMessages::parse_from(vec![
|
||||
"bridge-hub-kusama-bridge-hub-pezkuwi-headers-and-messages",
|
||||
"--bridge-hub-kusama-uri",
|
||||
let res = BridgeHubDicleBridgeHubPezkuwiHeadersAndMessages::parse_from(vec![
|
||||
"bridge-hub-dicle-bridge-hub-pezkuwi-headers-and-messages",
|
||||
"--bridge-hub-dicle-uri",
|
||||
"ws://bridge-hub-zagros-collator1:9944",
|
||||
"--bridge-hub-kusama-signer",
|
||||
"--bridge-hub-dicle-signer",
|
||||
"//Iden",
|
||||
"--bridge-hub-kusama-transactions-mortality",
|
||||
"--bridge-hub-dicle-transactions-mortality",
|
||||
"64",
|
||||
"--kusama-uri",
|
||||
"--dicle-uri",
|
||||
"ws://zagros-alice:9944",
|
||||
"--bridge-hub-pezkuwi-uri",
|
||||
"ws://bridge-hub-pezkuwichain-collator1:9944",
|
||||
@@ -440,7 +440,7 @@ mod tests {
|
||||
// then
|
||||
assert_eq!(
|
||||
res,
|
||||
BridgeHubKusamaBridgeHubPezkuwiHeadersAndMessages {
|
||||
BridgeHubDicleBridgeHubPezkuwiHeadersAndMessages {
|
||||
shared: HeadersAndMessagesSharedParams {
|
||||
lane: vec![HexLaneId(vec![0x00u8; 32])],
|
||||
only_mandatory_headers: false,
|
||||
@@ -451,27 +451,27 @@ mod tests {
|
||||
prometheus_port: 9616,
|
||||
},
|
||||
},
|
||||
left: BridgeHubKusamaConnectionParams {
|
||||
bridge_hub_kusama_uri: "ws://bridge-hub-zagros-collator1:9944".into(),
|
||||
bridge_hub_kusama_runtime_version: BridgeHubKusamaRuntimeVersionParams {
|
||||
bridge_hub_kusama_version_mode: RuntimeVersionType::Bundle,
|
||||
bridge_hub_kusama_spec_version: None,
|
||||
bridge_hub_kusama_transaction_version: None,
|
||||
left: BridgeHubDicleConnectionParams {
|
||||
bridge_hub_dicle_uri: "ws://bridge-hub-zagros-collator1:9944".into(),
|
||||
bridge_hub_dicle_runtime_version: BridgeHubDicleRuntimeVersionParams {
|
||||
bridge_hub_dicle_version_mode: RuntimeVersionType::Bundle,
|
||||
bridge_hub_dicle_spec_version: None,
|
||||
bridge_hub_dicle_transaction_version: None,
|
||||
},
|
||||
},
|
||||
left_sign: BridgeHubKusamaSigningParams {
|
||||
bridge_hub_kusama_signer: Some("//Iden".into()),
|
||||
bridge_hub_kusama_signer_password: None,
|
||||
bridge_hub_kusama_signer_file: None,
|
||||
bridge_hub_kusama_signer_password_file: None,
|
||||
bridge_hub_kusama_transactions_mortality: Some(64),
|
||||
left_sign: BridgeHubDicleSigningParams {
|
||||
bridge_hub_dicle_signer: Some("//Iden".into()),
|
||||
bridge_hub_dicle_signer_password: None,
|
||||
bridge_hub_dicle_signer_file: None,
|
||||
bridge_hub_dicle_signer_password_file: None,
|
||||
bridge_hub_dicle_transactions_mortality: Some(64),
|
||||
},
|
||||
left_relay: KusamaConnectionParams {
|
||||
kusama_uri: "ws://zagros-alice:9944".into(),
|
||||
kusama_runtime_version: KusamaRuntimeVersionParams {
|
||||
kusama_version_mode: RuntimeVersionType::Bundle,
|
||||
kusama_spec_version: None,
|
||||
kusama_transaction_version: None,
|
||||
left_relay: DicleConnectionParams {
|
||||
dicle_uri: "ws://zagros-alice:9944".into(),
|
||||
dicle_runtime_version: DicleRuntimeVersionParams {
|
||||
dicle_version_mode: RuntimeVersionType::Bundle,
|
||||
dicle_spec_version: None,
|
||||
dicle_transaction_version: None,
|
||||
},
|
||||
},
|
||||
right: BridgeHubPezkuwiConnectionParams {
|
||||
|
||||
@@ -125,23 +125,23 @@ mod tests {
|
||||
#[test]
|
||||
fn parse_service_response_works() {
|
||||
assert_eq!(
|
||||
parse_service_response("$.kusama.usd", r#"{"kusama":{"usd":433.05}}"#).map_err(drop),
|
||||
parse_service_response("$.dicle.usd", r#"{"dicle":{"usd":433.05}}"#).map_err(drop),
|
||||
Ok(433.05),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_service_response_rejects_negative_numbers() {
|
||||
assert!(parse_service_response("$.kusama.usd", r#"{"kusama":{"usd":-433.05}}"#).is_err());
|
||||
assert!(parse_service_response("$.dicle.usd", r#"{"dicle":{"usd":-433.05}}"#).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_service_response_rejects_zero_numbers() {
|
||||
assert!(parse_service_response("$.kusama.usd", r#"{"kusama":{"usd":0.0}}"#).is_err());
|
||||
assert!(parse_service_response("$.dicle.usd", r#"{"dicle":{"usd":0.0}}"#).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_service_response_rejects_nan() {
|
||||
assert!(parse_service_response("$.kusama.usd", r#"{"kusama":{"usd":NaN}}"#).is_err());
|
||||
assert!(parse_service_response("$.dicle.usd", r#"{"dicle":{"usd":NaN}}"#).is_err());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ cargo build --release --locked --bin pezkuwi-teyrchain
|
||||
Once the executable is built, launch the teyrchain node via:
|
||||
|
||||
```bash
|
||||
CHAIN=asset-hub-zagros # or asset-hub-kusama
|
||||
CHAIN=asset-hub-zagros # or asset-hub-dicle
|
||||
./target/release/pezkuwi-teyrchain --chain $CHAIN
|
||||
```
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ cargo install pezstaging-chain-spec-builder --locked
|
||||
### 2. Generate a chain spec
|
||||
|
||||
Omni Node requires the chain spec to include a JSON key named `relay_chain`. It is set to a chain id,
|
||||
representing the chain name, e.g. `zagros`, `paseo`, `pezkuwichain`, `pezkuwi`, or `kusama`, but
|
||||
representing the chain name, e.g. `zagros`, `paseo`, `pezkuwichain`, `pezkuwi`, or `dicle`, but
|
||||
there are also local variants that can be used for testing, like `pezkuwichain-local` or `zagros-local`. The
|
||||
local variants are available only for a build of `pezkuwi-omni-node` with
|
||||
`zagros-native` and `pezkuwichain-native` features respectively.
|
||||
|
||||
@@ -315,7 +315,7 @@ where
|
||||
// deleting one path) the information that they want to use as their DB.
|
||||
let old_name = match config.chain_spec.id() {
|
||||
"asset-hub-pezkuwi" => Some("statemint"),
|
||||
"asset-hub-kusama" => Some("statemine"),
|
||||
"asset-hub-dicle" => Some("statemine"),
|
||||
"asset-hub-zagros" => Some("westmint"),
|
||||
"asset-hub-pezkuwichain" => Some("rockmine"),
|
||||
_ => None,
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -21,8 +21,8 @@ use std::str::FromStr;
|
||||
/// Collects all supported BridgeHub configurations
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub enum BridgeHubRuntimeType {
|
||||
Kusama,
|
||||
KusamaLocal,
|
||||
Dicle,
|
||||
DicleLocal,
|
||||
|
||||
Pezkuwi,
|
||||
PezkuwiLocal,
|
||||
@@ -45,8 +45,8 @@ impl FromStr for BridgeHubRuntimeType {
|
||||
match value {
|
||||
pezkuwi::BRIDGE_HUB_PEZKUWI => Ok(BridgeHubRuntimeType::Pezkuwi),
|
||||
pezkuwi::BRIDGE_HUB_PEZKUWI_LOCAL => Ok(BridgeHubRuntimeType::PezkuwiLocal),
|
||||
kusama::BRIDGE_HUB_KUSAMA => Ok(BridgeHubRuntimeType::Kusama),
|
||||
kusama::BRIDGE_HUB_KUSAMA_LOCAL => Ok(BridgeHubRuntimeType::KusamaLocal),
|
||||
dicle::BRIDGE_HUB_DICLE => Ok(BridgeHubRuntimeType::Dicle),
|
||||
dicle::BRIDGE_HUB_DICLE_LOCAL => Ok(BridgeHubRuntimeType::DicleLocal),
|
||||
zagros::BRIDGE_HUB_ZAGROS => Ok(BridgeHubRuntimeType::Zagros),
|
||||
zagros::BRIDGE_HUB_ZAGROS_LOCAL => Ok(BridgeHubRuntimeType::ZagrosLocal),
|
||||
zagros::BRIDGE_HUB_ZAGROS_DEVELOPMENT => Ok(BridgeHubRuntimeType::ZagrosDevelopment),
|
||||
@@ -70,8 +70,8 @@ impl BridgeHubRuntimeType {
|
||||
BridgeHubRuntimeType::Pezkuwi => Ok(Box::new(GenericChainSpec::from_json_bytes(
|
||||
&include_bytes!("../../chain-specs/bridge-hub-pezkuwi.json")[..],
|
||||
)?)),
|
||||
BridgeHubRuntimeType::Kusama => Ok(Box::new(GenericChainSpec::from_json_bytes(
|
||||
&include_bytes!("../../chain-specs/bridge-hub-kusama.json")[..],
|
||||
BridgeHubRuntimeType::Dicle => Ok(Box::new(GenericChainSpec::from_json_bytes(
|
||||
&include_bytes!("../../chain-specs/bridge-hub-dicle.json")[..],
|
||||
)?)),
|
||||
BridgeHubRuntimeType::Zagros => Ok(Box::new(GenericChainSpec::from_json_bytes(
|
||||
&include_bytes!("../../chain-specs/bridge-hub-zagros.json")[..],
|
||||
@@ -166,10 +166,10 @@ pub mod pezkuwichain {
|
||||
}
|
||||
}
|
||||
|
||||
/// Sub-module for Kusama setup
|
||||
pub mod kusama {
|
||||
pub(crate) const BRIDGE_HUB_KUSAMA: &str = "bridge-hub-kusama";
|
||||
pub(crate) const BRIDGE_HUB_KUSAMA_LOCAL: &str = "bridge-hub-kusama-local";
|
||||
/// Sub-module for Dicle setup
|
||||
pub mod dicle {
|
||||
pub(crate) const BRIDGE_HUB_DICLE: &str = "bridge-hub-dicle";
|
||||
pub(crate) const BRIDGE_HUB_DICLE_LOCAL: &str = "bridge-hub-dicle-local";
|
||||
}
|
||||
|
||||
/// Sub-module for Zagros setup.
|
||||
|
||||
@@ -21,8 +21,8 @@ use std::{borrow::Cow, str::FromStr};
|
||||
/// Collects all supported Coretime configurations.
|
||||
#[derive(Debug, PartialEq, Clone, Copy)]
|
||||
pub enum CoretimeRuntimeType {
|
||||
Kusama,
|
||||
KusamaLocal,
|
||||
Dicle,
|
||||
DicleLocal,
|
||||
|
||||
Pezkuwi,
|
||||
PezkuwiLocal,
|
||||
@@ -47,8 +47,8 @@ impl FromStr for CoretimeRuntimeType {
|
||||
|
||||
fn from_str(value: &str) -> Result<Self, Self::Err> {
|
||||
match value {
|
||||
kusama::CORETIME_KUSAMA => Ok(CoretimeRuntimeType::Kusama),
|
||||
kusama::CORETIME_KUSAMA_LOCAL => Ok(CoretimeRuntimeType::KusamaLocal),
|
||||
dicle::CORETIME_DICLE => Ok(CoretimeRuntimeType::Dicle),
|
||||
dicle::CORETIME_DICLE_LOCAL => Ok(CoretimeRuntimeType::DicleLocal),
|
||||
pezkuwi::CORETIME_PEZKUWI => Ok(CoretimeRuntimeType::Pezkuwi),
|
||||
pezkuwi::CORETIME_PEZKUWI_LOCAL => Ok(CoretimeRuntimeType::PezkuwiLocal),
|
||||
pezkuwichain::CORETIME_PEZKUWICHAIN => Ok(CoretimeRuntimeType::Pezkuwichain),
|
||||
@@ -67,8 +67,8 @@ impl FromStr for CoretimeRuntimeType {
|
||||
impl From<CoretimeRuntimeType> for &str {
|
||||
fn from(runtime_type: CoretimeRuntimeType) -> Self {
|
||||
match runtime_type {
|
||||
CoretimeRuntimeType::Kusama => kusama::CORETIME_KUSAMA,
|
||||
CoretimeRuntimeType::KusamaLocal => kusama::CORETIME_KUSAMA_LOCAL,
|
||||
CoretimeRuntimeType::Dicle => dicle::CORETIME_DICLE,
|
||||
CoretimeRuntimeType::DicleLocal => dicle::CORETIME_DICLE_LOCAL,
|
||||
CoretimeRuntimeType::Pezkuwi => pezkuwi::CORETIME_PEZKUWI,
|
||||
CoretimeRuntimeType::PezkuwiLocal => pezkuwi::CORETIME_PEZKUWI_LOCAL,
|
||||
CoretimeRuntimeType::Pezkuwichain => pezkuwichain::CORETIME_PEZKUWICHAIN,
|
||||
@@ -86,11 +86,11 @@ impl From<CoretimeRuntimeType> for &str {
|
||||
impl From<CoretimeRuntimeType> for ChainType {
|
||||
fn from(runtime_type: CoretimeRuntimeType) -> Self {
|
||||
match runtime_type {
|
||||
CoretimeRuntimeType::Kusama
|
||||
CoretimeRuntimeType::Dicle
|
||||
| CoretimeRuntimeType::Pezkuwi
|
||||
| CoretimeRuntimeType::Pezkuwichain
|
||||
| CoretimeRuntimeType::Zagros => ChainType::Live,
|
||||
CoretimeRuntimeType::KusamaLocal
|
||||
CoretimeRuntimeType::DicleLocal
|
||||
| CoretimeRuntimeType::PezkuwiLocal
|
||||
| CoretimeRuntimeType::PezkuwichainLocal
|
||||
| CoretimeRuntimeType::ZagrosLocal => ChainType::Local,
|
||||
@@ -105,8 +105,8 @@ impl CoretimeRuntimeType {
|
||||
|
||||
pub fn load_config(&self) -> Result<Box<dyn ChainSpec>, String> {
|
||||
match self {
|
||||
CoretimeRuntimeType::Kusama => Ok(Box::new(GenericChainSpec::from_json_bytes(
|
||||
&include_bytes!("../../chain-specs/coretime-kusama.json")[..],
|
||||
CoretimeRuntimeType::Dicle => Ok(Box::new(GenericChainSpec::from_json_bytes(
|
||||
&include_bytes!("../../chain-specs/coretime-dicle.json")[..],
|
||||
)?)),
|
||||
CoretimeRuntimeType::Pezkuwi => Ok(Box::new(GenericChainSpec::from_json_bytes(
|
||||
&include_bytes!("../../chain-specs/coretime-pezkuwi.json")[..],
|
||||
@@ -231,9 +231,9 @@ pub mod zagros {
|
||||
}
|
||||
}
|
||||
|
||||
pub mod kusama {
|
||||
pub(crate) const CORETIME_KUSAMA: &str = "coretime-kusama";
|
||||
pub(crate) const CORETIME_KUSAMA_LOCAL: &str = "coretime-kusama-local";
|
||||
pub mod dicle {
|
||||
pub(crate) const CORETIME_DICLE: &str = "coretime-dicle";
|
||||
pub(crate) const CORETIME_DICLE_LOCAL: &str = "coretime-dicle-local";
|
||||
}
|
||||
|
||||
pub mod pezkuwi {
|
||||
|
||||
@@ -36,7 +36,7 @@ pub mod yet_another_teyrchain;
|
||||
|
||||
/// Extracts the normalized chain id and teyrchain id from the input chain id.
|
||||
/// (H/T to Phala for the idea)
|
||||
/// E.g. "penpal-kusama-2004" yields ("penpal-kusama", Some(2004))
|
||||
/// E.g. "penpal-dicle-2004" yields ("penpal-dicle", Some(2004))
|
||||
fn extract_teyrchain_id<'a>(
|
||||
id: &'a str,
|
||||
para_prefixes: &[&str],
|
||||
@@ -76,9 +76,9 @@ impl LoadSpec for ChainSpecLoader {
|
||||
&include_bytes!("../../chain-specs/asset-hub-pezkuwi.json")[..],
|
||||
)?),
|
||||
|
||||
// -- Asset Hub Kusama
|
||||
"asset-hub-kusama" | "statemine" => Box::new(GenericChainSpec::from_json_bytes(
|
||||
&include_bytes!("../../chain-specs/asset-hub-kusama.json")[..],
|
||||
// -- Asset Hub Dicle
|
||||
"asset-hub-dicle" | "statemine" => Box::new(GenericChainSpec::from_json_bytes(
|
||||
&include_bytes!("../../chain-specs/asset-hub-dicle.json")[..],
|
||||
)?),
|
||||
|
||||
// -- Asset Hub Pezkuwichain
|
||||
@@ -249,7 +249,7 @@ impl LegacyRuntime {
|
||||
|
||||
if id.starts_with("asset-hub-pezkuwi") | id.starts_with("statemint") {
|
||||
LegacyRuntime::AssetHubPezkuwi
|
||||
} else if id.starts_with("asset-hub-kusama")
|
||||
} else if id.starts_with("asset-hub-dicle")
|
||||
| id.starts_with("statemine")
|
||||
| id.starts_with("asset-hub-pezkuwichain")
|
||||
| id.starts_with("rockmine")
|
||||
|
||||
@@ -21,8 +21,8 @@ use std::str::FromStr;
|
||||
/// Collects all supported People configurations.
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub enum PeopleRuntimeType {
|
||||
Kusama,
|
||||
KusamaLocal,
|
||||
Dicle,
|
||||
DicleLocal,
|
||||
Pezkuwi,
|
||||
PezkuwiLocal,
|
||||
Pezkuwichain,
|
||||
@@ -38,8 +38,8 @@ impl FromStr for PeopleRuntimeType {
|
||||
|
||||
fn from_str(value: &str) -> Result<Self, Self::Err> {
|
||||
match value {
|
||||
kusama::PEOPLE_KUSAMA => Ok(PeopleRuntimeType::Kusama),
|
||||
kusama::PEOPLE_KUSAMA_LOCAL => Ok(PeopleRuntimeType::KusamaLocal),
|
||||
dicle::PEOPLE_DICLE => Ok(PeopleRuntimeType::Dicle),
|
||||
dicle::PEOPLE_DICLE_LOCAL => Ok(PeopleRuntimeType::DicleLocal),
|
||||
pezkuwi::PEOPLE_PEZKUWI => Ok(PeopleRuntimeType::Pezkuwi),
|
||||
pezkuwi::PEOPLE_PEZKUWI_LOCAL => Ok(PeopleRuntimeType::PezkuwiLocal),
|
||||
pezkuwichain::PEOPLE_PEZKUWICHAIN => Ok(PeopleRuntimeType::Pezkuwichain),
|
||||
@@ -60,8 +60,8 @@ impl PeopleRuntimeType {
|
||||
|
||||
pub fn load_config(&self) -> Result<Box<dyn ChainSpec>, String> {
|
||||
match self {
|
||||
PeopleRuntimeType::Kusama => Ok(Box::new(GenericChainSpec::from_json_bytes(
|
||||
&include_bytes!("../../chain-specs/people-kusama.json")[..],
|
||||
PeopleRuntimeType::Dicle => Ok(Box::new(GenericChainSpec::from_json_bytes(
|
||||
&include_bytes!("../../chain-specs/people-dicle.json")[..],
|
||||
)?)),
|
||||
PeopleRuntimeType::Pezkuwi => Ok(Box::new(GenericChainSpec::from_json_bytes(
|
||||
&include_bytes!("../../chain-specs/people-pezkuwi.json")[..],
|
||||
@@ -193,9 +193,9 @@ pub mod zagros {
|
||||
}
|
||||
}
|
||||
|
||||
pub mod kusama {
|
||||
pub(crate) const PEOPLE_KUSAMA: &str = "people-kusama";
|
||||
pub(crate) const PEOPLE_KUSAMA_LOCAL: &str = "people-kusama-local";
|
||||
pub mod dicle {
|
||||
pub(crate) const PEOPLE_DICLE: &str = "people-dicle";
|
||||
pub(crate) const PEOPLE_DICLE_LOCAL: &str = "people-dicle-local";
|
||||
}
|
||||
|
||||
pub mod pezkuwi {
|
||||
|
||||
@@ -54,10 +54,10 @@ pub fn yet_another_teyrchain_config(
|
||||
chain_type: ChainType,
|
||||
para_id: u32,
|
||||
) -> GenericChainSpec {
|
||||
// > pez_subkey inspect --network kusama --public \
|
||||
// > pez_subkey inspect --network dicle --public \
|
||||
// 6205a2a2aecb71c13d8ad3197e12c10bcdcaa0c9f176997bc236c6b39143aa15
|
||||
//
|
||||
// Network ID/Version: kusama
|
||||
// Network ID/Version: dicle
|
||||
// Public key (hex): 0x6205a2a2aecb71c13d8ad3197e12c10bcdcaa0c9f176997bc236c6b39143aa15
|
||||
// Account ID: 0x6205a2a2aecb71c13d8ad3197e12c10bcdcaa0c9f176997bc236c6b39143aa15
|
||||
// Public key (SS58): EnqtFmsXcGdSnWk5JWUMXyPVamjiFQurXxcNgJEg1C3sw6W
|
||||
|
||||
@@ -62,7 +62,7 @@ fn sovereign_account_translation() {
|
||||
// derivation proof (para 2030, index 2)
|
||||
Some(("13YMK2eeopZtUNpeHnJ1Ws2HqMQG6Ts9PGCZYGyFbSYoZfcm", 2u16)),
|
||||
),
|
||||
// Bifrost Kusama #1
|
||||
// Bifrost Dicle #1
|
||||
(
|
||||
// para 2001
|
||||
"5Ec4AhPV91i9yNuiWuNunPf6AQCYDhFTTA4G5QCbtqYApH9E",
|
||||
@@ -70,7 +70,7 @@ fn sovereign_account_translation() {
|
||||
"5Eg2fntJDju46yds4uKzu2zuQssqw7JZWohhLMj6mZZjg2pK",
|
||||
None,
|
||||
),
|
||||
// Bifrost Kusama #2
|
||||
// Bifrost Dicle #2
|
||||
(
|
||||
// para 2001 index 0
|
||||
"5E78xTBiaN3nAGYtcNnqTJQJqYAkSDGggKqaDfpNsKyPpbcb",
|
||||
@@ -79,7 +79,7 @@ fn sovereign_account_translation() {
|
||||
// derivation proof (para 2001, index 0)
|
||||
Some(("5Ec4AhPV91i9yNuiWuNunPf6AQCYDhFTTA4G5QCbtqYApH9E", 0u16)),
|
||||
),
|
||||
// Bifrost Kusama #3
|
||||
// Bifrost Dicle #3
|
||||
(
|
||||
// para 2001 index 1
|
||||
"5HXi9pzWnTQzk7VKzY6VQn92KfWCcA5NbSm53uKHrYU1VsjP",
|
||||
@@ -88,7 +88,7 @@ fn sovereign_account_translation() {
|
||||
// derivation proof (para 2001, index 1)
|
||||
Some(("5Ec4AhPV91i9yNuiWuNunPf6AQCYDhFTTA4G5QCbtqYApH9E", 1u16)),
|
||||
),
|
||||
// Bifrost Kusama #4
|
||||
// Bifrost Dicle #4
|
||||
(
|
||||
// para 2001 index 2
|
||||
"5CkKS3YMx64TguUYrMERc5Bn6Mn2aKMUkcozUFREQDgHS3Tv",
|
||||
@@ -97,7 +97,7 @@ fn sovereign_account_translation() {
|
||||
// derivation proof (para 2001, index 2)
|
||||
Some(("5Ec4AhPV91i9yNuiWuNunPf6AQCYDhFTTA4G5QCbtqYApH9E", 2u16)),
|
||||
),
|
||||
// Bifrost Kusama #5
|
||||
// Bifrost Dicle #5
|
||||
(
|
||||
// para 2001 index 3
|
||||
"5Crxhmiw5CQq3Mnfcu3dR3yJ3YpjbxjqaeDFtNNtqgmcnN4S",
|
||||
@@ -106,7 +106,7 @@ fn sovereign_account_translation() {
|
||||
// derivation proof (para 2001, index 3)
|
||||
Some(("5Ec4AhPV91i9yNuiWuNunPf6AQCYDhFTTA4G5QCbtqYApH9E", 3u16)),
|
||||
),
|
||||
// Bifrost Kusama #5
|
||||
// Bifrost Dicle #5
|
||||
(
|
||||
// para 2001 index 3
|
||||
"5DAZP4gZKZafGv42uoWNTMau4tYuDd2XteJLGL4upermhQpn",
|
||||
|
||||
@@ -72,7 +72,7 @@ pub mod v2 {
|
||||
|
||||
// New candidates who have registered since the upgrade. Under normal circumstances,
|
||||
// this should not exist because the migration should be applied when the upgrade
|
||||
// happens. But in Pezkuwi/Kusama we messed this up, and people registered under
|
||||
// happens. But in Pezkuwi/Dicle we messed this up, and people registered under
|
||||
// `CandidateList` while their funds were locked in `Candidates`.
|
||||
let new_candidate_list = CandidateList::<T>::get();
|
||||
if new_candidate_list.len().is_zero() {
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
//! DATE: 2023-09-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `Olivers-MacBook-Pro.local`, CPU: `<UNKNOWN>`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-kusama-dev")`, DB CACHE: `1024`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-dicle-dev")`, DB CACHE: `1024`
|
||||
|
||||
// Executed Command:
|
||||
// ./target/release/pezkuwi-teyrchain
|
||||
@@ -28,7 +28,7 @@
|
||||
// --pezpallet
|
||||
// pezcumulus-pezpallet-dmp-queue
|
||||
// --chain
|
||||
// asset-hub-kusama-dev
|
||||
// asset-hub-dicle-dev
|
||||
// --output
|
||||
// pezcumulus/pezpallets/dmp-queue/src/weights.rs
|
||||
// --template
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Kusama Asset Hub",
|
||||
"id": "asset-hub-kusama",
|
||||
"name": "Dicle Asset Hub",
|
||||
"id": "asset-hub-dicle",
|
||||
"chainType": "Live",
|
||||
"bootNodes": [
|
||||
"/ip4/127.0.0.1/tcp/30333/p2p/12D3KooWHGksh2JFMaW8AkZvyhVpmiXUJnCQbngExTLMdq753ZQR"
|
||||
@@ -10,9 +10,9 @@
|
||||
"properties": {
|
||||
"ss58Format": 2,
|
||||
"tokenDecimals": 12,
|
||||
"tokenSymbol": "KSM"
|
||||
"tokenSymbol": "DCL"
|
||||
},
|
||||
"relay_chain": "kusama",
|
||||
"relay_chain": "dicle",
|
||||
"para_id": 1000,
|
||||
"consensusEngine": null,
|
||||
"codeSubstitutes": {},
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user