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

Merged
merged 36 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
0e01b10
[1 changes] feat!: add session id to foreign call RPC requests (https…
AztecBot Jun 10, 2024
667085b
chore: apply sync fixes
AztecBot Jun 10, 2024
bdddac9
Merge branch 'master' into sync-noir
TomAFrench Jun 10, 2024
7eba86e
chore: update cargo.lock
TomAFrench Jun 10, 2024
2470833
Update noir/noir-repo/compiler/integration-tests/test/node/prove_and_…
TomAFrench Jun 10, 2024
14df10d
temp
TomAFrench Jun 10, 2024
9b4b174
Merge branch 'master' into sync-noir
TomAFrench Jun 11, 2024
ff8b27e
Merge branch 'master' into sync-noir
TomAFrench Jun 11, 2024
cb6e6b9
[1 changes] chore: avoid `bn254_blackbox_solver` polluting feature fl…
AztecBot Jun 11, 2024
b456ac1
chore: apply sync fixes
AztecBot Jun 11, 2024
e1dc886
chore: avoid `bn254_blackbox_solver` polluting feature flags (https:/…
AztecBot Jun 11, 2024
c30f091
push a scope in interpreter enter_function even when scopes.len() == 1
vezenovm Jun 11, 2024
f8c16cb
Merge branch 'master' into sync-noir
vezenovm Jun 11, 2024
d7877de
Merge branch 'master' into sync-noir
TomAFrench Jun 12, 2024
ee7965f
try bug fix with checking let_.comptime
vezenovm Jun 12, 2024
b0317ac
Merge remote-tracking branch 'origin/sync-noir' into sync-noir
vezenovm Jun 12, 2024
110385f
nargo fmt
vezenovm Jun 12, 2024
ca708d4
clippy and fmt
vezenovm Jun 12, 2024
5b34bec
Merge branch 'master' into sync-noir
vezenovm Jun 12, 2024
b1bc45d
a little debug cleanup
vezenovm Jun 12, 2024
ffecb8c
Merge remote-tracking branch 'origin/sync-noir' into sync-noir
vezenovm Jun 12, 2024
7d08148
nargo fmt aztec-nr
vezenovm Jun 12, 2024
14235fe
cleanup old debug stuff
vezenovm Jun 12, 2024
1eb3857
bring back verify_honk_proof test
vezenovm Jun 12, 2024
8f41207
format verify_honk_proof
vezenovm Jun 12, 2024
c1f3881
bring back honk_recursion flag that got reverted
vezenovm Jun 12, 2024
c9234c8
fix up hardcoded abis in noirc_abi_wasm
vezenovm Jun 12, 2024
b04cc42
update yarn lock
vezenovm Jun 12, 2024
6e45192
bring back testing integration-tests in series that was reverted
vezenovm Jun 12, 2024
e819ebe
one backendi nstance in prove_and_verify.test.ts integration-tests
vezenovm Jun 12, 2024
a6da3b3
Merge branch 'master' into sync-noir
vezenovm Jun 13, 2024
7fd2bec
Merge branch 'master' into sync-noir
vezenovm Jun 13, 2024
62996ab
remove last references to param_witnesses
vezenovm Jun 13, 2024
f5d1dda
Merge branch 'master' into sync-noir
vezenovm Jun 13, 2024
b2e8fe1
delete noir yarn.lock
vezenovm Jun 13, 2024
d8fa1c7
Merge remote-tracking branch 'origin/sync-noir' into sync-noir
vezenovm Jun 13, 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 @@
9c99a97ca8f42bee23cf97ebd724fdc51e647c60
2e543b40eb83ef2080e4d8f870f525fadd631099
1 change: 1 addition & 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/encrypted_logs.nr
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ mod header;
mod incoming_body;
mod outgoing_body;
mod payload;
mod encrypted_note_emission;
mod encrypted_note_emission;
2 changes: 1 addition & 1 deletion noir-projects/aztec-nr/aztec/src/note.nr
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ mod note_header;
mod note_interface;
mod note_viewer_options;
mod utils;
mod note_emission;
mod note_emission;
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ use dep::protocol_types::{
};

#[oracle(getKeyValidationRequest)]
unconstrained fn get_key_validation_request_oracle(_pk_m_hash: Field, _key_index: Field) -> [Field; KEY_VALIDATION_REQUEST_LENGTH] {}
unconstrained fn get_key_validation_request_oracle(
_pk_m_hash: Field,
_key_index: Field
) -> [Field; KEY_VALIDATION_REQUEST_LENGTH] {}

unconstrained fn get_key_validation_request_internal(npk_m_hash: Field, key_index: Field) -> KeyValidationRequest {
let result = get_key_validation_request_oracle(npk_m_hash, key_index);
Expand Down
27 changes: 4 additions & 23 deletions noir-projects/aztec-nr/aztec/src/oracle/logs.nr
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ use dep::protocol_types::{address::AztecAddress, grumpkin_point::GrumpkinPoint};

// = 480 + 32 * N bytes
#[oracle(emitEncryptedNoteLog)]
unconstrained fn emit_encrypted_note_log_oracle<M>(
_note_hash_counter: u32,
_encrypted_note: [u8; M],
_counter: u32
) {}
unconstrained fn emit_encrypted_note_log_oracle<M>(_note_hash_counter: u32, _encrypted_note: [u8; M], _counter: u32) {}

unconstrained pub fn emit_encrypted_note_log<M>(
note_hash_counter: u32,
Expand All @@ -17,12 +13,7 @@ unconstrained pub fn emit_encrypted_note_log<M>(
}

#[oracle(emitEncryptedEventLog)]
unconstrained fn emit_encrypted_event_log_oracle<M>(
_contract_address: AztecAddress,
_randomness: Field,
_encrypted_event: [u8; M],
_counter: u32
) {}
unconstrained fn emit_encrypted_event_log_oracle<M>(_contract_address: AztecAddress, _randomness: Field, _encrypted_event: [u8; M], _counter: u32) {}

unconstrained pub fn emit_encrypted_event_log<M>(
contract_address: AztecAddress,
Expand Down Expand Up @@ -98,12 +89,7 @@ unconstrained pub fn compute_encrypted_event_log<N, M>(
}

#[oracle(emitUnencryptedLog)]
unconstrained fn emit_unencrypted_log_oracle_private<T>(
_contract_address: AztecAddress,
_event_selector: Field,
_message: T,
_counter: u32
) -> Field {}
unconstrained fn emit_unencrypted_log_oracle_private<T>(_contract_address: AztecAddress, _event_selector: Field, _message: T, _counter: u32) -> Field {}

unconstrained pub fn emit_unencrypted_log_private_internal<T>(
contract_address: AztecAddress,
Expand All @@ -115,12 +101,7 @@ unconstrained pub fn emit_unencrypted_log_private_internal<T>(
}

#[oracle(emitContractClassUnencryptedLog)]
unconstrained fn emit_contract_class_unencrypted_log_private<N>(
contract_address: AztecAddress,
event_selector: Field,
message: [Field; N],
counter: u32
) -> Field {}
unconstrained fn emit_contract_class_unencrypted_log_private<N>(contract_address: AztecAddress, event_selector: Field, message: [Field; N], counter: u32) -> Field {}

unconstrained pub fn emit_contract_class_unencrypted_log_private_internal<N>(
contract_address: AztecAddress,
Expand Down
6 changes: 1 addition & 5 deletions noir-projects/aztec-nr/aztec/src/oracle/notes.nr
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ unconstrained pub fn notify_created_note<N>(
}

#[oracle(notifyNullifiedNote)]
unconstrained fn notify_nullified_note_oracle<N>(
_nullifier: Field,
_inner_note_hash: Field,
_counter: u32
) -> Field {}
unconstrained fn notify_nullified_note_oracle<N>(_nullifier: Field, _inner_note_hash: Field, _counter: u32) -> Field {}

unconstrained pub fn notify_nullified_note<N>(
nullifier: Field,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use dep::aztec::{
traits::{ToField, Serialize, FromField}, grumpkin_point::GrumpkinPoint,
constants::MAX_NOTE_HASH_READ_REQUESTS_PER_CALL
},
encrypted_logs::encrypted_note_emission::encode_and_encrypt_with_keys, note::note_getter::view_notes,
state_vars::PrivateSet, note::constants::MAX_NOTES_PER_PAGE
encrypted_logs::encrypted_note_emission::encode_and_encrypt_with_keys,
note::note_getter::view_notes, state_vars::PrivateSet, note::constants::MAX_NOTES_PER_PAGE
Copy link
Contributor

@vezenovm vezenovm Jun 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just fmt, and the same thing for the aztec-nr changes.

};
use dep::std;
use dep::std::{option::Option};
Expand Down
27 changes: 0 additions & 27 deletions noir/noir-repo/.github/workflows/test-js-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,32 +221,6 @@ jobs:
- name: Run browser tests
run: yarn workspace @noir-lang/noirc_abi test:browser

test-noir-js-backend-barretenberg:
needs: [build-noirc-abi]
name: noir-js-backend-barretenberg
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Download wasm package artifact
uses: actions/download-artifact@v4
with:
name: noirc_abi_wasm
path: ./tooling/noirc_abi_wasm

- name: Install Yarn dependencies
uses: ./.github/actions/setup

- name: Build noir_js_types
run: yarn workspace @noir-lang/types build

- name: Run barretenberg wrapper tests
run: |
yarn workspace @noir-lang/backend_barretenberg test

test-noir-js:
needs: [build-nargo, build-acvm-js, build-noirc-abi]
name: Noir JS
Expand Down Expand Up @@ -546,7 +520,6 @@ jobs:
- test-acvm_js-node
- test-acvm_js-browser
- test-noirc-abi
- test-noir-js-backend-barretenberg
- test-noir-js
- test-noir-wasm
- test-noir-codegen
Expand Down
8 changes: 5 additions & 3 deletions noir/noir-repo/Cargo.lock

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

10 changes: 10 additions & 0 deletions noir/noir-repo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ noirc_abi = { path = "tooling/noirc_abi" }
bb_abstraction_leaks = { path = "tooling/bb_abstraction_leaks" }
acvm_cli = { path = "tooling/acvm_cli" }

# Arkworks
ark-bn254 = { version = "^0.4.0", default-features = false, features = ["curve"] }
ark-bls12-381 = { version = "^0.4.0", default-features = false, features = ["curve"] }
grumpkin = { version = "0.1.0", package = "noir_grumpkin", features = ["std"] }
ark-ec = { version = "^0.4.0", default-features = false }
ark-ff = { version = "^0.4.0", default-features = false }
ark-std = { version = "^0.4.0", default-features = false }

# Misc utils crates
iter-extended = { path = "utils/iter-extended" }

Expand Down Expand Up @@ -131,6 +139,8 @@ similar-asserts = "1.5.0"
tempfile = "3.6.0"
jsonrpc = { version = "0.16.0", features = ["minreq_http"] }
flate2 = "1.0.24"
rand = "0.8.5"
proptest = "1.2.0"

im = { version = "15.1", features = ["serde"] }
tracing = "0.1.40"
Expand Down
9 changes: 6 additions & 3 deletions noir/noir-repo/acvm-repo/acir_field/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@ hex.workspace = true
num-bigint.workspace = true
serde.workspace = true

ark-bn254 = { version = "^0.4.0", default-features = false, features = ["curve"] }
ark-bls12-381 = { version = "^0.4.0", optional = true, default-features = false, features = ["curve"] }
ark-ff = { version = "^0.4.0", default-features = false }
ark-bn254.workspace = true
ark-bls12-381 = { workspace = true, optional = true }
ark-ff.workspace = true

cfg-if = "1.0.0"

[dev-dependencies]
proptest.workspace = true

[features]
bn254 = []
bls12_381 = ["dep:ark-bls12-381"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Seeds for failure cases proptest has generated in the past. It is
# automatically read and these particular cases re-run before any
# novel cases are generated.
#
# It is recommended to check this file in to source control so that
# everyone who runs the test benefits from these saved cases.
cc c1b2755b427c874de3ee55c2969e8adc1b4b0331a28173e9e1e492b3fee6b7b7 # shrinks to hex = "3a0aaaa0aa0aaa00000aaaaaaaa0000a000aaa0a00a0000aa00a00aa0a000a0a"
Loading
Loading