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

chore(docs): Core concepts page in getting-started #3401

Merged
merged 15 commits into from
Nov 28, 2023

Conversation

catmcgee
Copy link
Contributor

@catmcgee catmcgee commented Nov 22, 2023

A page in getting-started for devs to understand the bare minimum concepts of Aztec before they code. Closes #3398

Checklist:

Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge.

  • If the pull request requires a cryptography review (e.g. cryptographic algorithm implementations) I have added the 'crypto' tag.
  • I have reviewed my diff in github, line by line and removed unexpected formatting changes, testing logs, or commented-out code.
  • Every change is related to the PR description.
  • I have linked this pull request to relevant issues (if any exist).

@catmcgee catmcgee marked this pull request as ready for review November 27, 2023 07:31
@catmcgee catmcgee requested a review from critesjosh November 27, 2023 07:31
@AztecBot
Copy link
Collaborator

AztecBot commented Nov 27, 2023

Benchmark results

Metrics with a significant change:

  • note_trial_decrypting_time_in_ms (8): 5.16 (-45%)
  • note_trial_decrypting_time_in_ms (32): 13.1 (-88%)
Detailed results

All benchmarks are run on txs on the Benchmarking contract on the repository. Each tx consists of a batch call to create_note and increment_balance, which guarantees that each tx has a private call, a nested private call, a public call, and a nested public call, as well as an emitted private note, an unencrypted log, and public storage read and write.

This benchmark source data is available in JSON format on S3 here.

Values are compared against data from master at commit c4e4745d and shown if the difference exceeds 1%.

L2 block published to L1

Each column represents the number of txs on an L2 block published to L1.

Metric 8 txs 32 txs 128 txs
l1_rollup_calldata_size_in_bytes 45,444 179,588 716,132
l1_rollup_calldata_gas 222,924 868,172 3,449,324
l1_rollup_execution_gas 842,011 3,595,280 22,204,693
l2_block_processing_time_in_ms 2,051 (+1%) 7,640 29,996
note_successful_decrypting_time_in_ms 302 (-2%) 903 (+1%) 3,273
note_trial_decrypting_time_in_ms ⚠️ 5.16 (-45%) ⚠️ 13.1 (-88%) 140 (-1%)
l2_block_building_time_in_ms 25,254 100,609 401,550
l2_block_rollup_simulation_time_in_ms 17,698 (+1%) 70,509 280,547
l2_block_public_tx_process_time_in_ms 7,512 29,954 120,446

L2 chain processing

Each column represents the number of blocks on the L2 chain where each block has 16 txs.

Metric 5 blocks 10 blocks
node_history_sync_time_in_ms 22,094 42,631 (-1%)
note_history_successful_decrypting_time_in_ms 2,153 (+1%) 4,075 (-2%)
note_history_trial_decrypting_time_in_ms 126 (+1%) 156 (-1%)
node_database_size_in_bytes 1,630,952 1,100,208
pxe_database_size_in_bytes 29,748 59,307

Circuits stats

Stats on running time and I/O sizes collected for every circuit run across all benchmarks.

Circuit circuit_simulation_time_in_ms circuit_input_size_in_bytes circuit_output_size_in_bytes
private-kernel-init 399 43,077 20,441
private-kernel-ordering 126 25,833 9,689
base-rollup 3,177 659,500 873
root-rollup 91.9 (-1%) 4,072 1,097
private-kernel-inner 825 64,484 20,441
public-kernel-private-input 417 25,203 20,441
public-kernel-non-first-iteration 411 25,245 20,441
merge-rollup 10.8 2,592 873

Miscellaneous

Transaction sizes based on how many contracts are deployed in the tx.

Metric 0 deployed contracts 1 deployed contracts
tx_size_in_bytes 10,323 29,083

Copy link
Contributor

@critesjosh critesjosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this is a great addition! Just a few minor suggestions.

docs/docs/dev_docs/getting_started/core-concepts.md Outdated Show resolved Hide resolved
docs/docs/dev_docs/getting_started/core-concepts.md Outdated Show resolved Hide resolved
docs/docs/dev_docs/getting_started/core-concepts.md Outdated Show resolved Hide resolved
docs/docs/dev_docs/getting_started/core-concepts.md Outdated Show resolved Hide resolved
The `init` function must declare the storage struct with an instantiation defining how variables are accessed and manipulated. Each variable must be given a storage slot, which can be anything except 0.

The impl block is likely to be abstracted away at a later date.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we a link to this page for further reading?

This is achieved through portals - these are smart contracts written in Solidity that are related to the Ethereum smart contract you want to interact with.

A portal can be associated with multiple Aztec contracts, but an Aztec contract can only be associated with one portal.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a link to this page for further reading?

Every account in Aztec is a smart contract. This allows implementing different schemes for transaction signing, nonce management, and fee payments.

You can write your own account contract to define the rules by which user transactions are authorized and paid for, as well as how user keys are managed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs/docs/dev_docs/getting_started/core-concepts.md Outdated Show resolved Hide resolved
You can write your own account contract to define the rules by which user transactions are authorized and paid for, as well as how user keys are managed.

# Noir Language
Aztec smart contracts are written in a framework on top of Noir, the zero-knowledge domain-specific language developed specifically for Aztec. It is similar to Rust. Outside of Aztec, Noir is used for writing circuits that can be verified in Solidity.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Aztec smart contracts are written in a framework on top of Noir, the zero-knowledge domain-specific language developed specifically for Aztec. It is similar to Rust. Outside of Aztec, Noir is used for writing circuits that can be verified in Solidity.
Aztec smart contracts are written in a framework on top of Noir, the zero-knowledge domain-specific language developed specifically for Aztec. It's syntax is similar to Rust. Outside of Aztec, Noir is used for writing circuits that can be verified in Solidity.

@catmcgee catmcgee enabled auto-merge (squash) November 28, 2023 07:24
@catmcgee catmcgee disabled auto-merge November 28, 2023 12:02
Copy link
Contributor

@signorecello signorecello left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@catmcgee catmcgee merged commit 1a62f73 into master Nov 28, 2023
3 checks passed
@catmcgee catmcgee deleted the docs-dev-concepts-one-pager branch November 28, 2023 13:27
spypsy pushed a commit that referenced this pull request Nov 28, 2023
🤖 I have created a release *beep* *boop*
---


<details><summary>aztec-packages: 0.16.1</summary>

##
[0.16.1](aztec-packages-v0.16.0...aztec-packages-v0.16.1)
(2023-11-28)


### Features

* Added poseidon2 hash function to barretenberg/crypto
([#3118](#3118))
([d47782b](d47782b))
* Aztec CI files in Noir
([#3430](#3430))
([1621f3a](1621f3a))
* Persistent archiver store
([#3410](#3410))
([4735bde](4735bde)),
closes
[#3361](#3361)


### Bug Fixes

* **ci:** Don't leave DRY_DEPLOY unset
([#3449](#3449))
([454e316](454e316))
* **ci:** Publishing dockerhub manifests
([#3451](#3451))
([a59e7f0](a59e7f0))
* Hotfix noir sync
([#3436](#3436))
([c4e4745](c4e4745))


### Miscellaneous

* **docs:** Core concepts page in getting-started
([#3401](#3401))
([1a62f73](1a62f73))
* Point acir tests at noir master branch
([#3440](#3440))
([106e690](106e690))


### Documentation

* Further updates to the gas and fees whitepaper
([#3448](#3448))
([4152ba6](4152ba6))
* Updates to gas and fees yellow paper
([#3438](#3438))
([5f0e1ca](5f0e1ca))
</details>

<details><summary>barretenberg.js: 0.16.1</summary>

##
[0.16.1](barretenberg.js-v0.16.0...barretenberg.js-v0.16.1)
(2023-11-28)


### Miscellaneous

* **barretenberg.js:** Synchronize aztec-packages versions
</details>

<details><summary>barretenberg: 0.16.1</summary>

##
[0.16.1](barretenberg-v0.16.0...barretenberg-v0.16.1)
(2023-11-28)


### Features

* Added poseidon2 hash function to barretenberg/crypto
([#3118](#3118))
([d47782b](d47782b))


### Miscellaneous

* Point acir tests at noir master branch
([#3440](#3440))
([106e690](106e690))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Maddiaa0 pushed a commit that referenced this pull request Nov 28, 2023
A page in getting-started for devs to understand the bare minimum
concepts of Aztec before they code. Closes
#3398

# Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if
the PR is ready to merge.
- [x] If the pull request requires a cryptography review (e.g.
cryptographic algorithm implementations) I have added the 'crypto' tag.
- [x] I have reviewed my diff in github, line by line and removed
unexpected formatting changes, testing logs, or commented-out code.
- [ ] Every change is related to the PR description.
- [ ] I have
[linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
this pull request to relevant issues (if any exist).

---------

Co-authored-by: josh crites <critesjosh@gmail.com>
AztecBot added a commit to AztecProtocol/barretenberg that referenced this pull request Nov 29, 2023
🤖 I have created a release *beep* *boop*
---


<details><summary>aztec-packages: 0.16.1</summary>

##
[0.16.1](AztecProtocol/aztec-packages@aztec-packages-v0.16.0...aztec-packages-v0.16.1)
(2023-11-28)


### Features

* Added poseidon2 hash function to barretenberg/crypto
([#3118](AztecProtocol/aztec-packages#3118))
([d47782b](AztecProtocol/aztec-packages@d47782b))
* Aztec CI files in Noir
([#3430](AztecProtocol/aztec-packages#3430))
([1621f3a](AztecProtocol/aztec-packages@1621f3a))
* Persistent archiver store
([#3410](AztecProtocol/aztec-packages#3410))
([4735bde](AztecProtocol/aztec-packages@4735bde)),
closes
[#3361](AztecProtocol/aztec-packages#3361)


### Bug Fixes

* **ci:** Don't leave DRY_DEPLOY unset
([#3449](AztecProtocol/aztec-packages#3449))
([454e316](AztecProtocol/aztec-packages@454e316))
* **ci:** Publishing dockerhub manifests
([#3451](AztecProtocol/aztec-packages#3451))
([a59e7f0](AztecProtocol/aztec-packages@a59e7f0))
* Hotfix noir sync
([#3436](AztecProtocol/aztec-packages#3436))
([c4e4745](AztecProtocol/aztec-packages@c4e4745))


### Miscellaneous

* **docs:** Core concepts page in getting-started
([#3401](AztecProtocol/aztec-packages#3401))
([1a62f73](AztecProtocol/aztec-packages@1a62f73))
* Point acir tests at noir master branch
([#3440](AztecProtocol/aztec-packages#3440))
([106e690](AztecProtocol/aztec-packages@106e690))


### Documentation

* Further updates to the gas and fees whitepaper
([#3448](AztecProtocol/aztec-packages#3448))
([4152ba6](AztecProtocol/aztec-packages@4152ba6))
* Updates to gas and fees yellow paper
([#3438](AztecProtocol/aztec-packages#3438))
([5f0e1ca](AztecProtocol/aztec-packages@5f0e1ca))
</details>

<details><summary>barretenberg.js: 0.16.1</summary>

##
[0.16.1](AztecProtocol/aztec-packages@barretenberg.js-v0.16.0...barretenberg.js-v0.16.1)
(2023-11-28)


### Miscellaneous

* **barretenberg.js:** Synchronize aztec-packages versions
</details>

<details><summary>barretenberg: 0.16.1</summary>

##
[0.16.1](AztecProtocol/aztec-packages@barretenberg-v0.16.0...barretenberg-v0.16.1)
(2023-11-28)


### Features

* Added poseidon2 hash function to barretenberg/crypto
([#3118](AztecProtocol/aztec-packages#3118))
([d47782b](AztecProtocol/aztec-packages@d47782b))


### Miscellaneous

* Point acir tests at noir master branch
([#3440](AztecProtocol/aztec-packages#3440))
([106e690](AztecProtocol/aztec-packages@106e690))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Docs: One-pager in getting-started for concepts devs should know
4 participants