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: add tree snapshots #3468

Merged
merged 11 commits into from
Dec 1, 2023
Merged

feat: add tree snapshots #3468

merged 11 commits into from
Dec 1, 2023

Conversation

alexghr
Copy link
Contributor

@alexghr alexghr commented Nov 29, 2023

This PR adds two different algorithms to create snapshots of merkle trees.

Notation

N - number of non-zero nodes
H - height of tree
M - number of snapshots

Incremental Full snapshots

This algorithm stores the trees in a database instance in the same way they would be stored using pointers in memory. Each node has two key-value entries in the database: one for its left child and one for its right child.

Taking a snapshot means just walking the tree (BF order), storing any new nodes. If we hit a node that already exists in the database, that means the subtree rooted at that node has not changed and so we can skip checking it.

Building a sibling path is just a traversal of the tree from historic root to historic leaf.

Pros:

  1. its generic enough that it works with any type of merkle tree (one caveat: we'll need an extension to store historic leaf values for indexed-trees)
  2. it shares structure with other versions of the tree: if some subtree hasn't changed between two snapshots then it will be reused for both snapshots (would work well for append-only trees)
  3. getting a historic sibling path is extremely cheap only requiring O(H) database reads

Cons:

  1. it takes up a space to store every snapshot. Worst case scenario it would take up an extra O(N * M) space (ie. the tree changes entirely after every snapshot). For append-only trees it would be more space-efficient (e.g. once we start filling the right subtree, the left subtree will be shared by every future snapshot).

More details in this comment #3207 (comment).

Append-only snapshots

For append-only trees we can have an infinite number of snapshots with just O(N + M) extra space (N - number of nodes in the tree, M - number of snapshots) at the cost of sibling paths possibly requiring O(H) hashes.

This way of storing snapshots only works for AppendOnlyTree and exploits two properties of this type of tree:

  1. once a leaf is set, it can never be changed (i.e. the tree is append-only). This property can be generalised to: once a subtree is completely filled then none of its nodes can ever change.
  2. there are no gaps in the leaves: at any moment in time T we can say that the first K leaves of the tree are filled and the last 2^H-K leaves are zeroes.

The algorithm stores a copy of the tree in the database:

  • the last snapshot of that node (ie v1, v2, etc)
  • the node value at that snapshot

Taking the snapshot is also a BF traversal of the tree, comparing the current value of nodes with its previously stored value. If the value is different we update both entries. If the values are the same then the node hasn't changed and by the first property, none of the nodes in its subtree have changed so it returns early. For each snapshot we also store how many leaves have been filled (e.g. at v1 we had 10 leaves, at v2 33 leaves, etc)

Building a sibling path is more involved and could potentially require O(H) hashes:

  1. walk the historic tree from leaf to root
  2. check the sibling's last snapshot
  • if it's before the target snapshot version then we can safely use the node (e.g. node A was last changed at time T3 and we're building a proof for the tree at time T10, then by property 1 we can conclude that neither node A nor the subtree rooted at A will ever change at any moment in time Tn where n > 3)
  • if the node has changed then we have to rebuild its historic value at the snapshot we're interested in
    • to do this we check how "wide" the subtree rooted at that node is (e.g. what's the first leaf index of the subtree) and if it intersects with the filled leaf set at that snapshot. If it doesn't intersect at all (e.g. my subtree's first leaf is 11 but only 5 leaves were filled at the time) then we can safely conclude that the whole subtree has some hash of zeros
    • if it does intersect go down one level and level apply step 2 again.
    • the invariant is: we will either reach a leaf and that leaf was changed in the version we're interested in, or we reach a node that was changed before the version we're interested in (and we return early) or we reach a node that was historically a hash of zero

Two (big) SVGs showing the sibling path algorithm step-by-step

Average case

Drawing of sibling path algorithm in the worst case

Pros:

  • low space requirements only needing O(N+M) extra space.

Cons:

  • generating a sibling path involves mixed workload: partly reading from the database and partly hashing. Worst case scenario O(H) db reads + O(H) hashing
  • doesn't work for IndexedTrees because even though it only supports appending new leaves, internally it updates its leaf values.

Fix #3207

@alexghr
Copy link
Contributor Author

alexghr commented Nov 29, 2023

Maybe I should rename "incremental" to "full snapshots" to differentiate the two implementations better?

@AztecBot
Copy link
Collaborator

AztecBot commented Nov 29, 2023

Benchmark results

Metrics with a significant change:

  • node_database_size_in_bytes (10): 5,015,749 (+38%)
  • note_history_trial_decrypting_time_in_ms (10): 349 (+52%)
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 a138860b 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,972 868,172 3,447,800
l1_rollup_execution_gas 842,059 3,595,280 22,203,169
l2_block_processing_time_in_ms 2,255 (+9%) 8,440 (+4%) 35,278 (+6%)
note_successful_decrypting_time_in_ms 317 931 (+1%) 3,327 (-3%)
note_trial_decrypting_time_in_ms 25.5 (-8%) 57.9 (+16%) 199
l2_block_building_time_in_ms 20,627 (+1%) 80,990 324,176
l2_block_rollup_simulation_time_in_ms 17,063 (+1%) 67,035 268,176
l2_block_public_tx_process_time_in_ms 3,514 13,806 55,444

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 24,731 (+7%) 47,284 (+5%)
note_history_successful_decrypting_time_in_ms 2,206 (+2%) 4,278 (+2%)
note_history_trial_decrypting_time_in_ms 164 (+3%) ⚠️ 349 (+52%)
node_database_size_in_bytes 2,799,587 (-15%) ⚠️ 5,015,749 (+38%)
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 199 43,077 20,441
private-kernel-ordering 115 25,833 9,689
base-rollup 2,957 664,108 873
root-rollup 84.6 (-3%) 4,072 1,097
private-kernel-inner 259 64,484 20,441
public-kernel-private-input 171 25,203 20,441
public-kernel-non-first-iteration 168 25,245 20,441
merge-rollup 10.8 (-2%) 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 25,938

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.

Good job. Think this makes a lot of sense, mostly got some nits really.

The main thing we might need to consider is that require all the snapshots here to be taking throughout the process of building.

Something that could be done to reduce space requirements would be to only store snapshots for every 10'th block, and then apply a few blocks if needing values from in between these.

* Complexity:
*
* N - count of non-zero nodes in tree
* M - count of snapshots
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is M used?

It is not fully clear to me that there are no influence of M, I would say you are storing at the least "something" for every snapshot because you need the meta etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yes, you're right, I totally forgot. So the space requirements would be O(N + M). O(N) to store a copy of the tree and O(M) to store for each snapshot up to which leaf index it's written to.

export class AppendOnlySnapshotBuilder implements SnapshotBuilder {
constructor(private db: LevelUp, private tree: TreeBase & AppendOnlyTree, private hasher: Hasher) {}
async getSnapshot(version: number): Promise<SiblingPathSource> {
const filledLeavesAtVersion = await this.#getLeafCountAtVersion(version);
Copy link
Contributor

Choose a reason for hiding this comment

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

Would rename the var to convey the "count" as well. Use leafCountAtVersion as later as well.

const treeName = this.tree.getName();
const queue: [Buffer, number, bigint][] = [[root, 0, 0n]];

// walk the BF and update latest values
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the BF in this case, breadth first?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes


const nodeVersionKey = (name: string, level: number, index: bigint) =>
`snapshot:${name}:node:${level}:${index}:version`;
const nodePreviousValueKey = (name: string, level: number, index: bigint) =>
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this one is actually previous, consider changing to just nodeValueKey.

return new AppendOnlySnapshot(this.db, version, filledLeavesAtVersion, this.tree, this.hasher);
}

async snapshot(version: number): Promise<SiblingPathSource> {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the naming version is a bit weird for the snapshots. As I read it, you are using it as a snapshot id, so I would rather use that to not confuse version as the variant of snapshot (full/append-only).
Also since we are expected to be using it for block numbers, might be useful to think about that.

import { TreeBase } from '../tree_base.js';
import { SnapshotBuilder } from './snapshot_builder.js';

const nodeVersionKey = (name: string, level: number, index: bigint) =>
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be neat with a one line comment for each of these keys for what is to be stored at them.

private hasher: Hasher,
) {}

public async getSiblingPath<N extends number>(index: bigint, _: boolean): Promise<SiblingPath<N>> {
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the _: boolean in here? What is its purpose?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It comes from the SiblingPathSource interface and it's whether to include uncommitted data in the path. Oh I could even remove the parameter and TS should still be happy 🤔


const version = 1;
await snapshotBuilder.snapshot(version);
await expect(snapshotBuilder.snapshot(version)).rejects.toThrow();
Copy link
Contributor

Choose a reason for hiding this comment

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

Not clear to me if we want it to throw or just to return the one it already made?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh good shout!


await snapshotBuilder.snapshot(2);

for (const [index, path] of historicPaths.entries()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The values you are matching are both defined before you modify anything so it don't make a lot of difference. Seems like the historicPaths should only be computed after the second snapshot to show it. Otherwise the test is the same as returns the same path if tree has not advanced.

I think this test can be removed as it is covered be the other ones.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fair, I think I wanted to prove to myself that snapshotting again does not modify any prior sibling paths I had generated. But now that I say it out loud the test indeed doesn't make sense 😅

export class IncrementalSnapshotBuilder implements SnapshotBuilder {
constructor(private db: LevelUp, private tree: TreeBase) {}

async snapshot(version: number): Promise<SiblingPathSource> {
Copy link
Contributor

Choose a reason for hiding this comment

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

As before I'm not a fan of the version naming.

@PhilWindle
Copy link
Collaborator

This is great. So with this we have a space efficient way of generating snapshots for append only trees. Sparse trees probably more space than we would ideally like but we may be getting rid of the only sparse tree in favour of an indexed tree.

The indexed tree is still to be modified. Hopefully we can find a way to snapshot it that is more efficient than the sparse tree.

@alexghr
Copy link
Contributor Author

alexghr commented Nov 29, 2023

Something that could be done to reduce space requirements would be to only store snapshots for every 10'th block, and then apply a few blocks if needing values from in between these.

Yeah, that's a good idea Lasse. Controlling the granularity of snapshots would be a good thing to add. Do you think that would something we need right away or would we be able to work on it at a later date?

The indexed tree is still to be modified. Hopefully we can find a way to snapshot it that is more efficient than the sparse tree.

Just pushed a 3rd "full snapshot" implementation for indexed trees that saves the leaf values as well

@alexghr alexghr marked this pull request as ready for review November 29, 2023 20:07
@alexghr
Copy link
Contributor Author

alexghr commented Nov 30, 2023

Heya folks, I've updated WorldState to snapshot the trees after every block. The world state now exposes a getSnapshot(block: number): MerkleTreeOperations API to look at the state as it was at the given time. LMK what you think

@PhilWindle PhilWindle enabled auto-merge (squash) December 1, 2023 13:58
@PhilWindle PhilWindle merged commit 7a86bb3 into master Dec 1, 2023
79 of 81 checks passed
@PhilWindle PhilWindle deleted the alexg/feat/snapshot-trees branch December 1, 2023 14:18
rahul-kothari pushed a commit that referenced this pull request Dec 5, 2023
🤖 I have created a release *beep* *boop*
---


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

##
[0.16.2](aztec-packages-v0.16.1...aztec-packages-v0.16.2)
(2023-12-05)


### Features

* Add tree snapshots
([#3468](#3468))
([7a86bb3](7a86bb3))
* **AVM:** First version for mini AVM (ADD, RETURN, CALLDATACOPY)
([#3439](#3439))
([b3af146](b3af146))
* Circuit optimized indexed tree batch insertion
([#3367](#3367))
([187d2f7](187d2f7))
* Devnet
([#3473](#3473))
([97c40c2](97c40c2))
* **docs:** Add simple private voting tutorial
([#3402](#3402))
([a6e0352](a6e0352))
* **docs:** Document slow update tree
([#3416](#3416))
([8e9f103](8e9f103))
* Flavor refactor, reduce duplication
([#3407](#3407))
([8d6b013](8d6b013))
* Inclusion and non-inclusion proofs experiment
([#3255](#3255))
([b911e65](b911e65)),
closes
[#2572](#2572)
[#2584](#2584)
* New Poseidon2 circuit builder gates
([#3346](#3346))
([91cb369](91cb369))
* New Poseidon2 relations
([#3406](#3406))
([14b9736](14b9736))
* Pull latest noir for brillig optimizations
([#3464](#3464))
([d356bac](d356bac))
* Refactor StandardIndexedTree for abstract leaves and preimages and
optimized it
([#3530](#3530))
([63b9cdc](63b9cdc))
* Removing historical roots from circuits
([#3544](#3544))
([9f682cb](9f682cb))
* Seperate pil files for sub machines
([#3454](#3454))
([d09d6f5](d09d6f5))
* Throw compile time error if contract has too many fns
([#3536](#3536))
([ad66ad0](ad66ad0))
* Use tree snapshots in aztec-node/pxe/oracles
([#3504](#3504))
([6e40427](6e40427))
* Yellow paper cross-chain communication
([#3477](#3477))
([d51df8c](d51df8c))


### Bug Fixes

* Check version, chainid and sender for cross-chain l1 to l2 msgs
([#3457](#3457))
([d251703](d251703))
* **ci:** Add DEPLOY_TAG in fork log group
([#3510](#3510))
([f021041](f021041))
* **ci:** Check if l1 contracts img has been deployed
([#3531](#3531))
([ac1f03c](ac1f03c))
* **ci:** Comment out LB listeners (for now)
([#3519](#3519))
([640aabc](640aabc))
* **ci:** Count for bootnode discovery service
([#3517](#3517))
([2a38788](2a38788))
* **ci:** Define REPOSITORY in deploy_l1_contracts
([#3514](#3514))
([b246d1b](b246d1b))
* **ci:** Don't deploy to npm on master merge
([#3502](#3502))
([a138860](a138860))
* **ci:** Env vars for deploying l1-contracts
([#3513](#3513))
([27106b2](27106b2))
* **ci:** Export FORK_API_KEY from setup_env
([#3512](#3512))
([7e81e2c](7e81e2c))
* **ci:** Fix docker architecture for devnet packages
([#3505](#3505))
([66d0287](66d0287))
* **ci:** Fix faucet vars + don't deploy contracts from node
([#3553](#3553))
([c7176f6](c7176f6))
* **ci:** L1 contracts directories
([#3545](#3545))
([63dd0c8](63dd0c8))
* **ci:** Login to ecr to fetch contracts image
([#3538](#3538))
([b033538](b033538))
* **ci:** Remove unused ADDRESS vars & export private key vars
([#3520](#3520))
([d889359](d889359))
* **ci:** Set default value for $TO_TAINT
([#3508](#3508))
([8b6688a](8b6688a))
* **ci:** Terraform listener resources
([#3534](#3534))
([c3b9cce](c3b9cce))
* **ci:** Terraform_deploy for devnet
([#3516](#3516))
([ba3803e](ba3803e))
* **ci:** Tf variable references &
formatting([#3522](#3522))
([d37cf52](d37cf52))
* Disable e2e-slow-tree
([#3459](#3459))
([5927103](5927103))
* **docs:** Update package name of aztec-cli
([#3474](#3474))
([98d7ba0](98d7ba0))
* Double slash in deployed faucet routes
([#3555](#3555))
([6c704a5](6c704a5))
* Faucet lb_listener priority
([#3554](#3554))
([3f56dd7](3f56dd7))
* Handling low_nullifier.next_value equal to 0
([#3562](#3562))
([c800502](c800502)),
closes
[#3550](#3550)
* Remove x86_64 form l1-contracts img tag
([#3549](#3549))
([6828f1a](6828f1a))
* Throw error if fn sig has whitespaces
([#3509](#3509))
([7671063](7671063)),
closes
[#3055](#3055)


### Miscellaneous

* (yellow paper) public-vm section of yellow paper
([#3493](#3493))
([8ff3780](8ff3780))
* Add mermaid diagram support
([#3499](#3499))
([537d552](537d552))
* Add yellow paper build check to CI
([#3490](#3490))
([3ebd2f2](3ebd2f2))
* **avm:** Enable AVM unit tests in CI
([#3463](#3463))
([051dda9](051dda9)),
closes
[#3461](#3461)
* **bb:** Pointer_view to reference-based get_all
([#3495](#3495))
([50d7327](50d7327))
* **bb:** Reuse entities from GoblinUltra in GoblinUltraRecursive
([#3521](#3521))
([8259636](8259636))
* Build the acir test vectors as part of CI.
([#3447](#3447))
([1a2d1f8](1a2d1f8))
* Containers reduced to ~100MB total. ~30s installation.
([#3487](#3487))
([b49cef2](b49cef2))
* **docs:** Fix broken Noir stdlib link
([#3496](#3496))
([787d59a](787d59a))
* Field-agnostic and reusable transcript
([#3433](#3433))
([d78775a](d78775a))
* Fix broken link in txs in yellow paper
([#3484](#3484))
([798565d](798565d))
* Fix yellow paper build error
([32881a4](32881a4))
* Fixed typo in build system
([#3501](#3501))
([3a80ac2](3a80ac2))
* Increase functions per contract from 16 to 32
([#3503](#3503))
([ebdeea3](ebdeea3))
* Naming fixes
([#3476](#3476))
([1db30bf](1db30bf))
* Optimise bb.js package size and sandox/cli dockerfiles to unbloat
final containers.
([#3462](#3462))
([cb3db5d](cb3db5d))
* Pin node version in docker base images and bump nvmrc
([#3537](#3537))
([5d3895a](5d3895a))
* Recursive verifier updates
([#3452](#3452))
([dbb4a12](dbb4a12))
* Refactor `WitnessEntities` to be able to derive `WitnessCommitments`
from it
([#3479](#3479))
([9c9b561](9c9b561))
* Remove temporary logging
([#3466](#3466))
([8c8387b](8c8387b))
* Transcript handled through shared_ptr
([#3434](#3434))
([30fca33](30fca33))
* Typo fixes
([#3488](#3488))
([d9a44dc](d9a44dc))
* **yellow_paper:** Public&lt;&gt;private messaging
([#3491](#3491))
([6ecc406](6ecc406))


### Documentation

* Add transaction section to yellow paper
([#3418](#3418))
([44bf30b](44bf30b))
* Apply comments from Jan on contracts
([#3539](#3539))
([e351873](e351873))
* Fees update in yellow paper
([#3486](#3486))
([a8b2608](a8b2608))
* First go at generated AVM instruction set doc
([#3469](#3469))
([8cc54a4](8cc54a4))
* Further update to the yellow paper
([#3542](#3542))
([751bb6a](751bb6a))
* Yellow paper updates
([#3478](#3478))
([11f754d](11f754d))
* Yellow paper updates for private message delivery
([#3472](#3472))
([6ba9e18](6ba9e18))
* **yellow-paper:** Sync, enqueued, and static calls
([#3494](#3494))
([00835c6](00835c6)),
closes
[#3108](#3108)
* **yellowpaper:** Instruction set updates and fixes
([#3515](#3515))
([bfb61dd](bfb61dd))
</details>

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

##
[0.16.2](barretenberg.js-v0.16.1...barretenberg.js-v0.16.2)
(2023-12-05)


### Miscellaneous

* Optimise bb.js package size and sandox/cli dockerfiles to unbloat
final containers.
([#3462](#3462))
([cb3db5d](cb3db5d))
* Pin node version in docker base images and bump nvmrc
([#3537](#3537))
([5d3895a](5d3895a))
</details>

<details><summary>barretenberg: 0.16.2</summary>

##
[0.16.2](barretenberg-v0.16.1...barretenberg-v0.16.2)
(2023-12-05)


### Features

* **AVM:** First version for mini AVM (ADD, RETURN, CALLDATACOPY)
([#3439](#3439))
([b3af146](b3af146))
* Flavor refactor, reduce duplication
([#3407](#3407))
([8d6b013](8d6b013))
* New Poseidon2 circuit builder gates
([#3346](#3346))
([91cb369](91cb369))
* New Poseidon2 relations
([#3406](#3406))
([14b9736](14b9736))
* Pull latest noir for brillig optimizations
([#3464](#3464))
([d356bac](d356bac))
* Seperate pil files for sub machines
([#3454](#3454))
([d09d6f5](d09d6f5))


### Miscellaneous

* **avm:** Enable AVM unit tests in CI
([#3463](#3463))
([051dda9](051dda9)),
closes
[#3461](#3461)
* **bb:** Pointer_view to reference-based get_all
([#3495](#3495))
([50d7327](50d7327))
* **bb:** Reuse entities from GoblinUltra in GoblinUltraRecursive
([#3521](#3521))
([8259636](8259636))
* Build the acir test vectors as part of CI.
([#3447](#3447))
([1a2d1f8](1a2d1f8))
* Field-agnostic and reusable transcript
([#3433](#3433))
([d78775a](d78775a))
* Optimise bb.js package size and sandox/cli dockerfiles to unbloat
final containers.
([#3462](#3462))
([cb3db5d](cb3db5d))
* Pin node version in docker base images and bump nvmrc
([#3537](#3537))
([5d3895a](5d3895a))
* Recursive verifier updates
([#3452](#3452))
([dbb4a12](dbb4a12))
* Refactor `WitnessEntities` to be able to derive `WitnessCommitments`
from it
([#3479](#3479))
([9c9b561](9c9b561))
* Transcript handled through shared_ptr
([#3434](#3434))
([30fca33](30fca33))
* Typo fixes
([#3488](#3488))
([d9a44dc](d9a44dc))
</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 Dec 6, 2023
🤖 I have created a release *beep* *boop*
---


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

##
[0.16.2](AztecProtocol/aztec-packages@aztec-packages-v0.16.1...aztec-packages-v0.16.2)
(2023-12-05)


### Features

* Add tree snapshots
([#3468](AztecProtocol/aztec-packages#3468))
([7a86bb3](AztecProtocol/aztec-packages@7a86bb3))
* **AVM:** First version for mini AVM (ADD, RETURN, CALLDATACOPY)
([#3439](AztecProtocol/aztec-packages#3439))
([b3af146](AztecProtocol/aztec-packages@b3af146))
* Circuit optimized indexed tree batch insertion
([#3367](AztecProtocol/aztec-packages#3367))
([187d2f7](AztecProtocol/aztec-packages@187d2f7))
* Devnet
([#3473](AztecProtocol/aztec-packages#3473))
([97c40c2](AztecProtocol/aztec-packages@97c40c2))
* **docs:** Add simple private voting tutorial
([#3402](AztecProtocol/aztec-packages#3402))
([a6e0352](AztecProtocol/aztec-packages@a6e0352))
* **docs:** Document slow update tree
([#3416](AztecProtocol/aztec-packages#3416))
([8e9f103](AztecProtocol/aztec-packages@8e9f103))
* Flavor refactor, reduce duplication
([#3407](AztecProtocol/aztec-packages#3407))
([8d6b013](AztecProtocol/aztec-packages@8d6b013))
* Inclusion and non-inclusion proofs experiment
([#3255](AztecProtocol/aztec-packages#3255))
([b911e65](AztecProtocol/aztec-packages@b911e65)),
closes
[#2572](AztecProtocol/aztec-packages#2572)
[#2584](AztecProtocol/aztec-packages#2584)
* New Poseidon2 circuit builder gates
([#3346](AztecProtocol/aztec-packages#3346))
([91cb369](AztecProtocol/aztec-packages@91cb369))
* New Poseidon2 relations
([#3406](AztecProtocol/aztec-packages#3406))
([14b9736](AztecProtocol/aztec-packages@14b9736))
* Pull latest noir for brillig optimizations
([#3464](AztecProtocol/aztec-packages#3464))
([d356bac](AztecProtocol/aztec-packages@d356bac))
* Refactor StandardIndexedTree for abstract leaves and preimages and
optimized it
([#3530](AztecProtocol/aztec-packages#3530))
([63b9cdc](AztecProtocol/aztec-packages@63b9cdc))
* Removing historical roots from circuits
([#3544](AztecProtocol/aztec-packages#3544))
([9f682cb](AztecProtocol/aztec-packages@9f682cb))
* Seperate pil files for sub machines
([#3454](AztecProtocol/aztec-packages#3454))
([d09d6f5](AztecProtocol/aztec-packages@d09d6f5))
* Throw compile time error if contract has too many fns
([#3536](AztecProtocol/aztec-packages#3536))
([ad66ad0](AztecProtocol/aztec-packages@ad66ad0))
* Use tree snapshots in aztec-node/pxe/oracles
([#3504](AztecProtocol/aztec-packages#3504))
([6e40427](AztecProtocol/aztec-packages@6e40427))
* Yellow paper cross-chain communication
([#3477](AztecProtocol/aztec-packages#3477))
([d51df8c](AztecProtocol/aztec-packages@d51df8c))


### Bug Fixes

* Check version, chainid and sender for cross-chain l1 to l2 msgs
([#3457](AztecProtocol/aztec-packages#3457))
([d251703](AztecProtocol/aztec-packages@d251703))
* **ci:** Add DEPLOY_TAG in fork log group
([#3510](AztecProtocol/aztec-packages#3510))
([f021041](AztecProtocol/aztec-packages@f021041))
* **ci:** Check if l1 contracts img has been deployed
([#3531](AztecProtocol/aztec-packages#3531))
([ac1f03c](AztecProtocol/aztec-packages@ac1f03c))
* **ci:** Comment out LB listeners (for now)
([#3519](AztecProtocol/aztec-packages#3519))
([640aabc](AztecProtocol/aztec-packages@640aabc))
* **ci:** Count for bootnode discovery service
([#3517](AztecProtocol/aztec-packages#3517))
([2a38788](AztecProtocol/aztec-packages@2a38788))
* **ci:** Define REPOSITORY in deploy_l1_contracts
([#3514](AztecProtocol/aztec-packages#3514))
([b246d1b](AztecProtocol/aztec-packages@b246d1b))
* **ci:** Don't deploy to npm on master merge
([#3502](AztecProtocol/aztec-packages#3502))
([a138860](AztecProtocol/aztec-packages@a138860))
* **ci:** Env vars for deploying l1-contracts
([#3513](AztecProtocol/aztec-packages#3513))
([27106b2](AztecProtocol/aztec-packages@27106b2))
* **ci:** Export FORK_API_KEY from setup_env
([#3512](AztecProtocol/aztec-packages#3512))
([7e81e2c](AztecProtocol/aztec-packages@7e81e2c))
* **ci:** Fix docker architecture for devnet packages
([#3505](AztecProtocol/aztec-packages#3505))
([66d0287](AztecProtocol/aztec-packages@66d0287))
* **ci:** Fix faucet vars + don't deploy contracts from node
([#3553](AztecProtocol/aztec-packages#3553))
([c7176f6](AztecProtocol/aztec-packages@c7176f6))
* **ci:** L1 contracts directories
([#3545](AztecProtocol/aztec-packages#3545))
([63dd0c8](AztecProtocol/aztec-packages@63dd0c8))
* **ci:** Login to ecr to fetch contracts image
([#3538](AztecProtocol/aztec-packages#3538))
([b033538](AztecProtocol/aztec-packages@b033538))
* **ci:** Remove unused ADDRESS vars & export private key vars
([#3520](AztecProtocol/aztec-packages#3520))
([d889359](AztecProtocol/aztec-packages@d889359))
* **ci:** Set default value for $TO_TAINT
([#3508](AztecProtocol/aztec-packages#3508))
([8b6688a](AztecProtocol/aztec-packages@8b6688a))
* **ci:** Terraform listener resources
([#3534](AztecProtocol/aztec-packages#3534))
([c3b9cce](AztecProtocol/aztec-packages@c3b9cce))
* **ci:** Terraform_deploy for devnet
([#3516](AztecProtocol/aztec-packages#3516))
([ba3803e](AztecProtocol/aztec-packages@ba3803e))
* **ci:** Tf variable references &
formatting([#3522](AztecProtocol/aztec-packages#3522))
([d37cf52](AztecProtocol/aztec-packages@d37cf52))
* Disable e2e-slow-tree
([#3459](AztecProtocol/aztec-packages#3459))
([5927103](AztecProtocol/aztec-packages@5927103))
* **docs:** Update package name of aztec-cli
([#3474](AztecProtocol/aztec-packages#3474))
([98d7ba0](AztecProtocol/aztec-packages@98d7ba0))
* Double slash in deployed faucet routes
([#3555](AztecProtocol/aztec-packages#3555))
([6c704a5](AztecProtocol/aztec-packages@6c704a5))
* Faucet lb_listener priority
([#3554](AztecProtocol/aztec-packages#3554))
([3f56dd7](AztecProtocol/aztec-packages@3f56dd7))
* Handling low_nullifier.next_value equal to 0
([#3562](AztecProtocol/aztec-packages#3562))
([c800502](AztecProtocol/aztec-packages@c800502)),
closes
[#3550](AztecProtocol/aztec-packages#3550)
* Remove x86_64 form l1-contracts img tag
([#3549](AztecProtocol/aztec-packages#3549))
([6828f1a](AztecProtocol/aztec-packages@6828f1a))
* Throw error if fn sig has whitespaces
([#3509](AztecProtocol/aztec-packages#3509))
([7671063](AztecProtocol/aztec-packages@7671063)),
closes
[#3055](AztecProtocol/aztec-packages#3055)


### Miscellaneous

* (yellow paper) public-vm section of yellow paper
([#3493](AztecProtocol/aztec-packages#3493))
([8ff3780](AztecProtocol/aztec-packages@8ff3780))
* Add mermaid diagram support
([#3499](AztecProtocol/aztec-packages#3499))
([537d552](AztecProtocol/aztec-packages@537d552))
* Add yellow paper build check to CI
([#3490](AztecProtocol/aztec-packages#3490))
([3ebd2f2](AztecProtocol/aztec-packages@3ebd2f2))
* **avm:** Enable AVM unit tests in CI
([#3463](AztecProtocol/aztec-packages#3463))
([051dda9](AztecProtocol/aztec-packages@051dda9)),
closes
[#3461](AztecProtocol/aztec-packages#3461)
* **bb:** Pointer_view to reference-based get_all
([#3495](AztecProtocol/aztec-packages#3495))
([50d7327](AztecProtocol/aztec-packages@50d7327))
* **bb:** Reuse entities from GoblinUltra in GoblinUltraRecursive
([#3521](AztecProtocol/aztec-packages#3521))
([8259636](AztecProtocol/aztec-packages@8259636))
* Build the acir test vectors as part of CI.
([#3447](AztecProtocol/aztec-packages#3447))
([1a2d1f8](AztecProtocol/aztec-packages@1a2d1f8))
* Containers reduced to ~100MB total. ~30s installation.
([#3487](AztecProtocol/aztec-packages#3487))
([b49cef2](AztecProtocol/aztec-packages@b49cef2))
* **docs:** Fix broken Noir stdlib link
([#3496](AztecProtocol/aztec-packages#3496))
([787d59a](AztecProtocol/aztec-packages@787d59a))
* Field-agnostic and reusable transcript
([#3433](AztecProtocol/aztec-packages#3433))
([d78775a](AztecProtocol/aztec-packages@d78775a))
* Fix broken link in txs in yellow paper
([#3484](AztecProtocol/aztec-packages#3484))
([798565d](AztecProtocol/aztec-packages@798565d))
* Fix yellow paper build error
([32881a4](AztecProtocol/aztec-packages@32881a4))
* Fixed typo in build system
([#3501](AztecProtocol/aztec-packages#3501))
([3a80ac2](AztecProtocol/aztec-packages@3a80ac2))
* Increase functions per contract from 16 to 32
([#3503](AztecProtocol/aztec-packages#3503))
([ebdeea3](AztecProtocol/aztec-packages@ebdeea3))
* Naming fixes
([#3476](AztecProtocol/aztec-packages#3476))
([1db30bf](AztecProtocol/aztec-packages@1db30bf))
* Optimise bb.js package size and sandox/cli dockerfiles to unbloat
final containers.
([#3462](AztecProtocol/aztec-packages#3462))
([cb3db5d](AztecProtocol/aztec-packages@cb3db5d))
* Pin node version in docker base images and bump nvmrc
([#3537](AztecProtocol/aztec-packages#3537))
([5d3895a](AztecProtocol/aztec-packages@5d3895a))
* Recursive verifier updates
([#3452](AztecProtocol/aztec-packages#3452))
([dbb4a12](AztecProtocol/aztec-packages@dbb4a12))
* Refactor `WitnessEntities` to be able to derive `WitnessCommitments`
from it
([#3479](AztecProtocol/aztec-packages#3479))
([9c9b561](AztecProtocol/aztec-packages@9c9b561))
* Remove temporary logging
([#3466](AztecProtocol/aztec-packages#3466))
([8c8387b](AztecProtocol/aztec-packages@8c8387b))
* Transcript handled through shared_ptr
([#3434](AztecProtocol/aztec-packages#3434))
([30fca33](AztecProtocol/aztec-packages@30fca33))
* Typo fixes
([#3488](AztecProtocol/aztec-packages#3488))
([d9a44dc](AztecProtocol/aztec-packages@d9a44dc))
* **yellow_paper:** Public&lt;&gt;private messaging
([#3491](AztecProtocol/aztec-packages#3491))
([6ecc406](AztecProtocol/aztec-packages@6ecc406))


### Documentation

* Add transaction section to yellow paper
([#3418](AztecProtocol/aztec-packages#3418))
([44bf30b](AztecProtocol/aztec-packages@44bf30b))
* Apply comments from Jan on contracts
([#3539](AztecProtocol/aztec-packages#3539))
([e351873](AztecProtocol/aztec-packages@e351873))
* Fees update in yellow paper
([#3486](AztecProtocol/aztec-packages#3486))
([a8b2608](AztecProtocol/aztec-packages@a8b2608))
* First go at generated AVM instruction set doc
([#3469](AztecProtocol/aztec-packages#3469))
([8cc54a4](AztecProtocol/aztec-packages@8cc54a4))
* Further update to the yellow paper
([#3542](AztecProtocol/aztec-packages#3542))
([751bb6a](AztecProtocol/aztec-packages@751bb6a))
* Yellow paper updates
([#3478](AztecProtocol/aztec-packages#3478))
([11f754d](AztecProtocol/aztec-packages@11f754d))
* Yellow paper updates for private message delivery
([#3472](AztecProtocol/aztec-packages#3472))
([6ba9e18](AztecProtocol/aztec-packages@6ba9e18))
* **yellow-paper:** Sync, enqueued, and static calls
([#3494](AztecProtocol/aztec-packages#3494))
([00835c6](AztecProtocol/aztec-packages@00835c6)),
closes
[#3108](AztecProtocol/aztec-packages#3108)
* **yellowpaper:** Instruction set updates and fixes
([#3515](AztecProtocol/aztec-packages#3515))
([bfb61dd](AztecProtocol/aztec-packages@bfb61dd))
</details>

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

##
[0.16.2](AztecProtocol/aztec-packages@barretenberg.js-v0.16.1...barretenberg.js-v0.16.2)
(2023-12-05)


### Miscellaneous

* Optimise bb.js package size and sandox/cli dockerfiles to unbloat
final containers.
([#3462](AztecProtocol/aztec-packages#3462))
([cb3db5d](AztecProtocol/aztec-packages@cb3db5d))
* Pin node version in docker base images and bump nvmrc
([#3537](AztecProtocol/aztec-packages#3537))
([5d3895a](AztecProtocol/aztec-packages@5d3895a))
</details>

<details><summary>barretenberg: 0.16.2</summary>

##
[0.16.2](AztecProtocol/aztec-packages@barretenberg-v0.16.1...barretenberg-v0.16.2)
(2023-12-05)


### Features

* **AVM:** First version for mini AVM (ADD, RETURN, CALLDATACOPY)
([#3439](AztecProtocol/aztec-packages#3439))
([b3af146](AztecProtocol/aztec-packages@b3af146))
* Flavor refactor, reduce duplication
([#3407](AztecProtocol/aztec-packages#3407))
([8d6b013](AztecProtocol/aztec-packages@8d6b013))
* New Poseidon2 circuit builder gates
([#3346](AztecProtocol/aztec-packages#3346))
([91cb369](AztecProtocol/aztec-packages@91cb369))
* New Poseidon2 relations
([#3406](AztecProtocol/aztec-packages#3406))
([14b9736](AztecProtocol/aztec-packages@14b9736))
* Pull latest noir for brillig optimizations
([#3464](AztecProtocol/aztec-packages#3464))
([d356bac](AztecProtocol/aztec-packages@d356bac))
* Seperate pil files for sub machines
([#3454](AztecProtocol/aztec-packages#3454))
([d09d6f5](AztecProtocol/aztec-packages@d09d6f5))


### Miscellaneous

* **avm:** Enable AVM unit tests in CI
([#3463](AztecProtocol/aztec-packages#3463))
([051dda9](AztecProtocol/aztec-packages@051dda9)),
closes
[#3461](AztecProtocol/aztec-packages#3461)
* **bb:** Pointer_view to reference-based get_all
([#3495](AztecProtocol/aztec-packages#3495))
([50d7327](AztecProtocol/aztec-packages@50d7327))
* **bb:** Reuse entities from GoblinUltra in GoblinUltraRecursive
([#3521](AztecProtocol/aztec-packages#3521))
([8259636](AztecProtocol/aztec-packages@8259636))
* Build the acir test vectors as part of CI.
([#3447](AztecProtocol/aztec-packages#3447))
([1a2d1f8](AztecProtocol/aztec-packages@1a2d1f8))
* Field-agnostic and reusable transcript
([#3433](AztecProtocol/aztec-packages#3433))
([d78775a](AztecProtocol/aztec-packages@d78775a))
* Optimise bb.js package size and sandox/cli dockerfiles to unbloat
final containers.
([#3462](AztecProtocol/aztec-packages#3462))
([cb3db5d](AztecProtocol/aztec-packages@cb3db5d))
* Pin node version in docker base images and bump nvmrc
([#3537](AztecProtocol/aztec-packages#3537))
([5d3895a](AztecProtocol/aztec-packages@5d3895a))
* Recursive verifier updates
([#3452](AztecProtocol/aztec-packages#3452))
([dbb4a12](AztecProtocol/aztec-packages@dbb4a12))
* Refactor `WitnessEntities` to be able to derive `WitnessCommitments`
from it
([#3479](AztecProtocol/aztec-packages#3479))
([9c9b561](AztecProtocol/aztec-packages@9c9b561))
* Transcript handled through shared_ptr
([#3434](AztecProtocol/aztec-packages#3434))
([30fca33](AztecProtocol/aztec-packages@30fca33))
* Typo fixes
([#3488](AztecProtocol/aztec-packages#3488))
([d9a44dc](AztecProtocol/aztec-packages@d9a44dc))
</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.

feat(grandfather): Snapshotted trees
4 participants