messages_relay/lib.rs
1// Copyright 2019-2021 Parity Technologies (UK) Ltd.
2// This file is part of Parity Bridges Common.
3
4// Parity Bridges Common is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8
9// Parity Bridges Common is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13
14// You should have received a copy of the GNU General Public License
15// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
16
17//! Relaying [`pallet-bridge-messages`](../pallet_bridge_messages/index.html) application specific
18//! data. Message lane allows sending arbitrary messages between bridged chains. This
19//! module provides entrypoint that starts reading messages from given message lane
20//! of source chain and submits proof-of-message-at-source-chain transactions to the
21//! target chain. Additionally, proofs-of-messages-delivery are sent back from the
22//! target chain to the source chain.
23
24// required for futures::select!
25#![recursion_limit = "1024"]
26#![warn(missing_docs)]
27
28mod metrics;
29
30pub mod message_lane;
31pub mod message_lane_loop;
32
33mod message_race_delivery;
34mod message_race_limits;
35mod message_race_loop;
36mod message_race_receiving;
37mod message_race_strategy;
38
39pub use message_race_delivery::relay_messages_range;
40pub use message_race_receiving::relay_messages_delivery_confirmation;
41pub use metrics::Labeled;