lambda_ethereum_consensus icon indicating copy to clipboard operation
lambda_ethereum_consensus copied to clipboard

Load KZG's trusted setup only once

Open MegaRedHand opened this issue 1 year ago • 1 comments

#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

MegaRedHand avatar Mar 06 '24 16:03 MegaRedHand

I will unassign myself from this. I am not able to work on this atm.

I am sorry for the delay.

Godspower-Eze avatar Mar 30 '24 07:03 Godspower-Eze