Skip to content

test framework: optimize key manager's memory usage#460

Merged
unnawut merged 1 commit intoleanEthereum:mainfrom
unnawut:optimize-keys
Mar 18, 2026
Merged

test framework: optimize key manager's memory usage#460
unnawut merged 1 commit intoleanEthereum:mainfrom
unnawut:optimize-keys

Conversation

@unnawut
Copy link
Collaborator

@unnawut unnawut commented Mar 18, 2026

🗒️ Description

Instead of loading the public and private keys for all 12 validators...

  1. Loads only the public key by default which is already relatively very small
  2. Loads the private key only when signing is needed, advance it to next epoch (slot) after signing, then serializes back to SSZ (this avoids holding the deserialized key with millions of FP objects that was taking many hundreds of MB per key)

🔗 Related Issues or PRs

Closes #458

✅ Checklist

  • Ran tox checks to avoid unnecessary CI fails:
    uvx tox
  • Considered adding appropriate tests for the changes.
  • Considered updating the online docs in the ./docs/ directory.

@unnawut unnawut requested a review from tcoratger March 18, 2026 14:10
@unnawut unnawut self-assigned this Mar 18, 2026
@unnawut unnawut added the framework Scope: Changes to the testing framework label Mar 18, 2026
@unnawut
Copy link
Collaborator Author

unnawut commented Mar 18, 2026

oooh much faster build job too

image

@unnawut unnawut merged commit e73c707 into leanEthereum:main Mar 18, 2026
12 checks passed
@unnawut unnawut deleted the optimize-keys branch March 18, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

framework Scope: Changes to the testing framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

prod test vectors failing likely due to key split

1 participant