diff --git a/bridges/relays/lib-substrate-relay/src/finality_pipeline.rs b/bridges/relays/lib-substrate-relay/src/finality_pipeline.rs
index deb83d4ea9..2dc9a63947 100644
--- a/bridges/relays/lib-substrate-relay/src/finality_pipeline.rs
+++ b/bridges/relays/lib-substrate-relay/src/finality_pipeline.rs
@@ -35,6 +35,7 @@ pub(crate) const RECENT_FINALITY_PROOFS_LIMIT: usize = 4096;
/// Headers sync pipeline for Substrate <-> Substrate relays.
pub trait SubstrateFinalitySyncPipeline: 'static + Clone + Debug + Send + Sync {
+ /// Pipeline for syncing finalized Source chain headers to Target chain.
type FinalitySyncPipeline: FinalitySyncPipeline;
/// Name of the runtime method that returns id of best finalized source header at target chain.
diff --git a/bridges/relays/lib-substrate-relay/src/messages_lane.rs b/bridges/relays/lib-substrate-relay/src/messages_lane.rs
index fae07c33b3..15b75ae945 100644
--- a/bridges/relays/lib-substrate-relay/src/messages_lane.rs
+++ b/bridges/relays/lib-substrate-relay/src/messages_lane.rs
@@ -14,6 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with Parity Bridges Common. If not, see .
+//! Tools for supporting message lanes between two Substrate-based chains.
+
use crate::messages_source::SubstrateMessagesProof;
use crate::messages_target::SubstrateMessagesReceivingProof;
use crate::on_demand_headers::OnDemandHeadersRelay;
@@ -57,6 +59,7 @@ pub struct MessagesRelayParams {
/// Message sync pipeline for Substrate <-> Substrate relays.
pub trait SubstrateMessageLane: 'static + Clone + Send + Sync {
+ /// Underlying generic message lane.
type MessageLane: MessageLane;
/// Name of the runtime method that returns dispatch weight of outbound messages at the source chain.
diff --git a/bridges/relays/lib-substrate-relay/src/messages_source.rs b/bridges/relays/lib-substrate-relay/src/messages_source.rs
index 279b2c45e0..08e4964de7 100644
--- a/bridges/relays/lib-substrate-relay/src/messages_source.rs
+++ b/bridges/relays/lib-substrate-relay/src/messages_source.rs
@@ -298,6 +298,11 @@ fn prepare_dummy_messages_delivery_proof() -> SubstrateMes
)
}
+/// Read best blocks from given client.
+///
+/// This function assumes that the chain that is followed by the `self_client` has
+/// bridge GRANDPA pallet deployed and it provides `best_finalized_header_id_method_name`
+/// runtime API to read best finalized Bridged chain header.
pub async fn read_client_state(
self_client: &Client,
best_finalized_header_id_method_name: &str,