Skip to content

Add HOP promotion: node-side#11484

Open
franciscoaguirre wants to merge 2 commits intohop-prototypefrom
hop-promotion
Open

Add HOP promotion: node-side#11484
franciscoaguirre wants to merge 2 commits intohop-prototypefrom
hop-promotion

Conversation

@franciscoaguirre
Copy link
Contributor

@franciscoaguirre franciscoaguirre commented Mar 24, 2026

In order to support promotion to Bulletin in HOP, we need both node-side and runtime-side changes.
This PR adds the node-side changes to sc-hop and ultimately to polkadot-omni-node, since that's what will be used to run the Bulletin chain.
The runtime-side is tested in polkadot-bulletin-chain before the real deploy to fellowship runtimes.

How promotion works

When entries are about to expire, the collator will submit low-priority transactions to store them in Bulletin. These transactions are not propagated, they'll stay in the collators transaction pool until they expire or it's his turn to build a block and he can fit them in. Given that they are low-priority, all other external transactions take precedence. That's why promotion is a best-effort system. It only tries to fill in blocks if they have some space available.

A background HopMaintenanceTask runs on a configurable interval (default 60s). Each cycle it:

  1. Queries the pool for entries within hop_buffer_blocks (default ~2h) of their expiry that haven't been promoted yet (get_promotable)
  2. For each, calls HopPromoter::promote(data) which uses the HopPromotionApi runtime API to construct a general transaction extrinsic and submits it to the local tx pool
  3. Marks successfully promoted entries
  4. Cleans up expired entries

Promoted entries don't get immediately deleted, they wait for their actual expiry. This is so that the recipient can quickly get them from HOP if he comes online before the expiry time. If he comes online after the expiry time, then it will try to get it from HOP, fail and then go try to retrieve it from Bulletin via IPFS.

Runtime API detection

try_build_promoter() probes for HopPromotionApi support at startup. If the runtime doesn't implement it, the node logs a warning and runs in cleanup-only mode. The pool still works for submit/claim, just without automatic on-chain promotion. This keeps the node functional regardless of whether the runtime has pallet-hop-promotion.

We don't want the omni node to crash if the runtime is not Bulletin, clearly. Ideally we want all of this to be enabled only when the node is run with --enable-hop.

Companion: bulletin-chain runtime

The companion to this PR is on bulletin-chain. It has pallet-hop-promotion which implements the runtime API. This API gives the node the necessary promote() extrinsic to submit. To know more, go to that PR. We'll have to deploy that pallet to Polkadot to make use of HOP promotion.

@franciscoaguirre franciscoaguirre marked this pull request as ready for review March 24, 2026 18:20
@franciscoaguirre franciscoaguirre self-assigned this Mar 24, 2026
@franciscoaguirre franciscoaguirre added the T0-node This PR/Issue is related to the topic “node”. label Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T0-node This PR/Issue is related to the topic “node”.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant