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

[4 / 5] Make approval-voting runnable on a worker thread #4846

Merged
merged 28 commits into from
Sep 12, 2024

Conversation

alexggh
Copy link
Contributor

@alexggh alexggh commented Jun 20, 2024

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 to make possible the run of single approval-voting instance on a worker thread, so that it can be instantiated by the approval-voting-parallel subsystem.

This does not contain any functional changes it just decouples the subsystem from the subsystem Context and introduces more specific trait dependencies for each function instead of all of them requiring a context.

This change can be merged independent of the followup PRs.

@alexggh alexggh changed the title [WI] Make approval-voting runable on a worker thread Make approval-voting runable on a worker thread Jun 20, 2024
@alexggh alexggh changed the title Make approval-voting runable on a worker thread [2 / 5] Make approval-voting runnable on a worker thread Jun 20, 2024
@alexggh alexggh force-pushed the alexaggh/approval-voting-parallel-1-5 branch from 381e0b9 to 88e15da Compare July 2, 2024 11:40
@alexggh alexggh force-pushed the alexaggh/approval-voting-parallel-2-5 branch from 31767a9 to 7add070 Compare July 2, 2024 11:40
@alexggh alexggh changed the title [2 / 5] Make approval-voting runnable on a worker thread [4 / 5] Make approval-voting runnable on a worker thread Jul 2, 2024
@alexggh alexggh changed the base branch from alexaggh/approval-voting-parallel-1-5 to master July 2, 2024 11:50
@alexggh alexggh force-pushed the alexaggh/approval-voting-parallel-2-5 branch from 7add070 to 78708d7 Compare July 2, 2024 11:54
@alexggh alexggh changed the base branch from master to alexaggh/approval-voting-parallel-3-5 July 2, 2024 12:03
@alexggh alexggh force-pushed the alexaggh/approval-voting-parallel-3-5 branch from 88e15da to 7c968e1 Compare July 3, 2024 12:16
@alexggh alexggh force-pushed the alexaggh/approval-voting-parallel-2-5 branch from 7add070 to 3a0ba90 Compare July 3, 2024 12:16
@alexggh alexggh force-pushed the alexaggh/approval-voting-parallel-3-5 branch from 7c968e1 to 5fe747c Compare July 5, 2024 11:36
@alexggh alexggh force-pushed the alexaggh/approval-voting-parallel-2-5 branch from 3a0ba90 to 78bb23d Compare July 5, 2024 11:36
@alexggh alexggh force-pushed the alexaggh/approval-voting-parallel-3-5 branch from 5fe747c to e4f883e Compare July 5, 2024 13:13
@alexggh alexggh force-pushed the alexaggh/approval-voting-parallel-2-5 branch 3 times, most recently from 25f1f0a to d13e1c8 Compare July 12, 2024 07:04
@alexggh alexggh marked this pull request as ready for review July 12, 2024 07:14
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
@alexggh alexggh force-pushed the alexaggh/approval-voting-parallel-3-5 branch from e4f883e to 14727c5 Compare July 16, 2024 12:40
@alexggh alexggh force-pushed the alexaggh/approval-voting-parallel-2-5 branch from d13e1c8 to 1942139 Compare July 16, 2024 12:40
@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: cargo-clippy
Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6709471

Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
…l-1-5' into alexaggh/approval-voting-parallel-3-5
- rename check_and_import in import.
- refactor un-needed variable.

Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
…l-3-5' into alexaggh/approval-voting-parallel-2-5
@alexggh alexggh added T0-node This PR/Issue is related to the topic “node”. T8-polkadot This PR/Issue is related to/affects the Polkadot network. labels Jul 26, 2024
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
…l-3-5' into alexaggh/approval-voting-parallel-2-5
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
…l-3-5' into alexaggh/approval-voting-parallel-2-5
…l-3-5' into alexaggh/approval-voting-parallel-2-5
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
Copy link
Member

@ordian ordian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable

polkadot/node/core/approval-voting/src/lib.rs Outdated Show resolved Hide resolved
…ting

Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
Base automatically changed from alexaggh/approval-voting-parallel-3-5 to master September 2, 2024 09:33
Copy link
Contributor

@AndreiEres AndreiEres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, great job!

Copy link
Contributor

@sandreim sandreim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

polkadot/node/subsystem-types/src/messages.rs Outdated Show resolved Hide resolved
polkadot/node/network/approval-distribution/src/lib.rs Outdated Show resolved Hide resolved
polkadot/node/core/approval-voting/src/lib.rs Outdated Show resolved Hide resolved
alexggh and others added 3 commits September 9, 2024 16:01
Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com>
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
@alexggh alexggh added this pull request to the merge queue Sep 12, 2024
Merged via the queue into master with commit a34cc8d Sep 12, 2024
196 of 208 checks passed
@alexggh alexggh deleted the alexaggh/approval-voting-parallel-2-5 branch September 12, 2024 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T0-node This PR/Issue is related to the topic “node”. T8-polkadot This PR/Issue is related to/affects the Polkadot network.
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

6 participants