rebrand: kusama → dicle

- Replace all kusama/Kusama references with dicle/Dicle
- Rename weight files from ksm_size to dcl_size
- Update papi-tests files from ksm to dcl
- Remove chain-specs/kusama.json files
- cargo check --workspace successful (Finished output)
- Update MAINNET_ROADMAP.md: FAZ 8 completed
This commit is contained in:
2026-01-07 09:40:42 +03:00
parent 7d147277f2
commit 954e2703e2
190 changed files with 747 additions and 11058 deletions
+4 -4
View File
@@ -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
+23 -23
View File
@@ -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:
![Register Extrinsic](./bridge-relayers-register.png)
@@ -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):
![Claim Rewards Extrinsic](./bridge-relayers-claim-rewards.png)
@@ -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*
+4 -4
View File
@@ -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.
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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();
+8 -8
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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());
}
}