Skip to content

Commit 5217989

Browse files
author
AztecBot
committed
Merge branch 'next' into merge-train/avm
2 parents d866972 + eb010bd commit 5217989

File tree

124 files changed

+331
-332
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+331
-332
lines changed

barretenberg/cpp/src/barretenberg/bb/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Barretenberg UltraHonk comes with the capability to verify proofs in Solidity, i
7979
bb prove --scheme ultra_honk --oracle-hash keccak -b ./target/hello_world.json -w ./target/witness-name.gz -o ./target/proof
8080
```
8181

82-
> **Note:** `--oracle-hash keccak` flag is used to generate UltraHonk proofs with Keccak hashes, as it is what the Solidity verifier is designed to be compatible with given the better gas efficiency when verifying on-chain; The default `--oracle-hash poseidon` in comparison generates proofs with Poseidon hashes, which is more efficient in recursions but not for on-chain verifications.
82+
> **Note:** `--oracle-hash keccak` flag is used to generate UltraHonk proofs with Keccak hashes, as it is what the Solidity verifier is designed to be compatible with given the better gas efficiency when verifying onchain; The default `--oracle-hash poseidon` in comparison generates proofs with Poseidon hashes, which is more efficient in recursions but not for onchain verifications.
8383
8484
2. Compute the verification key for your Noir program running:
8585

barretenberg/docs/docs/explainers/recursive_aggregation.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ In Zero-Knowledge, recursion has some similarities.
4949

5050
It is not a Noir function calling itself, but a proof being used as an input to another circuit. In short, you verify one proof *inside* another proof, returning the proof that both proofs are valid.
5151

52-
This means that, given enough computational resources, you can prove the correctness of any arbitrary number of proofs in a single proof. This could be useful to design state channels (for which a common example would be [Bitcoin's Lightning Network](https://en.wikipedia.org/wiki/Lightning_Network)), to save on gas costs by settling one proof on-chain, or simply to make business logic less dependent on a consensus mechanism.
52+
This means that, given enough computational resources, you can prove the correctness of any arbitrary number of proofs in a single proof. This could be useful to design state channels (for which a common example would be [Bitcoin's Lightning Network](https://en.wikipedia.org/wiki/Lightning_Network)), to save on gas costs by settling one proof onchain, or simply to make business logic less dependent on a consensus mechanism.
5353

5454
## Examples
5555

@@ -61,9 +61,9 @@ Alice and Bob are friends, and they like guessing games. They want to play a gue
6161

6262
So, they use zero-knowledge proofs. Alice tries to guess Bob's number, and Bob will generate a ZK proof stating whether she succeeded or failed.
6363

64-
This ZK proof can go on a smart contract, revealing the winner and even giving prizes. However, this means every turn needs to be verified on-chain. This incurs some cost and waiting time that may simply make the game too expensive or time-consuming to be worth it.
64+
This ZK proof can go on a smart contract, revealing the winner and even giving prizes. However, this means every turn needs to be verified onchain. This incurs some cost and waiting time that may simply make the game too expensive or time-consuming to be worth it.
6565

66-
As a solution, Alice proposes the following: "what if Bob generates his proof, and instead of sending it on-chain, I verify it *within* my own proof before playing my own turn?".
66+
As a solution, Alice proposes the following: "what if Bob generates his proof, and instead of sending it onchain, I verify it *within* my own proof before playing my own turn?".
6767

6868
She can then generate a proof that she verified his proof, and so on.
6969

@@ -143,14 +143,14 @@ In such a situation, and assuming Alice is first, she would skip the first part
143143

144144
### Aggregating proofs
145145

146-
In some one-way interaction situations, recursion would allow for aggregation of simple proofs that don't need to be immediately verified on-chain or elsewhere.
146+
In some one-way interaction situations, recursion would allow for aggregation of simple proofs that don't need to be immediately verified onchain or elsewhere.
147147

148-
To give a practical example, a barman wouldn't need to verify a "proof-of-age" on-chain every time he serves alcohol to a customer. Instead, the architecture would comprise two circuits:
148+
To give a practical example, a barman wouldn't need to verify a "proof-of-age" onchain every time he serves alcohol to a customer. Instead, the architecture would comprise two circuits:
149149

150150
- A `main`, non-recursive circuit with some logic
151151
- A `recursive` circuit meant to verify two proofs in one proof
152152

153-
The customer's proofs would be intermediate, and made on their phones, and the barman could just verify them locally. He would then aggregate them into a final proof sent on-chain (or elsewhere) at the end of the day.
153+
The customer's proofs would be intermediate, and made on their phones, and the barman could just verify them locally. He would then aggregate them into a final proof sent onchain (or elsewhere) at the end of the day.
154154

155155
### Recursively verifying different circuits
156156

barretenberg/docs/docs/how_to_guides/recursive_aggregation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Always keep in mind what is actually happening on your development process, othe
9696

9797
In this case, you can imagine that Alice (running the `main` circuit) is proving something to Bob (running the `recursive` circuit), and Bob is verifying her proof within his proof.
9898

99-
With this in mind, it becomes clear that our intermediate proof is the one *meant to be verified within another circuit*, so it must be Alice's. Actually, the only final proof in this theoretical scenario would be the last one, sent on-chain.
99+
With this in mind, it becomes clear that our intermediate proof is the one *meant to be verified within another circuit*, so it must be Alice's. Actually, the only final proof in this theoretical scenario would be the last one, sent onchain.
100100

101101
:::
102102

barretenberg/docs/docs/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Barretenberg serves as the cryptographic backend for [Noir](https://noir-lang.or
3535
2. **ACIR Processing**: Barretenberg takes the ACIR instructions and converts them into a circuit representation
3636
3. **Witness Generation**: Based on actual input values, Barretenberg computes a witness for the circuit
3737
4. **Proof Generation**: Barretenberg creates a zero-knowledge proof that the computation was performed correctly
38-
5. **Verification**: The proof can be verified using Barretenberg's verification algorithms, including on-chain via Solidity verifiers
38+
5. **Verification**: The proof can be verified using Barretenberg's verification algorithms, including onchain via Solidity verifiers
3939

4040
This integration allows Noir developers to focus on writing application logic while Barretenberg handles the complex cryptographic operations underneath.
4141

@@ -51,7 +51,7 @@ The `bb` command line interface is the primary way to interact with Barretenberg
5151

5252
- Proving and verifying circuits
5353
- Generating verification keys
54-
- Creating Solidity verifiers for on-chain verification
54+
- Creating Solidity verifiers for onchain verification
5555
- Executing and verifying recursive proofs
5656

5757
### bb.js
@@ -72,7 +72,7 @@ UltraHonk is an advanced proof system that offers improvements over the legacy U
7272

7373
As the name implies, SNARKs are non-interactive, making them suitable to be verified in smart contracts. This enables applications where:
7474

75-
1. Verification happens on-chain (ensuring trustlessness)
75+
1. Verification happens onchain (ensuring trustlessness)
7676
2. Private data remains hidden while correctness is verified
7777

7878
Barretenberg produces Solidity smart contracts meant to be used on several EVM networks, as long as they implement the `ecMul`, `ecAdd`, `ecPairing`, and `modexp` EVM precompiles. For example:
@@ -110,7 +110,7 @@ Barretenberg is organized into several key modules:
110110
- **Commitment Schemes**: Polynomial commitment methods
111111
- **DSL (Domain Specific Language)**: Interfaces with ACIR from Noir
112112
- **Execution**: Witness generation and computation
113-
- **Verification**: Proof verification both native and on-chain
113+
- **Verification**: Proof verification both native and onchain
114114

115115
## Further Resources
116116

barretenberg/docs/versioned_docs/version-v0.87.0/explainers/recursive_aggregation.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ In Zero-Knowledge, recursion has some similarities.
4949

5050
It is not a Noir function calling itself, but a proof being used as an input to another circuit. In short, you verify one proof *inside* another proof, returning the proof that both proofs are valid.
5151

52-
This means that, given enough computational resources, you can prove the correctness of any arbitrary number of proofs in a single proof. This could be useful to design state channels (for which a common example would be [Bitcoin's Lightning Network](https://en.wikipedia.org/wiki/Lightning_Network)), to save on gas costs by settling one proof on-chain, or simply to make business logic less dependent on a consensus mechanism.
52+
This means that, given enough computational resources, you can prove the correctness of any arbitrary number of proofs in a single proof. This could be useful to design state channels (for which a common example would be [Bitcoin's Lightning Network](https://en.wikipedia.org/wiki/Lightning_Network)), to save on gas costs by settling one proof onchain, or simply to make business logic less dependent on a consensus mechanism.
5353

5454
## Examples
5555

@@ -61,9 +61,9 @@ Alice and Bob are friends, and they like guessing games. They want to play a gue
6161

6262
So, they use zero-knowledge proofs. Alice tries to guess Bob's number, and Bob will generate a ZK proof stating whether she succeeded or failed.
6363

64-
This ZK proof can go on a smart contract, revealing the winner and even giving prizes. However, this means every turn needs to be verified on-chain. This incurs some cost and waiting time that may simply make the game too expensive or time-consuming to be worth it.
64+
This ZK proof can go on a smart contract, revealing the winner and even giving prizes. However, this means every turn needs to be verified onchain. This incurs some cost and waiting time that may simply make the game too expensive or time-consuming to be worth it.
6565

66-
As a solution, Alice proposes the following: "what if Bob generates his proof, and instead of sending it on-chain, I verify it *within* my own proof before playing my own turn?".
66+
As a solution, Alice proposes the following: "what if Bob generates his proof, and instead of sending it onchain, I verify it *within* my own proof before playing my own turn?".
6767

6868
She can then generate a proof that she verified his proof, and so on.
6969

@@ -143,14 +143,14 @@ In such a situation, and assuming Alice is first, she would skip the first part
143143

144144
### Aggregating proofs
145145

146-
In some one-way interaction situations, recursion would allow for aggregation of simple proofs that don't need to be immediately verified on-chain or elsewhere.
146+
In some one-way interaction situations, recursion would allow for aggregation of simple proofs that don't need to be immediately verified onchain or elsewhere.
147147

148-
To give a practical example, a barman wouldn't need to verify a "proof-of-age" on-chain every time he serves alcohol to a customer. Instead, the architecture would comprise two circuits:
148+
To give a practical example, a barman wouldn't need to verify a "proof-of-age" onchain every time he serves alcohol to a customer. Instead, the architecture would comprise two circuits:
149149

150150
- A `main`, non-recursive circuit with some logic
151151
- A `recursive` circuit meant to verify two proofs in one proof
152152

153-
The customer's proofs would be intermediate, and made on their phones, and the barman could just verify them locally. He would then aggregate them into a final proof sent on-chain (or elsewhere) at the end of the day.
153+
The customer's proofs would be intermediate, and made on their phones, and the barman could just verify them locally. He would then aggregate them into a final proof sent onchain (or elsewhere) at the end of the day.
154154

155155
### Recursively verifying different circuits
156156

barretenberg/docs/versioned_docs/version-v0.87.0/how_to_guides/recursive_aggregation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Always keep in mind what is actually happening on your development process, othe
122122

123123
In this case, you can imagine that Alice (running the `main` circuit) is proving something to Bob (running the `recursive` circuit), and Bob is verifying her proof within his proof.
124124

125-
With this in mind, it becomes clear that our intermediate proof is the one *meant to be verified within another circuit*, so it must be Alice's. Actually, the only final proof in this theoretical scenario would be the last one, sent on-chain.
125+
With this in mind, it becomes clear that our intermediate proof is the one *meant to be verified within another circuit*, so it must be Alice's. Actually, the only final proof in this theoretical scenario would be the last one, sent onchain.
126126

127127
:::
128128

barretenberg/docs/versioned_docs/version-v0.87.0/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Barretenberg serves as the cryptographic backend for [Noir](https://noir-lang.or
3636
2. **ACIR Processing**: Barretenberg takes the ACIR instructions and converts them into a circuit representation
3737
3. **Witness Generation**: Based on actual input values, Barretenberg computes a witness for the circuit
3838
4. **Proof Generation**: Barretenberg creates a zero-knowledge proof that the computation was performed correctly
39-
5. **Verification**: The proof can be verified using Barretenberg's verification algorithms, including on-chain via Solidity verifiers
39+
5. **Verification**: The proof can be verified using Barretenberg's verification algorithms, including onchain via Solidity verifiers
4040

4141
This integration allows Noir developers to focus on writing application logic while Barretenberg handles the complex cryptographic operations underneath.
4242

@@ -51,8 +51,8 @@ A versioning tool allowing to install arbitrary versions of Barretenberg, as wel
5151
The `bb` command line interface is the primary way to interact with Barretenberg directly. It provides commands for operations such as:
5252

5353
- Proving and verifying circuits
54-
- Generating verification keys
55-
- Creating Solidity verifiers for on-chain verification
54+
- Generating verification keys
55+
- Creating Solidity verifiers for onchain verification
5656
- Executing and verifying recursive proofs
5757

5858
### bb.js
@@ -74,7 +74,7 @@ UltraHonk is an advanced proof system that offers improvements over the legacy U
7474

7575
As the name implies, SNARKs are non-interactive, making them suitable to be verified in smart contracts. This enables applications where:
7676

77-
1. Verification happens on-chain (ensuring trustlessness)
77+
1. Verification happens onchain (ensuring trustlessness)
7878
2. Private data remains hidden while correctness is verified
7979

8080
Barretenberg produces Solidity smart contracts meant to be used on several EVM networks, as long as they implement the `ecMul`, `ecAdd`, `ecPairing`, and `modexp` EVM precompiles. For example:
@@ -112,7 +112,7 @@ Barretenberg is organized into several key modules:
112112
- **Commitment Schemes**: Polynomial commitment methods
113113
- **DSL (Domain Specific Language)**: Interfaces with ACIR from Noir
114114
- **Execution**: Witness generation and computation
115-
- **Verification**: Proof verification both native and on-chain
115+
- **Verification**: Proof verification both native and onchain
116116

117117
## Further Resources
118118

barretenberg/docs/versioned_docs/version-v3.0.0-nightly.20250908/explainers/recursive_aggregation.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ In Zero-Knowledge, recursion has some similarities.
4949

5050
It is not a Noir function calling itself, but a proof being used as an input to another circuit. In short, you verify one proof *inside* another proof, returning the proof that both proofs are valid.
5151

52-
This means that, given enough computational resources, you can prove the correctness of any arbitrary number of proofs in a single proof. This could be useful to design state channels (for which a common example would be [Bitcoin's Lightning Network](https://en.wikipedia.org/wiki/Lightning_Network)), to save on gas costs by settling one proof on-chain, or simply to make business logic less dependent on a consensus mechanism.
52+
This means that, given enough computational resources, you can prove the correctness of any arbitrary number of proofs in a single proof. This could be useful to design state channels (for which a common example would be [Bitcoin's Lightning Network](https://en.wikipedia.org/wiki/Lightning_Network)), to save on gas costs by settling one proof onchain, or simply to make business logic less dependent on a consensus mechanism.
5353

5454
## Examples
5555

@@ -61,9 +61,9 @@ Alice and Bob are friends, and they like guessing games. They want to play a gue
6161

6262
So, they use zero-knowledge proofs. Alice tries to guess Bob's number, and Bob will generate a ZK proof stating whether she succeeded or failed.
6363

64-
This ZK proof can go on a smart contract, revealing the winner and even giving prizes. However, this means every turn needs to be verified on-chain. This incurs some cost and waiting time that may simply make the game too expensive or time-consuming to be worth it.
64+
This ZK proof can go on a smart contract, revealing the winner and even giving prizes. However, this means every turn needs to be verified onchain. This incurs some cost and waiting time that may simply make the game too expensive or time-consuming to be worth it.
6565

66-
As a solution, Alice proposes the following: "what if Bob generates his proof, and instead of sending it on-chain, I verify it *within* my own proof before playing my own turn?".
66+
As a solution, Alice proposes the following: "what if Bob generates his proof, and instead of sending it onchain, I verify it *within* my own proof before playing my own turn?".
6767

6868
She can then generate a proof that she verified his proof, and so on.
6969

@@ -143,14 +143,14 @@ In such a situation, and assuming Alice is first, she would skip the first part
143143

144144
### Aggregating proofs
145145

146-
In some one-way interaction situations, recursion would allow for aggregation of simple proofs that don't need to be immediately verified on-chain or elsewhere.
146+
In some one-way interaction situations, recursion would allow for aggregation of simple proofs that don't need to be immediately verified onchain or elsewhere.
147147

148-
To give a practical example, a barman wouldn't need to verify a "proof-of-age" on-chain every time he serves alcohol to a customer. Instead, the architecture would comprise two circuits:
148+
To give a practical example, a barman wouldn't need to verify a "proof-of-age" onchain every time he serves alcohol to a customer. Instead, the architecture would comprise two circuits:
149149

150150
- A `main`, non-recursive circuit with some logic
151151
- A `recursive` circuit meant to verify two proofs in one proof
152152

153-
The customer's proofs would be intermediate, and made on their phones, and the barman could just verify them locally. He would then aggregate them into a final proof sent on-chain (or elsewhere) at the end of the day.
153+
The customer's proofs would be intermediate, and made on their phones, and the barman could just verify them locally. He would then aggregate them into a final proof sent onchain (or elsewhere) at the end of the day.
154154

155155
### Recursively verifying different circuits
156156

barretenberg/docs/versioned_docs/version-v3.0.0-nightly.20250908/how_to_guides/recursive_aggregation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Always keep in mind what is actually happening on your development process, othe
122122

123123
In this case, you can imagine that Alice (running the `main` circuit) is proving something to Bob (running the `recursive` circuit), and Bob is verifying her proof within his proof.
124124

125-
With this in mind, it becomes clear that our intermediate proof is the one *meant to be verified within another circuit*, so it must be Alice's. Actually, the only final proof in this theoretical scenario would be the last one, sent on-chain.
125+
With this in mind, it becomes clear that our intermediate proof is the one *meant to be verified within another circuit*, so it must be Alice's. Actually, the only final proof in this theoretical scenario would be the last one, sent onchain.
126126

127127
:::
128128

0 commit comments

Comments
 (0)