-
Notifications
You must be signed in to change notification settings - Fork 307
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into 12-09-chore_removing_noir_bug_workaround
- Loading branch information
Showing
1,382 changed files
with
28,998 additions
and
107,299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3c488f4b272f460383341c51270b87bfe2b94468 | ||
db28cb9ffb710c286b54dbfcf57292ae3dffb03d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
FROM aztecprotocol/ci:2.0 | ||
FROM aztecprotocol/ci:2.2 | ||
COPY /usr/src /usr/src | ||
WORKDIR /usr/src/boxes | ||
RUN ls /usr/src/boxes | ||
RUN /usr/local/share/docker-init.sh &> /dev/null && ./bootstrap.sh test | ||
RUN /usr/local/share/docker-init.sh &> /dev/null && ./bootstrap.sh test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## `aztec-nargo` | ||
|
||
The `aztec-nargo` utility is packaged with docker and does the following: | ||
1. If the first argument to `aztec-nargo` is not `compile`, it just forwards args to `nargo` and exits. | ||
1. If the first argument _is_ `compile`, it forwards args to `nargo` with some added options (like `--inliner-aggressiveness 0 --show-artifact-paths`) | ||
3. Extracts all artifacts modified by `nargo` | ||
4. Transpiles each artifact using the `avm-transpiler` | ||
5. Generates verification keys for each artifact using `bb` (`barretenberg`'s binary) | ||
|
||
Example usage: `aztec-nargo compile` | ||
|
||
Note: uses versions of each tool from this repository (`nargo` version is from `../noir`). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Compile with: | ||
|
||
``` | ||
~/aztec-packages/bb-pilcom/target/release/bb_pil pil/vm2/execution.pil --name Avm2 -y -o src/barretenberg/vm2/generated && ./format.sh changed | ||
``` | ||
|
||
while on the `barretenberg/cpp` directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// This is a virtual gadget, which is part of the execution trace. | ||
namespace execution(256); | ||
|
||
pol commit stack_pointer_val; | ||
pol commit stack_pointer_tag; | ||
pol commit sel_addressing_error; // true if any error type | ||
pol commit addressing_error_kind; // TODO: might need to be selectors | ||
pol commit addressing_error_idx; // operand index for error, if any | ||
|
||
// whether each operand is an address for the given opcode. | ||
// retrieved from the instruction spec. | ||
pol commit sel_op1_is_address; | ||
pol commit sel_op2_is_address; | ||
pol commit sel_op3_is_address; | ||
pol commit sel_op4_is_address; | ||
// operands after relative resolution | ||
pol commit op1_after_relative; | ||
pol commit op2_after_relative; | ||
pol commit op3_after_relative; | ||
pol commit op4_after_relative; | ||
// operands after indirect resolution are the resolved_operands rop1, ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
namespace alu(256); | ||
|
||
pol commit sel_op_add; | ||
pol commit ia; | ||
pol commit ib; | ||
pol commit ic; | ||
pol commit op; | ||
pol commit ia_addr; | ||
pol commit ib_addr; | ||
pol commit dst_addr; | ||
|
||
#[SEL_ADD_BINARY] | ||
sel_op_add * (1 - sel_op_add) = 0; | ||
|
||
#[ALU_ADD] | ||
ia + ib = ic; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
include "alu.pil"; | ||
include "addressing.pil"; | ||
include "precomputed.pil"; | ||
|
||
namespace execution(256); | ||
|
||
pol commit sel; // subtrace selector | ||
|
||
pol commit ex_opcode; | ||
pol commit indirect; | ||
// operands | ||
pol commit op1; | ||
pol commit op2; | ||
pol commit op3; | ||
pol commit op4; | ||
// resolved operands | ||
pol commit rop1; | ||
pol commit rop2; | ||
pol commit rop3; | ||
pol commit rop4; | ||
|
||
pol commit pc; | ||
pol commit clk; | ||
pol commit last; | ||
|
||
// Selector constraints | ||
sel * (1 - sel) = 0; | ||
last * (1 - last) = 0; | ||
|
||
// If the current row is an execution row, then either | ||
// the next row is an execution row, or the current row is marked as the last row. | ||
// sel => (sel' v last) = 1 iff | ||
// ¬sel v (sel' v last) = 1 iff | ||
// ¬(¬sel v (sel' v last)) = 0 iff | ||
// sel ^ (¬sel' ^ ¬last) = 0 iff | ||
// sel * (1 - sel') * (1 - last) = 0 | ||
#[TRACE_CONTINUITY_1] | ||
sel * (1 - sel') * (1 - last) = 0; | ||
// If the current row is not an execution row, then there are no more execution rows after that. | ||
// (not enforced for the first row) | ||
#[TRACE_CONTINUITY_2] | ||
(1 - precomputed.first_row) * (1 - sel) * sel' = 0; | ||
// If the current row is the last row, then the next row is not an execution row. | ||
#[LAST_IS_LAST] | ||
last * sel' = 0; | ||
|
||
// These are needed to have a non-empty set of columns for each type. | ||
pol public input; | ||
#[LOOKUP_DUMMY_PRECOMPUTED] | ||
sel {/*will be 1=OR*/ sel, clk, clk, clk} in | ||
precomputed.sel_bitwise {precomputed.bitwise_op_id, precomputed.bitwise_input_a, precomputed.bitwise_input_b, precomputed.bitwise_output}; | ||
#[LOOKUP_DUMMY_DYNAMIC] // Just a self-lookup for now, for testing. | ||
sel {op1, op2, op3, op4} in sel {op1, op2, op3, op4}; | ||
#[PERM_DUMMY_DYNAMIC] // Just a self-permutation for now, for testing. | ||
sel {op1, op2, op3, op4} is sel {op1, op2, op3, op4}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// General/shared precomputed columns. | ||
namespace precomputed(256); | ||
|
||
// From 0 and incrementing up to the size of the circuit (2^21). | ||
pol constant clk; | ||
|
||
// 1 only at row 0. | ||
pol constant first_row; | ||
|
||
// AND/OR/XOR of all 8-bit numbers. | ||
// The tables are "stacked". First AND, then OR, then XOR. | ||
// Note: think if we can avoid the selector. | ||
pol constant sel_bitwise; // 1 in the first 3 * 256 rows. | ||
pol constant bitwise_op_id; // identifies if operation is AND/OR/XOR. | ||
pol constant bitwise_input_a; // column of all 8-bit numbers. | ||
pol constant bitwise_input_b; // column of all 8-bit numbers. | ||
pol constant bitwise_output; // output = a AND/OR/XOR b. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.