ChainSafe / ChainSafe/gossamer
ensure session-index and core-index are correct
- Dominant language
- Go
- Stars
- 454
- Forks
- 144
- PR merge metrics
- No merged PRs in 30d
Description
## Note:
This issue can be implemented only when we have logic for async backing + Elastic scalling for seconding the candidate in the collator protocol subsystem.
## Issue summary
- When we recieve collation from the collator, we need to ensure that the core-index and the session-index are valid in the candidate receipt v2.
## Implementation details
#### candidate receipt v1:
- we don't want to check anything.
#### candidate receipt v2:
- find actual core index using `GroupRotationInfo` and ensure that we have the same core index in the candidate descriptor.
- get session index from the runtime and ensure that we have the same the session index in the candidate descriptor.
## Other information and links
Polkadot-sdk func that implement this functionality: https://github.com/paritytech/polkadot-sdk/blob/79b2faa6e474490ad79756261f0129ab01201a2a/polkadot/node/network/collator-protocol/src/validator_side/mod.rs#L2229
## Acceptance criteria
- [ ] pass al the existing unit tests
- [ ] add necessary test cases for descriptor V2
Contributor guide
Assessment
This issue has not been assessed yet.