You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fnbridge_hub_rococo_dispatch_works(){
<initialize-externalities>::execute_with(|| {let bridge_message = BridgeMessage{universal_dest:V3(X2(GlobalConsensus(...),Parachain(1234))),xcm:Xcm(...)};assert_ok!(pallet_bridge_grandpa::Pallet::<Runtime, BridgeGrandpaWococoInstance>::submit_finality_proof(...));assert_ok!(pallet_bridge_parachains::Pallet::<Runtime, BridgeParachainWococoInstance>::submit_parachain_heads(...));assert_ok!(pallet_bridge_messages::Pallet::<Runtime, WithBridgeHubWococoMessagesInstance>::receive_messages_proof(..., bridge_message, ...));// get message from `XcmpQueue::take_outbound_messages` for 1234let dispatched_xcm = RuntimeHelper::<HrmpChannelSource>::take_xcm(1234);asset_eq!(xcm, dispatched_xcm);})}
I will prepare everything around, but will need help with submit_finality_proof/submit_parachain_heads/receive_messages_proof proofs (lots of this helper code is in benchmarking stuff e.g.: prepare_messages_storage_proof ...)
add test for DeliveryConfirmationPayments when receive_messages_delivery_proof
check economics in tests (hit delivery rewards constants)
It doesn't explicitly verify that the final XcmpQueue::take_outbound_messages() equals the original xcm payload (vec![ClearOrigin; n]), but we can enhance it to do that too as a nice to have.
But above only verifies incoming (over bridge) message (xcm) dispatch, not complete flow. We want a runtime test that fully verifies side-effects of a relayer submitting batch(grandpa_finality, parachain_heads, message_proof), including relayer slash/reward.
Pseudocode:
submit_finality_proof/submit_parachain_heads/receive_messages_proof
proofs (lots of this helper code is in benchmarking stuff e.g.:prepare_messages_storage_proof
...)The text was updated successfully, but these errors were encountered: