Aztec components interaction

After reading other posts and lastly erayajk post about Aztec Technical Aspects I found the following questions can be valuable for devs coming from the community as me.

As I understood from the context,
Aztec allows developers to build privacy preserving smart contracts, ZK-Snark programming language, Noir.
After checking documentation and reading articles about Aztec I have following mostly architecture-related questions.

  1. Why do we need barretenberg? What is its place in the project?

  2. Why do we need noir? I know that it’s a custom language made by the Aztec team for creating circuits but maybe showing its functionality inside the whole project will give more insight.

  3. Why we are using typescript(not only) here?.

  4. Is this package consists of most of the functionalities or why there are different languages there with similar rate?
    TypeScript 53.5%
    C++ 34.4%
    Solidity 4.8%
    Roff 4.0%

  5. Do we have the picture overall design where I can see entry points and the flow between all of these components?

I am interested in smart contract vulnerabilities and the product itself. I set up aztec-packages and barretenberg in my local, run tests successfully understood the role of Rollup, Decoder, and other few smart contracts functionalities but still not clear about product flow.

36 Likes

Hi @BZAghalarov.

  1. Barretenberg is our crypto backend, used for general cryptographic implementations, building circuits and backend for noir. It is what noir uses to generate circuits in the end and it generates the proofs (@kevaundray can correct me if I am misspeaking on noir).
  2. We use noir for writing contracts that need to deal with the new types of storage that we need to have private and public execution. Right now, the syntax and things are very much a work in progress, but you can see some tiny example contracts at aztec-packages/yarn-project/noir-contracts at master · AztecProtocol/aztec-packages · GitHub.
  3. The Aztec Packages repo is a mono-repo for what is going into the Aztec Network, so it got smart contracts for L1 that verify L2 blocks and a reference implementation for node and sequencer software that handles state and generate proofs.
  4. See above. The roff usage is really noir, but it is not yet showing correctly in github :sob:, @kevaundray or @Savio on the case? :eyes:
  5. Not fully sure if there is a large picture lying around, @Mike or @charlie you might have a diagram lying around?

The contracts in the l1-contracts dir are very much in progress atm when we are building out the individual pieces and stitching them together. As mentioned, Noir contracts is still somewhat early stage and we are figuring out what we are missing to make sure that private execution can be as useful and expressive as possible so there is not a lot to really try out there right now, but there will be in the future :slight_smile:

Hope this helped a bit

8 Likes

The roff usage is really noir, but it is not yet showing correctly in github :sob:, @kevaundray or @Savio on the case? :eyes:

Proper Linguist support for Noir would enable GitHub to pick the language up correctly, but we’re not there yet re Linguist’s requirements on Noir’s popularity.

If you get a chance, do give Noir a try!

11 Likes