noir-lang / noir

Noir is a domain specific language for zero knowledge proofs
https://noir-lang.org
Apache License 2.0
823 stars 178 forks source link

Panic with "no entry found for key" on duplicate field in a struct #5030

Open spalladino opened 1 month ago

spalladino commented 1 month ago

Aim

Running tests on the public kernel circuits in the Aztec packages repository.

Expected Behavior

Tests run.

Bug

Running ../../noir/noir-repo/target/release/nargo test --package public_kernel_lib only_valid_public_data_reads_should_be_propagated (though the same happens with any test in the package) in the folder noir-projects/noir-protocol-circuits of https://github.com/AztecProtocol/aztec-packages/pull/6403 yields the following:

[public_kernel_lib] Running 1 test function
The application panicked (crashed).
Message:  no entry found for key
Location: compiler/noirc_frontend/src/node_interner.rs:1067

This is a bug. We may have already fixed this in newer versions of Nargo so try searching for similar issues at https://github.com/noir-lang/noir/issues/.
If there isn't an open issue for this bug, consider opening one at https://github.com/noir-lang/noir/issues/new?labels=bug&template=bug_report.yml

To Reproduce

No response

Project Impact

Blocker

Impact Context

No response

Workaround

None

Workaround Description

No response

Additional Context

No response

Installation Method

Compiled from source

Nargo Version

No response

NoirJS Version

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

spalladino commented 1 month ago

Update: tracked this to a duplicate field in a struct. Removing it fixed the issue.

https://github.com/AztecProtocol/aztec-packages/pull/6403/commits/a2840b22f29262e2382305d58d7e50bad6162b11