Skip to content
Snippets Groups Projects
  • Branislav Kontur's avatar
    Make `pallet-bridge-rewards` generic over `RewardKind` (#7492) · ba7cb484
    Branislav Kontur authored
    
    Closes: https://github.com/paritytech/polkadot-sdk/issues/7272
    Relates to: https://github.com/paritytech/polkadot-sdk/pull/6578
    Relates to: https://github.com/paritytech/polkadot-sdk/issues/7274
    
    ## Description
    
    The PR enhances the `pallet-bridge-rewards` by making it generic over
    the `RewardKind` type (previously hardcoded as `RewardsAccountParams`).
    This modification allows the pallet to support multiple reward types
    (e.g., P/K bridge, Snowbridge), increasing its flexibility and
    applicability across various bridge scenarios.
    
    Other pallets can register rewards using `bp_relayers::RewardLedger`,
    which is implemented by the rewards pallet. The runtime can then be
    configured with different mechanisms for paying/claiming rewards via
    `bp_relayers::PaymentProcedure` (e.g., see the `pub struct
    BridgeRewardPayer;` implementation for BridgeHubWestend).
    
    ## Follow-up  
    The removed balances/rewards statistics from the complex relay (no
    longer used) will eventually be reintroduced or fixed in the standalone
    relayers via
    https://github.com/paritytech/parity-bridges-common/issues/3004#issuecomment-2401634589.
    
    ---------
    
    Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    Co-authored-by: default avatarFrancisco Aguirre <franciscoaguirreperez@gmail.com>
    Co-authored-by: default avatarSerban Iorga <serban@parity.io>
    Unverified
    ba7cb484
Code owners
Assign users and groups as approvers for specific file changes. Learn more.