referrerpolicy=no-referrer-when-downgrade

Module promotion

Module promotion 

Source
Expand description

HOP maintenance: periodic promotion of near-expiry pool entries to permanent on-chain storage and cleanup of expired entries.

§Architecture

  • HopPromoter — trait for promoting data on-chain (trait-object friendly).
  • RuntimeApiPromoter — concrete implementation that calls the HOP runtime API via dynamic dispatch (see crate::runtime_api) plus [sc_transaction_pool_api::LocalTransactionPool].
  • try_build_promoter — detects runtime API support at startup, returns Some(promoter) or logs a warning and returns None.
  • HopMaintenanceTask — background task combining promotion + cleanup.

Structs§

HopMaintenanceTask
Background task that periodically promotes near-expiry HOP pool entries to permanent on-chain storage and cleans up expired entries.
RuntimeApiPromoter
Concrete HopPromoter that calls the HOP runtime API dynamically (see crate::runtime_api) to build a promotion extrinsic and submits it to the local transaction pool.

Traits§

HopPromoter
Trait for promoting HOP data to permanent on-chain storage.

Functions§

build_maintenance_task
Build a HopMaintenanceTask wired to the node’s client and transaction pool.
try_build_promoter
Try to build a HopPromoter by detecting the HopRuntimeApi runtime API at the current best block.