refactor: call args as an array instead of a slice#18417
Conversation
75b4577 to
8ba41d6
Compare
71f23d5 to
fa41a20
Compare
2011739 to
14e7d4d
Compare
397ca53 to
5fd93f6
Compare
14e7d4d to
c8246fc
Compare
c8246fc to
24e5513
Compare
22b59bb to
ae1fd78
Compare
24e5513 to
05792c2
Compare
05792c2 to
47fbde1
Compare
803e00b to
fc8919f
Compare
fc8919f to
72976c7
Compare
Flakey Tests🤖 says: This CI run detected 2 tests that failed, but were tolerated due to a .test_patterns.yml entry. |
dbanks12
left a comment
There was a problem hiding this comment.
Public context and avm transpiler stuff looks good to me!
| }; | ||
|
|
||
| pub unconstrained fn add_private_authwit_from_call<T, let M: u32>( | ||
| pub unconstrained fn add_private_authwit_from_call<let M: u32, let N: u32, T>( |
There was a problem hiding this comment.
Would be nice to have some comment briefly defining what M, N and T stand for. Or, if Noir allows, using more descriptive names for said type variables. eg: add_private_authwit_from_call<let CallNameLen: u32, ArgsLen: u32, CallReturnType>)
There was a problem hiding this comment.
You have a point but this is all over the place and it's a bit unrelated so doesn't make sense to do in this PR.
| } | ||
|
|
||
| pub unconstrained fn add_public_authwit_from_call<T, let M: u32>( | ||
| pub unconstrained fn add_public_authwit_from_call<let M: u32, let N: u32, T>( |
mverzilli
left a comment
There was a problem hiding this comment.
Nice! Only general comment is I would try to use more descriptive names for parametric types (especially when a function or type ends up having more than one, like many cases in this PR where there's M, N and T).
I don't know if Noir supports names with more than letter in such cases though, so feel free to ignore me
Usage of slices is now discouraged and for this reason I am dropping their use from calls. This made me drop the `hash_args` function and rename `hash_args_array` to just `hash_args` as the original was no longer in use. Also `poseidon2_hash_with_separator_slice` got dropped due to lack of use.
e73ead2 to
663806b
Compare

Usage of slices is now discouraged and for this reason I am dropping their use from calls.
This made me drop the
hash_argsfunction and renamehash_args_arrayto justhash_argsas the original was no longer in use. Alsoposeidon2_hash_with_separator_slicegot dropped due to lack of use.