Skip to content

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

Merged
vivek-arte merged 16 commits intotxv6-separate-bundles-rebasedfrom
txv7-rebased-corrected
Jul 24, 2024
Merged

Corrections to V7 transaction format and using updated test vectors#66
vivek-arte merged 16 commits intotxv6-separate-bundles-rebasedfrom
txv7-rebased-corrected

Conversation

@vivek-arte
Copy link
Copy Markdown

@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
@vivek-arte vivek-arte force-pushed the txv7-rebased-corrected branch from 9107831 to 9b67da5 Compare July 18, 2024 12:00
Copy link
Copy Markdown
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

Comment thread zcash_primitives/src/transaction/mod.rs
@vivek-arte
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator

@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
Copy Markdown
Collaborator

@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
Copy Markdown
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
Copy Markdown
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
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