-
Notifications
You must be signed in to change notification settings - Fork 838
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make pallet-bridge-rewards
generic over RewardKind
#7492
Conversation
/cmd fmt |
/cmd fmt |
All GitHub workflows were cancelled due to failure one of the required jobs. |
/cmd fmt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM combined with #7609
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Serban Iorga <serban@parity.io>
Git push to origin failed for stable2407 with exitcode 1 |
Git push to origin failed for stable2409 with exitcode 1 |
Git push to origin failed for stable2412 with exitcode 1 |
Git push to origin failed for stable2503 with exitcode 1 |
Closes: #7272 Relates to: #6578 Relates to: #7274 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). The removed balances/rewards statistics from the complex relay (no longer used) will eventually be reintroduced or fixed in the standalone relayers via paritytech/parity-bridges-common#3004 (comment). --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com> Co-authored-by: Serban Iorga <serban@parity.io>
Backport #7492 into `stable2503` from bkontur. Manual backport, because `A4-needs-backport` bot failed for some permission reasons of touched CI files in the original PR: #7492 (comment) Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com> Co-authored-by: Serban Iorga <serban@parity.io>
Closes: #7272
Relates to: #6578
Relates to: #7274
Description
The PR enhances the
pallet-bridge-rewards
by making it generic over theRewardKind
type (previously hardcoded asRewardsAccountParams
). 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 viabp_relayers::PaymentProcedure
(e.g., see thepub 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 paritytech/parity-bridges-common#3004 (comment).