Skip to content

basic test fail for Noir 1.0 #20

@nuke-web3

Description

@nuke-web3

Aim

Run tests to ensure correct functionality.

Specifically want to use:

nargo version = 1.0.0-beta.3
noirc version = 1.0.0-beta.3+ceaa1986628197bd1170147f6a07f0f98d21030a
(git version hash: ceaa1986628197bd1170147f6a07f0f98d21030a, is dirty: false)

cargo 1.86.0 (adf9b6ad1 2025-02-28)
stable-x86_64-unknown-linux-gnu (active, default)
  rustc 1.86.0 (05f9846f8 2025-03-31)

Expected Behavior

Tests pass with any toolchain over the specified one:

https://github.com/noir-lang/sha256/blob/main/Nargo.toml#L5

Bug

warning: Unsafe block must have a safety comment above it
   ┌─ src/sha256.nr:49:17
   │
49 │                 unsafe { build_msg_block(msg, message_size, msg_start) };
   │                 ------ The comment must start with the "Safety: " word
   │

warning: Unsafe block must have a safety comment above it
   ┌─ src/sha256.nr:75:17
   │
75 │                 unsafe { build_msg_block(msg, message_size, msg_start) };
   │                 ------ The comment must start with the "Safety: " word
   │

warning: Unsafe block must have a safety comment above it
    ┌─ src/sha256.nr:110:21
    │
110 │         msg_block = unsafe { attach_len_to_msg_block(msg_block, msg_byte_ptr, message_size) };
    │                     ------ The comment must start with the "Safety: " word
    │

    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.16s
     Running tests/differential.rs (target/debug/deps/differential-1381982fd09565eb)

running 4 tests
test test_prop_sha256_1 ... FAILED
test test_prop_sha256_200 ... FAILED
test test_prop_sha256_512 ... FAILED
test test_prop_sha256_511 ... FAILED

failures:

---- test_prop_sha256_1 stdout ----
proptest: FileFailurePersistence::SourceParallel set, but no source file known

thread 'test_prop_sha256_1' panicked at /home/nuke/.cargo/git/checkouts/noir-runner-e39b5efdaaee6d98/2655620/src/runner.rs:99:14:
called `Result::unwrap()` on an `Err` value: Serde(Error("unknown variant `string`, expected `fmtstring` or `custom`", line: 1, column: 535))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

thread 'test_prop_sha256_1' panicked at /home/nuke/.cargo/git/checkouts/noir-runner-e39b5efdaaee6d98/2655620/src/runner.rs:99:14:
called `Result::unwrap()` on an `Err` value: Serde(Error("unknown variant `string`, expected `fmtstring` or `custom`", line: 1, column: 535))


... thousands more same error! ....


thread 'test_prop_sha256_511' panicked at /home/nuke/.cargo/git/checkouts/noir-runner-e39b5efdaaee6d98/2655620/src/runner.rs:99:14:
called `Result::unwrap()` on an `Err` value: Serde(Error("unknown variant `string`, expected `fmtstring` or `custom`", line: 1, column: 538))
proptest: Aborting shrinking after the PROPTEST_MAX_SHRINK_ITERS environment variable or ProptestConfig.max_shrink_iters iterations (set 1024 to a large(r) value to shrink more; current configuration: 1024 iterations)
proptest: FileFailurePersistence::SourceParallel set, but no source file known

thread 'test_prop_sha256_511' panicked at tests/differential.rs:83:10:
called `Result::unwrap()` on an `Err` value: Fail(Reason("called `Result::unwrap()` on an `Err` value: Serde(Error(\"unknown variant `string`, expected `fmtstring` or `custom`\", line: 1, column: 538))"), [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 186, 217, 98, 150, 22, 184, 216, 101, 34, 196, 152, 102, 194, 246, 165, 138, 182, 215, 171, 203, 196, 68, 241, 49, 217, 213, 153, 232, 44, 174, 94, 191, 91, 60, 77, 2, 236, 60, 163, 154, 195, 41, 84, 240, 128, 249, 58, 48, 150, 204, 68, 205, 86, 39, 227, 185, 200, 17, 214, 238, 159, 193, 209, 0, 139, 228, 32, 87, 48, 158, 22, 102, 126, 4, 36, 231, 12, 28, 99, 15, 128, 239, 243, 168, 198, 67, 95, 226, 22, 228, 106, 216, 132, 231, 55, 192, 240, 252, 247, 81, 172, 61, 185, 129, 183, 102, 87, 5, 214, 198, 225, 3, 45, 249, 178, 60, 235, 128, 166, 246, 169, 23, 239, 174, 2, 176, 86, 175, 182, 12, 212, 103, 225, 240, 70, 136, 33, 188, 186, 72, 178, 188, 57, 242, 32, 112, 213, 112, 242, 208, 230, 41, 53, 5, 71, 142, 69, 162, 119, 32, 227, 3, 167, 152, 168, 129, 135, 146, 13, 5, 121, 172, 213, 216, 150, 81, 74, 200, 223, 168, 96, 105, 209, 103, 20, 213, 240, 110, 77, 133, 201, 78, 81, 18, 177, 145, 53, 44, 213, 52, 141, 182, 198, 68, 129, 35, 116, 63, 32, 125, 116, 127, 173, 166, 58, 7, 196, 222, 112, 48, 77, 13, 215, 175, 5, 108, 51, 2, 13, 45, 4, 133, 63, 85, 210, 212, 21, 16, 152, 252, 139, 80, 224, 58, 205, 80, 212, 160, 119, 58, 239, 6, 102, 213, 137, 75, 201, 238, 209, 203, 114, 147, 4, 202, 147, 158, 248, 62, 172, 194, 125, 27, 94, 67, 202, 80, 250, 134, 228, 44, 17, 62, 185, 226, 250, 220, 180, 142, 132, 237, 52, 20, 28, 129, 14, 6, 70, 74, 228, 69, 196, 122, 18, 45, 155, 84, 70, 153, 193, 34, 36, 167, 104, 90, 228, 250, 116, 238, 140, 10, 143, 243, 200, 135, 250, 158, 72, 170, 242, 139, 153, 128, 165, 80, 131, 93, 52, 123, 58, 85, 188, 0, 203, 180, 144, 28, 76, 183, 50, 47, 23, 183, 240, 229, 144, 210, 111, 153, 243, 8, 44, 215, 113, 44, 76, 253, 122])


failures:
    test_prop_sha256_1
    test_prop_sha256_200
    test_prop_sha256_511
    test_prop_sha256_512

test result: FAILED. 0 passed; 4 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.43s

error: test failed, to rerun pass `--test differential`

To Reproduce

./scripts/fuzz-test.sh

or simply cargo test (without any nargo export)

Workaround

None

Workaround Description

No response

Additional Context

No response

Project Impact

None

Blocker Context

No response

Nargo Version

nargo version = 1.0.0-beta.3 noirc version = 1.0.0-beta.3+ceaa1986628197bd1170147f6a07f0f98d21030a (git version hash: ceaa1986628197bd1170147f6a07f0f98d21030a, is dirty: false)

NoirJS Version

No response

Proving Backend Tooling & Version

No response

Would you like to submit a PR for this Issue?

Maybe

Support Needs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions