Open
Conversation
2da6702 to
7326813
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In order to support promotion to Bulletin in HOP, we need both node-side and runtime-side changes.
This PR adds the runtime-side changes in order to test them before we move Bulletin Polkadot to fellowships.
The node-side changes are in paritytech/polkadot-sdk#11484.
How promotion works
The node regularly scans for entries about to expire and for each, it calls the runtime API HopPromotionAPI to get the promote() extrinsic it needs from pallet-hop-promotion. This extrinsic is authorized only if it comes from the local transaction pool, meaning it can't be sent from the outside world. It can only be used by collators building a block to promote. Since the extrinsic is also given a low priority from the runtime, it'll only be included in a block if it has space available after all user extrinsics.
sp-hop was created here mimicking the same crate on the sdk until we merge that PR.
Approach
The promote() extrinsic:
Companion: sdk
The companion to this PR also declares the runtime API and uses that to submit these promote() extrinsics.