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

Check total weight at session change boundary with staking enabled #734

Closed
Garandor opened this issue Aug 2, 2022 · 2 comments
Closed
Labels
A-weights Area: Issues and PRs related to Substrate Weights E-days up to a few days of effort, medium change
Milestone

Comments

@Garandor
Copy link
Contributor

Garandor commented Aug 2, 2022

Total weight of all calls at session change must be checked to ensure we're far away from the total block weight

  • rotate_session
  • reset_collator_performance
  • staking set change
  • first collator payout

Followup to #720 (comment)

@Garandor Garandor added the A-weights Area: Issues and PRs related to Substrate Weights label Aug 2, 2022
@Garandor Garandor added this to the v3.4.0 milestone Aug 2, 2022
@ghzlatarev
Copy link
Contributor

Consider resetting collator performance over several blocks if needed. We can store the cursor in a storage item and check it in the on_initialize hook of collator_selection.
pallet_session's on_init hook gets called first and that can set the cursor, then collator_selection's on_init can continue using in the same block and in the next.

@Garandor Garandor modified the milestones: v3.4.0, v3.5.0 Sep 9, 2022
@Garandor
Copy link
Contributor Author

Since #691 we are using the pallet_parachain_staking::Round mechanism to recompute eligible authors.
This one has a proper weight measuring mechanism instead of the full_block assumption from pallet_session.
pallet_session's session rotation hooks have since been disabled

Closing this as no longer needed.

@Garandor Garandor closed this as not planned Won't fix, can't repro, duplicate, stale Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-weights Area: Issues and PRs related to Substrate Weights E-days up to a few days of effort, medium change
Projects
None yet
Development

No branches or pull requests

2 participants