Skip to content

Conversation

ltitanb
Copy link
Collaborator

@ltitanb ltitanb commented Jul 4, 2025

speed up keys loading at startup by parallezing decryption across cores

@ltitanb ltitanb changed the title feat(signer): parallel loading feat(signer): load keys in parallel Jul 4, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR parallelizes key loading by leveraging Rayon for concurrent decryption and updates dependency versions and workspace settings.

  • Added rayon and jsonwebtoken as workspace dependencies in signer and common crates
  • Refactored load_from_* functions to collect directory entries and decrypt in parallel
  • Updated eth2_keystore dependency in root Cargo.toml to use a Git tag instead of a specific revision

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

File Description
crates/signer/Cargo.toml Added jsonwebtoken workspace entry
crates/common/src/signer/loader.rs Refactored sequential loops to parallel iterations with Rayon
crates/common/Cargo.toml Added jsonwebtoken and rayon workspace entries
Cargo.toml Changed eth2_keystore from a git revision to a git tag and added rayon dependency
Comments suppressed due to low confidence (2)

crates/common/src/signer/loader.rs:112

  • Parallel loading paths introduce concurrency concerns. Add unit or integration tests to verify correct behavior across different directory structures and error cases.
fn load_from_lighthouse_format(

Cargo.toml:39

  • Pinning to a moving Git tag can undermine reproducible builds. Consider using a specific commit SHA for deterministic dependency resolution.
eth2_keystore = { git = "https://github.com/sigp/lighthouse", tag = "v7.0.1" }

@ltitanb ltitanb added the signer Signer module label Jul 4, 2025
@ltitanb ltitanb merged commit f4a3a7f into main Jul 7, 2025
2 of 3 checks passed
@ltitanb ltitanb deleted the lt/parallel-loading branch July 7, 2025 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
signer Signer module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants