Skip to content
Snippets Groups Projects
Unverified Commit ba7cb484 authored by Branislav Kontur's avatar Branislav Kontur Committed by GitHub
Browse files

Make `pallet-bridge-rewards` generic over `RewardKind` (#7492)


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>
parent 0c258c66
No related merge requests found
Pipeline #516077 waiting for manual action with stages
in 20 minutes and 37 seconds
Showing
with 823 additions and 346 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment