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

Corrections to V7 transaction format and using updated test vectors #66

Merged
merged 16 commits into from
Jul 24, 2024

Conversation

vivek-arte
Copy link

@vivek-arte vivek-arte commented Jul 10, 2024

This PR makes the following changes:

  • reordering of the component fields in read_action and write_action in issuance in order to make them spec compliant.
  • It sets some of the constant values for NU7 in a way that is consistent with the generated test vectors from the Python reference implementation (See Changes to TXID generation to account for ZSA additions zcash-test-vectors#22 for the changes to the Python reference implementation).
  • Some changes are made to function names to reflect the shift from preparing ZSAs for V7 rather than V6.
  • There are changes to the tests to use the zcash_unstable flag in order to cover both ZSA and vanilla Orchard behavior.
  • The test vectors are also expanded to include both the V5 vectors, and the V7 vectors (behind a zcash_unstable flag).

@QED-it QED-it deleted a comment from what-the-diff bot Jul 10, 2024
@vivek-arte vivek-arte force-pushed the txv7-rebased-corrected branch 2 times, most recently from 1d17ea0 to 9107831 Compare July 17, 2024 20:20
Copy link
Collaborator

@alexeykoren alexeykoren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff, one minor question

zcash_primitives/src/transaction/mod.rs Show resolved Hide resolved
@vivek-arte
Copy link
Author

CI checks fail due to missing NoteBytes in zcash_note_encryption, which seems to be getting resolved in QED-it/zcash_note_encryption#8.

@alexeykoren
Copy link
Collaborator

CI checks fail due to missing NoteBytes in zcash_note_encryption, which seems to be getting resolved in QED-it/zcash_note_encryption#8.

Right. Yes, we'll merge it soon. But this PR we can merge even before, given that we are not targeting zsa1

Copy link

@PaulLaux PaulLaux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix CI error so we can merge it.

let tx = Transaction::read(&tv.tx[..], BranchId::Nu5).unwrap();
let tx = Transaction::read(
&tv.tx[..],
#[cfg(not(zcash_unstable = "nu6"))] /* TODO nu7 */ BranchId::Nu5,
Copy link

@PaulLaux PaulLaux Jul 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line after /* TODO nu7 */ (all occurrences)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cargo fmt pushes it back to the above line (so making it new line would make it fail the Rustfmt CI check).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirmed that this is the case for all lines where the newline is not used.

@vivek-arte vivek-arte merged commit 04ecb20 into txv6-separate-bundles-rebased Jul 24, 2024
25 checks passed
alexeykoren pushed a commit that referenced this pull request Jul 24, 2024
)

This PR makes the following changes:
- reordering of the component fields in `read_action` and `write_action`
in issuance in order to make them spec compliant.
- It sets some of the constant values for NU7 in a way that is
consistent with the generated test vectors from the Python reference
implementation (See QED-it/zcash-test-vectors#22
for the changes to the Python reference implementation).
- Some changes are made to function names to reflect the shift from
preparing ZSAs for V7 rather than V6.
- There are changes to the tests to use the `zcash_unstable` flag in
order to cover both ZSA and vanilla Orchard behavior.
- The test vectors are also expanded to include both the V5 vectors, and
the V7 vectors (behind a `zcash_unstable` flag).
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.

3 participants