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

Refactor paras_inherent::Pallet::enter #5520

Open
3 tasks
ordian opened this issue Aug 29, 2024 · 0 comments
Open
3 tasks

Refactor paras_inherent::Pallet::enter #5520

ordian opened this issue Aug 29, 2024 · 0 comments
Assignees
Labels
I4-refactor Code needs refactoring. T8-polkadot This PR/Issue is related to/affects the Polkadot network.

Comments

@ordian
Copy link
Member

ordian commented Aug 29, 2024

As outlined in #849 (comment), we should:

  • Change the way we calculate the weight of that function by calculating individually the costs of processing disputes, bitfields, backed candidates and enacting candidates (the latter is done in inclusion: bench enact_candidate weight #5270). We would need to refactor this function such that e.g. processing disputes is contained and can be benchmarked from a single function.
  • Remove the calculation of proof_size component of weight - on the Relay Chain the proof size is not limited anyway, so we should just rely on block size limits.

It would also be good to

  • Add some type safety, such that processing of bitfields can only be done after processing disputes, etc (e.g. type state pattern or a newtype wrapper).
@ordian ordian added I4-refactor Code needs refactoring. T8-polkadot This PR/Issue is related to/affects the Polkadot network. labels Aug 29, 2024
@ordian ordian self-assigned this Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I4-refactor Code needs refactoring. T8-polkadot This PR/Issue is related to/affects the Polkadot network.
Projects
Status: Backlog
Development

No branches or pull requests

1 participant