Skip to content

Load KZG's trusted setup only once #848

Open
@MegaRedHand

Description

@MegaRedHand

#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

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomersperfperformance-related PRs or issues

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions