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

Update GetBackableCandidates struct and logic to process it #4296

Open
2 tasks
Tracked by #4245
axaysagathiya opened this issue Oct 31, 2024 · 0 comments
Open
2 tasks
Tracked by #4245

Update GetBackableCandidates struct and logic to process it #4296

axaysagathiya opened this issue Oct 31, 2024 · 0 comments
Labels
S-subsystems-backing issues related to polkadot host backing subsystem functionality.

Comments

@axaysagathiya
Copy link
Contributor

axaysagathiya commented Oct 31, 2024

Issue summary

The current struct to request backable candidates from the candidate backing subsystem doesn't provide info on which candidate belongs to which parachain. Now we have to update this overseer message structure GetBackableCandidates to provide a record of the parachain ID and candidates belonging to them and relay the parents of each candidate.

type GetBackableCandidates struct {
	Candidates map[parachaintypes.ParaID][]*CandidateHashAndRelayParent
	ResCh      chan map[parachaintypes.ParaID]*parachaintypes.BackedCandidate
}

GetBackableCandidates requests a set of backable candidates attested by the subsystem.

The order of candidates of the same parachain must be preserved in the response because candidates are supplied in dependency order. We must ensure that this dependency order is preserved.

So, If a backable candidate of a parachain cannot be retrieved, the response should not contain any candidates of the same parachain that follow it in the input slice.

For example:
Candidates => [A, B, C, D, E, F, G, H]
If we are unable to retrieve backable candidate D, the Response should be [A, B, C]

TODO:

  • update the code as mentioned above
  • Write unit test
    • ensure the candidate orders in response
    • If a backable candidate can't be retrieved, the response should exclude any following candidates from the same parachain

Other information and links

@axaysagathiya axaysagathiya added the S-subsystems-backing issues related to polkadot host backing subsystem functionality. label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-subsystems-backing issues related to polkadot host backing subsystem functionality.
Projects
None yet
Development

No branches or pull requests

1 participant