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

Avoid multiple copies of bb.js being loaded #1839

Open
spalladino opened this issue Aug 28, 2023 · 1 comment
Open

Avoid multiple copies of bb.js being loaded #1839

spalladino opened this issue Aug 28, 2023 · 1 comment

Comments

@spalladino
Copy link
Contributor

Today aztec.js depends on both types and circuits.js, and types also depends on circuits.js. It can happen that npm or yarn decides to install a copy of circuits.js within aztec.js and another within types, in case there's already a circuits.js in the root of node_modules with a different version. This has led to serialisation issues (see #1826), and can lead to multiple copies of the circuits wasm being loaded, which can have an impact on memory usage.

We should explore whether removing the dependency from aztec.js to circuits.js (and instead having types re-export everything that's needed) would solve the issue. This also requires analysing all other dependencies to circuits.js.

@github-project-automation github-project-automation bot moved this to Todo in A3 Aug 28, 2023
@spalladino spalladino changed the title Avoid multiple copies of circuits.js being loaded Avoid multiple copies of bb.js being loaded Jan 5, 2024
@spalladino
Copy link
Contributor Author

Updating the issue since this now may happen with foundation and circuits.js both importing bb.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant