Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use generated runtimes for BHR/BHW #2106

Merged
merged 3 commits into from
May 3, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ impl MessagesCliBridge for BridgeHubRococoToBridgeHubWococoMessagesCliBridge {
substrate_relay_helper::generate_receive_message_proof_call_builder!(
BridgeHubRococoMessagesToBridgeHubWococoMessageLane,
BridgeHubRococoMessagesToBridgeHubWococoMessageLaneReceiveMessagesProofCallBuilder,
relay_bridge_hub_wococo_client::runtime::Call::BridgeRococoMessages,
relay_bridge_hub_wococo_client::runtime::BridgeRococoMessagesCall::receive_messages_proof
relay_bridge_hub_wococo_client::RuntimeCall::BridgeRococoMessages,
relay_bridge_hub_wococo_client::BridgeMessagesCall::receive_messages_proof
);

substrate_relay_helper::generate_receive_message_delivery_proof_call_builder!(
BridgeHubRococoMessagesToBridgeHubWococoMessageLane,
BridgeHubRococoMessagesToBridgeHubWococoMessageLaneReceiveMessagesDeliveryProofCallBuilder,
relay_bridge_hub_rococo_client::runtime::Call::BridgeWococoMessages,
relay_bridge_hub_rococo_client::runtime::BridgeWococoMessagesCall::receive_messages_delivery_proof
relay_bridge_hub_rococo_client::RuntimeCall::BridgeWococoMessages,
relay_bridge_hub_rococo_client::BridgeMessagesCall::receive_messages_delivery_proof
);

/// Description of BridgeHubRococo -> BridgeHubWococo messages bridge.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ impl MessagesCliBridge for BridgeHubWococoToBridgeHubRococoMessagesCliBridge {
substrate_relay_helper::generate_receive_message_proof_call_builder!(
BridgeHubWococoMessagesToBridgeHubRococoMessageLane,
BridgeHubWococoMessagesToBridgeHubRococoMessageLaneReceiveMessagesProofCallBuilder,
relay_bridge_hub_rococo_client::runtime::Call::BridgeWococoMessages,
relay_bridge_hub_rococo_client::runtime::BridgeWococoMessagesCall::receive_messages_proof
relay_bridge_hub_rococo_client::RuntimeCall::BridgeWococoMessages,
relay_bridge_hub_rococo_client::BridgeMessagesCall::receive_messages_proof
);

substrate_relay_helper::generate_receive_message_delivery_proof_call_builder!(
BridgeHubWococoMessagesToBridgeHubRococoMessageLane,
BridgeHubWococoMessagesToBridgeHubRococoMessageLaneReceiveMessagesDeliveryProofCallBuilder,
relay_bridge_hub_wococo_client::runtime::Call::BridgeRococoMessages,
relay_bridge_hub_wococo_client::runtime::BridgeRococoMessagesCall::receive_messages_delivery_proof
relay_bridge_hub_wococo_client::RuntimeCall::BridgeRococoMessages,
relay_bridge_hub_wococo_client::BridgeMessagesCall::receive_messages_delivery_proof
);

/// Description of BridgeHubWococo -> BridgeHubRococo messages bridge.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ pub struct RococoFinalityToBridgeHubWococo;
substrate_relay_helper::generate_submit_finality_proof_call_builder!(
RococoFinalityToBridgeHubWococo,
RococoFinalityToBridgeHubWococoCallBuilder,
relay_bridge_hub_wococo_client::runtime::Call::BridgeRococoGrandpa,
relay_bridge_hub_wococo_client::runtime::BridgeRococoGrandpaCall::submit_finality_proof
relay_bridge_hub_wococo_client::RuntimeCall::BridgeRococoGrandpa,
relay_bridge_hub_wococo_client::BridgeGrandpaCall::submit_finality_proof
);

#[async_trait]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ impl SubmitParachainHeadsCallBuilder<BridgeHubRococoToBridgeHubWococo>
parachains: Vec<(ParaId, ParaHash)>,
parachain_heads_proof: ParaHeadsProof,
) -> CallOf<relay_bridge_hub_wococo_client::BridgeHubWococo> {
relay_bridge_hub_wococo_client::runtime::Call::BridgeRococoParachain(
relay_bridge_hub_wococo_client::runtime::BridgeParachainCall::submit_parachain_heads {
relay_bridge_hub_wococo_client::RuntimeCall::BridgeRococoParachain(
relay_bridge_hub_wococo_client::BridgeParachainCall::submit_parachain_heads {
at_relay_block: (at_relay_block.0, at_relay_block.1),
parachains,
parachain_heads_proof,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ pub struct WococoFinalityToBridgeHubRococo;
substrate_relay_helper::generate_submit_finality_proof_call_builder!(
WococoFinalityToBridgeHubRococo,
WococoFinalityToBridgeHubRococoCallBuilder,
relay_bridge_hub_rococo_client::runtime::Call::BridgeWococoGrandpa,
relay_bridge_hub_rococo_client::runtime::BridgeWococoGrandpaCall::submit_finality_proof
relay_bridge_hub_rococo_client::RuntimeCall::BridgeWococoGrandpa,
relay_bridge_hub_rococo_client::BridgeGrandpaCall::submit_finality_proof
);

#[async_trait]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ impl SubmitParachainHeadsCallBuilder<BridgeHubWococoToBridgeHubRococo>
parachains: Vec<(ParaId, ParaHash)>,
parachain_heads_proof: ParaHeadsProof,
) -> CallOf<relay_bridge_hub_rococo_client::BridgeHubRococo> {
relay_bridge_hub_rococo_client::runtime::Call::BridgeWococoParachain(
bp_parachains::BridgeParachainCall::submit_parachain_heads {
relay_bridge_hub_rococo_client::RuntimeCall::BridgeWococoParachain(
relay_bridge_hub_rococo_client::BridgeParachainCall::submit_parachain_heads {
at_relay_block: (at_relay_block.0, at_relay_block.1),
parachains,
parachain_heads_proof,
Expand Down
12 changes: 4 additions & 8 deletions relays/bin-substrate/src/cli/init_bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,8 @@ impl BridgeInitializer for RococoToBridgeHubWococoCliBridge {
fn encode_init_bridge(
init_data: <Self::Engine as Engine<Self::Source>>::InitializationData,
) -> <Self::Target as Chain>::Call {
relay_bridge_hub_wococo_client::runtime::Call::BridgeRococoGrandpa(
relay_bridge_hub_wococo_client::runtime::BridgeRococoGrandpaCall::initialize {
init_data,
},
relay_bridge_hub_wococo_client::RuntimeCall::BridgeRococoGrandpa(
relay_bridge_hub_wococo_client::BridgeGrandpaCall::initialize { init_data },
)
}
}
Expand All @@ -194,10 +192,8 @@ impl BridgeInitializer for WococoToBridgeHubRococoCliBridge {
fn encode_init_bridge(
init_data: <Self::Engine as Engine<Self::Source>>::InitializationData,
) -> <Self::Target as Chain>::Call {
relay_bridge_hub_rococo_client::runtime::Call::BridgeWococoGrandpa(
relay_bridge_hub_rococo_client::runtime::BridgeWococoGrandpaCall::initialize {
init_data,
},
relay_bridge_hub_rococo_client::RuntimeCall::BridgeWococoGrandpa(
relay_bridge_hub_rococo_client::BridgeGrandpaCall::initialize { init_data },
)
}
}
Expand Down
5 changes: 4 additions & 1 deletion relays/client-bridge-hub-rococo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
[dependencies]
codec = { package = "parity-scale-codec", version = "3.1.5", features = ["derive"] }
scale-info = { version = "2.6.0", default-features = false, features = ["derive"] }
relay-substrate-client = { path = "../client-substrate" }
subxt = { version = "0.28.0", default-features = false, features = [] }

# Bridge dependencies

Expand All @@ -17,12 +17,15 @@ bp-bridge-hub-wococo = { path = "../../primitives/chain-bridge-hub-wococo" }
bp-header-chain = { path = "../../primitives/header-chain" }
bp-messages = { path = "../../primitives/messages" }
bp-parachains = { path = "../../primitives/parachains" }
bp-polkadot-core = { path = "../../primitives/polkadot-core" }
bp-runtime = { path = "../../primitives/runtime" }
bp-wococo = { path = "../../primitives/chain-wococo" }

bridge-runtime-common = { path = "../../bin/runtime-common" }
relay-substrate-client = { path = "../client-substrate" }

# Substrate Dependencies

sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-weights = { git = "https://github.com/paritytech/substrate", branch = "master" }
Loading