eth-educators / ethstaker-deposit-cli

Secure key generation for deposits
https://eth-educators.github.io/ethstaker-deposit-cli/
Creative Commons Zero v1.0 Universal
2 stars 2 forks source link

Add parallelism when performing multiple tasks at the same that can benefit from it #48

Closed remyroy closed 1 month ago

remyroy commented 1 month ago

This PR adds parallelism using the ProcessPoolExecutor when and where we can benefit from executing multiple tasks on potentially multiple cores. This speeds up keys generation, keystores generation, voluntary exits generation and a bunch of verification especially when multiples are requested. It will default to using number of processors on the machine for the number of workers.

Fixes #40

Introduces #47

remyroy commented 1 month ago

There seems to be a lingering issue with this PR and the unit tests in #49 . Let me fix it before finishing the review.

remyroy commented 1 month ago

The c35380e9d0dd8fe6ce1198e27c717e7a124c2a2e commit should fix #49. There seems to be another unit test issue in https://github.com/eth-educators/ethstaker-deposit-cli/actions/runs/9273010996/job/25512131191?pr=48 which need more fixes.

remyroy commented 1 month ago

It seems like all remaining issues are fixed. You can have another look @valefar-on-discord .