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

Propose new list of packages in the monorepo to reduce code split #204

Closed
spalladino opened this issue Apr 6, 2023 · 4 comments
Closed
Assignees
Labels
A-internal-devex Area: Relates to the devex of internal teams building Aztec. T-refactor Type: this code needs refactoring

Comments

@spalladino
Copy link
Collaborator

spalladino commented Apr 6, 2023

We currently have around two dozen packages, and interdependencies between them are hard to track. For instance, we already agreed on merging some of them like l2-block and tx into a single one, but we can go further.

Review the list of packages we have today, make a new proposal, get buy in, and implement it. Things to consider:

  • Which packages map to low-level repos (eg bb, circuits.js)
  • Which packages have shared code vs entrypoints (consider moving them to separate parent folders, as suggested here)
  • Which packages will eventually run on the browser, on node, or both

A modern alternative is bundling everything in 1-2 major packages, and make an aggressive use of namespaces, and rely on tree shaking from consumers for reducing bundle size.

@iAmMichaelConnor iAmMichaelConnor added T-refactor Type: this code needs refactoring A-internal-devex Area: Relates to the devex of internal teams building Aztec. labels Apr 8, 2023
@spalladino
Copy link
Collaborator Author

spalladino commented Apr 12, 2023

Going through the package list, after introducing the types package, it seems the split makes sense (or I got used to it!). Still, it could be worthwhile organizing the packages depending on their position in the stack. Consider the following:

Entrypoints

apps folder, contains packages that are starting points for different parts of the system (node, rpc-server, client lib).

  • aztec-cli (currently empty)
  • aztec.js
  • aztec-node
  • aztec-rpc

Modules

modules folder, contains packages each with a responsibility specific to an aztec3 module (sequencer, simulator, etc), which power the apps.

  • acir-simulator
  • archiver
  • kernel-prover (single file) -> Consider moving into aztec-rpc
  • key-store (currently empty)
  • p2p
  • prover-client (currently empty)
  • sequencer-client
  • world-state

Wrappers

wrappers folder, packages that wrap imported functionality.

  • bb.js
  • circuits.js
  • l1-contracts

Libraries

libs folder, contains generic shared code or base models.

  • ethereum.js
  • merkle-trees
  • foundation
  • noir-contracts -> Unsure what exactly goes in here, maybe it's a module?
  • types

Other:

misc folder, everything else.

  • docs
  • end-to-end
  • yarn-project-base -> Could be kept at the root of the tree?

@spalladino spalladino self-assigned this Apr 12, 2023
@spalladino
Copy link
Collaborator Author

spalladino commented Apr 17, 2023

Given lack of traction, and how disruptive a change like this is, I'm tempting to close this one as wontfix. Thoughts @ludamad @PhilWindle @rahul-kothari..?

@rahul-kothari
Copy link
Contributor

Tempted to agree - bigger fish to fry for now it seems

@PhilWindle
Copy link
Collaborator

I agree, leave for now.

@spalladino spalladino closed this as not planned Won't fix, can't repro, duplicate, stale Apr 18, 2023
ludamad pushed a commit that referenced this issue Jul 14, 2023
* feat: Add Noir DSL with acir_format and turbo_proofs namespaces

* chore: Upstream changes to fix proving key serialization in turbo_proofs (#204)
---------

Co-authored-by: kevaundray <kevtheappdev@gmail.com>
Co-authored-by: Maxim Vezenov <mvezenov@gmail.com>
codygunton pushed a commit that referenced this issue Jan 23, 2024
* feat: Add Noir DSL with acir_format and turbo_proofs namespaces

* chore: Upstream changes to fix proving key serialization in turbo_proofs (#204)
---------

Co-authored-by: kevaundray <kevtheappdev@gmail.com>
Co-authored-by: Maxim Vezenov <mvezenov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-internal-devex Area: Relates to the devex of internal teams building Aztec. T-refactor Type: this code needs refactoring
Projects
None yet
Development

No branches or pull requests

4 participants