Separate OrchardZSA from Orchard#13
Conversation
…s some redundant material that can be removed.
…efactoring) -- now all the ZSA additions are in the orchardzsa folder only, albeit with redundancies that are to be removed
…w for generalization to OrchardZSA)
…herText from Orchard
…we might later want to change. Also removing older generated test vectors.
PaulLaux
left a comment
There was a problem hiding this comment.
Very nice, added comments and questions.
TxV6 require some more work: extracting mutual code with v5 and polish.
To be done as a separate task.
|
Note: The NU6 specific updates to transaction.py and zip-0244.py will be done in a subsequent, follow-on PR. |
PaulLaux
left a comment
There was a problem hiding this comment.
approved pending small fixes.
Also, let's make sure all comments are correct and the links are valid.
| super().__init__(rand) | ||
|
|
||
| def encrypt(self, note: OrchardZSANote, memo, pk_d_new, g_d_new, cv_new, cm_new, ovk=None): | ||
| tc = super().encrypt(note, memo, pk_d_new, g_d_new, cv_new, cm_new, ovk) |
There was a problem hiding this comment.
nice generalization.
are we confident that we get the right ciphertext?
There was a problem hiding this comment.
Although super.encrypt(...) takes note: OrchardNote, since OrchardZSANote inherits OrchardNote, if I pass it an OrchardZSANote instead, it will use the OrchardZSANote version of the functions wherever they differ. I had seen simpler examples online displaying that.
I first confirmed we get the longer length ciphertexts, which is an initial sanity check.
Also then, I used these test vectors in the orchard crate with Dmitry's backward compatibility work, and it passed the test for note_encryption_zsa so it should be fine.
…est-vectors repo (#102) This PR simply changes the test vectors used, replacing them with those generated by the current version of the zcash-test-vectors repo (i.e. changes made in [this PR](QED-it/zcash-test-vectors#13)).
This PR separates the additions of the ZSA work into a separate file, creating separate test vector files for them. It also adds in upstream changes to the test vectors crate.