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

feat: add flexible nullifier to update circuit #1315

Merged
merged 4 commits into from
Oct 27, 2024

Conversation

ananas-block
Copy link
Contributor

@ananas-block ananas-block commented Oct 26, 2024

Motivation:

  • the batch update circuit assumes nullifying by replacing compressed_account_hash with [0u8;32]
  • we want to nullify with nullifier= H(compressed_account_hash, tx_hash) so that we can access the transaction that spent a compressed account in a proof
    -tx_hash = HashChain([..tx_input_hashes,... tx_output_hashes])

Changes:

  • leaves_hashchain is hashchain of nullifiers
  • it is not necessary to check nullifier derivation since we derive nullifiers onchain
  • update leaf with nullifier instead of empty_leaf

TODO:

  • generate new proving keys and upload those

@ananas-block ananas-block force-pushed the jorrit/feat-circuit-flexible-nullifiers branch from 27cedd8 to 41ea3a3 Compare October 26, 2024 23:44
@sergeytimoshin sergeytimoshin merged commit 9a50aeb into main Oct 27, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants