Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out how to re-use trusted setup across builds #13

Open
acolytec3 opened this issue Apr 18, 2024 · 0 comments
Open

Figure out how to re-use trusted setup across builds #13

acolytec3 opened this issue Apr 18, 2024 · 0 comments
Labels
good first issue Good for newcomers

Comments

@acolytec3
Copy link
Collaborator

The current published version of kzg-wasm duplicates the trusted_setup.js file across all three build outputs since it's a Javascript object and requires either a CJS or ESM export style (i.e. module.exports vs export ...). This balloons the bundle size considerably and is really unnecessary.

Ideally, the trusted setup should be converted to something like binary, maybe stored in the the dist/wasm directory alongside the WASM bundle, and then loaded in loadKZG if no alternative trusted setup is provided. It's important that we don't introduce any other deps toward the aim of compressing this. If the trusted setup can't be compressed using either node builtins or browser APIs, we should just use raw binary. Even that should decrease the size of the overall module considerably.

@acolytec3 acolytec3 added the good first issue Good for newcomers label Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant