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: Sync from noir #11294

Merged
merged 62 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
5a889cb
[1 changes] chore(ssa): Use correct prefix when printing array values…
AztecBot Jan 17, 2025
9f63bed
chore: apply sync fixes
AztecBot Jan 17, 2025
606b9ac
[1 changes] fix: defunctionalize pass on the caller runtime to apply …
AztecBot Jan 18, 2025
a72b1b8
chore: apply sync fixes
AztecBot Jan 18, 2025
67d362a
fix: defunctionalize pass on the caller runtime to apply (https://git…
AztecBot Jan 18, 2025
de1be34
[1 changes] fix: defunctionalize pass on the caller runtime to apply …
AztecBot Jan 19, 2025
470f921
chore: apply sync fixes
AztecBot Jan 19, 2025
9a8ae15
fix: defunctionalize pass on the caller runtime to apply (https://git…
AztecBot Jan 19, 2025
92fe93c
[1 changes] fix: defunctionalize pass on the caller runtime to apply …
AztecBot Jan 20, 2025
1ae9dc8
chore: apply sync fixes
AztecBot Jan 20, 2025
16c1348
fix: defunctionalize pass on the caller runtime to apply (https://git…
AztecBot Jan 20, 2025
dda6bed
Merge branch 'master' into sync-noir
TomAFrench Jan 20, 2025
cde04e6
Merge branch 'master' into sync-noir
TomAFrench Jan 20, 2025
23d6947
[1 changes] fix: don't always use an exclusive lock in `nargo check` …
AztecBot Jan 20, 2025
f21b821
chore: apply sync fixes
AztecBot Jan 20, 2025
a5c1b5f
fix: don't always use an exclusive lock in `nargo check` (https://git…
AztecBot Jan 20, 2025
ebb0774
DEBUGGING
aakoshh Jan 20, 2025
3404fce
[1 changes] fix: Prevent overlapping associated types impls (https://…
AztecBot Jan 21, 2025
053fc55
chore: apply sync fixes
AztecBot Jan 21, 2025
57ac507
fix: Prevent overlapping associated types impls (https://github.com/n…
AztecBot Jan 21, 2025
e3febe6
Parse Prover.toml or Prover.json
aakoshh Jan 21, 2025
374dc8a
Merge branch 'sync-noir' of github.com:AztecProtocol/aztec-packages i…
aakoshh Jan 21, 2025
efe1851
Extra logging when simulation fails
aakoshh Jan 21, 2025
8d3ae19
Add missing flag to CheckCmd
aakoshh Jan 21, 2025
89a2cab
Re-enable preprocessing
aakoshh Jan 21, 2025
1d03119
Preserve type in get_from_call_data
aakoshh Jan 22, 2025
0391234
Update noir/noir-repo/compiler/noirc_evaluator/src/acir/mod.rs
TomAFrench Jan 22, 2025
e9bfd0c
Log failing protocol circuit hash
aakoshh Jan 22, 2025
df04af5
[1 changes] feat: add `noir-inspector` (https://github.com/noir-lang/…
AztecBot Jan 24, 2025
d174172
chore: apply sync fixes
AztecBot Jan 24, 2025
eb2f133
feat: add `noir-inspector` (https://github.com/noir-lang/noir/pull/7136)
AztecBot Jan 24, 2025
bf16c04
Merge branch 'master' into sync-noir
TomAFrench Jan 24, 2025
a148954
Fix merge
aakoshh Jan 24, 2025
7c47422
Add back missing test program
aakoshh Jan 24, 2025
2143ac7
temporarily comment out tests
vezenovm Jan 24, 2025
9331891
comment out 512 test
vezenovm Jan 24, 2025
7bc19a4
Merge branch 'master' into sync-noir
vezenovm Jan 24, 2025
9dc9809
[1 changes] chore: let `add_definition_location` take a Location (htt…
AztecBot Jan 25, 2025
bdf5fa7
chore: apply sync fixes
AztecBot Jan 25, 2025
d672928
chore: let `add_definition_location` take a Location (https://github.…
AztecBot Jan 25, 2025
c127228
[1 changes] chore: let `add_definition_location` take a Location (htt…
AztecBot Jan 26, 2025
0d1bd03
chore: apply sync fixes
AztecBot Jan 26, 2025
feee294
chore: let `add_definition_location` take a Location (https://github.…
AztecBot Jan 26, 2025
1c42a35
[1 changes] chore: let `add_definition_location` take a Location (htt…
AztecBot Jan 27, 2025
09f355a
chore: apply sync fixes
AztecBot Jan 27, 2025
f56fe2d
chore: let `add_definition_location` take a Location (https://github.…
AztecBot Jan 27, 2025
e5267d7
Fix merge
aakoshh Jan 27, 2025
9c70d4c
Display which test panicked
aakoshh Jan 27, 2025
285662a
Comment out panicky tests again
aakoshh Jan 27, 2025
d654c1c
Merge branch 'master' into sync-noir
TomAFrench Jan 27, 2025
5fe6a89
Prefer const
aakoshh Jan 27, 2025
4a9dd59
Merge branch 'sync-noir' of github.com:AztecProtocol/aztec-packages i…
aakoshh Jan 27, 2025
39f42b8
TEMP FIX: Reverse the order of the call stack
aakoshh Jan 28, 2025
dc9b7b9
TEMP FIX: Keep inc_rs for array params
aakoshh Jan 28, 2025
ac9e584
TEMP FIX: Fix regression in private_kernel_init_simulated test
aakoshh Jan 29, 2025
4608c49
TEMP FIX: Track mutated arrays on the function level
aakoshh Jan 29, 2025
578a92d
TEMP FIX: Diable Mem2Reg (1st) pass; fixes the simulator test
aakoshh Jan 30, 2025
722e3aa
Merge branch 'master' into sync-noir
TomAFrench Jan 30, 2025
aad1248
.
TomAFrench Jan 30, 2025
c30734b
TEMP FIX: Do not panic, just simplify unhandled instructions
aakoshh Jan 30, 2025
dc6d0b3
TEMP FIX: Increase the balance to pay for increased gas cost
aakoshh Jan 30, 2025
feca4ed
TEMP FIX: Invert fee check in C++
aakoshh Jan 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .noir-sync-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c172880ae47ec4906cda662801bd4b7866c9586b
c44b62615f1c8ee657eedd82f2b80e2ec76c9078
3 changes: 2 additions & 1 deletion barretenberg/cpp/src/barretenberg/vm/avm/trace/trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,8 @@ void AvmTraceBuilder::pay_fee()
FF current_balance = read_hint.leaf_preimage.value;

const auto updated_balance = current_balance - tx_fee;
if (current_balance < tx_fee) {
// Comparison on Field gives inverted results, so we cast to uint128, which should be enough for fees.
if (static_cast<uint128_t>(current_balance) < static_cast<uint128_t>(tx_fee)) {
info("Not enough balance for fee payer to pay for transaction (got ", current_balance, " needs ", tx_fee);
throw std::runtime_error("Not enough balance for fee payer to pay for transaction");
}
Expand Down
214 changes: 117 additions & 97 deletions noir/noir-repo/.github/workflows/reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ jobs:

external_repo_compilation_and_execution_report:
needs: [build-nargo]
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 15
strategy:
fail-fast: false
Expand Down Expand Up @@ -421,53 +421,9 @@ jobs:
retention-days: 3
overwrite: true

upload_compilation_report:
name: Upload compilation report
needs: [generate_compilation_and_execution_report, external_repo_compilation_and_execution_report]
# We want this job to run even if one variation of the matrix in `external_repo_compilation_and_execution_report` fails
if: always()
runs-on: ubuntu-latest
permissions:
pull-requests: write

steps:
- uses: actions/checkout@v4

- name: Download initial compilation report
uses: actions/download-artifact@v4
with:
name: in_progress_compilation_report

- name: Download matrix compilation reports
uses: actions/download-artifact@v4
with:
pattern: compilation_report_*
path: ./reports

- name: Merge compilation reports using jq
run: |
mv ./.github/scripts/merge-bench-reports.sh merge-bench-reports.sh
./merge-bench-reports.sh compilation_report

- name: Parse compilation report
id: compilation_report
uses: noir-lang/noir-bench-report@6ba151d7795042c4ff51864fbeb13c0a6a79246c
with:
report: compilation_report.json
header: |
Compilation Report
memory_report: false

- name: Add memory report to sticky comment
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
uses: marocchino/sticky-pull-request-comment@v2
with:
header: compilation
message: ${{ steps.compilation_report.outputs.markdown }}

external_repo_memory_report:
needs: [build-nargo]
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 30
strategy:
fail-fast: false
Expand Down Expand Up @@ -508,6 +464,7 @@ jobs:
path: scripts
sparse-checkout: |
test_programs/memory_report.sh
test_programs/parse_memory.sh
sparse-checkout-cone-mode: false

- name: Checkout
Expand All @@ -521,6 +478,7 @@ jobs:
working-directory: ./test-repo/${{ matrix.project.path }}
run: |
mv /home/runner/work/noir/noir/scripts/test_programs/memory_report.sh ./memory_report.sh
mv /home/runner/work/noir/noir/scripts/test_programs/parse_memory.sh ./parse_memory.sh
./memory_report.sh 1
# Rename the memory report as the execution report is about to write to the same file
cp memory_report.json compilation_memory_report.json
Expand Down Expand Up @@ -568,14 +526,67 @@ jobs:
retention-days: 3
overwrite: true

upload_compilation_report:
name: Upload compilation report
needs: [generate_compilation_and_execution_report, external_repo_compilation_and_execution_report]
# We want this job to run even if one variation of the matrix in `external_repo_compilation_and_execution_report` fails
if: always()
runs-on: ubuntu-22.04
permissions:
pull-requests: write
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write

steps:
- uses: actions/checkout@v4

- name: Download initial compilation report
uses: actions/download-artifact@v4
with:
name: in_progress_compilation_report

- name: Download matrix compilation reports
uses: actions/download-artifact@v4
with:
pattern: compilation_report_*
path: ./reports

- name: Merge compilation reports using jq
run: |
mv ./.github/scripts/merge-bench-reports.sh merge-bench-reports.sh
./merge-bench-reports.sh compilation_report
jq ".compilation_reports | map({name: .artifact_name, value: (.time[:-1] | tonumber), unit: \"s\"}) " ./compilation_report.json > time_bench.json

- name: Store benchmark result
continue-on-error: true
uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
with:
name: "Compilation Time"
tool: "customSmallerIsBetter"
output-file-path: ./time_bench.json
github-token: ${{ secrets.GITHUB_TOKEN }}
# We want this to only run on master to avoid garbage data from PRs being added.
auto-push: ${{ github.ref == 'refs/heads/master' }}
alert-threshold: "120%"
comment-on-alert: true
fail-on-alert: false
alert-comment-cc-users: "@TomAFrench"
max-items-in-chart: 50

upload_compilation_memory_report:
name: Upload compilation memory report
needs: [generate_memory_report, external_repo_memory_report]
# We want this job to run even if one variation of the matrix in `external_repo_memory_report` fails
if: always()
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
pull-requests: write
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write

steps:
- uses: actions/checkout@v4
Expand All @@ -595,33 +606,36 @@ jobs:
run: |
mv ./.github/scripts/merge-bench-reports.sh merge-bench-reports.sh
./merge-bench-reports.sh memory_report
# Rename the memory report as to not clash with the compilation memory report file name
cp memory_report.json execution_memory_report.json

- name: Parse compilation memory report
id: compilation_mem_report
uses: noir-lang/noir-bench-report@6ba151d7795042c4ff51864fbeb13c0a6a79246c
with:
report: execution_memory_report.json
header: |
Compilation Memory Report
memory_report: true

- name: Add execution memory report to sticky comment
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
uses: marocchino/sticky-pull-request-comment@v2
with:
header: compilation_memory
message: ${{ steps.compilation_mem_report.outputs.markdown }}
jq ".memory_reports | map({name: .artifact_name, value: (.peak_memory | tonumber), unit: \"MB\"}) " ./memory_report.json > memory_bench.json

- name: Store benchmark result
continue-on-error: true
uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
with:
name: "Compilation Memory"
tool: "customSmallerIsBetter"
output-file-path: ./memory_bench.json
github-token: ${{ secrets.GITHUB_TOKEN }}
# We want this to only run on master to avoid garbage data from PRs being added.
auto-push: ${{ github.ref == 'refs/heads/master' }}
alert-threshold: "120%"
comment-on-alert: true
fail-on-alert: false
alert-comment-cc-users: "@TomAFrench"
max-items-in-chart: 50

upload_execution_memory_report:
name: Upload execution memory report
needs: [generate_memory_report, external_repo_memory_report]
# We want this job to run even if one variation of the matrix in `external_repo_memory_report` fails
if: always()
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
pull-requests: write
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write

steps:
- uses: actions/checkout@v4
Expand All @@ -643,31 +657,37 @@ jobs:
./merge-bench-reports.sh memory_report
# Rename the memory report as to not clash with the compilation memory report file name
cp memory_report.json execution_memory_report.json
jq ".memory_reports | map({name: .artifact_name, value: (.peak_memory | tonumber), unit: \"MB\"}) " ./execution_memory_report.json > memory_bench.json

- name: Parse execution memory report
id: execution_mem_report
uses: noir-lang/noir-bench-report@6ba151d7795042c4ff51864fbeb13c0a6a79246c
- name: Store benchmark result
continue-on-error: true
uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
with:
report: execution_memory_report.json
header: |
Execution Memory Report
memory_report: true
name: "Execution Memory"
tool: "customSmallerIsBetter"
output-file-path: ./memory_bench.json
github-token: ${{ secrets.GITHUB_TOKEN }}
# We want this to only run on master to avoid garbage data from PRs being added.
auto-push: ${{ github.ref == 'refs/heads/master' }}
alert-threshold: "120%"
comment-on-alert: true
fail-on-alert: false
alert-comment-cc-users: "@TomAFrench"
max-items-in-chart: 50

- name: Add execution memory report to sticky comment
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
uses: marocchino/sticky-pull-request-comment@v2
with:
header: execution_memory
message: ${{ steps.execution_mem_report.outputs.markdown }}

upload_execution_report:
name: Upload execution report
needs: [generate_compilation_and_execution_report, external_repo_compilation_and_execution_report]
# We want this job to run even if one variation of the matrix in `external_repo_compilation_and_execution_report` fails
if: always()
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
pull-requests: write
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write

steps:
- uses: actions/checkout@v4
Expand All @@ -687,20 +707,20 @@ jobs:
run: |
mv ./.github/scripts/merge-bench-reports.sh merge-bench-reports.sh
./merge-bench-reports.sh execution_report

- name: Parse execution report
id: execution_report
uses: noir-lang/noir-bench-report@6ba151d7795042c4ff51864fbeb13c0a6a79246c
with:
report: execution_report.json
header: |
Execution Report
execution_report: true

- name: Add memory report to sticky comment
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
uses: marocchino/sticky-pull-request-comment@v2
with:
header: execution_time
message: ${{ steps.execution_report.outputs.markdown }}

jq ".execution_reports | map({name: .artifact_name, value: (.time[:-1] | tonumber), unit: \"s\"}) " ./execution_report.json > time_bench.json

- name: Store benchmark result
continue-on-error: true
uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
with:
name: "Execution Time"
tool: "customSmallerIsBetter"
output-file-path: ./time_bench.json
github-token: ${{ secrets.GITHUB_TOKEN }}
# We want this to only run on master to avoid garbage data from PRs being added.
auto-push: ${{ github.ref == 'refs/heads/master' }}
alert-threshold: "120%"
comment-on-alert: true
fail-on-alert: false
alert-comment-cc-users: "@TomAFrench"
max-items-in-chart: 50
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
tool: [email protected]

- name: Build and archive tests
run: cargo nextest archive --workspace --release --archive-file nextest-archive.tar.zst
run: cargo nextest archive --workspace --archive-file nextest-archive.tar.zst

- name: Upload archive to workflow
uses: actions/upload-artifact@v4
Expand Down
4 changes: 2 additions & 2 deletions noir/noir-repo/.github/workflows/test-rust-workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- uses: Swatinem/rust-cache@v2
with:
key: x86_64-unknown-linux-gnu
key: x86_64-unknown-linux-gnu-debug
cache-on-failure: true
save-if: ${{ github.event_name != 'merge_group' }}

Expand All @@ -39,7 +39,7 @@ jobs:
tool: [email protected]

- name: Build and archive tests
run: cargo nextest archive --workspace --release --archive-file nextest-archive.tar.zst
run: cargo nextest archive --workspace --archive-file nextest-archive.tar.zst

- name: Upload archive to workflow
uses: actions/upload-artifact@v4
Expand Down
14 changes: 14 additions & 0 deletions noir/noir-repo/Cargo.lock

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

2 changes: 2 additions & 0 deletions noir/noir-repo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ members = [
"tooling/noirc_abi_wasm",
"tooling/acvm_cli",
"tooling/profiler",
"tooling/inspector",
# ACVM
"acvm-repo/acir_field",
"acvm-repo/acir",
Expand All @@ -40,6 +41,7 @@ default-members = [
"tooling/nargo_cli",
"tooling/acvm_cli",
"tooling/profiler",
"tooling/inspector",
]
resolver = "2"

Expand Down
4 changes: 2 additions & 2 deletions noir/noir-repo/compiler/noirc_driver/src/abi_gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ pub(super) fn abi_type_from_hir_type(context: &Context, typ: &Type) -> AbiType {
AbiType::String { length: size }
}

Type::Struct(def, args) => {
Type::DataType(def, args) => {
let struct_type = def.borrow();
let fields = struct_type.get_fields(args);
let fields = struct_type.get_fields(args).unwrap_or_default();
let fields =
vecmap(fields, |(name, typ)| (name, abi_type_from_hir_type(context, &typ)));
// For the ABI, we always want to resolve the struct paths from the root crate
Expand Down
Loading