lambdaclass / lambdaclass/lambda_ethereum_consensus
Load KZG's trusted setup only once
Open
Nobody has claimed this yet.
good first issue
perf
- Dominant language
- Elixir
- Stars
- 109
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
#780 introduces the new Kzg module, but the Rust part of the NIF loads a trusted setup on every function call. We should change this so it's loaded only once at module initialization, but preferably at compile-time.
Some ideas:
- embed the file in the compiled binary (
include_bytes!) - use static variables to cache the parsed file (
std::sync::Once) - add some init function to run on module load
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the Rust part of the NIF introduced by #780 and the new Kzg module. Trace where the trusted setup is loaded during each function call, then determine how module initialization or compile-time embedding fits the existing design. Done means the trusted setup is loaded only once rather than per call.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir, rust
- Domain
- backend, cryptography
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100