AztecProtocol / aztec-packages

Apache License 2.0
173 stars 177 forks source link

Hash logs inside Noir #1165

Closed benesjan closed 1 month ago

benesjan commented 1 year ago

Currently we inject the logs hashes and lengths in TS here. This was a hack to get the logs working when Noir was too buggy.

Blocked by https://github.com/noir-lang/noir/issues/1889.

Details: We currently can't use slices (or the wrapper Vec) because of https://github.com/noir-lang/noir/issues/1889. Since we need to accumulate the logs preimages in Context before hashing them all at the end the only other alternative is preallocating a large array and then when calling Context.finish copy the populated part of array to a new array of exact size and hash that copy. To achieve this we would need to use generics to set the size of the target array and this would mean that whoever would call finish would have to manually set this size. This seems impractical to me so I decided to postpone addressing this issue for when we can use the Vec type.

iAmMichaelConnor commented 1 year ago

Not blocked anymore :)

benesjan commented 1 year ago

Not blocked anymore :)

Cool, cool.

Anyway, it makes sense to wait for this issue to be resolved before tackling this.

benesjan commented 1 month ago

Closing as it's tackled