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

Fellowship-core: add fast promote #4877

Merged
merged 19 commits into from
Jun 26, 2024
Merged

Fellowship-core: add fast promote #4877

merged 19 commits into from
Jun 26, 2024

Conversation

ggwpez
Copy link
Member

@ggwpez ggwpez commented Jun 25, 2024

Add a promote_fast extrinsic to the core-fellowship pallet to allow promotions that ignore the promotion cooldown. It comes with a new FastPromoteOrigin.

Supersedes #4778

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez ggwpez requested a review from a team as a code owner June 25, 2024 15:51
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez ggwpez added the T2-pallets This PR/Issue is related to a particular pallet. label Jun 25, 2024
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Copy link
Contributor

@acatangiu acatangiu 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!

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Ok(allow_rank) => ensure!(allow_rank >= to_rank, Error::<T, I>::NoPermission),
Err(origin) => ensure_root(origin)?,
}
ensure!(to_rank as u32 <= T::MaxRank::get(), Error::<T, I>::InvalidRank);
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe refactor those into a helper function so it can be shared with promote

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes could do, but it needs to go into the release today and its already approved 🫠

prdoc/pr_4877.prdoc Outdated Show resolved Hide resolved
substrate/frame/core-fellowship/src/lib.rs Outdated Show resolved Hide resolved
ggwpez and others added 2 commits June 26, 2024 12:16
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
@ggwpez
Copy link
Member Author

ggwpez commented Jun 26, 2024

bot bench substrate-pallet --pallet=pallet-core-fellowship
bot bench cumulus-collectives --pallet=pallet-core-fellowship

@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: cargo-clippy
Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6554464

@ggwpez
Copy link
Member Author

ggwpez commented Jun 26, 2024

bot bench substrate-pallet --pallet=pallet_core_fellowship
bot bench cumulus-collectives --pallet=pallet_core_fellowship

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez
Copy link
Member Author

ggwpez commented Jun 26, 2024

bot cancel
bot clean
bot bench substrate-pallet --pallet=pallet_core_fellowship

@command-bot
Copy link

command-bot bot commented Jun 26, 2024

@ggwpez Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=collectives-westend --runtime_dir=collectives --target_dir=cumulus --pallet=pallet_core_fellowship has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6554912 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6554912/artifacts/download.

@command-bot
Copy link

command-bot bot commented Jun 26, 2024

@ggwpez https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6555216 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_core_fellowship. Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 3-90e781f1-719b-4647-95cd-6ded39473917 to cancel this command or bot cancel to cancel all commands in this pull request.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez ggwpez added this pull request to the merge queue Jun 26, 2024
@ggwpez ggwpez removed this pull request from the merge queue due to a manual request Jun 26, 2024
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez ggwpez enabled auto-merge June 26, 2024 13:51
@ggwpez ggwpez added this pull request to the merge queue Jun 26, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 26, 2024
@ggwpez ggwpez added this pull request to the merge queue Jun 26, 2024
Merged via the queue into master with commit b4ae5b0 Jun 26, 2024
152 of 158 checks passed
@ggwpez ggwpez deleted the oty-fast-promote branch June 26, 2024 15:12
TarekkMA pushed a commit to moonbeam-foundation/polkadot-sdk that referenced this pull request Aug 2, 2024
Add a `promote_fast` extrinsic to the `core-fellowship` pallet to allow
promotions that ignore the promotion cooldown. It comes with a new
`FastPromoteOrigin`.

Supersedes paritytech#4778

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: command-bot <>
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.

7 participants