Skip to content

[runtime, tesseract]: incentivise request from hyperbridge#822

Merged
Wizdave97 merged 22 commits into
mainfrom
dami/incentivize-hyperbridge-request
May 28, 2026
Merged

[runtime, tesseract]: incentivise request from hyperbridge#822
Wizdave97 merged 22 commits into
mainfrom
dami/incentivize-hyperbridge-request

Conversation

@dharjeezy
Copy link
Copy Markdown
Contributor

This PR adds a per destination BRIDGE reward for relayers that deliver hyperbridge originated requests. Closes #532.

The pallet gains a new claim variant claim_outbound_request_delivery_reward paid from the existing treasury, idempotent on the request commitment, and valid or both EVM and substrate destinations. The shape mirrors the existing claim_outbound_consensus_delivery_reward so verification reuses the same state proof and signature primitives.

The tesseract messaging task gains a sibling claim pipeline. After dest.submit(), receipts whose query.source_chain equals the hyperbridge coprocessor get persisted to the local DB and pushed onto a new claim channel. A new task consumes that channel, waits for hyperbridge's view of the destination to catch up, builds the state proof, signs outbound_request_delivery_message(commitment, destination, payee), and submits the claim. Responses are filtered out at the trigger because the incentive is request only.

@seunlanlege
Copy link
Copy Markdown
Member

Not all requests from hyperbridge should be incentivized, we should make it take an allow list eg: pallet-host-executive, pallet-bandwidth etc

Comment thread tesseract/messaging/messaging/src/outbound.rs Outdated
Comment thread tesseract/messaging/messaging/src/outbound.rs Outdated
Comment thread modules/pallets/relayer/src/lib.rs Outdated
Comment thread modules/pallets/relayer/src/lib.rs
Comment thread modules/pallets/relayer/src/lib.rs Outdated
Comment thread tesseract/messaging/messaging/src/outbound.rs
Comment thread tesseract/messaging/messaging/src/outbound.rs Outdated
Comment thread tesseract/messaging/messaging/src/outbound.rs
dharjeezy added 2 commits May 13, 2026 15:35
…rbridge-request

# Conflicts:
#	tesseract/messaging/messaging/src/outbound.rs
@dharjeezy dharjeezy requested a review from Wizdave97 May 13, 2026 14:48
Comment thread tesseract/messaging/substrate/src/calls.rs Outdated
Comment thread tesseract/messaging/messaging/src/events.rs
Comment thread modules/pallets/relayer/src/lib.rs Outdated
@dharjeezy dharjeezy requested a review from Wizdave97 May 13, 2026 18:22
Comment thread modules/pallets/testsuite/src/tests/pallet_ismp_relayer.rs Outdated
Comment thread tesseract/messaging/messaging/src/events.rs Outdated
Comment thread tesseract/messaging/messaging/src/events.rs Outdated
@dharjeezy dharjeezy requested a review from Wizdave97 May 14, 2026 11:50
@seunlanlege seunlanlege changed the title [runtime, relayer]: incentivise request from hyperbridge [runtime, tesseract]: incentivise request from hyperbridge May 15, 2026
dharjeezy added 4 commits May 20, 2026 13:59
…rbridge-request

Resolve conflicts against main's refactors while preserving the outbound
request-delivery incentive work:

- relayer pallet: adopt main's module split (accumulate/outbound_consensus)
  and add the request claim as a new outbound_request module; re-home our
  storage, errors, events, calls (index 5/6) and validate_unsigned arm into
  main's slim pallet module. Adapt process_outbound_request_delivery_claim to
  main's 3-arg verify_withdrawal_proof (validate_state_machine precursor).
- events.rs / outbound.rs: drop PostResponse handling (removed in #840) and
  adapt to the request-only TxReceipt struct; keep retain_incentivized_requests
  and the on-chain allowlist filter; keep the router-id removal from this branch.
- testsuite: convert SubstrateStateProof::OverlayProof to bare StateMachineProof
  (enum removed on main).
- gargantua spec_version -> 7_200 (above main's 7_000).

Verified: pallet-ismp-relayer, gargantua-runtime, messaging, subxt-utils all
compile; 15 outbound_request_delivery pallet tests and 10 messaging outbound
tests pass; cargo metadata --locked clean.
Update the design doc to match the merged shape: reward keyed by module_id, the claim living in the outbound_request module, the three argument verify_withdrawal_proof, request-only TxReceipt, the BTreeSet allowlist snapshot, and the refreshed error list and test counts.
…/incentivize-hyperbridge-request

# Conflicts:
#	parachain/runtimes/gargantua/src/lib.rs
Comment thread modules/pallets/relayer/src/outbound_request.rs
Comment thread modules/pallets/relayer/src/outbound_request.rs Outdated
Comment thread modules/pallets/relayer/src/outbound_request.rs Outdated
…/incentivize-hyperbridge-request

# Conflicts:
#	parachain/runtimes/gargantua/src/lib.rs
Copy link
Copy Markdown
Member

@Wizdave97 Wizdave97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not have duplicate implementations of the same thing

@dharjeezy dharjeezy requested a review from Wizdave97 May 25, 2026 12:29
@Wizdave97 Wizdave97 marked this pull request as ready for review May 28, 2026 11:40
dharjeezy and others added 4 commits May 28, 2026 13:00
…/incentivize-hyperbridge-request

# Conflicts:
#	tesseract/messaging/substrate/src/calls.rs
The `destination == request.dest` check in
process_outbound_request_delivery_claim was untested; the rest of the
verification pipeline had explicit rejection tests but this one did not.

Add a case that registers a valid, allowlisted, unclaimed commitment for
an EVM destination and then submits a claim whose state proof is for a
substrate destination instead. Asserts the pallet rejects with
MismatchedStateMachine before reaching state-proof verification.
Wizdave97 added 2 commits May 28, 2026 17:54
Cuts a new release after the outbound request delivery reward claim
pipeline (#822) lands. Minor bump reflects the new outbound-request
claim task, the sibling DB-backed claim persistence, and the
`incentivized_outbound_request_modules` allowlist fetch — additive
features with no breaking changes to existing relayer behaviour.
@Wizdave97 Wizdave97 merged commit 27d1756 into main May 28, 2026
8 of 10 checks passed
@Wizdave97 Wizdave97 deleted the dami/incentivize-hyperbridge-request branch May 28, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incentivize requests from hyperbridge

3 participants