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

Update pallet nomination pool to support Block Number Provider #6715

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

Conversation

dharjeezy
Copy link
Contributor

This PR introduces BlockNumberProvider config for the nomination pool pallet.
closes part of #6297

@dharjeezy dharjeezy requested a review from a team as a code owner December 1, 2024 02:12
Copy link
Contributor

@gui1117 gui1117 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me,

prdoc/prdoc/pr_6715.prdoc Outdated Show resolved Hide resolved
@@ -3092,9 +3098,11 @@ pub mod pallet {
}

#[pallet::hooks]
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
impl<T: Config> Hooks<frame_system::pallet_prelude::BlockNumberFor<T>> for Pallet<T> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

personally I would have introduced a different type alias to avoid the name collision with the frame_system::pallet_prelude::BlockNumberFor.
But I don't mind any implementation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have done as suggested

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking the opposite like keeping BlockNumberFor for the system one, and having maybe ProvidedBlockNumberFor or PalletBlockNumberFor.
But this is also good to me.

doc:
- audience: Runtime Dev
description: |
This PR makes the nomination pool pallet use the relay chain as a block provider for a parachain on a regular schedule.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't force the nomination pool pallet to use the relay chain block provider,

Suggested change
This PR makes the nomination pool pallet use the relay chain as a block provider for a parachain on a regular schedule.
This PR makes the block number provider used in the nomination pool pallet configurable. Before this PR, nomination pool pallet always used the system block number, with this PR some runtime can opt to use the relay chain block number instead.

@gui1117 gui1117 added the T2-pallets This PR/Issue is related to a particular pallet. label Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T2-pallets This PR/Issue is related to a particular pallet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants