-
Notifications
You must be signed in to change notification settings - Fork 789
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[3 / 5] Move crypto checks in the approval-distribution (#4928)
# Prerequisite This is part of the work to further optimize the approval subsystems, if you want to understand the full context start with reading #4849 (comment), # Description This PR contain changes, so that the crypto checks are performed by the approval-distribution subsystem instead of the approval-voting one. The benefit for these, is twofold: 1. Approval-distribution won't have to wait every single time for the approval-voting to finish its job, so the work gets to be pipelined between approval-distribution and approval-voting. 2. By running in parallel multiple instances of approval-distribution as described here #4849 (comment), this significant body of work gets to run in parallel. ## Changes: 1. When approval-voting send `ApprovalDistributionMessage::NewBlocks` it needs to pass the core_index and candidate_hash of the candidates. 2. ApprovalDistribution needs to use `RuntimeInfo` to be able to fetch the SessionInfo from the runtime. 3. Move `approval-voting` logic that checks VRF assignment into `approval-distribution` 4. Move `approval-voting` logic that checks vote is correctly signed into `approval-distribution` 5. Plumb `approval-distribution` and `approval-voting` tests to support the new logic. ## Benefits Even without parallelisation the gains are significant, for example on my machine if we run approval subsystem bench for 500 validators and 100 cores and trigger all 89 tranches of assignments and approvals, the system won't fall behind anymore because of late processing of messages. ``` Before change Chain selection approved after 11500 ms hash=0x0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a After change Chain selection approved after 5500 ms hash=0x0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a ``` ## TODO: - [x] Run on versi. - [x] Update parachain host documentation. --------- Signed-off-by: Alexandru Gheorghe <[email protected]>
- Loading branch information
Showing
27 changed files
with
4,648 additions
and
3,535 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.