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

feat: crowdfunding contract #4917

Merged
merged 61 commits into from
Mar 7, 2024
Merged

feat: crowdfunding contract #4917

merged 61 commits into from
Mar 7, 2024

Conversation

benesjan
Copy link
Contributor

@benesjan benesjan commented Mar 4, 2024

Crowdfunding contract implemented during offsite.

@benesjan benesjan marked this pull request as draft March 4, 2024 14:38
Copy link
Contributor Author

benesjan commented Mar 5, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @benesjan and the rest of your teammates on Graphite Graphite

@benesjan benesjan changed the title Aztec crowdfunding feat: crowdfunding contract Mar 5, 2024
@AztecBot
Copy link
Collaborator

AztecBot commented Mar 5, 2024

Benchmark results

Metrics with a significant change:

  • note_trial_decrypting_time_in_ms (8): 102 (+1176%)
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 f6f34b7c 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 64 txs
l1_rollup_calldata_size_in_bytes 5,700 18,884 36,452
l1_rollup_calldata_gas 66,600 239,372 470,156
l1_rollup_execution_gas 194,548 500,678 909,414
l2_block_processing_time_in_ms 1,198 (+1%) 4,490 (+1%) 8,928 (+1%)
note_successful_decrypting_time_in_ms 197 (-2%) 542 (+1%) 994 (+1%)
note_trial_decrypting_time_in_ms ⚠️ 102 (+1176%) 64.0 (+9%) 129 (+14%)
l2_block_building_time_in_ms 11,331 (+1%) 44,973 (+1%) 90,341 (+1%)
l2_block_rollup_simulation_time_in_ms 7,304 29,176 58,955 (+1%)
l2_block_public_tx_process_time_in_ms 3,995 (+2%) 15,716 (+2%) 31,267 (+2%)

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 14,880 (+1%) 29,153 (+4%)
note_history_successful_decrypting_time_in_ms 1,248 (+1%) 2,399 (+1%)
note_history_trial_decrypting_time_in_ms 85.9 (+3%) 140 (+23%)
node_database_size_in_bytes 18,772,048 35,496,016
pxe_database_size_in_bytes 29,923 59,478

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 253 44,736 28,001
private-kernel-ordering 193 (-1%) 52,625 14,627
base-rollup 656 177,932 997
root-rollup 68.2 (-1%) 4,320 825
private-kernel-inner 319 73,715 28,001
public-kernel-app-logic 171 32,254 25,379
merge-rollup 8.46 (-1%) 2,840 997

Tree insertion stats

The duration to insert a fixed batch of leaves into each tree type.

Metric 1 leaves 2 leaves 8 leaves 16 leaves 32 leaves 64 leaves 128 leaves 512 leaves 1024 leaves 2048 leaves 4096 leaves
batch_insert_into_append_only_tree_16_depth_ms 9.74 10.4 (-7%) 16.8 (+13%) 16.1 (-1%) 22.0 35.6 (+1%) N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_count 16.9 17.5 23.0 31.6 47.0 79.0 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_ms 0.566 (-1%) 0.578 (-7%) 0.716 (+13%) 0.497 (-1%) 0.462 0.444 (+1%) N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A N/A N/A N/A 45.6 71.6 (-1%) 231 443 (-1%) 869 1,726
batch_insert_into_append_only_tree_32_depth_hash_count N/A N/A N/A N/A N/A 96.0 159 543 1,055 2,079 4,127
batch_insert_into_append_only_tree_32_depth_hash_ms N/A N/A N/A N/A N/A 0.468 0.442 (-1%) 0.421 0.415 (-1%) 0.412 (-1%) 0.414
batch_insert_into_indexed_tree_20_depth_ms N/A N/A N/A N/A N/A 53.3 106 338 655 (-1%) 1,313 2,614
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A N/A N/A N/A 104 207 691 1,363 2,707 5,395
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A N/A N/A N/A 0.475 (-1%) 0.478 0.458 0.451 (-1%) 0.456 0.454
batch_insert_into_indexed_tree_40_depth_ms N/A N/A N/A N/A 61.4 (+1%) N/A N/A N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_count N/A N/A N/A N/A 109 N/A N/A N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_ms N/A N/A N/A N/A 0.537 N/A N/A N/A N/A N/A N/A

Miscellaneous

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

Metric 0 deployed contracts
tx_size_in_bytes 19,179

Transaction processing duration by data writes.

Metric 0 new note hashes 1 new note hashes
tx_pxe_processing_time_ms 2,710 (+1%) 1,375
Metric 0 public data writes 1 public data writes
tx_sequencer_processing_time_ms 0.0330 (+21%) 476

@sklppy88 sklppy88 self-requested a review March 6, 2024 18:35
@sklppy88 sklppy88 dismissed their stale review March 6, 2024 18:35

stale

Copy link
Contributor

@sklppy88 sklppy88 left a comment

Choose a reason for hiding this comment

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

Wow this is beautiful. 10x better than when what we first hacked together 😄

.circleci/config.yml Outdated Show resolved Hide resolved
benesjan and others added 4 commits March 7, 2024 08:39
@benesjan benesjan requested review from LHerskind and nventuro March 7, 2024 08:33
Copy link
Contributor

@LHerskind LHerskind left a comment

Choose a reason for hiding this comment

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

I restarted CI as it is failing to fetch an image. But looks good 👍

@benesjan benesjan enabled auto-merge (squash) March 7, 2024 11:58
@benesjan benesjan merged commit ba3aff2 into master Mar 7, 2024
94 of 95 checks passed
@benesjan benesjan deleted the aztec_juicebox branch March 7, 2024 12:00
PhilWindle pushed a commit that referenced this pull request Mar 7, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>aztec-package: 0.26.5</summary>

##
[0.26.5](aztec-package-v0.26.4...aztec-package-v0.26.5)
(2024-03-07)


### Features

* Integrated native ACVM
([#4903](#4903))
([3fd7025](3fd7025))
</details>

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

##
[0.26.5](barretenberg.js-v0.26.4...barretenberg.js-v0.26.5)
(2024-03-07)


### Miscellaneous

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

<details><summary>aztec-cli: 0.26.5</summary>

##
[0.26.5](aztec-cli-v0.26.4...aztec-cli-v0.26.5)
(2024-03-07)


### Miscellaneous

* **aztec-cli:** Synchronize aztec-packages versions
</details>

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

##
[0.26.5](aztec-packages-v0.26.4...aztec-packages-v0.26.5)
(2024-03-07)


### Features

* Crowdfunding contract
([#4917](#4917))
([ba3aff2](ba3aff2))
* Integrated native ACVM
([#4903](#4903))
([3fd7025](3fd7025))


### Bug Fixes

* Dependency for yarn-project-tests
([#5031](#5031))
([4b5db50](4b5db50))
* **docs:** Update writing_token_contract.md
([#5020](#5020))
([5b0f38f](5b0f38f))
* End to end dependency fix
([#5029](#5029))
([191ad93](191ad93))
* Missing dependency end-to-end =&gt; yarn-project
([#5018](#5018))
([f930bdd](f930bdd))
* **revert:** "feat(avm): storage"
([#5019](#5019))
([ba31016](ba31016))


### Miscellaneous

* **boxes:** Refactor npx to improve readability, added upgrade option
and manual versioning
([#4855](#4855))
([ef76d3f](ef76d3f))
* Purging calldata hash
([#4984](#4984))
([f6f34b7](f6f34b7))


### Documentation

* Add versions section to updating doc
([#4916](#4916))
([d4d935f](d4d935f))
</details>

<details><summary>barretenberg: 0.26.5</summary>

##
[0.26.5](barretenberg-v0.26.4...barretenberg-v0.26.5)
(2024-03-07)


### Miscellaneous

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

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
AztecBot added a commit to AztecProtocol/barretenberg that referenced this pull request Mar 8, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>aztec-package: 0.26.5</summary>

##
[0.26.5](AztecProtocol/aztec-packages@aztec-package-v0.26.4...aztec-package-v0.26.5)
(2024-03-07)


### Features

* Integrated native ACVM
([#4903](AztecProtocol/aztec-packages#4903))
([3fd7025](AztecProtocol/aztec-packages@3fd7025))
</details>

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

##
[0.26.5](AztecProtocol/aztec-packages@barretenberg.js-v0.26.4...barretenberg.js-v0.26.5)
(2024-03-07)


### Miscellaneous

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

<details><summary>aztec-cli: 0.26.5</summary>

##
[0.26.5](AztecProtocol/aztec-packages@aztec-cli-v0.26.4...aztec-cli-v0.26.5)
(2024-03-07)


### Miscellaneous

* **aztec-cli:** Synchronize aztec-packages versions
</details>

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

##
[0.26.5](AztecProtocol/aztec-packages@aztec-packages-v0.26.4...aztec-packages-v0.26.5)
(2024-03-07)


### Features

* Crowdfunding contract
([#4917](AztecProtocol/aztec-packages#4917))
([ba3aff2](AztecProtocol/aztec-packages@ba3aff2))
* Integrated native ACVM
([#4903](AztecProtocol/aztec-packages#4903))
([3fd7025](AztecProtocol/aztec-packages@3fd7025))


### Bug Fixes

* Dependency for yarn-project-tests
([#5031](AztecProtocol/aztec-packages#5031))
([4b5db50](AztecProtocol/aztec-packages@4b5db50))
* **docs:** Update writing_token_contract.md
([#5020](AztecProtocol/aztec-packages#5020))
([5b0f38f](AztecProtocol/aztec-packages@5b0f38f))
* End to end dependency fix
([#5029](AztecProtocol/aztec-packages#5029))
([191ad93](AztecProtocol/aztec-packages@191ad93))
* Missing dependency end-to-end =&gt; yarn-project
([#5018](AztecProtocol/aztec-packages#5018))
([f930bdd](AztecProtocol/aztec-packages@f930bdd))
* **revert:** "feat(avm): storage"
([#5019](AztecProtocol/aztec-packages#5019))
([ba31016](AztecProtocol/aztec-packages@ba31016))


### Miscellaneous

* **boxes:** Refactor npx to improve readability, added upgrade option
and manual versioning
([#4855](AztecProtocol/aztec-packages#4855))
([ef76d3f](AztecProtocol/aztec-packages@ef76d3f))
* Purging calldata hash
([#4984](AztecProtocol/aztec-packages#4984))
([f6f34b7](AztecProtocol/aztec-packages@f6f34b7))


### Documentation

* Add versions section to updating doc
([#4916](AztecProtocol/aztec-packages#4916))
([d4d935f](AztecProtocol/aztec-packages@d4d935f))
</details>

<details><summary>barretenberg: 0.26.5</summary>

##
[0.26.5](AztecProtocol/aztec-packages@barretenberg-v0.26.4...barretenberg-v0.26.5)
(2024-03-07)


### Miscellaneous

* **barretenberg:** Synchronize aztec-packages versions
</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
None yet
Development

Successfully merging this pull request may close these issues.

7 participants