-
Notifications
You must be signed in to change notification settings - Fork 699
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
Snowbridge V2 - Rewards Pallet #6117
Snowbridge V2 - Rewards Pallet #6117
Conversation
We have a similar pallet here: https://github.com/paritytech/polkadot-sdk/tree/master/bridges/modules/relayers for registering relayers (deposits, slashing) and collecting rewards for relayer accounts. I'm just curious if we could have a single generic pallet for relayers/rewards that could cover both the P/K bridge, the Eth bridge, or any other possible bridge. That would be cool. Essentially, we need to store the same things:
Some good abstraction over the reward identifier to support both, and using |
As an aside, we do not have grandpa or beefy rewards planned for validators, but if we ever need them then they'd need a median computation, like polkadot-fellows/RFCs#119 does. |
let xcm: Xcm<()> = vec![ | ||
DepositAsset { assets: Definite(deposit.into()), beneficiary }, | ||
SetTopic(message_id.into()), | ||
] | ||
.into(); |
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.
Withdraw/Teleport + BuyExecution is required to pass the Barrier check for executing any XCM.
# Conflicts: # Cargo.lock # Cargo.toml
…wards-pallet # Conflicts: # bridges/snowbridge/pallets/inbound-queue-v2/src/mock.rs
@bkontur that would definitely be cool, to reuse what is already there. I could see in the future how we also would register relayers and use other functionality in the pallet. Right now we're kind of focused on meeting a tight deadline for v2 and although reusing is a great idea, it usually takes a bit longer to get right since it needs to cater to multiple party's needs. So I think we are going to do the Snowbridge specific pallet (luckily it is very simple) and revisit using your team's pallet in the future. |
Closing for now, still too WIP and depends on other PRs. Moving the PR to my personal clone: claravanstaden#1 |
Description
Adds a rewards pallet, where rewards for relayers will be accumulated. More details in the Snowbridge v2 design: https://github.com/paritytech/polkadot-sdk/blob/master/bridges/snowbridge/docs/v2.md#relayer-rewards
Integration
Since this is a new feature, so it does not affect integration.
Review Notes
TODOs:
[ ] Add deposit from Inbound and Outbound queue.
[ ] Test XCM
[ ] More tests, including integration.