Skip to content

Commit

Permalink
feat: Sync from noir (#7743)
Browse files Browse the repository at this point in the history
Automated pull of development from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
feat: let LSP work will with code generated by macros
(noir-lang/noir#5665)
chore(docs): Update web app page to use nargo v 0.31
(noir-lang/noir#5652)
feat: add `std::meta::type_of` and `impl Eq for Type`
(noir-lang/noir#5669)
fix: speed up LSP (noir-lang/noir#5650)
feat: don't eagerly error on cast expressions
(noir-lang/noir#5635)
fix: error on unbound generics in structs
(noir-lang/noir#5619)
fix: allow using Self for function calls
(noir-lang/noir#5629)
feat: let filenames in errors be relative to the current dir if possible
(noir-lang/noir#5642)
feat: LSP inlay type hints on lambda parameters
(noir-lang/noir#5639)
feat: Sync from aztec-packages
(noir-lang/noir#5598)
fix!: parse block and if statements independently of expressions in
statements (noir-lang/noir#5634)
chore: test blackbox binary op instructions
(noir-lang/noir#5484)
chore(docs): add Writing Noir doc
(noir-lang/noir#5456)
chore(github): Switch to organization-wide Issue templates
(noir-lang/noir#5622)
chore: Switch `Value::TraitConstraint` to a resolved trait constraint
(noir-lang/noir#5618)
fix: error on incorrect generic count for impl and type alias
(noir-lang/noir#5623)
feat: allow inserting LSP inlay type hints
(noir-lang/noir#5620)
feat: turbofish in struct pattern
(noir-lang/noir#5616)
fix: correct span for prefix operator
(noir-lang/noir#5624)
fix: `NoMatchingImplFound` in comptime code only
(noir-lang/noir#5617)
feat: Remove 'comptime or separate crate' restriction on comptime code
(noir-lang/noir#5609)
chore(docs): Update proving backend related docs
(noir-lang/noir#5601)
feat: turbofish operator in struct constructor
(noir-lang/noir#5607)
feat: add parameter to call_data attribute
(noir-lang/noir#5599)
feat: turbofish operator on path segments
(noir-lang/noir#5603)
fix: Filter comptime globals
(noir-lang/noir#5538)
chore: Display comptime assertion errors, not Debug
(noir-lang/noir#5605)
chore: add array and slice control flow tests
(noir-lang/noir#5558)
fix: let trait calls work in globals
(noir-lang/noir#5602)
feat: Implement format strings in the comptime interpreter
(noir-lang/noir#5596)
feat: Implement `Value::Type` in comptime interpreter
(noir-lang/noir#5593)
chore(docs): nasty linky (noir-lang/noir#5600)
feat(acir_gen): Width aware ACIR gen addition
(noir-lang/noir#5493)
fix: lookup trait constraints methods in composite types
(noir-lang/noir#5595)
fix: allow trailing comma when parsing where clauses
(noir-lang/noir#5594)
fix: let std::unsafe::zeroed() work for slices
(noir-lang/noir#5592)
fix: error on duplicate struct field
(noir-lang/noir#5585)
END_COMMIT_OVERRIDE

---------

Co-authored-by: sirasistant <[email protected]>
  • Loading branch information
AztecBot and sirasistant authored Aug 2, 2024
1 parent 83f8d9c commit 22845ac
Show file tree
Hide file tree
Showing 160 changed files with 5,303 additions and 1,759 deletions.
2 changes: 1 addition & 1 deletion .noir-sync-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
453ed590ae3ae6ee8a8d3113419fc51b825b2538
812262413770d2f20cba04eb0e3176320a3b704a
8 changes: 4 additions & 4 deletions noir-projects/aztec-nr/aztec/src/keys/constants.nr
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ global TAGGING_INDEX = 3;
global NUM_KEY_TYPES = 4;

global sk_generators = [
GENERATOR_INDEX__NSK_M,
GENERATOR_INDEX__IVSK_M,
GENERATOR_INDEX__OVSK_M,
GENERATOR_INDEX__TSK_M
GENERATOR_INDEX__NSK_M as Field,
GENERATOR_INDEX__IVSK_M as Field,
GENERATOR_INDEX__OVSK_M as Field,
GENERATOR_INDEX__TSK_M as Field
];
2 changes: 1 addition & 1 deletion noir-projects/aztec-nr/aztec/src/keys/public_keys.nr
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl PublicKeys {
self.tpk_m.x,
self.tpk_m.y,
self.tpk_m.is_infinite as Field,
GENERATOR_INDEX__PUBLIC_KEYS_HASH
GENERATOR_INDEX__PUBLIC_KEYS_HASH as Field
]
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ mod tests {
let key_validation_index = builder.previous_kernel.add_request_for_key_validation(
Point { x: 1, y: 2, is_infinite: false },
27,
GENERATOR_INDEX__OVSK_M
GENERATOR_INDEX__OVSK_M as Field
);
let key_validation = builder.previous_kernel.scoped_key_validation_requests_and_generators.storage[key_validation_index];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ mod tests {
let _void = builder.previous_kernel.add_request_for_key_validation(
Point { x: 1, y: 2, is_infinite: false },
27,
GENERATOR_INDEX__IVSK_M
GENERATOR_INDEX__IVSK_M as Field
);
builder.failed();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ mod tests {
let _void = builder.previous_kernel.add_request_for_key_validation(
Point { x: 1, y: 2, is_infinite: false },
27,
GENERATOR_INDEX__TSK_M
GENERATOR_INDEX__TSK_M as Field
);
builder.failed();
}
Expand Down
94 changes: 47 additions & 47 deletions noir-projects/noir-protocol-circuits/crates/types/src/constants.nr
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ global NOTE_HASH_TREE_HEIGHT: u32 = 32;
global PUBLIC_DATA_TREE_HEIGHT: u32 = 40;
global NULLIFIER_TREE_HEIGHT: u32 = 20;
global L1_TO_L2_MSG_TREE_HEIGHT: u32 = 16;
global ARTIFACT_FUNCTION_TREE_MAX_HEIGHT = 5;
global ARTIFACT_FUNCTION_TREE_MAX_HEIGHT: u32 = 5;
global NULLIFIER_TREE_ID = 0;
global NOTE_HASH_TREE_ID = 1;
global PUBLIC_DATA_TREE_ID = 2;
Expand Down Expand Up @@ -165,14 +165,14 @@ global FIXED_DA_GAS: u32 = 512;
// pays for fixed tx costs like validation, and updating state roots
global FIXED_L2_GAS: u32 = 512;
// base cost for a single public call
global FIXED_AVM_STARTUP_L2_GAS = 1024;
global FIXED_AVM_STARTUP_L2_GAS : u32= 1024;
// pays for hashing/validating logs
global L2_GAS_PER_LOG_BYTE = 4;
global L2_GAS_PER_LOG_BYTE: u32 = 4;
// pays for tree insertions.
global L2_GAS_PER_NOTE_HASH = 32;
global L2_GAS_PER_NOTE_HASH: u32 = 32;
// nullifiers are more expensive to insert/validate:
// they are inserted into an indexed tree and must be checked for duplicates
global L2_GAS_PER_NULLIFIER = 64;
global L2_GAS_PER_NULLIFIER: u32 = 64;

// CANONICAL CONTRACT ADDRESSES
global CANONICAL_KEY_REGISTRY_ADDRESS = 0x04c2d010f88e8c238882fbbcbce5c81fdc1dc8ece85e8dbf3f602b4d81ec0351;
Expand Down Expand Up @@ -287,55 +287,55 @@ global VERIFICATION_KEY_LENGTH_IN_FIELDS = 120;
* +-----------+-------------------------------+----------------------+
*/
// Indices with size ≤ 8
global GENERATOR_INDEX__NOTE_HASH = 1;
global GENERATOR_INDEX__NOTE_HASH_NONCE = 2;
global GENERATOR_INDEX__UNIQUE_NOTE_HASH = 3;
global GENERATOR_INDEX__SILOED_NOTE_HASH = 4;
global GENERATOR_INDEX__MESSAGE_NULLIFIER = 5;
global GENERATOR_INDEX__INITIALIZATION_NULLIFIER = 6;
global GENERATOR_INDEX__OUTER_NULLIFIER = 7;
global GENERATOR_INDEX__PUBLIC_DATA_READ = 8;
global GENERATOR_INDEX__PUBLIC_DATA_UPDATE_REQUEST = 9;
global GENERATOR_INDEX__FUNCTION_DATA = 10;
global GENERATOR_INDEX__FUNCTION_LEAF = 11;
global GENERATOR_INDEX__CONTRACT_DEPLOYMENT_DATA = 12;
global GENERATOR_INDEX__CONSTRUCTOR = 13;
global GENERATOR_INDEX__CONSTRUCTOR_ARGS = 14;
global GENERATOR_INDEX__NOTE_HASH: u32 = 1;
global GENERATOR_INDEX__NOTE_HASH_NONCE: u32 = 2;
global GENERATOR_INDEX__UNIQUE_NOTE_HASH: u32 = 3;
global GENERATOR_INDEX__SILOED_NOTE_HASH: u32 = 4;
global GENERATOR_INDEX__MESSAGE_NULLIFIER: u32 = 5;
global GENERATOR_INDEX__INITIALIZATION_NULLIFIER: u32 = 6;
global GENERATOR_INDEX__OUTER_NULLIFIER: u32 = 7;
global GENERATOR_INDEX__PUBLIC_DATA_READ: u32 = 8;
global GENERATOR_INDEX__PUBLIC_DATA_UPDATE_REQUEST: u32 = 9;
global GENERATOR_INDEX__FUNCTION_DATA: u32 = 10;
global GENERATOR_INDEX__FUNCTION_LEAF: u32 = 11;
global GENERATOR_INDEX__CONTRACT_DEPLOYMENT_DATA: u32 = 12;
global GENERATOR_INDEX__CONSTRUCTOR: u32 = 13;
global GENERATOR_INDEX__CONSTRUCTOR_ARGS: u32 = 14;
global GENERATOR_INDEX__CONTRACT_ADDRESS_V1 = 15;
global GENERATOR_INDEX__CONTRACT_LEAF = 16;
global GENERATOR_INDEX__CALL_CONTEXT = 17;
global GENERATOR_INDEX__CALL_STACK_ITEM = 18;
global GENERATOR_INDEX__CONTRACT_LEAF: u32 = 16;
global GENERATOR_INDEX__CALL_CONTEXT: u32 = 17;
global GENERATOR_INDEX__CALL_STACK_ITEM: u32 = 18;
global GENERATOR_INDEX__CALL_STACK_ITEM_2 = 19;
global GENERATOR_INDEX__SECRET_HASH = 20;
global GENERATOR_INDEX__SECRET_HASH: u32 = 20;
global GENERATOR_INDEX__L2_TO_L1_MSG = 21;
global GENERATOR_INDEX__TX_CONTEXT = 22;
global GENERATOR_INDEX__PUBLIC_LEAF_INDEX = 23;
global GENERATOR_INDEX__PUBLIC_DATA_LEAF = 24;
global GENERATOR_INDEX__SIGNED_TX_REQUEST = 25;
global GENERATOR_INDEX__GLOBAL_VARIABLES = 26;
global GENERATOR_INDEX__PARTIAL_ADDRESS = 27;
global GENERATOR_INDEX__BLOCK_HASH = 28;
global GENERATOR_INDEX__SIDE_EFFECT = 29;
global GENERATOR_INDEX__FEE_PAYLOAD = 30;
global GENERATOR_INDEX__TX_CONTEXT: u32 = 22;
global GENERATOR_INDEX__PUBLIC_LEAF_INDEX: u32 = 23;
global GENERATOR_INDEX__PUBLIC_DATA_LEAF: u32 = 24;
global GENERATOR_INDEX__SIGNED_TX_REQUEST: u32 = 25;
global GENERATOR_INDEX__GLOBAL_VARIABLES: u32 = 26;
global GENERATOR_INDEX__PARTIAL_ADDRESS: u32 = 27;
global GENERATOR_INDEX__BLOCK_HASH: u32 = 28;
global GENERATOR_INDEX__SIDE_EFFECT: u32 = 29;
global GENERATOR_INDEX__FEE_PAYLOAD: u32 = 30;
// Indices with size ≤ 16
global GENERATOR_INDEX__TX_REQUEST = 33;
global GENERATOR_INDEX__SIGNATURE_PAYLOAD = 34;
global GENERATOR_INDEX__TX_REQUEST: u32 = 33;
global GENERATOR_INDEX__SIGNATURE_PAYLOAD: u32 = 34;
// Indices with size ≤ 44
global GENERATOR_INDEX__VK = 41;
global GENERATOR_INDEX__PRIVATE_CIRCUIT_PUBLIC_INPUTS = 42;
global GENERATOR_INDEX__PUBLIC_CIRCUIT_PUBLIC_INPUTS = 43;
global GENERATOR_INDEX__VK: u32 = 41;
global GENERATOR_INDEX__PRIVATE_CIRCUIT_PUBLIC_INPUTS: u32 = 42;
global GENERATOR_INDEX__PUBLIC_CIRCUIT_PUBLIC_INPUTS: u32 = 43;
// TODO: Function args generator index is being used to hash 64 items
global GENERATOR_INDEX__FUNCTION_ARGS = 44;
global GENERATOR_INDEX__AUTHWIT_INNER = 45;
global GENERATOR_INDEX__AUTHWIT_OUTER = 46;
global GENERATOR_INDEX__AUTHWIT_NULLIFIER = 47;
global GENERATOR_INDEX__FUNCTION_ARGS: u32 = 44;
global GENERATOR_INDEX__AUTHWIT_INNER: u32 = 45;
global GENERATOR_INDEX__AUTHWIT_OUTER: u32 = 46;
global GENERATOR_INDEX__AUTHWIT_NULLIFIER: u32 = 47;
// Key related generators follow
global GENERATOR_INDEX__NSK_M = 48;
global GENERATOR_INDEX__IVSK_M = 49;
global GENERATOR_INDEX__OVSK_M = 50;
global GENERATOR_INDEX__TSK_M = 51;
global GENERATOR_INDEX__PUBLIC_KEYS_HASH = 52;
global GENERATOR_INDEX__NOTE_NULLIFIER = 53;
global GENERATOR_INDEX__NSK_M: u32 = 48;
global GENERATOR_INDEX__IVSK_M: u32 = 49;
global GENERATOR_INDEX__OVSK_M: u32 = 50;
global GENERATOR_INDEX__TSK_M: u32 = 51;
global GENERATOR_INDEX__PUBLIC_KEYS_HASH: u32 = 52;
global GENERATOR_INDEX__NOTE_NULLIFIER: u32 = 53;
global GENERATOR_INDEX__NOTE_HIDING_POINT: u32 = 54;
global GENERATOR_INDEX__SYMMETRIC_KEY: u8 = 55;

Expand Down
2 changes: 1 addition & 1 deletion noir/bb-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.46.1
0.47.1
120 changes: 0 additions & 120 deletions noir/noir-repo/.github/ISSUE_TEMPLATE/bug_report.yml

This file was deleted.

71 changes: 0 additions & 71 deletions noir/noir-repo/.github/ISSUE_TEMPLATE/feature_request.yml

This file was deleted.

1 change: 1 addition & 0 deletions noir/noir-repo/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 22845ac

Please sign in to comment.