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 #10483

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
5432ee9
[1 changes]
AztecBot Dec 8, 2024
c80b654
chore: apply sync fixes
AztecBot Dec 8, 2024
d5dc851
Merge branch 'master' into sync-noir
TomAFrench Dec 9, 2024
22be332
[1 changes] feat: Order attribute execution by their source ordering …
AztecBot Dec 9, 2024
bed011d
chore: apply sync fixes
AztecBot Dec 9, 2024
8d3752e
feat: Order attribute execution by their source ordering (https://git…
AztecBot Dec 9, 2024
2445f7a
chore: pull across macro ordering changes (#10466)
TomAFrench Dec 9, 2024
74ae849
Merge branch 'master' into sync-noir
TomAFrench Dec 9, 2024
36fff22
Apply suggestions from code review
TomAFrench Dec 9, 2024
450f431
[1 changes] chore: free memory for silenced warnings early (https://g…
AztecBot Dec 10, 2024
2563f49
chore: apply sync fixes
AztecBot Dec 10, 2024
493106f
chore: free memory for silenced warnings early (https://github.com/no…
AztecBot Dec 10, 2024
4520593
.
TomAFrench Dec 10, 2024
a56d0d2
[1 changes] fix: Do not merge expressions that contain output witness…
AztecBot Dec 11, 2024
ceae8e1
chore: apply sync fixes
AztecBot Dec 11, 2024
7a66f06
fix: Do not merge expressions that contain output witnesses (https://…
AztecBot Dec 11, 2024
9c79a87
Merge branch 'master' into sync-noir
TomAFrench Dec 11, 2024
5e41b03
[1 changes] chore: Try replace callstack with a linked list (https://…
AztecBot Dec 11, 2024
f73299e
chore: apply sync fixes
AztecBot Dec 11, 2024
17e7f3b
chore: Try replace callstack with a linked list (https://github.com/n…
AztecBot Dec 11, 2024
1353980
Fix optimizer to keep track of chaning opcode locations
aakoshh Dec 12, 2024
dcb26c7
Merge branch 'sync-noir' of github.com:AztecProtocol/aztec-packages i…
aakoshh Dec 12, 2024
2abfafa
Early exit on 0
aakoshh Dec 12, 2024
97fd0e1
[1 changes] feat: several `nargo test` improvements (https://github.c…
AztecBot Dec 12, 2024
22818a6
chore: apply sync fixes
AztecBot Dec 12, 2024
5c54d74
feat: several `nargo test` improvements (https://github.com/noir-lang…
AztecBot Dec 12, 2024
5caae4e
chore: fix build
TomAFrench Dec 12, 2024
0e07fa3
.
TomAFrench Dec 12, 2024
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 @@
6d0f86ba389a5b59b1d7fdcadcbce3e40eecaa48
1b0dd4149d9249f0ea4fb5e2228c688e0135618f
16 changes: 16 additions & 0 deletions avm-transpiler/Cargo.lock

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

2 changes: 1 addition & 1 deletion noir-projects/aztec-nr/aztec/src/macros/events/mod.nr
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use super::utils::compute_event_selector;
use protocol_types::meta::flatten_to_fields;
use std::meta::typ::fresh_type_variable;

comptime fn generate_event_interface(s: StructDefinition) -> Quoted {
let name = s.name();
Expand All @@ -13,7 +14,6 @@ comptime fn generate_event_interface(s: StructDefinition) -> Quoted {
impl aztec::event::event_interface::EventInterface<$content_len> for $name {
fn to_be_bytes(self) -> [u8; $content_len * 32 + 32] {
let mut buffer: [u8; $content_len * 32 + 32] = [0; $content_len * 32 + 32];

let event_type_id_bytes: [u8; 32] = $name::get_event_type_id().to_field().to_be_bytes();

for i in 0..32 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ contract ContractInstanceDeployer {
};
use std::meta::derive;

#[event]
#[derive(Serialize)]
#[event]
struct ContractInstanceDeployed {
DEPLOYER_CONTRACT_INSTANCE_DEPLOYED_MAGIC_VALUE: Field,
address: AztecAddress,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ contract Crowdfunding {
use token::Token;
// docs:end:all-deps

#[event]
#[derive(Serialize)]
#[event]
struct WithdrawalProcessed {
who: AztecAddress,
amount: u64,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ contract NFT {
utils::comparison::Comparator,
};
use dep::compressed_string::FieldCompressedString;
use std::{embedded_curve_ops::EmbeddedCurvePoint, meta::derive};
use std::meta::derive;

// TODO(#8467): Rename this to Transfer - calling this NFTTransfer to avoid export conflict with the Transfer event
// in the Token contract.
#[event]
#[derive(Serialize)]
#[event]
struct NFTTransfer {
from: AztecAddress,
to: AztecAddress,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ contract SchnorrAccount {
is_infinite: false,
};
let valid_in_private =
std::schnorr::verify_signature(pub_key, signature, message_hash.to_be_bytes::<32>());
schnorr::verify_signature(pub_key, signature, message_hash.to_be_bytes::<32>());

// Compute the nullifier and check if it is spent
// This will BLINDLY TRUST the oracle, but the oracle is us, and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,11 @@ contract Test {
get_mint_to_private_content_hash, get_mint_to_public_content_hash,
};
use dep::value_note::value_note::ValueNote;
// TODO investigate why the macros require EmbeddedCurvePoint and EmbeddedCurveScalar
use std::embedded_curve_ops::{EmbeddedCurvePoint, EmbeddedCurveScalar};
use std::meta::derive;

use crate::test_note::TestNote;

#[event]
#[derive(Serialize)]
#[event]
struct ExampleEvent {
value0: Field,
value1: Field,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,15 @@ contract TestLog {
use dep::value_note::value_note::ValueNote;
use std::meta::derive;

use std::embedded_curve_ops::EmbeddedCurveScalar;

#[event]
#[derive(Serialize)]
#[event]
struct ExampleEvent0 {
value0: Field,
value1: Field,
}

#[event]
#[derive(Serialize)]
#[event]
struct ExampleEvent1 {
value2: AztecAddress,
value3: u8,
Expand Down
2 changes: 1 addition & 1 deletion noir/bb-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.63.1
0.66.0
27 changes: 27 additions & 0 deletions noir/noir-repo/.github/scripts/merge-bench-reports.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
set -eu

echo "Merging reports"

REPORT_NAME=$1
NAME_PLURAL=""$REPORT_NAME"s"

combined_reports="[]"

# Iterate over each report and merge them
for report in ./reports/*; do
# The report is saved under ./$REPORT_NAME_{ matrix_report }/$REPORT_NAME_{ matrix_report }.json
FILE_PATH=$(echo $(ls $report))

# Extract the $NAME_PLURAL array from each report and merge it
combined_reports=$(jq '[."'"$NAME_PLURAL"'"[]] + '"$combined_reports" <<< "$(cat "$report/$FILE_PATH")")
done

combined_reports=$(jq '[."'$NAME_PLURAL'"[]] + '"$combined_reports" <<< "$(cat ./$REPORT_NAME.json)")

# Wrap the merged memory reports into a new object as to keep the $NAME_PLURAL key
final_report="{\"$NAME_PLURAL\": $combined_reports}"

echo "$final_report" > $REPORT_NAME.json

cat $REPORT_NAME.json
2 changes: 1 addition & 1 deletion noir/noir-repo/.github/workflows/cache-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
cleanup:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Cleanup
run: |
Expand Down
2 changes: 1 addition & 1 deletion noir/noir-repo/.github/workflows/deny.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ concurrency: deny-${{ github.head_ref || github.run_id }}
jobs:
deny:
name: deny
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1
Expand Down
2 changes: 1 addition & 1 deletion noir/noir-repo/.github/workflows/docs-dead-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:

jobs:
markdown-link-check:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@master
- uses: gaurav-nelson/github-action-markdown-link-check@v1
Expand Down
8 changes: 4 additions & 4 deletions noir/noir-repo/.github/workflows/docs-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
add_label:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
has_label: ${{ steps.check-labels.outputs.result }}
steps:
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
}
build_preview:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:

deploy_preview:
needs: [build_preview, add_label]
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
pull-requests: write
if: needs.add_label.outputs.has_label == 'true'
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:

add_comment:
needs: [deploy_preview]
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
pull-requests: write
steps:
Expand Down
8 changes: 4 additions & 4 deletions noir/noir-repo/.github/workflows/formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ concurrency:
jobs:
clippy:
name: cargo clippy
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 30
env:
RUSTFLAGS: -Dwarnings
Expand All @@ -41,7 +41,7 @@ jobs:

rustfmt:
name: cargo fmt
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 30
env:
RUSTFLAGS: -Dwarnings
Expand All @@ -67,7 +67,7 @@ jobs:

eslint:
name: eslint
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 30

steps:
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
nargo_fmt:
needs: [build-nargo]
name: Nargo fmt
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 30

steps:
Expand Down
2 changes: 1 addition & 1 deletion noir/noir-repo/.github/workflows/publish-acvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
publish:
name: Publish in order
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion noir/noir-repo/.github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
publish-docs:
name: Publish docs
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Checkout release branch
Expand Down
8 changes: 4 additions & 4 deletions noir/noir-repo/.github/workflows/publish-es-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ run-name: Publish ES Packages from ${{ inputs.noir-ref }} under @${{ inputs.npm-

jobs:
build-noirc_abi_wasm:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout Noir repo
uses: actions/checkout@v4
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
retention-days: 10

build-noir_wasm:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
retention-days: 3

build-acvm_js:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
retention-days: 3

publish-es-packages:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [build-acvm_js, build-noirc_abi_wasm, build-noir_wasm]
steps:
- name: Checkout sources
Expand Down
2 changes: 1 addition & 1 deletion noir/noir-repo/.github/workflows/publish-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
dispatch-publish-es:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Dispatch to publish-nargo
uses: benc-uk/workflow-dispatch@v1
Expand Down
4 changes: 2 additions & 2 deletions noir/noir-repo/.github/workflows/pull-request-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ permissions:
jobs:
conventional-title:
name: Validate PR title is Conventional Commit
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check title
if: github.event_name == 'pull_request_target'
Expand All @@ -30,7 +30,7 @@ jobs:
force-push-comment:
name: Warn external contributors about force-pushing
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != 'noir-lang/noir' }}
permissions:
pull-requests: write
Expand Down
2 changes: 1 addition & 1 deletion noir/noir-repo/.github/workflows/recrawler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
algolia_recrawl:
name: Algolia Recrawl
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Algolia crawler creation and crawl
uses: algolia/[email protected]
Expand Down
Loading
Loading