fix!: remove hash_to_field from stdlib#9098
Conversation
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Test Suite Duration'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: 0709521 | Previous: 0098c45 | Ratio |
|---|---|---|---|
test_report_zkpassport_noir_rsa_ |
2 s |
1 s |
2 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
jfecher
left a comment
There was a problem hiding this comment.
Need to update all .snap files now that the stdlib changed
|
🫠 |
|
I'm running the tests locally now, I'll push a commit when they finish |
|
🚀 Deployed on https://68658f957ddcd0dafdcb2bd9--noir-docs.netlify.app |
|
FYI @noir-lang/developerrelations on Noir doc changes. |
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE chore: remove redundant associated constant lookup (noir-lang/noir#9114) chore: test that associated function and constant with the same name collide (noir-lang/noir#9112) feat: Allow TraitAsType syntax to refer to associated constants in expressions (noir-lang/noir#9041) chore: clippy (noir-lang/noir#9101) chore(fuzz): Recursively generate lvalue for multi dimensional arrays and nested tuples (noir-lang/noir#9086) fix!: remove `hash_to_field` from stdlib (noir-lang/noir#9098) chore(docs): Brillig gen (noir-lang/noir#9085) chore(fuzz): Test AST print-and-parse roundtrip (noir-lang/noir#9083) fix(ssa): Do not fail for static assertions in a map over empty dynamic slices (noir-lang/noir#9060) chore: merge `RangeCheckFailed` and `RangeCheckFailedWithMessage` (noir-lang/noir#9093) chore(fuzz): Capture printed output in `comptime_vs_brillig_direct` (noir-lang/noir#9090) chore(debug): Add trait constraint to string helper (noir-lang/noir#9082) chore: bump some deps (noir-lang/noir#9076) END_COMMIT_OVERRIDE --------- Co-authored-by: AztecBot <tech@aztecprotocol.com> Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
|
Projects hosted on GitHub that relies on the library: https://github.com/search?q=path%3A*.nr+AND+%22hash_to_field%22&type=code For similar removal of features in the future, we should at the minimum add an error that i) recommends an alternative (e.g. alternative hashing scheme in this case) for our users, and ii) prompts them to create an Issue if the alternative is not helpful. |
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE chore: remove redundant associated constant lookup (noir-lang/noir#9114) chore: test that associated function and constant with the same name collide (noir-lang/noir#9112) feat: Allow TraitAsType syntax to refer to associated constants in expressions (noir-lang/noir#9041) chore: clippy (noir-lang/noir#9101) chore(fuzz): Recursively generate lvalue for multi dimensional arrays and nested tuples (noir-lang/noir#9086) fix!: remove `hash_to_field` from stdlib (noir-lang/noir#9098) chore(docs): Brillig gen (noir-lang/noir#9085) chore(fuzz): Test AST print-and-parse roundtrip (noir-lang/noir#9083) fix(ssa): Do not fail for static assertions in a map over empty dynamic slices (noir-lang/noir#9060) chore: merge `RangeCheckFailed` and `RangeCheckFailedWithMessage` (noir-lang/noir#9093) chore(fuzz): Capture printed output in `comptime_vs_brillig_direct` (noir-lang/noir#9090) chore(debug): Add trait constraint to string helper (noir-lang/noir#9082) chore: bump some deps (noir-lang/noir#9076) END_COMMIT_OVERRIDE --------- Co-authored-by: AztecBot <tech@aztecprotocol.com> Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
Description
Problem*
Resolves
Summary*
This PR removes the insecure function
hash_to_fieldfrom the stdlib. It looks like this came while trying to avoid a breaking change in #4675 as it's no longer possible to pass a slice toblake2s.Any fix for this is going to be a breaking to the point of being a completely different function (at the minimum it can't take a slice as input, it also doesn't really make sense for it to accept
Fields as I would just use a poseidon hash in that case). I think it's then worth just removing the function entirely and we can re-add a fixed implementation in future if necessaryAdditional Context
Documentation*
Check one:
PR Checklist*
cargo fmton default settings.