Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding hash index in noir for private call stack item #499

Closed
rahul-kothari opened this issue May 8, 2023 · 5 comments · Fixed by #1394
Closed

Adding hash index in noir for private call stack item #499

rahul-kothari opened this issue May 8, 2023 · 5 comments · Fixed by #1394
Assignees

Comments

@rahul-kothari
Copy link
Contributor

In C++, for the private kernel's call stack item, we hash the object using a GeneratorIndex aka hash index

We do that check here in the private kernel circuit.

On the client side, we hash the call stack item in private_call_stack_item.nr but we don't use a hash index!

Because of this nested calls to the private kernel is failing (now that we have error handling). I have commented out the validate_this_private_call_stack() check in the private kernel circuit for now because of this.

@rahul-kothari
Copy link
Contributor Author

rahul-kothari commented May 8, 2023

From @sirasistant :
It isn't available yet - involves modifying the BB functions to be able to accept constants such as the hash index

https://aztecprotocol.slack.com/archives/C04QF64EDNV/p1683559405947599?thread_ts=1683559369.179149&cid=C04QF64EDNV

@spalladino
Copy link
Collaborator

Same applies to public call stack item in Noir being added in #546.

@sirasistant
Copy link
Collaborator

I'm working on this now that we have support for hash_index

@iAmMichaelConnor
Copy link
Contributor

@dbanks12 @suyash67 maybe something your team could pick up? :)

spalladino added a commit that referenced this issue Jul 31, 2023
…1209)

Fix hashing of private call stack items to be consistent across Noir and
cpp.

Note that this does not solve #499 in the kernel circuit (cc @jeanmon)
since uncommenting the call stack hash validation breaks most of the
kernel tests since they modify call stack items without updating the
corresponding hashes. I tried fixing them but after a few hours of
repeated failures decided to cut my losses and submit what I got working
on the noir and ts side.
@dbanks12
Copy link
Collaborator

@dbanks12 @suyash67 maybe something your team could pick up? :)

@suyash67 can you pick this up this week?

@github-project-automation github-project-automation bot moved this from Todo to Done in A3 Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants