Conversation
Split logic into a lib crate to allow testing
TomAFrench
left a comment
There was a problem hiding this comment.
Cheers!
If I try to build this I end up with the error below:
error: Expected an end of input but found #[builtin(arraylen)]
┌─ /home/tom/.config/noir-lang/std/array.nr:7:1
│
7 │ #[builtin(arraylen)]
│ --------------------
error: could not resolve path 'array::len'
┌─ /home/tom/.config/noir-lang/std/hash.nr:23:24
│
23 │ for i in 1..crate::array::len(constants) {
│ ----------
│ │
│ could not resolve `len` in path
error: could not resolve path 'array::len'
┌─ /home/tom/.config/noir-lang/std/hash.nr:130:24
│
130 │ for i in 0..crate::array::len(x) {
│ ----------
│ │
│ could not resolve `len` in path
error: could not resolve path 'array::len'
┌─ /home/tom/.config/noir-lang/std/merkle.nr:14:20
│
14 │ let n = crate::array::len(hash_path);
│ ----------
│ │
│ could not resolve `len` in path
* master: refactor: split logic into a lib crate to allow testing
|
Looks like my version of std lib wasn't being updated by noirup and so I had a |
refactor: use global values for array sizes
* master: fix: remove some usages of NUM_LANES which isn't supported feat: use constant for lengths of lane offset values refactor: use global values for array sizes
Consolidate constants to a single file
* master: fix: add missing import to padding test fix: remove some usages of NUM_LANES which isn't supported refactor: move constants to a single file feat: use constant for lengths of lane offset values refactor: split logic into a lib crate to allow testing refactor: use global values for array sizes
|
I had a go proving this with using noir-lang/noir#437, judging by how long it takes to throw an error we seem to make it further through the proving process but we eventually error out with |
|
I tried proving with the same PR and ran into the same error. From some brief debugging it looks like the XOR operations with the state arrays are causing the error. Trying to drill down more exactly what is causing the terms to be non-linear. It looks to possibly be related to the state arrays being parameters to the function where the XOR is being performed. |
* master: chore: delete committed Verifier.toml
I found what was causing the panic which is referenced in PR #6 |
* master: refactor: remove noop renamings of imports (#7)
Thanks for the help with this. :) I'm inclined to say it's best that we make the push to switch over sooner rather than later. Doing any meaningful testing using bit arrays will be like pulling teeth (just testing the padding function takes the best part of a minute each time). Tests should easier to write as short arrays of hex are easier to manipulate than massive bit arrays and they'll run faster due to the smaller circuit sizes. I'll just keep this PR open in the meantime and I can just pull across the code and modify it to handle |
|
Closing this as I've integrated the changes into #8. Thanks again! |

This PR adds usage of the final keccak permutation functions into the absorb function.
These changes successfully build however there are some errors with regards when it comes to compilation. It may be due to something inside of Noir though, further debugging needs to be done to determine the error.