Skip to content

Commit 1e40f2d

Browse files
authored
Fix codec indices in pallet hyperbridge message type (#511)
1 parent ef69e10 commit 1e40f2d

File tree

6 files changed

+19
-16
lines changed

6 files changed

+19
-16
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ ismp-parachain-runtime-api = { version = "2506.0.0", path = "./modules/ismp/clie
225225
pallet-ismp = { version = "2506.1.0", path = "modules/pallets/ismp", default-features = false }
226226
pallet-ismp-rpc = { version = "2506.1.0", path = "modules/pallets/ismp/rpc" }
227227
pallet-ismp-runtime-api = { version = "2506.1.0", path = "modules/pallets/ismp/runtime-api", default-features = false }
228-
pallet-hyperbridge = { version = "2506.1.0", path = "modules/pallets/hyperbridge", default-features = false }
228+
pallet-hyperbridge = { version = "2506.1.1", path = "modules/pallets/hyperbridge", default-features = false }
229229
pallet-token-gateway = { version = "2506.1.0", path = "modules/pallets/token-gateway", default-features = false }
230230
token-gateway-primitives = { version = "2506.1.0", path = "modules/pallets/token-gateway/primitives", default-features = false }
231231
substrate-state-machine = { version = "2506.1.0", path = "modules/ismp/state-machines/substrate", default-features = false }

modules/ismp/core/src/handlers/response.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ where
6666

6767
// in order to allow proxies, the host must configure the given state machine
6868
// as it's proxy and must not have a state machine client for the source chain
69-
let allow_proxy = host.is_allowed_proxy(&msg.proof.height.id.state_id)
70-
&& check_state_machine_client(source_chain);
69+
let allow_proxy = host.is_allowed_proxy(&msg.proof.height.id.state_id) &&
70+
check_state_machine_client(source_chain);
7171

7272
// check if the response is allowed to be proxied
7373
if response.source_chain() != msg.proof.height.id.state_id && !allow_proxy {

modules/pallets/hyperbridge/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pallet-hyperbridge"
3-
version = "2506.1.0"
3+
version = "2506.1.1"
44
edition = "2021"
55
authors = ["Polytope Labs <[email protected]>"]
66
license = "Apache-2.0"

modules/pallets/hyperbridge/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,10 @@ pub struct WithdrawalRequest<Account, Amount> {
284284
#[derive(Debug, Clone, Encode, Decode, PartialEq, Eq)]
285285
pub enum Message<Account, Balance> {
286286
/// Set some new host params
287+
#[codec(index = 0)]
287288
UpdateHostParams(VersionedHostParams<Balance>),
288289
/// Withdraw the fees owed to a relayer
290+
#[codec(index = 2)]
289291
WithdrawRelayerFees(WithdrawalRequest<Account, Balance>),
290292
}
291293

parachain/runtimes/nexus/src/lib.rs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
226226
spec_name: Cow::Borrowed("nexus"),
227227
impl_name: Cow::Borrowed("nexus"),
228228
authoring_version: 1,
229-
spec_version: 3_900,
229+
spec_version: 4_000,
230230
impl_version: 0,
231231
apis: RUNTIME_API_VERSIONS,
232232
transaction_version: 1,
@@ -344,8 +344,8 @@ impl Contains<RuntimeCall> for IsTreasurySpend {
344344
fn contains(c: &RuntimeCall) -> bool {
345345
matches!(
346346
c,
347-
RuntimeCall::Treasury(pallet_treasury::Call::spend { .. }) |
348-
RuntimeCall::Treasury(pallet_treasury::Call::spend_local { .. })
347+
RuntimeCall::Treasury(pallet_treasury::Call::spend { .. })
348+
| RuntimeCall::Treasury(pallet_treasury::Call::spend_local { .. })
349349
)
350350
}
351351
}
@@ -815,19 +815,20 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
815815
fn filter(&self, c: &RuntimeCall) -> bool {
816816
match self {
817817
ProxyType::Any => true,
818-
ProxyType::NonTransfer =>
819-
!matches!(c, RuntimeCall::Balances { .. } | RuntimeCall::Assets { .. }),
818+
ProxyType::NonTransfer => {
819+
!matches!(c, RuntimeCall::Balances { .. } | RuntimeCall::Assets { .. })
820+
},
820821
ProxyType::CancelProxy => matches!(
821822
c,
822-
RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. }) |
823-
RuntimeCall::Utility { .. } |
824-
RuntimeCall::Multisig { .. }
823+
RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. })
824+
| RuntimeCall::Utility { .. }
825+
| RuntimeCall::Multisig { .. }
825826
),
826827
ProxyType::Collator => matches!(
827828
c,
828-
RuntimeCall::CollatorSelection { .. } |
829-
RuntimeCall::Utility { .. } |
830-
RuntimeCall::Multisig { .. }
829+
RuntimeCall::CollatorSelection { .. }
830+
| RuntimeCall::Utility { .. }
831+
| RuntimeCall::Multisig { .. }
831832
),
832833
}
833834
}

0 commit comments

Comments
 (0)