Skip to content
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

Open
wants to merge 35 commits into
base: master
Choose a base branch
from

Conversation

bkontur
Copy link
Contributor

@bkontur bkontur commented Feb 5, 2025

Closes: #7272
Relates to: #6578
Relates to: #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 paritytech/parity-bridges-common#3004 (comment).

@bkontur bkontur added the T15-bridges This PR/Issue is related to bridges. label Feb 5, 2025
@bkontur bkontur self-assigned this Feb 5, 2025
@bkontur
Copy link
Contributor Author

bkontur commented Feb 10, 2025

/cmd fmt

@bkontur
Copy link
Contributor Author

bkontur commented Feb 11, 2025

/cmd fmt

@bkontur
Copy link
Contributor Author

bkontur commented Feb 12, 2025

/cmd prdoc --audience runtime_dev --bump patch

@paritytech-workflow-stopper
Copy link

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/13288795332
Failed job name: fmt

@bkontur
Copy link
Contributor Author

bkontur commented Feb 12, 2025

/cmd fmt

@bkontur bkontur marked this pull request as ready for review February 12, 2025 15:37
@paritytech-review-bot paritytech-review-bot bot requested a review from a team February 12, 2025 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T15-bridges This PR/Issue is related to bridges.
Projects
Status: In-Review
Development

Successfully merging this pull request may close these issues.

Improve pallet-bridge-relayers to support multiple bridges
1 participant