-
Notifications
You must be signed in to change notification settings - Fork 282
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
Update method of hashing the SignedTxRequest in the circuits. #361
Milestone
Comments
spalladino
added
the
S-needs-discussion
Status: Still needs more discussion before work can start.
label
Apr 25, 2023
spalladino
removed
the
S-needs-discussion
Status: Still needs more discussion before work can start.
label
Apr 25, 2023
Note there is now a third entry in the signature struct |
PhilWindle
changed the title
Calculate tx hash from signed tx request and push it as first nullifier
Update method of hashing the SignedTxRequest in the circuits.
May 7, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As part of this discussion, we agreed that we need a way to reconstruct tx hashes for private and public txs from the L2 block. Given it's possible it'll change in the near future, rather than passing in a new field altogether with the tx hash, we'll be using the first nullifier of each tx to store the hash. We'll also alter how we calculate tx hashes: for all txs, public or private, they'll be the hash of the signed tx request.
This means we need to make the following changes:
Tx
object in thetypes
package, update how tx hashes are calculated. The hash should always be obtained by pedersen hashing the signed tx request (check if we need a new generator point). For the sake of simplicity, we'll disallow txs that have both a private and a public signed tx request.For reference, the hash of a tx should be calculated by concatenating the following fields in the following order, and pedersen hashing them:
The text was updated successfully, but these errors were encountered: