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

Document consensus rules from Zcash spec 7.1.2: Transaction Size #3426

Closed
9 of 10 tasks
Tracked by #3125 ...
mpguerra opened this issue Jan 27, 2022 · 0 comments · Fixed by #3461
Closed
9 of 10 tasks
Tracked by #3125 ...

Document consensus rules from Zcash spec 7.1.2: Transaction Size #3426

mpguerra opened this issue Jan 27, 2022 · 0 comments · Fixed by #3461
Assignees

Comments

@mpguerra
Copy link
Contributor

mpguerra commented Jan 27, 2022

  • [Pre-Sapling] The encoded size of the transaction MUST be less than or equal to 100000 bytes.
  • [NU5 onward] In a version 5 transaction, the reserved bits 2..7 of the flagsOrchard field MUST
    be zero.
  • [NU5 onward] nSpendsSapling, nOutputsSapling, and nActionsOrchard MUST all be less than 2^16.
  • [Pre-Sapling] If effectiveVersion = 1 or nJoinSplit = 0, then both tx_in_count and tx_out_count MUST be nonzero.
  • [Sapling onward] If effectiveVersion < 5, then at least one of tx_in_count, nSpendsSapling, and nJoinSplit MUST be nonzero.
  • [Sapling onward] If effectiveVersion < 5, then at least one of tx_out_count, nOutputsSapling, and nJoinSplit MUST be nonzero.
  • [NU5 onward] If effectiveVersion >= 5 then this condition MUST hold: tx_in_count > 0 or nSpendsSapling > 0 or (nActionsOrchard > 0 and enableSpendsOrchard = 1).
  • [NU5 onward] If effectiveVersion >= 5 then this condition MUST hold: tx_out_count > 0 or nOutputsSapling > 0 or (nActionsOrchard > 0 and enableOutputsOrchard = 1).
  • [NU5 onward] If effectiveVersion >= 5 and nActionsOrchard > 0, then at least one of enableSpendsOrchard and enableOutputsOrchard MUST be 1.
  • [Sapling onward] If effectiveVersion = 4 and there are no Spend descriptions or Output descriptions, then valueBalanceSapling MUST be 0.
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 a pull request may close this issue.

2 participants