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

find core index of candidate parachain using the validity statement #4324

Open
3 tasks
Tracked by #4245
axaysagathiya opened this issue Nov 12, 2024 · 0 comments
Open
3 tasks
Tracked by #4245

Comments

@axaysagathiya
Copy link
Contributor

Issue summary

  • To find the core index, we need a group index for the validator who provided the statement.
    • we can get validator groups from runtime. Rather than calling the runtime function multiple times for the same relay parent state, we can call it once and store it in perRelayParentState as a map from the validator index to the group index.
  • find the core index for the group using group rotation info. (polkadot-sdk implementation)
  • corner cases:
    • The core index must be smaller than the number of available cores.
    • in the case of the seconded statement, make sure the candidate parachain is assigned to the core.

  • to find the core index from the statement we need below data
    • Map from the validator index to its group index. (introduce field in perRelayParentState, So that we don't need to call the runtime function again and again)
    • number of availability cores(have in PerRelayParentState)
    • group rotation info(have in PerRelayParentState)
    • signed full statement

So, We can have a method of PerRelayParentState with a statement as an argument.


TODO

  • implement the functionality discribed above
  • make sure we have code to fill the values in newly introduce field in perRelayParentState.
  • unit test

Other information and links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant