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: RC optimization pass #4560

Merged
merged 17 commits into from
Mar 18, 2024
Merged
Prev Previous commit
Next Next commit
Remove extra line
jfecher committed Mar 18, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 383ad40bb43e2ddb375f1b0f818597b0992e0bb9
1 change: 0 additions & 1 deletion test_programs/execution_success/brillig_rc_opt/src/main.nr
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

unconstrained fn main() {
let mut array = [1, 2, 3];


Unchanged files with check annotations Beta

let bytes = block.to_be_bytes();
blocks[i * 4..i * 4 + 4].copy_from_slice(&bytes);
}
let blocks: GenericArray<u8, sha2::digest::typenum::U64> = blocks.into();

Check warning on line 42 in acvm-repo/blackbox_solver/src/hash.rs

GitHub Actions / Code

Unknown word (typenum)
sha2::compress256(state, &[blocks]);
}
#[test]
fn sanity_check() {
// Test vectors are copied from XKCP (eXtended Keccak Code Package)

Check warning on line 61 in acvm-repo/blackbox_solver/src/hash.rs

GitHub Actions / Code

Unknown word (XKCP)
// https://github.com/XKCP/XKCP/blob/master/tests/TestVectors/KeccakF-1600-IntermediateValues.txt
let zero_state = [0u64; 25];
### Features
* **acvm_js:** Add `execute_circuit_with_black_box_solver` to prevent reinitialization of `BlackBoxFunctionSolver` ([3877e0e](https://github.com/noir-lang/acvm/commit/3877e0e438a8d0e5545a4da7210767dec05c342f))

Check warning on line 746 in acvm-repo/CHANGELOG.md

GitHub Actions / Code

Unknown word (reinitialization)
* Expose a `BlackBoxFunctionSolver` containing a barretenberg wasm from `blackbox_solver` ([#494](https://github.com/noir-lang/acvm/issues/494)) ([a1d4b71](https://github.com/noir-lang/acvm/commit/a1d4b71256dfbf1e883e770dd9c45479235aa860))
### ⚠ BREAKING CHANGES
* add backend-solvable blackboxes to brillig & unify implementations ([#422](https://github.com/noir-lang/acvm/issues/422))

Check warning on line 854 in acvm-repo/CHANGELOG.md

GitHub Actions / Code

Unknown word (blackboxes)
* **acvm:** Remove `CircuitSimplifer` ([#421](https://github.com/noir-lang/acvm/issues/421))

Check warning on line 855 in acvm-repo/CHANGELOG.md

GitHub Actions / Code

Unknown word (Simplifer)
* **acvm:** Add `circuit: &Circuit` to `eth_contract_from_vk` function signature ([#420](https://github.com/noir-lang/acvm/issues/420))
* Returns index of failing opcode and transformation mapping ([#412](https://github.com/noir-lang/acvm/issues/412))
### Features
* **acvm:** Add `circuit: &Circuit` to `eth_contract_from_vk` function signature ([#420](https://github.com/noir-lang/acvm/issues/420)) ([744e9da](https://github.com/noir-lang/acvm/commit/744e9da71f7ca477a5390a63f47211dd4dffb8b3))
* add backend-solvable blackboxes to brillig & unify implementations ([#422](https://github.com/noir-lang/acvm/issues/422)) ([093342e](https://github.com/noir-lang/acvm/commit/093342ea9481a311fa71343b8b7a22774788838a))

Check warning on line 862 in acvm-repo/CHANGELOG.md

GitHub Actions / Code

Unknown word (blackboxes)
* derive PartialOrd, Ord, and Hash on RegisterIndex ([#425](https://github.com/noir-lang/acvm/issues/425)) ([7f6b0dc](https://github.com/noir-lang/acvm/commit/7f6b0dc138c4e11d2b5847f0c9603979cc43493a))
* Returns index of failing opcode and transformation mapping ([#412](https://github.com/noir-lang/acvm/issues/412)) ([79950e9](https://github.com/noir-lang/acvm/commit/79950e943f60e4082e1cf5ec4442aa67ea91aade))
* **stdlib:** Add fallback implementation of `SHA256` black box function ([#407](https://github.com/noir-lang/acvm/issues/407)) ([040369a](https://github.com/noir-lang/acvm/commit/040369adc8749fa5ec2edd255ff54c105c3140f5))
* **acir:** Add a public outputs field ([#56](https://github.com/noir-lang/acvm/issues/56))
* **acir:** remove `Linear` struct ([#145](https://github.com/noir-lang/acvm/issues/145))
* **acvm:** remove `prove_with_meta` and `verify_from_cs` from `ProofSystemCompiler` ([#140](https://github.com/noir-lang/acvm/issues/140))
* **acvm:** Remove truncate and oddrange directives ([#142](https://github.com/noir-lang/acvm/issues/142))

Check warning on line 1211 in acvm-repo/CHANGELOG.md

GitHub Actions / Code

Unknown word (oddrange)
### Features
* **acir:** remove `Linear` struct ([#145](https://github.com/noir-lang/acvm/issues/145)) ([bbb6d92](https://github.com/noir-lang/acvm/commit/bbb6d92e25c43dd33b12f5fcd639fc9ad2a9c9d8))
* **acvm:** remove `prove_with_meta` and `verify_from_cs` from `ProofSystemCompiler` ([#140](https://github.com/noir-lang/acvm/issues/140)) ([35dd181](https://github.com/noir-lang/acvm/commit/35dd181102203df17eef510666b327ef41f4b036))
* **acvm:** Remove truncate and oddrange directives ([#142](https://github.com/noir-lang/acvm/issues/142)) ([85dd6e8](https://github.com/noir-lang/acvm/commit/85dd6e85bfba85bfb97651f7e30e1f75deb986d5))

Check warning on line 1224 in acvm-repo/CHANGELOG.md

GitHub Actions / Code

Unknown word (oddrange)
## [0.6.0](https://github.com/noir-lang/acvm/compare/root-v0.5.0...root-v0.6.0) (2023-03-03)
- Refactor the way we print ACIR (This is a first draft and will change with more feedback)
- Rename `solve_gadget_call` trait method on ProofSystemCompile to `solve_blackbox_function_call`
- API for `compile` now requires a function pointer which tells us whether a blackbox function is supported
- Renamed Directive::Oddrange to Directive::OddRange

Check warning on line 1364 in acvm-repo/CHANGELOG.md

GitHub Actions / Code

Unknown word (Oddrange)
- Renamed FieldElement::to_bytes to FieldElement::to_be_bytes
### Removed
} else if is_custom_attribute(&secondary_attribute, "aztec(initializer)") {
is_initializer = true;
insert_init_check = false;
} else if is_custom_attribute(&secondary_attribute, "aztec(noinitcheck)") {

Check warning on line 127 in aztec_macros/src/lib.rs

GitHub Actions / Code

Unknown word (noinitcheck)
insert_init_check = false;
} else if is_custom_attribute(&secondary_attribute, "aztec(internal)") {
is_internal = true;