Skip to content

[AHM] Fully bound staking async#8303

Merged
kianenigma merged 15 commits intomasterfrom
kiz-fully-bound-staking-async
Apr 25, 2025
Merged

[AHM] Fully bound staking async#8303
kianenigma merged 15 commits intomasterfrom
kiz-fully-bound-staking-async

Conversation

@kianenigma
Copy link
Copy Markdown
Contributor

@kianenigma kianenigma commented Apr 23, 2025

Follow up to #8127

  • Bound BondedEras, making it super clear that ErasStartSessionIndex is no longer needed and is ergo removed. We only want to query the start index of the active era, which we already have in BondedEras
  • Bound EraRewardPoints by MaxValidatorSet
  • Bound ErasClaimedRewards with a custom bound. This type is using WeakBoundedVec under the hood as we expect MaxExposurePageSize to change. It is, in essence, only used in benchmarking and the code uses a force_from to set it.
  • Bound ErasStakersPaged with a custom wrapper type. This type is actually unbounded under the hood as MaxExposurePagesize might change, and is pretending to be bounded by providing a bounded wrapper.
  • re-run benchmarks

@kianenigma kianenigma added the R0-no-crate-publish-required The change does not require any crates to be re-published. label Apr 23, 2025
@kianenigma kianenigma requested a review from a team as a code owner April 23, 2025 08:55
@kianenigma kianenigma changed the title fully bound staking async [AHM] Fully bound staking async Apr 23, 2025
Copy link
Copy Markdown
Contributor

@Ank4n Ank4n left a comment

Choose a reason for hiding this comment

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

Just one nit and one question out of curiosity — everything else looks awesome!

@Ank4n
Copy link
Copy Markdown
Contributor

Ank4n commented Apr 24, 2025

/cmd fmt

@paritytech-workflow-stopper
Copy link
Copy Markdown

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

@kianenigma kianenigma requested a review from re-gius April 24, 2025 11:55
@kianenigma kianenigma enabled auto-merge April 25, 2025 08:36
@kianenigma kianenigma added this pull request to the merge queue Apr 25, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 25, 2025
@kianenigma kianenigma added this pull request to the merge queue Apr 25, 2025
@kianenigma kianenigma removed this pull request from the merge queue due to a manual request Apr 25, 2025
@kianenigma kianenigma enabled auto-merge April 25, 2025 10:28
@kianenigma kianenigma added this pull request to the merge queue Apr 25, 2025
Merged via the queue into master with commit c77248b Apr 25, 2025
238 of 243 checks passed
@kianenigma kianenigma deleted the kiz-fully-bound-staking-async branch April 25, 2025 12:21
wassimans pushed a commit to wassimans/polkadot-sdk that referenced this pull request Apr 27, 2025
Follow up to paritytech#8127

- [x] Bound `BondedEras`, making it super clear that
`ErasStartSessionIndex` is no longer needed and is ergo removed. We only
want to query the start index of the active era, which we already have
in `BondedEras`
- [x] Bound `EraRewardPoints` by `MaxValidatorSet`
- [x] Bound `ErasClaimedRewards` with a custom bound. This type is using
`WeakBoundedVec` under the hood as we expect `MaxExposurePageSize` to
change. It is, in essence, only used in benchmarking and the code uses a
`force_from` to set it.
- [x] Bound `ErasStakersPaged` with a custom wrapper type. This type is
actually unbounded under the hood as `MaxExposurePagesize` might change,
and is pretending to be bounded by providing a bounded wrapper.
- [ ] re-run benchmarks

---------

Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
ordian added a commit that referenced this pull request Apr 28, 2025
* master: (120 commits)
  [CI] Improve GH build status checking (#8331)
  [CI/CD] Use original PR name in prdoc check for the backport PR's to the stable branches (#8329)
  Add new host APIs set_storage_or_clear and get_storage_or_zero (#7857)
  push to dockerhub (#8322)
  Snowbridge - V1 - Adds 2 hop transfer to Rococo (#7956)
  [AHM] Prepare `election-provider-multi-block` for full lazy data deletion (#8304)
  Check umbrella version (#8250)
  [AHM] Fully bound staking async (#8303)
  migrate parachain-templates tests to `gha` (#8226)
  staking-async: add missing new_session_genesis (#8310)
  New NFT traits: granular and abstract interface (#5620)
  Extract create_pool_with_native_on macro to common crate (#8289)
  XCMP: use batching when enqueuing inbound messages (#8021)
  Snowbridge - Tests refactor (#8014)
  Allow configuration of worst case buy execution weight (#7944)
  Fix faulty pre-upgrade migration check in pallet-session (#8294)
  [pallet-revive] add get_storage_var_key for variable-sized keys (#8274)
  add poke_deposit extrinsic to pallet-recovery (#7882)
  `txpool`: use tracing for structured logging (#8001)
  [revive] eth-rpc refactoring (#8148)
  ...
)]
#[codec(mel_bound())]
#[scale_info(skip_type_params(T))]
pub struct EraRewardPoints<T: Config> {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Pulling in Config is a nightmare for anyone using it. Please try to only pull in Config if absolutely necessary.
It is better here to just pull in what is needed: AccountID and the MEL bound.

castillax pushed a commit that referenced this pull request May 12, 2025
Follow up to #8127

- [x] Bound `BondedEras`, making it super clear that
`ErasStartSessionIndex` is no longer needed and is ergo removed. We only
want to query the start index of the active era, which we already have
in `BondedEras`
- [x] Bound `EraRewardPoints` by `MaxValidatorSet`
- [x] Bound `ErasClaimedRewards` with a custom bound. This type is using
`WeakBoundedVec` under the hood as we expect `MaxExposurePageSize` to
change. It is, in essence, only used in benchmarking and the code uses a
`force_from` to set it.
- [x] Bound `ErasStakersPaged` with a custom wrapper type. This type is
actually unbounded under the hood as `MaxExposurePagesize` might change,
and is pretending to be bounded by providing a bounded wrapper.
- [ ] re-run benchmarks

---------

Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

R0-no-crate-publish-required The change does not require any crates to be re-published.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants