diff --git a/Cargo.lock b/Cargo.lock
index 38c5d5c8a94..f6db689aec7 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -944,6 +944,7 @@ dependencies = [
"scale-info",
"serde",
"sp-core",
+ "sp-io",
"sp-std 8.0.0 (git+https://github.com/paritytech/substrate?branch=master)",
]
@@ -5816,6 +5817,7 @@ name = "millau-bridge-node"
version = "0.1.0"
dependencies = [
"bp-messages",
+ "bridge-runtime-common",
"clap 4.3.4",
"frame-benchmarking",
"frame-benchmarking-cli",
@@ -10121,6 +10123,7 @@ name = "rialto-bridge-node"
version = "0.1.0"
dependencies = [
"bp-messages",
+ "bridge-runtime-common",
"clap 4.3.4",
"frame-benchmarking",
"frame-benchmarking-cli",
@@ -10149,6 +10152,7 @@ name = "rialto-parachain-collator"
version = "0.1.0"
dependencies = [
"bp-messages",
+ "bridge-runtime-common",
"clap 4.3.4",
"cumulus-client-cli",
"cumulus-client-consensus-aura",
@@ -10271,6 +10275,7 @@ dependencies = [
"frame-support",
"frame-system",
"frame-system-rpc-runtime-api",
+ "hex-literal 0.4.1",
"pallet-authority-discovery",
"pallet-babe",
"pallet-balances",
@@ -13468,6 +13473,7 @@ dependencies = [
"relay-wococo-client",
"rialto-parachain-runtime",
"rialto-runtime",
+ "rustc-hex",
"signal-hook",
"signal-hook-async-std",
"sp-core",
diff --git a/README.md b/README.md
index 2f8c5ca9abb..e72d4b2cd44 100644
--- a/README.md
+++ b/README.md
@@ -189,7 +189,7 @@ You will also see the message lane relayers listening for new messages.
```
# Message Relayer Logs
-[Millau_to_Rialto_MessageLane_00000000] [date] DEBUG bridge Asking Millau::ReceivingConfirmationsDelivery about best message nonces
+[Millau_to_Rialto_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7] [date] DEBUG bridge Asking Millau::ReceivingConfirmationsDelivery about best message nonces
[...] [date] INFO bridge Synced Some(2) of Some(3) nonces in Millau::MessagesDelivery -> Rialto::MessagesDelivery race
[...] [date] DEBUG bridge Asking Millau::MessagesDelivery about message nonces
[...] [date] DEBUG bridge Received best nonces from Millau::ReceivingConfirmationsDelivery: TargetClientNonces { latest_nonce: 0, nonces_data: () }
diff --git a/bin/millau/node/Cargo.toml b/bin/millau/node/Cargo.toml
index db5f83ac7fa..78a44b18a9c 100644
--- a/bin/millau/node/Cargo.toml
+++ b/bin/millau/node/Cargo.toml
@@ -16,6 +16,7 @@ serde_json = "1.0.97"
# Bridge dependencies
bp-messages = { path = "../../../primitives/messages" }
+bridge-runtime-common = { path = "../../runtime-common" }
millau-runtime = { path = "../runtime" }
# Substrate Dependencies
diff --git a/bin/millau/node/src/chain_spec.rs b/bin/millau/node/src/chain_spec.rs
index 708c377c080..0b3662b2b06 100644
--- a/bin/millau/node/src/chain_spec.rs
+++ b/bin/millau/node/src/chain_spec.rs
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity Bridges Common. If not, see .
+use bridge_runtime_common::messages_xcm_extension::XcmBlobHauler;
use millau_runtime::{
AccountId, AuraConfig, BalancesConfig, BeefyConfig, BridgeRialtoMessagesConfig,
BridgeRialtoParachainMessagesConfig, BridgeWestendGrandpaConfig, GrandpaConfig,
@@ -223,14 +224,17 @@ fn testnet_genesis(
},
bridge_rialto_messages: BridgeRialtoMessagesConfig {
owner: Some(get_account_id_from_seed::(RIALTO_MESSAGES_PALLET_OWNER)),
- opened_lanes: vec![bp_messages::LaneId::default()],
+ opened_lanes: vec![millau_runtime::rialto_messages::ToRialtoXcmBlobHauler::xcm_lane()],
..Default::default()
},
bridge_rialto_parachain_messages: BridgeRialtoParachainMessagesConfig {
owner: Some(get_account_id_from_seed::(
RIALTO_PARACHAIN_MESSAGES_PALLET_OWNER,
)),
- opened_lanes: vec![bp_messages::LaneId::default()],
+ opened_lanes: vec![
+ millau_runtime::rialto_parachain_messages::ToRialtoParachainXcmBlobHauler::xcm_lane(
+ ),
+ ],
..Default::default()
},
xcm_pallet: Default::default(),
diff --git a/bin/millau/runtime/src/lib.rs b/bin/millau/runtime/src/lib.rs
index 801842e1321..319721cc61d 100644
--- a/bin/millau/runtime/src/lib.rs
+++ b/bin/millau/runtime/src/lib.rs
@@ -484,7 +484,6 @@ impl pallet_bridge_messages::Config for Run
}
parameter_types! {
- pub const RialtoParachainMessagesLane: bp_messages::LaneId = rialto_parachain_messages::XCM_LANE;
pub const RialtoParasPalletName: &'static str = bp_rialto::PARAS_PALLET_NAME;
pub const WestendParasPalletName: &'static str = bp_westend::PARAS_PALLET_NAME;
pub const MaxRialtoParaHeadDataSize: u32 = bp_rialto::MAX_NESTED_PARACHAIN_HEAD_DATA_SIZE;
@@ -586,7 +585,7 @@ pub type PriorityBoostPerMessage = ConstU64<327_319_648>;
pub type BridgeRefundRialtoParachainMessages = RefundBridgedParachainMessages<
Runtime,
RefundableParachain,
- RefundableMessagesLane,
+ RefundableMessagesLane,
ActualFeeRefund,
PriorityBoostPerMessage,
StrBridgeRefundRialtoPara2000Lane0Msgs,
diff --git a/bin/millau/runtime/src/rialto_messages.rs b/bin/millau/runtime/src/rialto_messages.rs
index 6cbb6215978..7e785703aee 100644
--- a/bin/millau/runtime/src/rialto_messages.rs
+++ b/bin/millau/runtime/src/rialto_messages.rs
@@ -19,13 +19,14 @@
use crate::{Runtime, WithRialtoMessagesInstance};
use bp_messages::LaneId;
-use bridge_runtime_common::messages_xcm_extension::{XcmBlobHauler, XcmBlobHaulerAdapter};
+use bridge_runtime_common::messages_xcm_extension::{
+ LaneIdFromChainId, XcmBlobHauler, XcmBlobHaulerAdapter,
+};
use frame_support::{parameter_types, weights::Weight};
use pallet_bridge_relayers::WeightInfoExt as _;
+use sp_core::Get;
use xcm_builder::HaulBlobExporter;
-/// Default lane that is used to send messages to Rialto.
-pub const XCM_LANE: LaneId = LaneId([0, 0, 0, 0]);
/// Weight of 2 XCM instructions is for simple `Trap(42)` program, coming through bridge
/// (it is prepended with `UniversalOrigin` instruction). It is used just for simplest manual
/// tests, confirming that we don't break encoding somewhere between.
@@ -60,7 +61,7 @@ impl XcmBlobHauler for ToRialtoXcmBlobHauler {
type MessageSender = pallet_bridge_messages::Pallet;
fn xcm_lane() -> LaneId {
- XCM_LANE
+ LaneIdFromChainId::::get()
}
}
@@ -80,6 +81,7 @@ impl pallet_bridge_messages::WeightInfoExt for crate::weights::RialtoMessagesWei
#[cfg(test)]
mod tests {
+ use super::*;
use crate::{RialtoGrandpaInstance, Runtime, WithRialtoMessagesInstance};
use bridge_runtime_common::{
@@ -121,4 +123,15 @@ mod tests {
},
});
}
+
+ #[test]
+ fn rialto_millau_bridge_identifier_did_not_changed() {
+ // there's nothing criminal if it is changed, but then thou need to fix it across
+ // all deployments scripts, alerts and so on
+ assert_eq!(
+ *ToRialtoXcmBlobHauler::xcm_lane().as_ref(),
+ hex_literal::hex!("52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7")
+ .into(),
+ );
+ }
}
diff --git a/bin/millau/runtime/src/rialto_parachain_messages.rs b/bin/millau/runtime/src/rialto_parachain_messages.rs
index 728ff1bf5f8..e13c4c203c4 100644
--- a/bin/millau/runtime/src/rialto_parachain_messages.rs
+++ b/bin/millau/runtime/src/rialto_parachain_messages.rs
@@ -19,13 +19,14 @@
use crate::{Runtime, WithRialtoParachainMessagesInstance};
use bp_messages::LaneId;
-use bridge_runtime_common::messages_xcm_extension::{XcmBlobHauler, XcmBlobHaulerAdapter};
+use bridge_runtime_common::messages_xcm_extension::{
+ LaneIdFromChainId, XcmBlobHauler, XcmBlobHaulerAdapter,
+};
use frame_support::{parameter_types, weights::Weight};
use pallet_bridge_relayers::WeightInfoExt as _;
+use sp_core::Get;
use xcm_builder::HaulBlobExporter;
-/// Default lane that is used to send messages to Rialto parachain.
-pub const XCM_LANE: LaneId = LaneId([0, 0, 0, 0]);
/// Weight of 2 XCM instructions is for simple `Trap(42)` program, coming through bridge
/// (it is prepended with `UniversalOrigin` instruction). It is used just for simplest manual
/// tests, confirming that we don't break encoding somewhere between.
@@ -61,7 +62,7 @@ impl XcmBlobHauler for ToRialtoParachainXcmBlobHauler {
pallet_bridge_messages::Pallet;
fn xcm_lane() -> LaneId {
- XCM_LANE
+ LaneIdFromChainId::::get()
}
}
@@ -83,6 +84,7 @@ impl pallet_bridge_messages::WeightInfoExt
#[cfg(test)]
mod tests {
+ use super::*;
use crate::{
PriorityBoostPerMessage, RialtoGrandpaInstance, Runtime,
WithRialtoParachainMessagesInstance,
@@ -134,4 +136,15 @@ mod tests {
PriorityBoostPerMessage,
>(1_000_000);
}
+
+ #[test]
+ fn rialto_parachain_millau_bridge_identifier_did_not_changed() {
+ // there's nothing criminal if it is changed, but then thou need to fix it across
+ // all deployments scripts, alerts and so on
+ assert_eq!(
+ *ToRialtoParachainXcmBlobHauler::xcm_lane().as_ref(),
+ hex_literal::hex!("6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de")
+ .into(),
+ );
+ }
}
diff --git a/bin/millau/runtime/src/xcm_config.rs b/bin/millau/runtime/src/xcm_config.rs
index cae4b68d991..d1135b2942a 100644
--- a/bin/millau/runtime/src/xcm_config.rs
+++ b/bin/millau/runtime/src/xcm_config.rs
@@ -245,7 +245,9 @@ mod tests {
target_chain::{DispatchMessage, DispatchMessageData, MessageDispatch},
LaneId, MessageKey, OutboundLaneData,
};
- use bridge_runtime_common::messages_xcm_extension::XcmBlobMessageDispatchResult;
+ use bridge_runtime_common::messages_xcm_extension::{
+ XcmBlobHauler, XcmBlobMessageDispatchResult,
+ };
use codec::Encode;
use pallet_bridge_messages::OutboundLanes;
use xcm_executor::XcmExecutor;
@@ -269,16 +271,15 @@ mod tests {
fn xcm_messages_to_rialto_are_sent_using_bridge_exporter() {
new_test_ext().execute_with(|| {
// ensure that the there are no messages queued
+ let lane_id = crate::rialto_messages::ToRialtoXcmBlobHauler::xcm_lane();
OutboundLanes::::insert(
- crate::rialto_messages::XCM_LANE,
+ lane_id,
OutboundLaneData::opened(),
);
assert_eq!(
- OutboundLanes::::get(
- crate::rialto_messages::XCM_LANE
- )
- .unwrap()
- .latest_generated_nonce,
+ OutboundLanes::::get(lane_id)
+ .unwrap()
+ .latest_generated_nonce,
0,
);
@@ -295,11 +296,9 @@ mod tests {
// ensure that the message has been queued
assert_eq!(
- OutboundLanes::::get(
- crate::rialto_messages::XCM_LANE
- )
- .unwrap()
- .latest_generated_nonce,
+ OutboundLanes::::get(lane_id)
+ .unwrap()
+ .latest_generated_nonce,
1,
);
})
@@ -309,16 +308,16 @@ mod tests {
fn xcm_messages_to_rialto_parachain_are_sent_using_bridge_exporter() {
new_test_ext().execute_with(|| {
// ensure that the there are no messages queued
+ let lane_id =
+ crate::rialto_parachain_messages::ToRialtoParachainXcmBlobHauler::xcm_lane();
OutboundLanes::::insert(
- crate::rialto_parachain_messages::XCM_LANE,
+ lane_id,
OutboundLaneData::opened(),
);
assert_eq!(
- OutboundLanes::::get(
- crate::rialto_parachain_messages::XCM_LANE
- )
- .unwrap()
- .latest_generated_nonce,
+ OutboundLanes::::get(lane_id)
+ .unwrap()
+ .latest_generated_nonce,
0,
);
@@ -335,17 +334,15 @@ mod tests {
// ensure that the message has been queued
assert_eq!(
- OutboundLanes::::get(
- crate::rialto_parachain_messages::XCM_LANE
- )
- .unwrap()
- .latest_generated_nonce,
+ OutboundLanes::::get(lane_id)
+ .unwrap()
+ .latest_generated_nonce,
1,
);
})
}
- fn prepare_inbound_bridge_message() -> DispatchMessage> {
+ fn prepare_inbound_bridge_message(lane_id: LaneId) -> DispatchMessage> {
let xcm = xcm::VersionedXcm::::V3(vec![Instruction::Trap(42)].into());
let location =
xcm::VersionedInteriorMultiLocation::V3(X1(GlobalConsensus(ThisNetwork::get())));
@@ -353,14 +350,16 @@ mod tests {
// or public fields, so just tuple
let bridge_message = (location, xcm).encode();
DispatchMessage {
- key: MessageKey { lane_id: LaneId([0, 0, 0, 0]), nonce: 1 },
+ key: MessageKey { lane_id, nonce: 1 },
data: DispatchMessageData { payload: Ok(bridge_message) },
}
}
#[test]
fn xcm_messages_from_rialto_are_dispatched() {
- let incoming_message = prepare_inbound_bridge_message();
+ let incoming_message = prepare_inbound_bridge_message(
+ crate::rialto_messages::ToRialtoXcmBlobHauler::xcm_lane(),
+ );
// we care only about handing message to the XCM dispatcher, so we don't care about its
// actual dispatch
@@ -373,7 +372,9 @@ mod tests {
#[test]
fn xcm_messages_from_rialto_parachain_are_dispatched() {
- let incoming_message = prepare_inbound_bridge_message();
+ let incoming_message = prepare_inbound_bridge_message(
+ crate::rialto_parachain_messages::ToRialtoParachainXcmBlobHauler::xcm_lane(),
+ );
// we care only about handing message to the XCM dispatcher, so we don't care about its
// actual dispatch
diff --git a/bin/rialto-parachain/node/Cargo.toml b/bin/rialto-parachain/node/Cargo.toml
index 90331a22ea4..781355dc363 100644
--- a/bin/rialto-parachain/node/Cargo.toml
+++ b/bin/rialto-parachain/node/Cargo.toml
@@ -28,6 +28,7 @@ jsonrpsee = { version = "0.16.2", features = ["server"] }
# Local Dependencies
bp-messages = { path = "../../../primitives/messages" }
+bridge-runtime-common = { path = "../../runtime-common" }
rialto-parachain-runtime = { path = '../runtime' }
# Substrate Dependencies
diff --git a/bin/rialto-parachain/node/src/chain_spec.rs b/bin/rialto-parachain/node/src/chain_spec.rs
index 30f5a624a5e..e3d9be39695 100644
--- a/bin/rialto-parachain/node/src/chain_spec.rs
+++ b/bin/rialto-parachain/node/src/chain_spec.rs
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity Bridges Common. If not, see .
+use bridge_runtime_common::messages_xcm_extension::XcmBlobHauler;
use cumulus_primitives_core::ParaId;
use rialto_parachain_runtime::{AccountId, AuraId, BridgeMillauMessagesConfig, Signature};
use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup};
@@ -192,7 +193,9 @@ fn testnet_genesis(
aura_ext: Default::default(),
bridge_millau_messages: BridgeMillauMessagesConfig {
owner: Some(get_account_id_from_seed::(MILLAU_MESSAGES_PALLET_OWNER)),
- opened_lanes: vec![bp_messages::LaneId::default()],
+ opened_lanes: vec![
+ rialto_parachain_runtime::millau_messages::ToMillauXcmBlobHauler::xcm_lane(),
+ ],
..Default::default()
},
}
diff --git a/bin/rialto-parachain/runtime/src/lib.rs b/bin/rialto-parachain/runtime/src/lib.rs
index 78f7c794872..48b825b573d 100644
--- a/bin/rialto-parachain/runtime/src/lib.rs
+++ b/bin/rialto-parachain/runtime/src/lib.rs
@@ -841,14 +841,15 @@ cumulus_pallet_parachain_system::register_validate_block!(
#[cfg(test)]
mod tests {
use super::*;
- use crate::millau_messages::{FromMillauMessageDispatch, XCM_LANE};
+ use crate::millau_messages::FromMillauMessageDispatch;
use bp_messages::{
target_chain::{DispatchMessage, DispatchMessageData, MessageDispatch},
- LaneId, MessageKey, OutboundLaneData,
+ MessageKey, OutboundLaneData,
};
use bp_runtime::Chain;
use bridge_runtime_common::{
- integrity::check_additional_signed, messages_xcm_extension::XcmBlobMessageDispatchResult,
+ integrity::check_additional_signed,
+ messages_xcm_extension::{XcmBlobHauler, XcmBlobMessageDispatchResult},
};
use codec::Encode;
use pallet_bridge_messages::OutboundLanes;
@@ -882,12 +883,13 @@ mod tests {
fn xcm_messages_to_millau_are_sent_using_bridge_exporter() {
new_test_ext().execute_with(|| {
// ensure that the there are no messages queued
+ let lane_id = crate::millau_messages::ToMillauXcmBlobHauler::xcm_lane();
OutboundLanes::::insert(
- XCM_LANE,
+ lane_id,
OutboundLaneData::opened(),
);
assert_eq!(
- OutboundLanes::::get(XCM_LANE)
+ OutboundLanes::::get(lane_id)
.unwrap()
.latest_generated_nonce,
0,
@@ -906,7 +908,7 @@ mod tests {
// ensure that the message has been queued
assert_eq!(
- OutboundLanes::::get(XCM_LANE)
+ OutboundLanes::::get(lane_id)
.unwrap()
.latest_generated_nonce,
1,
@@ -920,9 +922,10 @@ mod tests {
xcm::VersionedInteriorMultiLocation::V3(X1(GlobalConsensus(ThisNetwork::get())));
// this is the `BridgeMessage` from polkadot xcm builder, but it has no constructor
// or public fields, so just tuple
+ let xcm_lane = crate::millau_messages::ToMillauXcmBlobHauler::xcm_lane();
let bridge_message = (location, xcm).encode();
DispatchMessage {
- key: MessageKey { lane_id: LaneId([0, 0, 0, 0]), nonce: 1 },
+ key: MessageKey { lane_id: xcm_lane, nonce: 1 },
data: DispatchMessageData { payload: Ok(bridge_message) },
}
}
diff --git a/bin/rialto-parachain/runtime/src/millau_messages.rs b/bin/rialto-parachain/runtime/src/millau_messages.rs
index d9f51c1ed2b..2eb7c1b8525 100644
--- a/bin/rialto-parachain/runtime/src/millau_messages.rs
+++ b/bin/rialto-parachain/runtime/src/millau_messages.rs
@@ -22,12 +22,13 @@
use crate::{Runtime, WithMillauMessagesInstance};
use bp_messages::LaneId;
-use bridge_runtime_common::messages_xcm_extension::{XcmBlobHauler, XcmBlobHaulerAdapter};
+use bridge_runtime_common::messages_xcm_extension::{
+ LaneIdFromChainId, XcmBlobHauler, XcmBlobHaulerAdapter,
+};
use frame_support::{parameter_types, weights::Weight};
+use sp_core::Get;
use xcm_builder::HaulBlobExporter;
-/// Default lane that is used to send messages to Millau.
-pub const XCM_LANE: LaneId = LaneId([0, 0, 0, 0]);
/// Weight of 2 XCM instructions is for simple `Trap(42)` program, coming through bridge
/// (it is prepended with `UniversalOrigin` instruction). It is used just for simplest manual
/// tests, confirming that we don't break encoding somewhere between.
@@ -59,12 +60,13 @@ impl XcmBlobHauler for ToMillauXcmBlobHauler {
type MessageSender = pallet_bridge_messages::Pallet;
fn xcm_lane() -> LaneId {
- XCM_LANE
+ LaneIdFromChainId::::get()
}
}
#[cfg(test)]
mod tests {
+ use super::*;
use crate::{MillauGrandpaInstance, Runtime, WithMillauMessagesInstance};
use bridge_runtime_common::{
assert_complete_bridge_types,
@@ -109,4 +111,15 @@ mod tests {
},
});
}
+
+ #[test]
+ fn rialto_parachain_millau_bridge_identifier_did_not_changed() {
+ // there's nothing criminal if it is changed, but then thou need to fix it across
+ // all deployments scripts, alerts and so on
+ assert_eq!(
+ *ToMillauXcmBlobHauler::xcm_lane().as_ref(),
+ hex_literal::hex!("6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de")
+ .into(),
+ );
+ }
}
diff --git a/bin/rialto/node/Cargo.toml b/bin/rialto/node/Cargo.toml
index bf0f145b6e4..bc89c207c78 100644
--- a/bin/rialto/node/Cargo.toml
+++ b/bin/rialto/node/Cargo.toml
@@ -15,6 +15,7 @@ serde_json = "1.0.97"
# Bridge dependencies
bp-messages = { path = "../../../primitives/messages" }
+bridge-runtime-common = { path = "../../runtime-common" }
rialto-runtime = { path = "../runtime" }
# Substrate Dependencies
diff --git a/bin/rialto/node/src/chain_spec.rs b/bin/rialto/node/src/chain_spec.rs
index 4f0cb5aa650..72f62897b6e 100644
--- a/bin/rialto/node/src/chain_spec.rs
+++ b/bin/rialto/node/src/chain_spec.rs
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity Bridges Common. If not, see .
+use bridge_runtime_common::messages_xcm_extension::XcmBlobHauler;
use polkadot_primitives::v5::{AssignmentId, ValidatorId};
use rialto_runtime::{
AccountId, BabeConfig, BalancesConfig, BeefyConfig, BridgeMillauMessagesConfig,
@@ -277,7 +278,7 @@ fn testnet_genesis(
paras: Default::default(),
bridge_millau_messages: BridgeMillauMessagesConfig {
owner: Some(get_account_id_from_seed::(MILLAU_MESSAGES_PALLET_OWNER)),
- opened_lanes: vec![bp_messages::LaneId::default()],
+ opened_lanes: vec![rialto_runtime::millau_messages::ToMillauXcmBlobHauler::xcm_lane()],
..Default::default()
},
xcm_pallet: Default::default(),
diff --git a/bin/rialto/runtime/Cargo.toml b/bin/rialto/runtime/Cargo.toml
index 12254010b35..38de00da62f 100644
--- a/bin/rialto/runtime/Cargo.toml
+++ b/bin/rialto/runtime/Cargo.toml
@@ -71,6 +71,7 @@ xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "maste
[dev-dependencies]
bridge-runtime-common = { path = "../../runtime-common", features = ["integrity-test"] }
env_logger = "0.10"
+hex-literal = "0.4"
static_assertions = "1.1"
[build-dependencies]
diff --git a/bin/rialto/runtime/src/millau_messages.rs b/bin/rialto/runtime/src/millau_messages.rs
index 2ef82f22f16..b8f6fadcad5 100644
--- a/bin/rialto/runtime/src/millau_messages.rs
+++ b/bin/rialto/runtime/src/millau_messages.rs
@@ -19,12 +19,13 @@
use crate::{Runtime, WithMillauMessagesInstance};
use bp_messages::LaneId;
-use bridge_runtime_common::messages_xcm_extension::{XcmBlobHauler, XcmBlobHaulerAdapter};
+use bridge_runtime_common::messages_xcm_extension::{
+ LaneIdFromChainId, XcmBlobHauler, XcmBlobHaulerAdapter,
+};
use frame_support::{parameter_types, weights::Weight};
+use sp_core::Get;
use xcm_builder::HaulBlobExporter;
-/// Lane that is used for XCM messages exchange.
-pub const XCM_LANE: LaneId = LaneId([0, 0, 0, 0]);
/// Weight of 2 XCM instructions is for simple `Trap(42)` program, coming through bridge
/// (it is prepended with `UniversalOrigin` instruction). It is used just for simplest manual
/// tests, confirming that we don't break encoding somewhere between.
@@ -59,12 +60,13 @@ impl XcmBlobHauler for ToMillauXcmBlobHauler {
type MessageSender = pallet_bridge_messages::Pallet;
fn xcm_lane() -> LaneId {
- XCM_LANE
+ LaneIdFromChainId::::get()
}
}
#[cfg(test)]
mod tests {
+ use super::*;
use crate::{MillauGrandpaInstance, Runtime, WithMillauMessagesInstance};
use bridge_runtime_common::{
assert_complete_bridge_types,
@@ -105,4 +107,15 @@ mod tests {
},
});
}
+
+ #[test]
+ fn rialto_millau_bridge_identifier_did_not_changed() {
+ // there's nothing criminal if it is changed, but then thou need to fix it across
+ // all deployments scripts, alerts and so on
+ assert_eq!(
+ *ToMillauXcmBlobHauler::xcm_lane().as_ref(),
+ hex_literal::hex!("52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7")
+ .into(),
+ );
+ }
}
diff --git a/bin/rialto/runtime/src/xcm_config.rs b/bin/rialto/runtime/src/xcm_config.rs
index bc3460d5a36..0018b7fc67b 100644
--- a/bin/rialto/runtime/src/xcm_config.rs
+++ b/bin/rialto/runtime/src/xcm_config.rs
@@ -192,15 +192,14 @@ impl pallet_xcm::Config for Runtime {
#[cfg(test)]
mod tests {
use super::*;
- use crate::{
- millau_messages::{FromMillauMessageDispatch, XCM_LANE},
- WithMillauMessagesInstance,
- };
+ use crate::{millau_messages::FromMillauMessageDispatch, WithMillauMessagesInstance};
use bp_messages::{
target_chain::{DispatchMessage, DispatchMessageData, MessageDispatch},
- LaneId, MessageKey, OutboundLaneData,
+ MessageKey, OutboundLaneData,
+ };
+ use bridge_runtime_common::messages_xcm_extension::{
+ XcmBlobHauler, XcmBlobMessageDispatchResult,
};
- use bridge_runtime_common::messages_xcm_extension::XcmBlobMessageDispatchResult;
use codec::Encode;
use pallet_bridge_messages::OutboundLanes;
use xcm_executor::XcmExecutor;
@@ -224,12 +223,13 @@ mod tests {
fn xcm_messages_to_millau_are_sent_using_bridge_exporter() {
new_test_ext().execute_with(|| {
// ensure that the there are no messages queued
+ let lane_id = crate::millau_messages::ToMillauXcmBlobHauler::xcm_lane();
OutboundLanes::::insert(
- XCM_LANE,
+ lane_id,
OutboundLaneData::opened(),
);
assert_eq!(
- OutboundLanes::::get(XCM_LANE)
+ OutboundLanes::::get(lane_id)
.unwrap()
.latest_generated_nonce,
0,
@@ -248,7 +248,7 @@ mod tests {
// ensure that the message has been queued
assert_eq!(
- OutboundLanes::::get(XCM_LANE)
+ OutboundLanes::::get(lane_id)
.unwrap()
.latest_generated_nonce,
1,
@@ -263,8 +263,9 @@ mod tests {
// this is the `BridgeMessage` from polkadot xcm builder, but it has no constructor
// or public fields, so just tuple
let bridge_message = (location, xcm).encode();
+ let lane_id = crate::millau_messages::ToMillauXcmBlobHauler::xcm_lane();
DispatchMessage {
- key: MessageKey { lane_id: LaneId([0, 0, 0, 0]), nonce: 1 },
+ key: MessageKey { lane_id, nonce: 1 },
data: DispatchMessageData { payload: Ok(bridge_message) },
}
}
diff --git a/bin/runtime-common/src/messages_call_ext.rs b/bin/runtime-common/src/messages_call_ext.rs
index bad1b0255fe..4ec82b84656 100644
--- a/bin/runtime-common/src/messages_call_ext.rs
+++ b/bin/runtime-common/src/messages_call_ext.rs
@@ -324,11 +324,13 @@ mod tests {
};
use sp_std::ops::RangeInclusive;
- const TEST_LANE_ID: LaneId = LaneId([0, 0, 0, 0]);
+ fn test_lane_id() -> LaneId {
+ LaneId::new(1, 2)
+ }
fn fill_unrewarded_relayers() {
let mut inbound_lane_state =
- pallet_bridge_messages::InboundLanes::::get(TEST_LANE_ID).unwrap();
+ pallet_bridge_messages::InboundLanes::::get(test_lane_id()).unwrap();
for n in 0..BridgedUnderlyingChain::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX {
inbound_lane_state.relayers.push_back(UnrewardedRelayer {
relayer: Default::default(),
@@ -336,14 +338,14 @@ mod tests {
});
}
pallet_bridge_messages::InboundLanes::::insert(
- TEST_LANE_ID,
+ test_lane_id(),
inbound_lane_state,
);
}
fn fill_unrewarded_messages() {
let mut inbound_lane_state =
- pallet_bridge_messages::InboundLanes::::get(TEST_LANE_ID).unwrap();
+ pallet_bridge_messages::InboundLanes::::get(test_lane_id()).unwrap();
inbound_lane_state.relayers.push_back(UnrewardedRelayer {
relayer: Default::default(),
messages: DeliveredMessages {
@@ -352,14 +354,14 @@ mod tests {
},
});
pallet_bridge_messages::InboundLanes::::insert(
- TEST_LANE_ID,
+ test_lane_id(),
inbound_lane_state,
);
}
fn deliver_message_10() {
pallet_bridge_messages::InboundLanes::::insert(
- TEST_LANE_ID,
+ test_lane_id(),
bp_messages::InboundLaneData {
state: LaneState::Opened,
relayers: Default::default(),
@@ -381,7 +383,7 @@ mod tests {
proof: Box::new(FromBridgedChainMessagesProof {
bridged_header_hash: Default::default(),
storage: Default::default(),
- lane: TEST_LANE_ID,
+ lane: test_lane_id(),
nonces_start,
nonces_end,
}),
@@ -394,11 +396,11 @@ mod tests {
fn run_test(test: impl Fn() -> T) -> T {
sp_io::TestExternalities::new(Default::default()).execute_with(|| {
pallet_bridge_messages::InboundLanes::::insert(
- TEST_LANE_ID,
+ test_lane_id(),
InboundLaneData::opened(),
);
pallet_bridge_messages::OutboundLanes::::insert(
- TEST_LANE_ID,
+ test_lane_id(),
OutboundLaneData::opened(),
);
test()
@@ -488,7 +490,7 @@ mod tests {
fn confirm_message_10() {
pallet_bridge_messages::OutboundLanes::::insert(
- TEST_LANE_ID,
+ test_lane_id(),
bp_messages::OutboundLaneData {
state: LaneState::Opened,
oldest_unpruned_nonce: 0,
@@ -504,7 +506,7 @@ mod tests {
proof: FromBridgedChainMessagesDeliveryProof {
bridged_header_hash: Default::default(),
storage_proof: Default::default(),
- lane: TEST_LANE_ID,
+ lane: test_lane_id(),
},
relayers_state: UnrewardedRelayersState {
last_delivered_nonce,
@@ -562,7 +564,7 @@ mod tests {
CallHelper::::was_successful(&CallInfo::ReceiveMessagesProof(
ReceiveMessagesProofInfo {
base: BaseMessagesProofInfo {
- lane_id: TEST_LANE_ID,
+ lane_id: test_lane_id(),
bundled_range,
best_stored_nonce: 0, // doesn't matter for `was_successful`
},
@@ -622,7 +624,7 @@ mod tests {
fn was_message_confirmation_successful(bundled_range: RangeInclusive) -> bool {
CallHelper::::was_successful(&CallInfo::ReceiveMessagesDeliveryProof(
ReceiveMessagesDeliveryProofInfo(BaseMessagesProofInfo {
- lane_id: TEST_LANE_ID,
+ lane_id: test_lane_id(),
bundled_range,
best_stored_nonce: 0, // doesn't matter for `was_successful`
}),
diff --git a/bin/runtime-common/src/messages_xcm_extension.rs b/bin/runtime-common/src/messages_xcm_extension.rs
index 0317d745c15..c6a7703a72e 100644
--- a/bin/runtime-common/src/messages_xcm_extension.rs
+++ b/bin/runtime-common/src/messages_xcm_extension.rs
@@ -26,17 +26,37 @@ use bp_messages::{
target_chain::{DispatchMessage, MessageDispatch},
LaneId,
};
-use bp_runtime::messages::MessageDispatchResult;
+use bp_runtime::{messages::MessageDispatchResult, Chain};
use codec::{Decode, Encode};
use frame_support::{dispatch::Weight, CloneNoBound, EqNoBound, PartialEqNoBound};
use pallet_bridge_messages::WeightInfoExt as MessagesPalletWeights;
use scale_info::TypeInfo;
+use sp_core::Get;
use sp_runtime::SaturatedConversion;
+use sp_std::marker::PhantomData;
use xcm_builder::{DispatchBlob, DispatchBlobError, HaulBlob, HaulBlobError};
/// Plain "XCM" payload, which we transfer through bridge
pub type XcmAsPlainPayload = sp_std::prelude::Vec;
+/// Make LaneId from chain identifiers of two bridge endpoints.
+// TODO: https://github.com/paritytech/parity-bridges-common/issues/1666: this function
+// is a temporary solution, because `ChainId` and will be removed soon.
+pub struct LaneIdFromChainId(PhantomData<(R, I)>);
+
+impl Get for LaneIdFromChainId
+where
+ R: pallet_bridge_messages::Config,
+ I: 'static,
+{
+ fn get() -> LaneId {
+ LaneId::new(
+ pallet_bridge_messages::ThisChainOf::::ID,
+ pallet_bridge_messages::BridgedChainOf::::ID,
+ )
+ }
+}
+
/// Message dispatch result type for single message
#[derive(CloneNoBound, EqNoBound, PartialEqNoBound, Encode, Decode, Debug, TypeInfo)]
pub enum XcmBlobMessageDispatchResult {
diff --git a/bin/runtime-common/src/mock.rs b/bin/runtime-common/src/mock.rs
index b67543ad145..7c7e40c92e9 100644
--- a/bin/runtime-common/src/mock.rs
+++ b/bin/runtime-common/src/mock.rs
@@ -36,6 +36,7 @@ use frame_support::{
StateVersion,
};
use pallet_transaction_payment::Multiplier;
+use sp_core::Get;
use sp_runtime::{
testing::H256,
traits::{BlakeTwo256, ConstU32, ConstU64, ConstU8, IdentityLookup},
@@ -90,7 +91,10 @@ pub type TestStakeAndSlash = pallet_bridge_relayers::StakeAndSlashNamed<
>;
/// Message lane used in tests.
-pub const TEST_LANE_ID: LaneId = LaneId([0, 0, 0, 0]);
+pub fn test_lane_id() -> LaneId {
+ crate::messages_xcm_extension::LaneIdFromChainId::::get()
+}
+
/// Bridged chain id used in tests.
pub const TEST_BRIDGED_CHAIN_ID: ChainId = *b"brdg";
/// Maximal extrinsic size at the `BridgedChain`.
diff --git a/bin/runtime-common/src/refund_relayer_extension.rs b/bin/runtime-common/src/refund_relayer_extension.rs
index ce8c3c2346f..90f6d4bfce1 100644
--- a/bin/runtime-common/src/refund_relayer_extension.rs
+++ b/bin/runtime-common/src/refund_relayer_extension.rs
@@ -19,8 +19,11 @@
//! with calls that are: delivering new messsage and all necessary underlying headers
//! (parachain or relay chain).
-use crate::messages_call_ext::{
- CallHelper as MessagesCallHelper, CallInfo as MessagesCallInfo, MessagesCallSubType,
+use crate::{
+ messages_call_ext::{
+ CallHelper as MessagesCallHelper, CallInfo as MessagesCallInfo, MessagesCallSubType,
+ },
+ messages_xcm_extension::LaneIdFromChainId,
};
use bp_messages::{ChainWithMessages, LaneId, MessageNonce};
use bp_relayers::{RewardsAccountOwner, RewardsAccountParams};
@@ -102,14 +105,15 @@ pub trait RefundableMessagesLaneId {
}
/// Default implementation of `RefundableMessagesLaneId`.
-pub struct RefundableMessagesLane(PhantomData<(Instance, Id)>);
+pub struct RefundableMessagesLane(PhantomData<(Runtime, Instance)>);
-impl RefundableMessagesLaneId for RefundableMessagesLane
+impl RefundableMessagesLaneId for RefundableMessagesLane
where
- Id: Get,
+ Runtime: MessagesConfig,
+ Instance: 'static,
{
type Instance = Instance;
- type Id = Id;
+ type Id = LaneIdFromChainId;
}
/// Refund calculator.
@@ -680,14 +684,13 @@ mod tests {
parameter_types! {
TestParachain: u32 = 1000;
- pub TestLaneId: LaneId = TEST_LANE_ID;
pub MsgProofsRewardsAccount: RewardsAccountParams = RewardsAccountParams::new(
- TEST_LANE_ID,
+ test_lane_id(),
TEST_BRIDGED_CHAIN_ID,
RewardsAccountOwner::ThisChain,
);
pub MsgDeliveryProofsRewardsAccount: RewardsAccountParams = RewardsAccountParams::new(
- TEST_LANE_ID,
+ test_lane_id(),
TEST_BRIDGED_CHAIN_ID,
RewardsAccountOwner::BridgedChain,
);
@@ -697,7 +700,7 @@ mod tests {
type TestExtension = RefundBridgedParachainMessages<
TestRuntime,
DefaultRefundableParachainId<(), TestParachain>,
- RefundableMessagesLane<(), TestLaneId>,
+ RefundableMessagesLane,
ActualFeeRefund,
ConstU64<1>,
StrTestExtension,
@@ -749,7 +752,7 @@ mod tests {
};
pallet_bridge_parachains::ParasInfo::::insert(para_id, para_info);
- let lane_id = TestLaneId::get();
+ let lane_id = test_lane_id();
let in_lane_data =
InboundLaneData { last_confirmed_nonce: best_message, ..Default::default() };
pallet_bridge_messages::InboundLanes::::insert(lane_id, in_lane_data);
@@ -802,9 +805,9 @@ mod tests {
proof: Box::new(FromBridgedChainMessagesProof {
bridged_header_hash: Default::default(),
storage: Default::default(),
- lane: TestLaneId::get(),
+ lane: test_lane_id(),
nonces_start: pallet_bridge_messages::InboundLanes::::get(
- TEST_LANE_ID,
+ test_lane_id(),
)
.unwrap()
.last_delivered_nonce() +
@@ -821,7 +824,7 @@ mod tests {
proof: FromBridgedChainMessagesDeliveryProof {
bridged_header_hash: Default::default(),
storage_proof: Default::default(),
- lane: TestLaneId::get(),
+ lane: test_lane_id(),
},
relayers_state: UnrewardedRelayersState {
last_delivered_nonce: best_message,
@@ -898,7 +901,7 @@ mod tests {
},
MessagesCallInfo::ReceiveMessagesProof(ReceiveMessagesProofInfo {
base: BaseMessagesProofInfo {
- lane_id: TEST_LANE_ID,
+ lane_id: test_lane_id(),
bundled_range: 101..=200,
best_stored_nonce: 100,
},
@@ -929,7 +932,7 @@ mod tests {
},
MessagesCallInfo::ReceiveMessagesDeliveryProof(ReceiveMessagesDeliveryProofInfo(
BaseMessagesProofInfo {
- lane_id: TEST_LANE_ID,
+ lane_id: test_lane_id(),
bundled_range: 101..=200,
best_stored_nonce: 100,
},
@@ -949,7 +952,7 @@ mod tests {
},
MessagesCallInfo::ReceiveMessagesProof(ReceiveMessagesProofInfo {
base: BaseMessagesProofInfo {
- lane_id: TEST_LANE_ID,
+ lane_id: test_lane_id(),
bundled_range: 101..=200,
best_stored_nonce: 100,
},
@@ -975,7 +978,7 @@ mod tests {
},
MessagesCallInfo::ReceiveMessagesDeliveryProof(ReceiveMessagesDeliveryProofInfo(
BaseMessagesProofInfo {
- lane_id: TEST_LANE_ID,
+ lane_id: test_lane_id(),
bundled_range: 101..=200,
best_stored_nonce: 100,
},
@@ -990,7 +993,7 @@ mod tests {
call_info: CallInfo::Msgs(MessagesCallInfo::ReceiveMessagesProof(
ReceiveMessagesProofInfo {
base: BaseMessagesProofInfo {
- lane_id: TEST_LANE_ID,
+ lane_id: test_lane_id(),
bundled_range: 101..=200,
best_stored_nonce: 100,
},
@@ -1010,7 +1013,7 @@ mod tests {
relayer: relayer_account_at_this_chain(),
call_info: CallInfo::Msgs(MessagesCallInfo::ReceiveMessagesDeliveryProof(
ReceiveMessagesDeliveryProofInfo(BaseMessagesProofInfo {
- lane_id: TEST_LANE_ID,
+ lane_id: test_lane_id(),
bundled_range: 101..=200,
best_stored_nonce: 100,
}),
diff --git a/deployments/bridges/rialto-millau/dashboard/grafana/relay-millau-to-rialto-messages-dashboard.json b/deployments/bridges/rialto-millau/dashboard/grafana/relay-millau-to-rialto-messages-dashboard.json
index af8749325de..d3c59e98868 100644
--- a/deployments/bridges/rialto-millau/dashboard/grafana/relay-millau-to-rialto-messages-dashboard.json
+++ b/deployments/bridges/rialto-millau/dashboard/grafana/relay-millau-to-rialto-messages-dashboard.json
@@ -63,14 +63,14 @@
"steppedLine": false,
"targets": [
{
- "expr": "Millau_to_Rialto_MessageLane_00000000_best_target_block_number",
+ "expr": "Millau_to_Rialto_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_best_target_block_number",
"instant": false,
"interval": "",
"legendFormat": "At Rialto",
"refId": "A"
},
{
- "expr": "Millau_to_Rialto_MessageLane_00000000_best_target_at_source_block_number",
+ "expr": "Millau_to_Rialto_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_best_target_at_source_block_number",
"instant": false,
"interval": "",
"legendFormat": "At Millau",
@@ -164,13 +164,13 @@
"steppedLine": false,
"targets": [
{
- "expr": "Millau_to_Rialto_MessageLane_00000000_best_source_block_number",
+ "expr": "Millau_to_Rialto_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_best_source_block_number",
"interval": "",
"legendFormat": "At Millau",
"refId": "A"
},
{
- "expr": "Millau_to_Rialto_MessageLane_00000000_best_source_at_target_block_number",
+ "expr": "Millau_to_Rialto_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_best_source_at_target_block_number",
"interval": "",
"legendFormat": "At Rialto",
"refId": "B"
@@ -298,16 +298,16 @@
"steppedLine": false,
"targets": [
{
- "expr": "label_replace(label_replace(Millau_to_Rialto_MessageLane_00000000_lane_state_nonces{type=~\"source_latest_generated|target_latest_received\"}, \"type\", \"Latest message sent from Rialto\", \"type\", \"source_latest_generated\"), \"type\", \"Latest Rialto message received by Millau\", \"type\", \"target_latest_received\")",
+ "expr": "label_replace(label_replace(Millau_to_Rialto_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=~\"source_latest_generated|target_latest_received\"}, \"type\", \"Latest message sent from Rialto\", \"type\", \"source_latest_generated\"), \"type\", \"Latest Rialto message received by Millau\", \"type\", \"target_latest_received\")",
"interval": "",
"legendFormat": "{{type}}",
"refId": "A"
},
{
- "expr": "increase(Millau_to_Rialto_MessageLane_00000000_lane_state_nonces{type=\"source_latest_generated\"}[10m]) OR on() vector(0)",
+ "expr": "increase(Millau_to_Rialto_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=\"source_latest_generated\"}[10m]) OR on() vector(0)",
"hide": true,
"interval": "",
- "legendFormat": "Messages generated in last 5 minutes (Millau -> Rialto, 00000000)",
+ "legendFormat": "Messages generated in last 5 minutes (Millau -> Rialto)",
"refId": "B"
}
],
@@ -324,7 +324,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Delivery race (00000000)",
+ "title": "Delivery race",
"tooltip": {
"shared": true,
"sort": 0,
@@ -407,7 +407,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "label_replace(label_replace(Millau_to_Rialto_MessageLane_00000000_lane_state_nonces{type=~\"source_latest_confirmed|target_latest_received\"}, \"type\", \"Latest message confirmed by Rialto to Millau\", \"type\", \"source_latest_confirmed\"), \"type\", \"Latest Rialto message received by Millau\", \"type\", \"target_latest_received\")",
+ "expr": "label_replace(label_replace(Millau_to_Rialto_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=~\"source_latest_confirmed|target_latest_received\"}, \"type\", \"Latest message confirmed by Rialto to Millau\", \"type\", \"source_latest_confirmed\"), \"type\", \"Latest Rialto message received by Millau\", \"type\", \"target_latest_received\")",
"interval": "",
"legendFormat": "{{type}}",
"refId": "A"
@@ -417,7 +417,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Confirmations race (00000000)",
+ "title": "Confirmations race",
"tooltip": {
"shared": true,
"sort": 0,
@@ -535,7 +535,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "scalar(max_over_time(Millau_to_Rialto_MessageLane_00000000_lane_state_nonces{type=\"source_latest_generated\"}[2m])) - scalar(max_over_time(Millau_to_Rialto_MessageLane_00000000_lane_state_nonces{type=\"target_latest_received\"}[2m]))",
+ "expr": "scalar(max_over_time(Millau_to_Rialto_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=\"source_latest_generated\"}[2m])) - scalar(max_over_time(Millau_to_Rialto_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=\"target_latest_received\"}[2m]))",
"format": "time_series",
"instant": false,
"interval": "",
@@ -543,7 +543,7 @@
"refId": "A"
},
{
- "expr": "increase(Millau_to_Rialto_MessageLane_00000000_lane_state_nonces{type=\"target_latest_received\"}[5m]) OR on() vector(0)",
+ "expr": "increase(Millau_to_Rialto_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=\"target_latest_received\"}[5m]) OR on() vector(0)",
"interval": "",
"legendFormat": "Millau Messages delivered to Rialto in last 5m",
"refId": "B"
@@ -562,7 +562,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Delivery race lags (00000000)",
+ "title": "Delivery race lags",
"tooltip": {
"shared": true,
"sort": 0,
@@ -680,7 +680,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "scalar(max_over_time(Millau_to_Rialto_MessageLane_00000000_lane_state_nonces{type=\"target_latest_received\"}[2m]) OR on() vector(0)) - scalar(max_over_time(Millau_to_Rialto_MessageLane_00000000_lane_state_nonces{type=\"source_latest_confirmed\"}[2m]) OR on() vector(0))",
+ "expr": "scalar(max_over_time(Millau_to_Rialto_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=\"target_latest_received\"}[2m]) OR on() vector(0)) - scalar(max_over_time(Millau_to_Rialto_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=\"source_latest_confirmed\"}[2m]) OR on() vector(0))",
"interval": "",
"legendFormat": "Unconfirmed messages at Millau",
"refId": "A"
@@ -699,7 +699,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Confirmations race lags (00000000)",
+ "title": "Confirmations race lags",
"tooltip": {
"shared": true,
"sort": 0,
@@ -817,13 +817,13 @@
"steppedLine": false,
"targets": [
{
- "expr": "scalar(max_over_time(Millau_to_Rialto_MessageLane_00000000_lane_state_nonces{type=\"source_latest_confirmed\"}[2m])) - scalar(max_over_time(Millau_to_Rialto_MessageLane_00000000_lane_state_nonces{type=\"target_latest_confirmed\"}[2m]))",
+ "expr": "scalar(max_over_time(Millau_to_Rialto_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=\"source_latest_confirmed\"}[2m])) - scalar(max_over_time(Millau_to_Rialto_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=\"target_latest_confirmed\"}[2m]))",
"interval": "",
"legendFormat": "Unconfirmed rewards at Rialto",
"refId": "A"
},
{
- "expr": "(scalar(max_over_time(Millau_to_Rialto_MessageLane_00000000_lane_state_nonces{type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(Millau_to_Rialto_MessageLane_00000000_lane_state_nonces{type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))) * (max_over_time(Millau_to_Rialto_MessageLane_00000000_lane_state_nonces{type=\"target_latest_received\"}[2m]) > bool min_over_time(Millau_to_Rialto_MessageLane_00000000_lane_state_nonces{type=\"target_latest_received\"}[2m]))",
+ "expr": "(scalar(max_over_time(Millau_to_Rialto_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(Millau_to_Rialto_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))) * (max_over_time(Millau_to_Rialto_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=\"target_latest_received\"}[2m]) > bool min_over_time(Millau_to_Rialto_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=\"target_latest_received\"}[2m]))",
"interval": "",
"legendFormat": "Unconfirmed rewards at Millau->Rialto (zero if messages are not being delivered to Rialto)",
"refId": "B"
@@ -842,7 +842,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Reward lags (00000000)",
+ "title": "Reward lags",
"tooltip": {
"shared": true,
"sort": 0,
diff --git a/deployments/bridges/rialto-millau/dashboard/grafana/relay-rialto-to-millau-messages-dashboard.json b/deployments/bridges/rialto-millau/dashboard/grafana/relay-rialto-to-millau-messages-dashboard.json
index efee749c5c1..68932a05891 100644
--- a/deployments/bridges/rialto-millau/dashboard/grafana/relay-rialto-to-millau-messages-dashboard.json
+++ b/deployments/bridges/rialto-millau/dashboard/grafana/relay-rialto-to-millau-messages-dashboard.json
@@ -64,14 +64,14 @@
"steppedLine": false,
"targets": [
{
- "expr": "Rialto_to_Millau_MessageLane_00000000_best_target_block_number",
+ "expr": "Rialto_to_Millau_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_best_target_block_number",
"instant": false,
"interval": "",
"legendFormat": "At Millau",
"refId": "A"
},
{
- "expr": "Rialto_to_Millau_MessageLane_00000000_best_target_at_source_block_number",
+ "expr": "Rialto_to_Millau_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_best_target_at_source_block_number",
"instant": false,
"interval": "",
"legendFormat": "At Rialto",
@@ -165,13 +165,13 @@
"steppedLine": false,
"targets": [
{
- "expr": "Rialto_to_Millau_MessageLane_00000000_best_source_block_number",
+ "expr": "Rialto_to_Millau_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_best_source_block_number",
"interval": "",
"legendFormat": "At Rialto",
"refId": "A"
},
{
- "expr": "Rialto_to_Millau_MessageLane_00000000_best_source_at_target_block_number",
+ "expr": "Rialto_to_Millau_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_best_source_at_target_block_number",
"interval": "",
"legendFormat": "At Millau",
"refId": "B"
@@ -299,16 +299,16 @@
"steppedLine": false,
"targets": [
{
- "expr": "label_replace(label_replace(Rialto_to_Millau_MessageLane_00000000_lane_state_nonces{type=~\"source_latest_generated|target_latest_received\"}, \"type\", \"Latest message sent from Millau\", \"type\", \"source_latest_generated\"), \"type\", \"Latest message received by Rialto\", \"type\", \"target_latest_received\")",
+ "expr": "label_replace(label_replace(Rialto_to_Millau_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=~\"source_latest_generated|target_latest_received\"}, \"type\", \"Latest message sent from Millau\", \"type\", \"source_latest_generated\"), \"type\", \"Latest message received by Rialto\", \"type\", \"target_latest_received\")",
"interval": "",
"legendFormat": "{{type}}",
"refId": "A"
},
{
- "expr": "increase(Rialto_to_Millau_MessageLane_00000000_lane_state_nonces{type=\"source_latest_generated\"}[10m]) OR on() vector(0)",
+ "expr": "increase(Rialto_to_Millau_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=\"source_latest_generated\"}[10m]) OR on() vector(0)",
"hide": true,
"interval": "",
- "legendFormat": "Messages generated in last 5 minutes (Rialto -> Millau, 00000000)",
+ "legendFormat": "Messages generated in last 5 minutes (Rialto -> Millau)",
"refId": "B"
}
],
@@ -316,7 +316,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Delivery race (00000000)",
+ "title": "Delivery race",
"tooltip": {
"shared": true,
"sort": 0,
@@ -399,7 +399,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "label_replace(label_replace(Rialto_to_Millau_MessageLane_00000000_lane_state_nonces{type=~\"source_latest_confirmed|target_latest_received\"}, \"type\", \"Latest message confirmed by Millau to Rialto\", \"type\", \"source_latest_confirmed\"), \"type\", \"Latest message received by Rialto\", \"type\", \"target_latest_received\")",
+ "expr": "label_replace(label_replace(Rialto_to_Millau_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=~\"source_latest_confirmed|target_latest_received\"}, \"type\", \"Latest message confirmed by Millau to Rialto\", \"type\", \"source_latest_confirmed\"), \"type\", \"Latest message received by Rialto\", \"type\", \"target_latest_received\")",
"interval": "",
"legendFormat": "{{type}}",
"refId": "A"
@@ -409,7 +409,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Confirmations race (00000000)",
+ "title": "Confirmations race",
"tooltip": {
"shared": true,
"sort": 0,
@@ -527,7 +527,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "scalar(max_over_time(Rialto_to_Millau_MessageLane_00000000_lane_state_nonces{type=\"source_latest_generated\"}[2m])) - scalar(max_over_time(Rialto_to_Millau_MessageLane_00000000_lane_state_nonces{type=\"target_latest_received\"}[2m]))",
+ "expr": "scalar(max_over_time(Rialto_to_Millau_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=\"source_latest_generated\"}[2m])) - scalar(max_over_time(Rialto_to_Millau_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=\"target_latest_received\"}[2m]))",
"format": "time_series",
"instant": false,
"interval": "",
@@ -535,7 +535,7 @@
"refId": "A"
},
{
- "expr": "increase(Rialto_to_Millau_MessageLane_00000000_lane_state_nonces{type=\"target_latest_received\"}[5m]) OR on() vector(0)",
+ "expr": "increase(Rialto_to_Millau_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=\"target_latest_received\"}[5m]) OR on() vector(0)",
"interval": "",
"legendFormat": "Rialto Messages delivered to Millau in last 5m",
"refId": "B"
@@ -554,7 +554,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Delivery race lags (00000000)",
+ "title": "Delivery race lags",
"tooltip": {
"shared": true,
"sort": 0,
@@ -672,7 +672,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "scalar(max_over_time(Rialto_to_Millau_MessageLane_00000000_lane_state_nonces{type=\"target_latest_received\"}[2m]) OR on() vector(0)) - scalar(max_over_time(Rialto_to_Millau_MessageLane_00000000_lane_state_nonces{type=\"source_latest_confirmed\"}[2m]) OR on() vector(0))",
+ "expr": "scalar(max_over_time(Rialto_to_Millau_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=\"target_latest_received\"}[2m]) OR on() vector(0)) - scalar(max_over_time(Rialto_to_Millau_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=\"source_latest_confirmed\"}[2m]) OR on() vector(0))",
"interval": "",
"legendFormat": "Unconfirmed messages at Rialto",
"refId": "A"
@@ -691,7 +691,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Confirmations race lags (00000000)",
+ "title": "Confirmations race lags",
"tooltip": {
"shared": true,
"sort": 0,
@@ -809,13 +809,13 @@
"steppedLine": false,
"targets": [
{
- "expr": "scalar(max_over_time(Rialto_to_Millau_MessageLane_00000000_lane_state_nonces{type=\"source_latest_confirmed\"}[2m])) - scalar(max_over_time(Rialto_to_Millau_MessageLane_00000000_lane_state_nonces{type=\"target_latest_confirmed\"}[2m]))",
+ "expr": "scalar(max_over_time(Rialto_to_Millau_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=\"source_latest_confirmed\"}[2m])) - scalar(max_over_time(Rialto_to_Millau_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=\"target_latest_confirmed\"}[2m]))",
"interval": "",
"legendFormat": "Unconfirmed rewards at Millau",
"refId": "A"
},
{
- "expr": "(scalar(max_over_time(Rialto_to_Millau_MessageLane_00000000_lane_state_nonces{type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(Rialto_to_Millau_MessageLane_00000000_lane_state_nonces{type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))) * (max_over_time(Rialto_to_Millau_MessageLane_00000000_lane_state_nonces{type=\"target_latest_received\"}[2m]) > bool min_over_time(Rialto_to_Millau_MessageLane_00000000_lane_state_nonces{type=\"target_latest_received\"}[2m]))",
+ "expr": "(scalar(max_over_time(Rialto_to_Millau_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(Rialto_to_Millau_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))) * (max_over_time(Rialto_to_Millau_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=\"target_latest_received\"}[2m]) > bool min_over_time(Rialto_to_Millau_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_lane_state_nonces{type=\"target_latest_received\"}[2m]))",
"interval": "",
"legendFormat": "Unconfirmed rewards at Millau (zero if messages are not being delivered to Millau)",
"refId": "B"
@@ -834,7 +834,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Reward lags (00000000)",
+ "title": "Reward lags",
"tooltip": {
"shared": true,
"sort": 0,
diff --git a/deployments/bridges/rialto-millau/dashboard/grafana/rialto-millau-maintenance-dashboard.json b/deployments/bridges/rialto-millau/dashboard/grafana/rialto-millau-maintenance-dashboard.json
index 4f134914f70..23a180b17ce 100644
--- a/deployments/bridges/rialto-millau/dashboard/grafana/rialto-millau-maintenance-dashboard.json
+++ b/deployments/bridges/rialto-millau/dashboard/grafana/rialto-millau-maintenance-dashboard.json
@@ -426,7 +426,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "Rialto_to_Millau_MessageLane_00000000_is_source_and_source_at_target_using_different_forks OR on() vector(0)",
+ "expr": "Rialto_to_Millau_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_is_source_and_source_at_target_using_different_forks OR on() vector(0)",
"interval": "",
"legendFormat": "On different forks?",
"refId": "A"
@@ -559,7 +559,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "Millau_to_Rialto_MessageLane_00000000_is_source_and_source_at_target_using_different_forks OR on() vector(0)",
+ "expr": "Millau_to_Rialto_MessageLane_0x52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7_is_source_and_source_at_target_using_different_forks OR on() vector(0)",
"interval": "",
"legendFormat": "On different forks?",
"refId": "A"
diff --git a/deployments/bridges/rialto-millau/entrypoints/relay-messages-millau-to-rialto-entrypoint.sh b/deployments/bridges/rialto-millau/entrypoints/relay-messages-millau-to-rialto-entrypoint.sh
deleted file mode 100755
index 3a55cc782ca..00000000000
--- a/deployments/bridges/rialto-millau/entrypoints/relay-messages-millau-to-rialto-entrypoint.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-set -xeu
-
-sleep 15
-
-MESSAGE_LANE=${MSG_EXCHANGE_GEN_LANE:-00000000}
-
-/home/user/substrate-relay relay-messages millau-to-rialto \
- --lane $MESSAGE_LANE \
- --source-host millau-node-bob \
- --source-port 9944 \
- --source-signer //Rialto.OutboundMessagesRelay.Lane00000001 \
- --target-host rialto-node-bob \
- --target-port 9944 \
- --target-signer //Millau.InboundMessagesRelay.Lane00000001 \
- --prometheus-host=0.0.0.0
diff --git a/deployments/bridges/rialto-millau/entrypoints/relay-messages-rialto-to-millau-entrypoint.sh b/deployments/bridges/rialto-millau/entrypoints/relay-messages-rialto-to-millau-entrypoint.sh
deleted file mode 100755
index 145cd20100d..00000000000
--- a/deployments/bridges/rialto-millau/entrypoints/relay-messages-rialto-to-millau-entrypoint.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-set -xeu
-
-sleep 15
-
-MESSAGE_LANE=${MSG_EXCHANGE_GEN_LANE:-00000000}
-
-/home/user/substrate-relay relay-messages rialto-to-millau \
- --lane $MESSAGE_LANE \
- --source-host rialto-node-bob \
- --source-port 9944 \
- --source-signer //Millau.OutboundMessagesRelay.Lane00000001 \
- --target-host millau-node-bob \
- --target-port 9944 \
- --target-signer //Rialto.InboundMessagesRelay.Lane00000001 \
- --prometheus-host=0.0.0.0
diff --git a/deployments/bridges/rialto-millau/entrypoints/relay-millau-rialto-entrypoint.sh b/deployments/bridges/rialto-millau/entrypoints/relay-millau-rialto-entrypoint.sh
index a1306984bca..1227c4a4452 100755
--- a/deployments/bridges/rialto-millau/entrypoints/relay-millau-rialto-entrypoint.sh
+++ b/deployments/bridges/rialto-millau/entrypoints/relay-millau-rialto-entrypoint.sh
@@ -3,6 +3,10 @@ set -xeu
sleep 15
+# see `rialto_millau_bridge_identifier_did_not_changed` test in `millau-runtime` crate for
+# details on how this lane is computed
+MESSAGE_LANE="52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7"
+
/home/user/substrate-relay init-bridge millau-to-rialto \
--source-host millau-node-alice \
--source-port 9944 \
@@ -33,5 +37,5 @@ RIALTO_NODE_CONNECTION_PARAMS=$([ -z ${GLOBAL_DEPLOYMENTS} ] && \
$RIALTO_NODE_CONNECTION_PARAMS \
--rialto-signer //Millau.HeadersAndMessagesRelay \
--rialto-transactions-mortality=64 \
- --lane=00000000 \
+ --lane=$MESSAGE_LANE \
--prometheus-host=0.0.0.0
diff --git a/deployments/bridges/rialto-parachain-millau/dashboard/grafana/relay-millau-to-rialto-parachain-messages-dashboard.json b/deployments/bridges/rialto-parachain-millau/dashboard/grafana/relay-millau-to-rialto-parachain-messages-dashboard.json
index b20348cc513..d4feb6a4c7e 100644
--- a/deployments/bridges/rialto-parachain-millau/dashboard/grafana/relay-millau-to-rialto-parachain-messages-dashboard.json
+++ b/deployments/bridges/rialto-parachain-millau/dashboard/grafana/relay-millau-to-rialto-parachain-messages-dashboard.json
@@ -63,14 +63,14 @@
"steppedLine": false,
"targets": [
{
- "expr": "Millau_to_RialtoParachain_MessageLane_00000000_best_target_block_number{instance=\"relay-millau-rialto-parachain-1:9616\"}",
+ "expr": "Millau_to_RialtoParachain_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_best_target_block_number{instance=\"relay-millau-rialto-parachain-1:9616\"}",
"instant": false,
"interval": "",
"legendFormat": "At RialtoParachain",
"refId": "A"
},
{
- "expr": "Millau_to_RialtoParachain_MessageLane_00000000_best_target_at_source_block_number{instance=\"relay-millau-rialto-parachain-1:9616\"}",
+ "expr": "Millau_to_RialtoParachain_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_best_target_at_source_block_number{instance=\"relay-millau-rialto-parachain-1:9616\"}",
"instant": false,
"interval": "",
"legendFormat": "At Millau",
@@ -164,13 +164,13 @@
"steppedLine": false,
"targets": [
{
- "expr": "Millau_to_RialtoParachain_MessageLane_00000000_best_source_block_number{instance=\"relay-millau-rialto-parachain-1:9616\"}",
+ "expr": "Millau_to_RialtoParachain_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_best_source_block_number{instance=\"relay-millau-rialto-parachain-1:9616\"}",
"interval": "",
"legendFormat": "At Millau",
"refId": "A"
},
{
- "expr": "Millau_to_RialtoParachain_MessageLane_00000000_best_source_at_target_block_number{instance=\"relay-millau-rialto-parachain-1:9616\"}",
+ "expr": "Millau_to_RialtoParachain_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_best_source_at_target_block_number{instance=\"relay-millau-rialto-parachain-1:9616\"}",
"interval": "",
"legendFormat": "At RialtoParachain",
"refId": "B"
@@ -298,16 +298,16 @@
"steppedLine": false,
"targets": [
{
- "expr": "label_replace(label_replace(Millau_to_RialtoParachain_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=~\"source_latest_generated|target_latest_received\"}, \"type\", \"Latest message sent from RialtoParachain\", \"type\", \"source_latest_generated\"), \"type\", \"Latest RialtoParachain message received by Millau\", \"type\", \"target_latest_received\")",
+ "expr": "label_replace(label_replace(Millau_to_RialtoParachain_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=~\"source_latest_generated|target_latest_received\"}, \"type\", \"Latest message sent from RialtoParachain\", \"type\", \"source_latest_generated\"), \"type\", \"Latest RialtoParachain message received by Millau\", \"type\", \"target_latest_received\")",
"interval": "",
"legendFormat": "{{type}}",
"refId": "A"
},
{
- "expr": "increase(Millau_to_RialtoParachain_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_generated\"}[10m]) OR on() vector(0)",
+ "expr": "increase(Millau_to_RialtoParachain_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_generated\"}[10m]) OR on() vector(0)",
"hide": true,
"interval": "",
- "legendFormat": "Messages generated in last 5 minutes (Millau -> RialtoParachain, 00000000)",
+ "legendFormat": "Messages generated in last 5 minutes (Millau -> RialtoParachain)",
"refId": "B"
}
],
@@ -324,7 +324,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Delivery race (00000000)",
+ "title": "Delivery race",
"tooltip": {
"shared": true,
"sort": 0,
@@ -407,7 +407,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "label_replace(label_replace(Millau_to_RialtoParachain_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=~\"source_latest_confirmed|target_latest_received\"}, \"type\", \"Latest message confirmed by RialtoParachain to Millau\", \"type\", \"source_latest_confirmed\"), \"type\", \"Latest RialtoParachain message received by Millau\", \"type\", \"target_latest_received\")",
+ "expr": "label_replace(label_replace(Millau_to_RialtoParachain_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=~\"source_latest_confirmed|target_latest_received\"}, \"type\", \"Latest message confirmed by RialtoParachain to Millau\", \"type\", \"source_latest_confirmed\"), \"type\", \"Latest RialtoParachain message received by Millau\", \"type\", \"target_latest_received\")",
"interval": "",
"legendFormat": "{{type}}",
"refId": "A"
@@ -417,7 +417,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Confirmations race (00000000)",
+ "title": "Confirmations race",
"tooltip": {
"shared": true,
"sort": 0,
@@ -535,7 +535,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "scalar(max_over_time(Millau_to_RialtoParachain_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_generated\"}[2m])) - scalar(max_over_time(Millau_to_RialtoParachain_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[2m]))",
+ "expr": "scalar(max_over_time(Millau_to_RialtoParachain_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_generated\"}[2m])) - scalar(max_over_time(Millau_to_RialtoParachain_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[2m]))",
"format": "time_series",
"instant": false,
"interval": "",
@@ -543,7 +543,7 @@
"refId": "A"
},
{
- "expr": "increase(Millau_to_RialtoParachain_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[5m]) OR on() vector(0)",
+ "expr": "increase(Millau_to_RialtoParachain_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[5m]) OR on() vector(0)",
"interval": "",
"legendFormat": "Millau Messages delivered to RialtoParachain in last 5m",
"refId": "B"
@@ -561,7 +561,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Delivery race lags (00000000)",
+ "title": "Delivery race lags",
"tooltip": {
"shared": true,
"sort": 0,
@@ -679,7 +679,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "scalar(max_over_time(Millau_to_RialtoParachain_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[2m]) OR on() vector(0)) - scalar(max_over_time(Millau_to_RialtoParachain_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0))",
+ "expr": "scalar(max_over_time(Millau_to_RialtoParachain_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[2m]) OR on() vector(0)) - scalar(max_over_time(Millau_to_RialtoParachain_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0))",
"interval": "",
"legendFormat": "Unconfirmed messages at Millau",
"refId": "A"
@@ -697,7 +697,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Confirmations race lags (00000000)",
+ "title": "Confirmations race lags",
"tooltip": {
"shared": true,
"sort": 0,
@@ -815,13 +815,13 @@
"steppedLine": false,
"targets": [
{
- "expr": "scalar(max_over_time(Millau_to_RialtoParachain_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_confirmed\"}[2m])) - scalar(max_over_time(Millau_to_RialtoParachain_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_confirmed\"}[2m]))",
+ "expr": "scalar(max_over_time(Millau_to_RialtoParachain_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_confirmed\"}[2m])) - scalar(max_over_time(Millau_to_RialtoParachain_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_confirmed\"}[2m]))",
"interval": "",
"legendFormat": "Unconfirmed rewards at RialtoParachain",
"refId": "A"
},
{
- "expr": "(scalar(max_over_time(Millau_to_RialtoParachain_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(Millau_to_RialtoParachain_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))) * (max_over_time(Millau_to_RialtoParachain_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[2m]) > bool min_over_time(Millau_to_RialtoParachain_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[2m]))",
+ "expr": "(scalar(max_over_time(Millau_to_RialtoParachain_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(Millau_to_RialtoParachain_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))) * (max_over_time(Millau_to_RialtoParachain_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[2m]) > bool min_over_time(Millau_to_RialtoParachain_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[2m]))",
"interval": "",
"legendFormat": "Unconfirmed rewards at Millau->RaltoParachain (zero if messages are not being delivered to RialtoParachain)",
"refId": "B"
@@ -840,7 +840,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Reward lags (00000000)",
+ "title": "Reward lags",
"tooltip": {
"shared": true,
"sort": 0,
diff --git a/deployments/bridges/rialto-parachain-millau/dashboard/grafana/relay-rialto-parachain-to-millau-messages-dashboard.json b/deployments/bridges/rialto-parachain-millau/dashboard/grafana/relay-rialto-parachain-to-millau-messages-dashboard.json
index 064436145de..10c8fcd3928 100644
--- a/deployments/bridges/rialto-parachain-millau/dashboard/grafana/relay-rialto-parachain-to-millau-messages-dashboard.json
+++ b/deployments/bridges/rialto-parachain-millau/dashboard/grafana/relay-rialto-parachain-to-millau-messages-dashboard.json
@@ -63,14 +63,14 @@
"steppedLine": false,
"targets": [
{
- "expr": "RialtoParachain_to_Millau_MessageLane_00000000_best_target_block_number{instance=\"relay-millau-rialto-parachain-1:9616\"}",
+ "expr": "RialtoParachain_to_Millau_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_best_target_block_number{instance=\"relay-millau-rialto-parachain-1:9616\"}",
"instant": false,
"interval": "",
"legendFormat": "At Millau",
"refId": "A"
},
{
- "expr": "RialtoParachain_to_Millau_MessageLane_00000000_best_target_at_source_block_number{instance=\"relay-millau-rialto-parachain-1:9616\"}",
+ "expr": "RialtoParachain_to_Millau_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_best_target_at_source_block_number{instance=\"relay-millau-rialto-parachain-1:9616\"}",
"instant": false,
"interval": "",
"legendFormat": "At RialtoParachain",
@@ -164,13 +164,13 @@
"steppedLine": false,
"targets": [
{
- "expr": "RialtoParachain_to_Millau_MessageLane_00000000_best_source_block_number{instance=\"relay-millau-rialto-parachain-1:9616\"}",
+ "expr": "RialtoParachain_to_Millau_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_best_source_block_number{instance=\"relay-millau-rialto-parachain-1:9616\"}",
"interval": "",
"legendFormat": "At RialtoParachain",
"refId": "A"
},
{
- "expr": "RialtoParachain_to_Millau_MessageLane_00000000_best_source_at_target_block_number{instance=\"relay-millau-rialto-parachain-1:9616\"}",
+ "expr": "RialtoParachain_to_Millau_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_best_source_at_target_block_number{instance=\"relay-millau-rialto-parachain-1:9616\"}",
"interval": "",
"legendFormat": "At Millau",
"refId": "B"
@@ -298,16 +298,16 @@
"steppedLine": false,
"targets": [
{
- "expr": "label_replace(label_replace(RialtoParachain_to_Millau_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=~\"source_latest_generated|target_latest_received\"}, \"type\", \"Latest message sent from Millau\", \"type\", \"source_latest_generated\"), \"type\", \"Latest Millau message received by RialtoParachain\", \"type\", \"target_latest_received\")",
+ "expr": "label_replace(label_replace(RialtoParachain_to_Millau_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=~\"source_latest_generated|target_latest_received\"}, \"type\", \"Latest message sent from Millau\", \"type\", \"source_latest_generated\"), \"type\", \"Latest Millau message received by RialtoParachain\", \"type\", \"target_latest_received\")",
"interval": "",
"legendFormat": "{{type}}",
"refId": "A"
},
{
- "expr": "increase(RialtoParachain_to_Millau_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_generated\"}[10m]) OR on() vector(0)",
+ "expr": "increase(RialtoParachain_to_Millau_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_generated\"}[10m]) OR on() vector(0)",
"hide": true,
"interval": "",
- "legendFormat": "Messages generated in last 5 minutes (RialtoParachain -> Millau, 00000000)",
+ "legendFormat": "Messages generated in last 5 minutes (RialtoParachain -> Millau)",
"refId": "B"
}
],
@@ -323,7 +323,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Delivery race (00000000)",
+ "title": "Delivery race",
"tooltip": {
"shared": true,
"sort": 0,
@@ -406,7 +406,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "label_replace(label_replace(RialtoParachain_to_Millau_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=~\"source_latest_confirmed|target_latest_received\"}, \"type\", \"Latest message confirmed by Millau to RialtoParachain\", \"type\", \"source_latest_confirmed\"), \"type\", \"Latest Millau message received by RialtoParachain\", \"type\", \"target_latest_received\")",
+ "expr": "label_replace(label_replace(RialtoParachain_to_Millau_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=~\"source_latest_confirmed|target_latest_received\"}, \"type\", \"Latest message confirmed by Millau to RialtoParachain\", \"type\", \"source_latest_confirmed\"), \"type\", \"Latest Millau message received by RialtoParachain\", \"type\", \"target_latest_received\")",
"interval": "",
"legendFormat": "{{type}}",
"refId": "A"
@@ -416,7 +416,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Confirmations race (00000000)",
+ "title": "Confirmations race",
"tooltip": {
"shared": true,
"sort": 0,
@@ -534,7 +534,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "scalar(max_over_time(RialtoParachain_to_Millau_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_generated\"}[2m])) - scalar(max_over_time(RialtoParachain_to_Millau_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[2m]))",
+ "expr": "scalar(max_over_time(RialtoParachain_to_Millau_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_generated\"}[2m])) - scalar(max_over_time(RialtoParachain_to_Millau_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[2m]))",
"format": "time_series",
"instant": false,
"interval": "",
@@ -542,7 +542,7 @@
"refId": "A"
},
{
- "expr": "increase(RialtoParachain_to_Millau_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[5m]) OR on() vector(0)",
+ "expr": "increase(RialtoParachain_to_Millau_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[5m]) OR on() vector(0)",
"interval": "",
"legendFormat": "RialtoParachain Messages delivered to Millau in last 5m",
"refId": "B"
@@ -560,7 +560,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Delivery race lags (00000000)",
+ "title": "Delivery race lags",
"tooltip": {
"shared": true,
"sort": 0,
@@ -678,7 +678,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "scalar(max_over_time(RialtoParachain_to_Millau_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[2m]) OR on() vector(0)) - scalar(max_over_time(RialtoParachain_to_Millau_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0))",
+ "expr": "scalar(max_over_time(RialtoParachain_to_Millau_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[2m]) OR on() vector(0)) - scalar(max_over_time(RialtoParachain_to_Millau_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0))",
"interval": "",
"legendFormat": "Unconfirmed messages at RialtoParachain",
"refId": "A"
@@ -696,7 +696,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Confirmations race lags (00000000)",
+ "title": "Confirmations race lags",
"tooltip": {
"shared": true,
"sort": 0,
@@ -814,13 +814,13 @@
"steppedLine": false,
"targets": [
{
- "expr": "scalar(max_over_time(RialtoParachain_to_Millau_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_confirmed\"}[2m])) - scalar(max_over_time(RialtoParachain_to_Millau_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_confirmed\"}[2m]))",
+ "expr": "scalar(max_over_time(RialtoParachain_to_Millau_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_confirmed\"}[2m])) - scalar(max_over_time(RialtoParachain_to_Millau_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_confirmed\"}[2m]))",
"interval": "",
"legendFormat": "Unconfirmed rewards at Millau",
"refId": "A"
},
{
- "expr": "(scalar(max_over_time(RialtoParachain_to_Millau_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(RialtoParachain_to_Millau_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))) * (max_over_time(RialtoParachain_to_Millau_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[2m]) > bool min_over_time(RialtoParachain_to_Millau_MessageLane_00000000_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[2m]))",
+ "expr": "(scalar(max_over_time(RialtoParachain_to_Millau_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(RialtoParachain_to_Millau_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))) * (max_over_time(RialtoParachain_to_Millau_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[2m]) > bool min_over_time(RialtoParachain_to_Millau_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[2m]))",
"interval": "",
"legendFormat": "Unconfirmed rewards at Millau (zero if messages are not being delivered to Millau)",
"refId": "B"
@@ -838,7 +838,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "Reward lags (00000000)",
+ "title": "Reward lags",
"tooltip": {
"shared": true,
"sort": 0,
diff --git a/deployments/bridges/rialto-parachain-millau/dashboard/grafana/rialto-parachain-millau-maintenance-dashboard.json b/deployments/bridges/rialto-parachain-millau/dashboard/grafana/rialto-parachain-millau-maintenance-dashboard.json
index ca22a6dadd0..d3cd10f5a80 100644
--- a/deployments/bridges/rialto-parachain-millau/dashboard/grafana/rialto-parachain-millau-maintenance-dashboard.json
+++ b/deployments/bridges/rialto-parachain-millau/dashboard/grafana/rialto-parachain-millau-maintenance-dashboard.json
@@ -111,7 +111,7 @@
},
{
"exemplar": true,
- "expr": "at_RialtoParachain_relay_MillauMessages_reward_for_msgs_from_Millau_on_lane_00000000{instance=\"relay-millau-rialto-parachain-1:9616\"} + at_RialtoParachain_relay_MillauMessages_reward_for_msgs_to_Millau_on_lane_00000000{instance=\"relay-millau-rialto-parachain-1:9616\"}",
+ "expr": "at_RialtoParachain_relay_MillauMessages_reward_for_msgs_from_Millau_on_lane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de{instance=\"relay-millau-rialto-parachain-1:9616\"} + at_RialtoParachain_relay_MillauMessages_reward_for_msgs_to_Millau_on_lane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de{instance=\"relay-millau-rialto-parachain-1:9616\"}",
"hide": false,
"instant": false,
"interval": "",
@@ -120,7 +120,7 @@
},
{
"exemplar": true,
- "expr": "at_RialtoParachain_relay_MillauMessages_balance{instance=\"relay-millau-rialto-parachain-1:9616\"} + at_RialtoParachain_relay_MillauMessages_reward_for_msgs_from_Millau_on_lane_00000000{instance=\"relay-millau-rialto-parachain-1:9616\"} + at_RialtoParachain_relay_MillauMessages_reward_for_msgs_to_Millau_on_lane_00000000{instance=\"relay-millau-rialto-parachain-1:9616\"}",
+ "expr": "at_RialtoParachain_relay_MillauMessages_balance{instance=\"relay-millau-rialto-parachain-1:9616\"} + at_RialtoParachain_relay_MillauMessages_reward_for_msgs_from_Millau_on_lane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de{instance=\"relay-millau-rialto-parachain-1:9616\"} + at_RialtoParachain_relay_MillauMessages_reward_for_msgs_to_Millau_on_lane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de{instance=\"relay-millau-rialto-parachain-1:9616\"}",
"hide": false,
"interval": "",
"legendFormat": "With-Millau relay account total balance (balance + reward)",
@@ -262,7 +262,7 @@
},
{
"exemplar": true,
- "expr": "at_Millau_relay_RialtoParachainMessages_reward_for_msgs_from_RialtoParachain_on_lane_00000000{instance=\"relay-millau-rialto-parachain-1:9616\"} + at_Millau_relay_RialtoParachainMessages_reward_for_msgs_to_RialtoParachain_on_lane_00000000{instance=\"relay-millau-rialto-parachain-1:9616\"}",
+ "expr": "at_Millau_relay_RialtoParachainMessages_reward_for_msgs_from_RialtoParachain_on_lane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de{instance=\"relay-millau-rialto-parachain-1:9616\"} + at_Millau_relay_RialtoParachainMessages_reward_for_msgs_to_RialtoParachain_on_lane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de{instance=\"relay-millau-rialto-parachain-1:9616\"}",
"hide": false,
"interval": "",
"legendFormat": "With-Rialto relay account reward",
@@ -270,7 +270,7 @@
},
{
"exemplar": true,
- "expr": "at_Millau_relay_RialtoParachainMessages_balance{instance=\"relay-millau-rialto-parachain-1:9616\"} + at_Millau_relay_RialtoParachainMessages_reward_for_msgs_from_RialtoParachain_on_lane_00000000{instance=\"relay-millau-rialto-parachain-1:9616\"} + at_Millau_relay_RialtoParachainMessages_reward_for_msgs_to_RialtoParachain_on_lane_00000000{instance=\"relay-millau-rialto-parachain-1:9616\"}",
+ "expr": "at_Millau_relay_RialtoParachainMessages_balance{instance=\"relay-millau-rialto-parachain-1:9616\"} + at_Millau_relay_RialtoParachainMessages_reward_for_msgs_from_RialtoParachain_on_lane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de{instance=\"relay-millau-rialto-parachain-1:9616\"} + at_Millau_relay_RialtoParachainMessages_reward_for_msgs_to_RialtoParachain_on_lane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de{instance=\"relay-millau-rialto-parachain-1:9616\"}",
"hide": false,
"interval": "",
"legendFormat": "With-Rialto relay account total balance (balance + reward)",
@@ -404,7 +404,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "RialtoParachain_to_Millau_MessageLane_00000000_is_source_and_source_at_target_using_different_forks{instance=\"relay-millau-rialto-parachain-1:9616\"} OR on() vector(0)",
+ "expr": "RialtoParachain_to_Millau_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_is_source_and_source_at_target_using_different_forks{instance=\"relay-millau-rialto-parachain-1:9616\"} OR on() vector(0)",
"instant": false,
"interval": "",
"legendFormat": "On different forks?",
@@ -538,7 +538,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "Millau_to_RialtoParachain_MessageLane_00000000_is_source_and_source_at_target_using_different_forks{instance=\"relay-millau-rialto-parachain-1:9616\"} OR on() vector(0)",
+ "expr": "Millau_to_RialtoParachain_MessageLane_0x6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de_is_source_and_source_at_target_using_different_forks{instance=\"relay-millau-rialto-parachain-1:9616\"} OR on() vector(0)",
"interval": "",
"legendFormat": "On different forks?",
"refId": "A"
diff --git a/deployments/bridges/rialto-parachain-millau/entrypoints/relay-messages-to-millau-generator-entrypoint.sh b/deployments/bridges/rialto-parachain-millau/entrypoints/relay-messages-to-millau-generator-entrypoint.sh
index c09116a1614..80208dc752b 100755
--- a/deployments/bridges/rialto-parachain-millau/entrypoints/relay-messages-to-millau-generator-entrypoint.sh
+++ b/deployments/bridges/rialto-parachain-millau/entrypoints/relay-messages-to-millau-generator-entrypoint.sh
@@ -9,7 +9,6 @@ set -eu
# Max delay before submitting transactions (s)
MAX_SUBMIT_DELAY_S=${MSG_EXCHANGE_GEN_MAX_SUBMIT_DELAY_S:-30}
-MESSAGE_LANE=${MSG_EXCHANGE_GEN_LANE:-00000000}
MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE=1024
SHARED_CMD="/home/user/substrate-relay send-message rialto-parachain-to-millau"
diff --git a/deployments/bridges/rialto-parachain-millau/entrypoints/relay-millau-rialto-parachain-entrypoint.sh b/deployments/bridges/rialto-parachain-millau/entrypoints/relay-millau-rialto-parachain-entrypoint.sh
index 7685f5f5ec2..caa3ebb7ceb 100755
--- a/deployments/bridges/rialto-parachain-millau/entrypoints/relay-millau-rialto-parachain-entrypoint.sh
+++ b/deployments/bridges/rialto-parachain-millau/entrypoints/relay-millau-rialto-parachain-entrypoint.sh
@@ -7,6 +7,10 @@ MILLAU_RELAY_ACCOUNT=${EXT_MILLAU_RELAY_ACCOUNT:-//RialtoParachain.HeadersAndMes
MILLAU_RELAY_ACCOUNT_HEADERS_OVERRIDE=${EXT_MILLAU_RELAY_ACCOUNT_HEADERS_OVERRIDE:-//RialtoParachain.RialtoHeadersRelay1}
RIALTO_PARACHAIN_RELAY_ACCOUNT=${EXT_RIALTO_PARACHAIN_RELAY_ACCOUNT:-//Millau.HeadersAndMessagesRelay1}
+# see `rialto_parachain_millau_bridge_identifier_did_not_changed` test in `millau-runtime` crate for
+# details on how this lane is computed
+MESSAGE_LANE="6aa61bff567db6b5d5f0cb815ee6d8f5ac630e222a95700cb3d594134e3805de"
+
/home/user/substrate-relay init-bridge millau-to-rialto-parachain \
--source-host millau-node-alice \
--source-port 9944 \
@@ -35,5 +39,5 @@ exec /home/user/substrate-relay relay-headers-and-messages millau-rialto-paracha
--rialto-parachain-transactions-mortality=64 \
--rialto-host rialto-node-alice \
--rialto-port 9944 \
- --lane=00000000 \
+ --lane=$MESSAGE_LANE \
--prometheus-host=0.0.0.0
diff --git a/deployments/local-scripts/relay-messages-millau-to-rialto.sh b/deployments/local-scripts/relay-messages-millau-to-rialto.sh
index d420dc56c26..90f9c8c9dd7 100755
--- a/deployments/local-scripts/relay-messages-millau-to-rialto.sh
+++ b/deployments/local-scripts/relay-messages-millau-to-rialto.sh
@@ -10,7 +10,7 @@ RIALTO_PORT="${RIALTO_PORT:-9944}"
RUST_LOG=bridge=debug \
./target/debug/substrate-relay relay-messages millau-to-rialto \
- --lane 00000000 \
+ --lane "52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7" \
--source-host localhost \
--source-port $MILLAU_PORT \
--source-signer //Bob \
diff --git a/deployments/local-scripts/relay-messages-rialto-to-millau.sh b/deployments/local-scripts/relay-messages-rialto-to-millau.sh
index 0cd73c00454..03791d41352 100755
--- a/deployments/local-scripts/relay-messages-rialto-to-millau.sh
+++ b/deployments/local-scripts/relay-messages-rialto-to-millau.sh
@@ -10,7 +10,7 @@ RIALTO_PORT="${RIALTO_PORT:-9944}"
RUST_LOG=bridge=debug \
./target/debug/substrate-relay relay-messages rialto-to-millau \
- --lane 00000000 \
+ --lane "52011894c856c0c613a2ad2395dfbb509090f6b7a6aef9359adb75aa26a586c7" \
--source-host localhost \
--source-port $RIALTO_PORT \
--source-signer //Bob \
diff --git a/modules/messages/src/benchmarking.rs b/modules/messages/src/benchmarking.rs
index e68911f8aa1..a12a84546f8 100644
--- a/modules/messages/src/benchmarking.rs
+++ b/modules/messages/src/benchmarking.rs
@@ -74,10 +74,8 @@ pub struct MessageDeliveryProofParams {
/// Trait that must be implemented by runtime.
pub trait Config: crate::Config {
/// Lane id to use in benchmarks.
- ///
- /// By default, lane 00000000 is used.
fn bench_lane_id() -> LaneId {
- LaneId([0, 0, 0, 0])
+ LaneId::new(1, 2)
}
/// Return id of relayer account at the bridged chain.
diff --git a/modules/messages/src/inbound_lane.rs b/modules/messages/src/inbound_lane.rs
index 5df48cad0ba..41d00b91627 100644
--- a/modules/messages/src/inbound_lane.rs
+++ b/modules/messages/src/inbound_lane.rs
@@ -216,15 +216,7 @@ impl InboundLane {
#[cfg(test)]
mod tests {
use super::*;
- use crate::{
- inbound_lane,
- tests::mock::{
- dispatch_result, inbound_message_data, inbound_unrewarded_relayers_state, run_test,
- unrewarded_relayer, BridgedChain, TestMessageDispatch, TestRuntime, REGULAR_PAYLOAD,
- TEST_LANE_ID, TEST_RELAYER_A, TEST_RELAYER_B, TEST_RELAYER_C,
- },
- RuntimeInboundLaneStorage,
- };
+ use crate::{inbound_lane, tests::mock::*, RuntimeInboundLaneStorage};
use bp_messages::UnrewardedRelayersState;
fn receive_regular_message(
@@ -244,7 +236,7 @@ mod tests {
#[test]
fn receive_status_update_ignores_status_from_the_future() {
run_test(|| {
- let mut lane = inbound_lane::(TEST_LANE_ID).unwrap();
+ let mut lane = inbound_lane::(test_lane_id()).unwrap();
receive_regular_message(&mut lane, 1);
assert_eq!(
lane.receive_state_update(OutboundLaneData {
@@ -261,7 +253,7 @@ mod tests {
#[test]
fn receive_status_update_ignores_obsolete_status() {
run_test(|| {
- let mut lane = inbound_lane::(TEST_LANE_ID).unwrap();
+ let mut lane = inbound_lane::(test_lane_id()).unwrap();
receive_regular_message(&mut lane, 1);
receive_regular_message(&mut lane, 2);
receive_regular_message(&mut lane, 3);
@@ -288,7 +280,7 @@ mod tests {
#[test]
fn receive_status_update_works() {
run_test(|| {
- let mut lane = inbound_lane::(TEST_LANE_ID).unwrap();
+ let mut lane = inbound_lane::(test_lane_id()).unwrap();
receive_regular_message(&mut lane, 1);
receive_regular_message(&mut lane, 2);
receive_regular_message(&mut lane, 3);
@@ -326,7 +318,7 @@ mod tests {
#[test]
fn receive_status_update_works_with_batches_from_relayers() {
run_test(|| {
- let mut lane = inbound_lane::(TEST_LANE_ID).unwrap();
+ let mut lane = inbound_lane::(test_lane_id()).unwrap();
let mut seed_storage_data = lane.storage.data();
// Prepare data
seed_storage_data.last_confirmed_nonce = 0;
@@ -357,7 +349,7 @@ mod tests {
#[test]
fn fails_to_receive_message_with_incorrect_nonce() {
run_test(|| {
- let mut lane = inbound_lane::(TEST_LANE_ID).unwrap();
+ let mut lane = inbound_lane::(test_lane_id()).unwrap();
assert_eq!(
lane.receive_message::(
&TEST_RELAYER_A,
@@ -373,7 +365,7 @@ mod tests {
#[test]
fn fails_to_receive_messages_above_unrewarded_relayer_entries_limit_per_lane() {
run_test(|| {
- let mut lane = inbound_lane::(TEST_LANE_ID).unwrap();
+ let mut lane = inbound_lane::(test_lane_id()).unwrap();
let max_nonce = BridgedChain::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX;
for current_nonce in 1..max_nonce + 1 {
assert_eq!(
@@ -409,7 +401,7 @@ mod tests {
#[test]
fn fails_to_receive_messages_above_unconfirmed_messages_limit_per_lane() {
run_test(|| {
- let mut lane = inbound_lane::(TEST_LANE_ID).unwrap();
+ let mut lane = inbound_lane::(test_lane_id()).unwrap();
let max_nonce = BridgedChain::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX;
for current_nonce in 1..=max_nonce {
assert_eq!(
@@ -445,7 +437,7 @@ mod tests {
#[test]
fn correctly_receives_following_messages_from_two_relayers_alternately() {
run_test(|| {
- let mut lane = inbound_lane::(TEST_LANE_ID).unwrap();
+ let mut lane = inbound_lane::(test_lane_id()).unwrap();
assert_eq!(
lane.receive_message::(
&TEST_RELAYER_A,
@@ -484,7 +476,7 @@ mod tests {
#[test]
fn rejects_same_message_from_two_different_relayers() {
run_test(|| {
- let mut lane = inbound_lane::(TEST_LANE_ID).unwrap();
+ let mut lane = inbound_lane::(test_lane_id()).unwrap();
assert_eq!(
lane.receive_message::(
&TEST_RELAYER_A,
@@ -507,7 +499,7 @@ mod tests {
#[test]
fn correct_message_is_processed_instantly() {
run_test(|| {
- let mut lane = inbound_lane::(TEST_LANE_ID).unwrap();
+ let mut lane = inbound_lane::(test_lane_id()).unwrap();
receive_regular_message(&mut lane, 1);
assert_eq!(lane.storage.data().last_delivered_nonce(), 1);
});
@@ -516,7 +508,7 @@ mod tests {
#[test]
fn unspent_weight_is_returned_by_receive_message() {
run_test(|| {
- let mut lane = inbound_lane::(TEST_LANE_ID).unwrap();
+ let mut lane = inbound_lane::(test_lane_id()).unwrap();
let mut payload = REGULAR_PAYLOAD;
*payload.dispatch_result.unspent_weight.ref_time_mut() = 1;
assert_eq!(
@@ -533,7 +525,7 @@ mod tests {
#[test]
fn first_message_is_confirmed_correctly() {
run_test(|| {
- let mut lane = inbound_lane::(TEST_LANE_ID).unwrap();
+ let mut lane = inbound_lane::(test_lane_id()).unwrap();
receive_regular_message(&mut lane, 1);
receive_regular_message(&mut lane, 2);
assert_eq!(
@@ -544,7 +536,7 @@ mod tests {
Some(1),
);
assert_eq!(
- inbound_unrewarded_relayers_state(TEST_LANE_ID),
+ inbound_unrewarded_relayers_state(test_lane_id()),
UnrewardedRelayersState {
unrewarded_relayer_entries: 1,
messages_in_oldest_entry: 1,
diff --git a/modules/messages/src/outbound_lane.rs b/modules/messages/src/outbound_lane.rs
index 92a356a0a66..559328163ba 100644
--- a/modules/messages/src/outbound_lane.rs
+++ b/modules/messages/src/outbound_lane.rs
@@ -192,13 +192,7 @@ fn ensure_unrewarded_relayers_are_correct(
#[cfg(test)]
mod tests {
use super::*;
- use crate::{
- outbound_lane,
- tests::mock::{
- outbound_message_data, run_test, unrewarded_relayer, TestRelayer, TestRuntime,
- REGULAR_PAYLOAD, TEST_LANE_ID,
- },
- };
+ use crate::{outbound_lane, tests::mock::*};
use frame_support::assert_ok;
use sp_std::ops::RangeInclusive;
@@ -219,7 +213,7 @@ mod tests {
relayers: &VecDeque>,
) -> Result