diff --git a/bridges/bin/millau/runtime/src/rialto_messages.rs b/bridges/bin/millau/runtime/src/rialto_messages.rs index 736301016fa30..a61d7cce2978d 100644 --- a/bridges/bin/millau/runtime/src/rialto_messages.rs +++ b/bridges/bin/millau/runtime/src/rialto_messages.rs @@ -214,7 +214,9 @@ impl TargetHeaderChain for Rialto fn verify_messages_delivery_proof( proof: Self::MessagesDeliveryProof, ) -> Result<(LaneId, InboundLaneData), Self::Error> { - messages::source::verify_messages_delivery_proof::(proof) + messages::source::verify_messages_delivery_proof::( + proof, + ) } } @@ -231,7 +233,10 @@ impl SourceHeaderChain for Rialto { proof: Self::MessagesProof, messages_count: u32, ) -> Result>, Self::Error> { - messages::target::verify_messages_proof::(proof, messages_count) + messages::target::verify_messages_proof::( + proof, + messages_count, + ) } } diff --git a/bridges/bin/rialto/runtime/src/lib.rs b/bridges/bin/rialto/runtime/src/lib.rs index 69fff6b10c3fa..70f770388200c 100644 --- a/bridges/bin/rialto/runtime/src/lib.rs +++ b/bridges/bin/rialto/runtime/src/lib.rs @@ -436,6 +436,7 @@ parameter_types! { pub const HeadersToKeep: u32 = 7 * bp_rialto::DAYS as u32; } +pub type MillauGrandpaInstance = (); impl pallet_bridge_grandpa::Config for Runtime { type BridgedChain = bp_millau::Millau; type MaxRequests = MaxRequests; diff --git a/bridges/bin/rialto/runtime/src/millau_messages.rs b/bridges/bin/rialto/runtime/src/millau_messages.rs index 77b73c07857b0..30a34b9276ce1 100644 --- a/bridges/bin/rialto/runtime/src/millau_messages.rs +++ b/bridges/bin/rialto/runtime/src/millau_messages.rs @@ -214,7 +214,9 @@ impl TargetHeaderChain for Millau fn verify_messages_delivery_proof( proof: Self::MessagesDeliveryProof, ) -> Result<(LaneId, InboundLaneData), Self::Error> { - messages::source::verify_messages_delivery_proof::(proof) + messages::source::verify_messages_delivery_proof::( + proof, + ) } } @@ -231,7 +233,10 @@ impl SourceHeaderChain for Millau { proof: Self::MessagesProof, messages_count: u32, ) -> Result>, Self::Error> { - messages::target::verify_messages_proof::(proof, messages_count) + messages::target::verify_messages_proof::( + proof, + messages_count, + ) } } diff --git a/bridges/bin/runtime-common/src/messages.rs b/bridges/bin/runtime-common/src/messages.rs index 54e8b30031a44..9f25039dc4b61 100644 --- a/bridges/bin/runtime-common/src/messages.rs +++ b/bridges/bin/runtime-common/src/messages.rs @@ -352,20 +352,21 @@ pub mod source { } /// Verify proof of This -> Bridged chain messages delivery. - pub fn verify_messages_delivery_proof( + pub fn verify_messages_delivery_proof( proof: FromBridgedChainMessagesDeliveryProof>>, ) -> Result, &'static str> where - ThisRuntime: pallet_bridge_grandpa::Config, + ThisRuntime: pallet_bridge_grandpa::Config, ThisRuntime: pallet_bridge_messages::Config>>, - HashOf>: Into::BridgedChain>>, + HashOf>: + Into>::BridgedChain>>, { let FromBridgedChainMessagesDeliveryProof { bridged_header_hash, storage_proof, lane, } = proof; - pallet_bridge_grandpa::Pallet::::parse_finalized_storage_proof( + pallet_bridge_grandpa::Pallet::::parse_finalized_storage_proof( bridged_header_hash.into(), StorageProof::new(storage_proof), |storage| { @@ -504,20 +505,21 @@ pub mod target { /// The `messages_count` argument verification (sane limits) is supposed to be made /// outside of this function. This function only verifies that the proof declares exactly /// `messages_count` messages. - pub fn verify_messages_proof( + pub fn verify_messages_proof( proof: FromBridgedChainMessagesProof>>, messages_count: u32, ) -> Result>>>, &'static str> where - ThisRuntime: pallet_bridge_grandpa::Config, + ThisRuntime: pallet_bridge_grandpa::Config, ThisRuntime: pallet_bridge_messages::Config>>, - HashOf>: Into::BridgedChain>>, + HashOf>: + Into>::BridgedChain>>, { verify_messages_proof_with_parser::( proof, messages_count, |bridged_header_hash, bridged_storage_proof| { - pallet_bridge_grandpa::Pallet::::parse_finalized_storage_proof( + pallet_bridge_grandpa::Pallet::::parse_finalized_storage_proof( bridged_header_hash.into(), StorageProof::new(bridged_storage_proof), |storage_adapter| storage_adapter,