Skip to content

Commit

Permalink
Fix non-compact-proofs codegens
Browse files Browse the repository at this point in the history
  • Loading branch information
bkontur committed Jun 26, 2024
1 parent 5b3637e commit ee151cd
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 29 deletions.
25 changes: 15 additions & 10 deletions Cargo.lock

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

5 changes: 3 additions & 2 deletions relay-clients/client-bridge-hub-kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand All @@ -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" }
4 changes: 2 additions & 2 deletions relay-clients/client-bridge-hub-kusama/src/codegen_runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1363,15 +1363,15 @@ 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,
dispatch_weight: ::sp_weights::Weight,
},
#[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,
Expand Down
5 changes: 3 additions & 2 deletions relay-clients/client-bridge-hub-polkadot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand All @@ -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" }
Original file line number Diff line number Diff line change
Expand Up @@ -1340,15 +1340,15 @@ 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,
dispatch_weight: ::sp_weights::Weight,
},
#[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,
Expand Down
5 changes: 3 additions & 2 deletions relay-clients/client-bridge-hub-rococo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand All @@ -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" }
4 changes: 2 additions & 2 deletions relay-clients/client-bridge-hub-rococo/src/codegen_runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1429,15 +1429,15 @@ 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,
dispatch_weight: ::sp_weights::Weight,
},
#[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,
Expand Down
5 changes: 3 additions & 2 deletions relay-clients/client-bridge-hub-westend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand All @@ -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" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1369,15 +1369,15 @@ 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,
dispatch_weight: ::sp_weights::Weight,
},
#[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,
Expand Down
5 changes: 3 additions & 2 deletions relay-clients/client-polkadot-bulletin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand All @@ -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" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ,) , }
Expand Down

0 comments on commit ee151cd

Please sign in to comment.