fix(ismp): decode the relayer account, and cover the inbound path - #149
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two commits, kept separate because one changes consensus and the other does not.
1 ·
fix(ismp): decode the relayer account from its SCALE-encoded receipt valueDeliveryConfirmed.relayerpublished the receipt's stored bytes verbatim.pallet-ismpwrites that receipt withchild::put(child_trie.rs:154), which encodes, so a 32-byte account is stored as 33 bytes: a compact length prefix (0x80) followed by the account. Observed live as0x8022b6e6…9763, where the account is0x22b6e6…9763.Not cosmetic: the published relayer matched no account anyone could look up.
on_responsenow SCALE-decodes before emitting, and a value that fails to decode emits nothing — the receipt's presence is already the proof of delivery, so the account answers who, not whether.The existing tests passed with unencoded data, so they would have stayed green with the bug in place. They now store what the chain actually stores, and one asserts the 33-byte width explicitly.
spec_version15. No migration, no storage change, no weight change.transaction_versionstays at 3 — no call signature moved.RUNTIME_VERSIONS.mdalso marks spec 14 as released (2026-09-13,v0.1.0-rc.25, live from block 829906) and records this defect against it: events indexed while spec 14 was live keep the 33-byte shape.2 ·
test(ismp): cover the inbound path and the runtime router that feeds itAcceptedSourceshas been populated on testnet (KUSAMA-4009,EVM-97) since spec 14, but no inbound message has ever arrived —InboundCountis still 0. Every inbound behaviour is unexercised on the live chain, so a regression would surface as a message silently lost rather than as a failing test.Eleven tests pin what the first real arrival will hit: attribution of an event to the message that caused it, data messages alongside pings, oversized bodies rejected before decoding, rejections that still name what they refused, source acceptance as the gate that opens the door, repeated arrivals each getting their own row, and a body an EVM caller would build.
One runtime test covers a step nothing else does: the pallet's own tests call
IsmpModuleCallbackdirectly, so nothing proved the real router resolves our module id and hands it aPostRequest— exactly the path a message from Hyperbridge takes.Tests only: no runtime change, no
spec_versionbump.Verification
cargo test -p pallet-ismp-messagingcargo test -p orbinum-runtime --lib configs::ismpcargo check -p orbinum-runtime