diff --git a/Cargo.lock b/Cargo.lock index 1540551f44..03b6d312be 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1635,16 +1635,6 @@ dependencies = [ "vec_map", ] -[[package]] -name = "client-legacy" -version = "0.1.0" -dependencies = [ - "bp-messages", - "parity-scale-codec", - "scale-info", - "sp-runtime", -] - [[package]] name = "colorchoice" version = "1.0.0" @@ -6848,6 +6838,7 @@ dependencies = [ "bp-runtime", "bridge-runtime-common", "parity-scale-codec", + "relay-legacy-client", "relay-substrate-client", "scale-info", "sp-core", @@ -6870,6 +6861,7 @@ dependencies = [ "bp-runtime", "bridge-runtime-common", "parity-scale-codec", + "relay-legacy-client", "relay-substrate-client", "scale-info", "sp-core", @@ -6890,6 +6882,7 @@ dependencies = [ "bp-runtime", "bridge-runtime-common", "parity-scale-codec", + "relay-legacy-client", "relay-substrate-client", "scale-info", "sp-core", @@ -6911,6 +6904,7 @@ dependencies = [ "bp-runtime", "bridge-runtime-common", "parity-scale-codec", + "relay-legacy-client", "relay-substrate-client", "scale-info", "sp-consensus-grandpa", @@ -6939,6 +6933,16 @@ dependencies = [ "subxt", ] +[[package]] +name = "relay-legacy-client" +version = "0.1.0" +dependencies = [ + "bp-messages", + "parity-scale-codec", + "scale-info", + "sp-runtime", +] + [[package]] name = "relay-polkadot-bulletin-client" version = "0.1.0" @@ -6950,6 +6954,7 @@ dependencies = [ "bp-runtime", "bridge-runtime-common", "parity-scale-codec", + "relay-legacy-client", "relay-substrate-client", "relay-utils", "scale-info", diff --git a/relay-clients/client-bridge-hub-kusama/Cargo.toml b/relay-clients/client-bridge-hub-kusama/Cargo.toml index bbbce52736..2e809e1ed5 100644 --- a/relay-clients/client-bridge-hub-kusama/Cargo.toml +++ b/relay-clients/client-bridge-hub-kusama/Cargo.toml @@ -14,8 +14,10 @@ codec = { package = "parity-scale-codec", version = "3.6.1", features = ["derive scale-info = { version = "2.11.3", default-features = false, features = ["derive"] } subxt = { version = "0.37.0", default-features = false, features = ["native"] } -# Bridge dependencies +# Local dependencies +relay-legacy-client = { path = "../client-legacy" } +# Bridge dependencies bp-bridge-hub-kusama = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } bp-header-chain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } bp-messages = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } @@ -27,7 +29,6 @@ bridge-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", br relay-substrate-client = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } # Substrate Dependencies - sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } sp-weights = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } diff --git a/relay-clients/client-bridge-hub-kusama/src/codegen_runtime.rs b/relay-clients/client-bridge-hub-kusama/src/codegen_runtime.rs index 06496b3482..1c841d2ba0 100644 --- a/relay-clients/client-bridge-hub-kusama/src/codegen_runtime.rs +++ b/relay-clients/client-bridge-hub-kusama/src/codegen_runtime.rs @@ -1363,7 +1363,7 @@ pub mod api { #[codec(index = 2)] receive_messages_proof { relayer_id_at_bridged_chain: ::sp_core::crypto::AccountId32, - proof: ::bridge_runtime_common::messages::target::FromBridgedChainMessagesProof< + proof: ::relay_legacy_client::non_compact_proofs::bridge_runtime_common::messages::target::FromBridgedChainMessagesProof< ::subxt::ext::subxt_core::utils::H256, >, messages_count: ::core::primitive::u32, @@ -1371,7 +1371,7 @@ pub mod api { }, #[codec(index = 3)] receive_messages_delivery_proof { - proof: ::bridge_runtime_common::messages::source::FromBridgedChainMessagesDeliveryProof< + proof: ::relay_legacy_client::non_compact_proofs::bridge_runtime_common::messages::source::FromBridgedChainMessagesDeliveryProof< ::subxt::ext::subxt_core::utils::H256, >, relayers_state: ::bp_messages::UnrewardedRelayersState, diff --git a/relay-clients/client-bridge-hub-polkadot/Cargo.toml b/relay-clients/client-bridge-hub-polkadot/Cargo.toml index 277b6ab964..e5e81a078c 100644 --- a/relay-clients/client-bridge-hub-polkadot/Cargo.toml +++ b/relay-clients/client-bridge-hub-polkadot/Cargo.toml @@ -14,8 +14,10 @@ codec = { package = "parity-scale-codec", version = "3.6.1", features = ["derive scale-info = { version = "2.11.3", default-features = false, features = ["derive"] } subxt = { version = "0.37.0", default-features = false, features = ["native"] } -# Bridge dependencies +# Local dependencies +relay-legacy-client = { path = "../client-legacy" } +# Bridge dependencies bp-bridge-hub-polkadot = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } bp-header-chain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } bp-messages = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } @@ -28,7 +30,6 @@ bridge-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", br relay-substrate-client = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } # Substrate Dependencies - sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } sp-weights = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } diff --git a/relay-clients/client-bridge-hub-polkadot/src/codegen_runtime.rs b/relay-clients/client-bridge-hub-polkadot/src/codegen_runtime.rs index 2b4e85876f..bcd4775bda 100644 --- a/relay-clients/client-bridge-hub-polkadot/src/codegen_runtime.rs +++ b/relay-clients/client-bridge-hub-polkadot/src/codegen_runtime.rs @@ -1340,7 +1340,7 @@ pub mod api { #[codec(index = 2)] receive_messages_proof { relayer_id_at_bridged_chain: ::sp_core::crypto::AccountId32, - proof: ::bridge_runtime_common::messages::target::FromBridgedChainMessagesProof< + proof: ::relay_legacy_client::non_compact_proofs::bridge_runtime_common::messages::target::FromBridgedChainMessagesProof< ::subxt::ext::subxt_core::utils::H256, >, messages_count: ::core::primitive::u32, @@ -1348,7 +1348,7 @@ pub mod api { }, #[codec(index = 3)] receive_messages_delivery_proof { - proof: ::bridge_runtime_common::messages::source::FromBridgedChainMessagesDeliveryProof< + proof: ::relay_legacy_client::non_compact_proofs::bridge_runtime_common::messages::source::FromBridgedChainMessagesDeliveryProof< ::subxt::ext::subxt_core::utils::H256, >, relayers_state: ::bp_messages::UnrewardedRelayersState, diff --git a/relay-clients/client-bridge-hub-rococo/Cargo.toml b/relay-clients/client-bridge-hub-rococo/Cargo.toml index 134f29c53c..9d7eb84973 100644 --- a/relay-clients/client-bridge-hub-rococo/Cargo.toml +++ b/relay-clients/client-bridge-hub-rococo/Cargo.toml @@ -14,8 +14,10 @@ codec = { package = "parity-scale-codec", version = "3.6.1", features = ["derive scale-info = { version = "2.11.3", default-features = false, features = ["derive"] } subxt = { version = "0.37.0", default-features = false, features = ["native"] } -# Bridge dependencies +# Local dependencies +relay-legacy-client = { path = "../client-legacy" } +# Bridge dependencies bp-bridge-hub-rococo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } bp-header-chain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } bp-messages = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } @@ -27,7 +29,6 @@ bridge-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", br relay-substrate-client = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } # Substrate Dependencies - sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } sp-weights = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } diff --git a/relay-clients/client-bridge-hub-rococo/src/codegen_runtime.rs b/relay-clients/client-bridge-hub-rococo/src/codegen_runtime.rs index cc8e281498..782288a798 100644 --- a/relay-clients/client-bridge-hub-rococo/src/codegen_runtime.rs +++ b/relay-clients/client-bridge-hub-rococo/src/codegen_runtime.rs @@ -1429,7 +1429,7 @@ pub mod api { #[codec(index = 2)] receive_messages_proof { relayer_id_at_bridged_chain: ::sp_core::crypto::AccountId32, - proof: ::bridge_runtime_common::messages::target::FromBridgedChainMessagesProof< + proof: ::relay_legacy_client::non_compact_proofs::bridge_runtime_common::messages::target::FromBridgedChainMessagesProof< ::subxt::ext::subxt_core::utils::H256, >, messages_count: ::core::primitive::u32, @@ -1437,7 +1437,7 @@ pub mod api { }, #[codec(index = 3)] receive_messages_delivery_proof { - proof: ::bridge_runtime_common::messages::source::FromBridgedChainMessagesDeliveryProof< + proof: ::relay_legacy_client::non_compact_proofs::bridge_runtime_common::messages::source::FromBridgedChainMessagesDeliveryProof< ::subxt::ext::subxt_core::utils::H256, >, relayers_state: ::bp_messages::UnrewardedRelayersState, diff --git a/relay-clients/client-bridge-hub-westend/Cargo.toml b/relay-clients/client-bridge-hub-westend/Cargo.toml index 4c72ad2d66..be73264a98 100644 --- a/relay-clients/client-bridge-hub-westend/Cargo.toml +++ b/relay-clients/client-bridge-hub-westend/Cargo.toml @@ -14,8 +14,10 @@ codec = { package = "parity-scale-codec", version = "3.6.1", features = ["derive scale-info = { version = "2.11.3", default-features = false, features = ["derive"] } subxt = { version = "0.37.0", default-features = false, features = ["native"] } -# Bridge dependencies +# Local dependencies +relay-legacy-client = { path = "../client-legacy" } +# Bridge dependencies bp-bridge-hub-westend = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } bp-header-chain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } bp-messages = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } @@ -27,7 +29,6 @@ bridge-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", br relay-substrate-client = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } # Substrate Dependencies - sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } sp-weights = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } diff --git a/relay-clients/client-bridge-hub-westend/src/codegen_runtime.rs b/relay-clients/client-bridge-hub-westend/src/codegen_runtime.rs index b650697df2..8455770f81 100644 --- a/relay-clients/client-bridge-hub-westend/src/codegen_runtime.rs +++ b/relay-clients/client-bridge-hub-westend/src/codegen_runtime.rs @@ -1369,7 +1369,7 @@ pub mod api { #[codec(index = 2)] receive_messages_proof { relayer_id_at_bridged_chain: ::sp_core::crypto::AccountId32, - proof: ::bridge_runtime_common::messages::target::FromBridgedChainMessagesProof< + proof: ::relay_legacy_client::non_compact_proofs::bridge_runtime_common::messages::target::FromBridgedChainMessagesProof< ::subxt::ext::subxt_core::utils::H256, >, messages_count: ::core::primitive::u32, @@ -1377,7 +1377,7 @@ pub mod api { }, #[codec(index = 3)] receive_messages_delivery_proof { - proof: ::bridge_runtime_common::messages::source::FromBridgedChainMessagesDeliveryProof< + proof: ::relay_legacy_client::non_compact_proofs::bridge_runtime_common::messages::source::FromBridgedChainMessagesDeliveryProof< ::subxt::ext::subxt_core::utils::H256, >, relayers_state: ::bp_messages::UnrewardedRelayersState, diff --git a/relay-clients/client-polkadot-bulletin/Cargo.toml b/relay-clients/client-polkadot-bulletin/Cargo.toml index 38fa2c4fdf..8bc5591b56 100644 --- a/relay-clients/client-polkadot-bulletin/Cargo.toml +++ b/relay-clients/client-polkadot-bulletin/Cargo.toml @@ -14,8 +14,10 @@ codec = { package = "parity-scale-codec", version = "3.6.1", features = ["derive scale-info = { version = "2.11.3", default-features = false, features = ["derive"] } subxt = { version = "0.37.0", default-features = false, features = ["native"] } -# Bridge dependencies +# Local dependencies +relay-legacy-client = { path = "../client-legacy" } +# Bridge dependencies bp-header-chain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } bp-messages = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } bp-polkadot-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } @@ -26,7 +28,6 @@ relay-substrate-client = { git = "https://github.com/paritytech/polkadot-sdk", b relay-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } # Substrate Dependencies - sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "bko-bridges-v2-compact-proofs" } diff --git a/relay-clients/client-polkadot-bulletin/src/codegen_runtime.rs b/relay-clients/client-polkadot-bulletin/src/codegen_runtime.rs index 601a2dd973..addbb30251 100644 --- a/relay-clients/client-polkadot-bulletin/src/codegen_runtime.rs +++ b/relay-clients/client-polkadot-bulletin/src/codegen_runtime.rs @@ -617,7 +617,7 @@ pub mod api { use super::runtime_types; #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub enum Call { - # [codec (index = 0)] set_owner { new_owner : :: core :: option :: Option < :: sp_core :: crypto :: AccountId32 > , } , # [codec (index = 1)] set_operating_mode { operating_mode : runtime_types :: bp_messages :: MessagesOperatingMode , } , # [codec (index = 2)] receive_messages_proof { relayer_id_at_bridged_chain : :: sp_core :: crypto :: AccountId32 , proof : :: bridge_runtime_common :: messages :: target :: FromBridgedChainMessagesProof < :: subxt :: utils :: H256 > , messages_count : :: core :: primitive :: u32 , dispatch_weight : :: sp_weights :: Weight , } , # [codec (index = 3)] receive_messages_delivery_proof { proof : :: bridge_runtime_common :: messages :: source :: FromBridgedChainMessagesDeliveryProof < :: subxt :: utils :: H256 > , relayers_state : :: bp_messages :: UnrewardedRelayersState , } , } + # [codec (index = 0)] set_owner { new_owner : :: core :: option :: Option < :: sp_core :: crypto :: AccountId32 > , } , # [codec (index = 1)] set_operating_mode { operating_mode : runtime_types :: bp_messages :: MessagesOperatingMode , } , # [codec (index = 2)] receive_messages_proof { relayer_id_at_bridged_chain : :: sp_core :: crypto :: AccountId32 , proof : :: relay_legacy_client :: non_compact_proofs :: bridge_runtime_common :: messages :: target :: FromBridgedChainMessagesProof < :: subxt :: utils :: H256 > , messages_count : :: core :: primitive :: u32 , dispatch_weight : :: sp_weights :: Weight , } , # [codec (index = 3)] receive_messages_delivery_proof { proof : :: relay_legacy_client :: non_compact_proofs :: bridge_runtime_common :: messages :: source :: FromBridgedChainMessagesDeliveryProof < :: subxt :: utils :: H256 > , relayers_state : :: bp_messages :: UnrewardedRelayersState , } , } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub enum Error { # [codec (index = 0)] NotOperatingNormally , # [codec (index = 1)] InactiveOutboundLane , # [codec (index = 2)] MessageDispatchInactive , # [codec (index = 3)] MessageRejectedByChainVerifier (runtime_types :: bp_messages :: VerificationError ,) , # [codec (index = 4)] MessageRejectedByLaneVerifier (runtime_types :: bp_messages :: VerificationError ,) , # [codec (index = 5)] MessageRejectedByPallet (runtime_types :: bp_messages :: VerificationError ,) , # [codec (index = 6)] FailedToWithdrawMessageFee , # [codec (index = 7)] TooManyMessagesInTheProof , # [codec (index = 8)] InvalidMessagesProof , # [codec (index = 9)] InvalidMessagesDeliveryProof , # [codec (index = 10)] InvalidUnrewardedRelayersState , # [codec (index = 11)] InsufficientDispatchWeight , # [codec (index = 12)] MessageIsNotYetSent , # [codec (index = 13)] ReceivalConfirmation (runtime_types :: pallet_bridge_messages :: outbound_lane :: ReceivalConfirmationError ,) , # [codec (index = 14)] BridgeModule (runtime_types :: bp_runtime :: OwnedBridgeModuleError ,) , }