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

Merged
merged 8 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@
6cc105ee441e093b4fccdd5fcc3db922eb28a3fb
1969ce39378f633e88adedf43b747724b89ed7d7
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 avm-transpiler/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "1.73"
channel = "1.74.1"
components = ["rust-src"]
targets = []
profile = "default"
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ pub fn get_pack_cards(
// generate pseudo randomness deterministically from 'seed' and user secret
let secret = context.request_app_nullifier_secret_key(owner);
let mix = secret + seed;
let random_bytes = std::hash::sha256_slice(mix.to_le_bytes(32));
let mix_bytes: [u8; 32] = mix.to_le_bytes(32).as_array();
let random_bytes = std::hash::sha256(mix_bytes);

let mut cards = [Card::from_field(0); PACK_CARDS];
// we generate PACK_CARDS cards
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ contract EcdsaAccount {

// Verify payload signature using Ethereum's signing scheme
// Note that noir expects the hash of the message/challenge as input to the ECDSA verification.
let hashed_message: [u8; 32] = std::hash::sha256_slice(outer_hash.to_be_bytes(32));
let outer_hash_bytes: [u8; 32] = outer_hash.to_be_bytes(32).as_array();
let hashed_message: [u8; 32] = std::hash::sha256(outer_hash_bytes);
let verification = std::ecdsa_secp256k1::verify_signature(public_key.x, public_key.y, signature, hashed_message);
assert(verification == true);

Expand Down
2 changes: 1 addition & 1 deletion noir/noir-repo/.github/workflows/docs-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1

- uses: Swatinem/rust-cache@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions noir/noir-repo/.github/workflows/formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1
with:
targets: ${{ matrix.target }}
components: clippy, rustfmt
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1

- uses: Swatinem/rust-cache@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion noir/noir-repo/.github/workflows/gates_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1

- uses: Swatinem/rust-cache@v2
with:
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 @@ -18,7 +18,7 @@ jobs:
ref: ${{ inputs.noir-ref }}

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1

# These steps are in a specific order so crate dependencies are updated first
- name: Publish acir_field
Expand Down
6 changes: 3 additions & 3 deletions noir/noir-repo/.github/workflows/publish-es-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
ref: ${{ inputs.noir-ref }}

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
ref: ${{ inputs.noir-ref }}

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
ref: ${{ inputs.noir-ref }}

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1

- uses: Swatinem/rust-cache@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions noir/noir-repo/.github/workflows/publish-nargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx$(sw_vers -productVersion) --show-sdk-platform-version)" >> $GITHUB_ENV

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1
with:
targets: ${{ matrix.target }}

Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
ref: ${{ inputs.tag || env.GITHUB_REF }}

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1
with:
targets: ${{ matrix.target }}

Expand Down
8 changes: 4 additions & 4 deletions noir/noir-repo/.github/workflows/test-js-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1

- uses: Swatinem/rust-cache@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions noir/noir-repo/.github/workflows/test-rust-workspace-msrv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1
with:
targets: x86_64-unknown-linux-gnu

Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
- uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1
with:
targets: x86_64-unknown-linux-gnu

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 @@ -23,7 +23,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1
with:
targets: x86_64-unknown-linux-gnu

Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
- uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1
with:
targets: x86_64-unknown-linux-gnu

Expand Down
2 changes: 1 addition & 1 deletion noir/noir-repo/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
* reserve `unchecked` keyword ([#4432](https://github.com/noir-lang/noir/issues/4432))
* Remove empty value from bounded vec ([#4431](https://github.com/noir-lang/noir/issues/4431))
* Ban Fields in for loop indices and bitwise ops ([#4376](https://github.com/noir-lang/noir/issues/4376))
* bump msrv to 1.73.0 ([#4406](https://github.com/noir-lang/noir/issues/4406))
* Bump msrv to 1.73.0 ([#4406](https://github.com/noir-lang/noir/issues/4406))
* **ci:** Bump MSRV to 1.72.1 and enforce that ACVM can be published using updated lockfile ([#4385](https://github.com/noir-lang/noir/issues/4385))
* Restrict bit sizes ([#4235](https://github.com/noir-lang/noir/issues/4235))
* move noir out of yarn-project (https://github.com/AztecProtocol/aztec-packages/pull/4479)
Expand Down
33 changes: 28 additions & 5 deletions noir/noir-repo/Cargo.lock

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

11 changes: 10 additions & 1 deletion noir/noir-repo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ version = "0.27.0"
# x-release-please-end
authors = ["The Noir Team <[email protected]>"]
edition = "2021"
rust-version = "1.73.0"
rust-version = "1.74.1"
license = "MIT OR Apache-2.0"
repository = "https://github.com/noir-lang/noir/"

Expand Down Expand Up @@ -104,6 +104,14 @@ chumsky = { git = "https://github.com/jfecher/chumsky", rev = "ad9d312", default
"ahash",
"std",
] }

# Benchmarking
criterion = "0.5.0"
# Note that using the "frame-pointer" feature breaks framegraphs on linux
# https://github.com/tikv/pprof-rs/pull/172
pprof = { version = "0.13", features = ["flamegraph","criterion"] }


dirs = "4"
serde = { version = "1.0.136", features = ["derive"] }
serde_json = "1.0"
Expand All @@ -124,6 +132,7 @@ tempfile = "3.6.0"
jsonrpc = { version = "0.16.0", features = ["minreq_http"] }
flate2 = "1.0.24"

im = { version = "15.1", features = ["serde"] }
tracing = "0.1.40"
tracing-web = "0.1.3"
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
Expand Down
Loading
Loading