Commit Graph

2800 Commits

Author SHA1 Message Date
Daira Hopwood c7ad527f38 Fix an undefined reference in the history entry for 2021.2.17, in pre-Canopy versions.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-18 08:49:31 +00:00
Daira Hopwood 5d3b4ef038 NU5 proposal -> NU5
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-18 01:51:34 +00:00
Daira Hopwood e381ded490 \crossref{coinbasetransactions} effectively defined a coinbase transaction as the first
transaction in a block. This wording was copied from the Bitcoin Developer Reference
(https://developer.bitcoin.org/reference/transactions.html#coinbase-input-the-input-of-the-first-transaction-in-a-block),
but it does not match the implementation in zcashd that was inherited from Bitcoin Core.

Instead, a coinbase transaction should be, and now is, defined as a transaction with a
single null prevout. The specifications of consensus rules have been clarified and adjusted
(without any actual consensus change) to take this into account, as follows:

 * a block MUST have at least one transaction;
 * the first transaction in a block MUST be a coinbase transaction, and subsequent
   transactions MUST NOT be coinbase transactions;
 * a transparent input in a non-coinbase transaction MUST NOT have a null prevout;
 * every non-null prevout MUST point to a unique UTXO in either a preceding block, or a
   *previous* transaction in the same block (this rule was previously not given explicitly
   because it was assumed to be inherited from Bitcoin);
 * the rule that "A coinbase transaction MUST NOT have any transparent inputs with non-null
   prevout fields" is removed as an explicit consensus rule because it is implied by the
   corrected definition of coinbase transaction.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-18 01:51:33 +00:00
Daira Hopwood e123584794 Document the consensus rule that coinbase script length MUST be {2..100} bytes. fixes #589
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-18 01:09:11 +00:00
Daira Hopwood c506a972ac Cosmetics and improvements to indexing.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-18 01:02:24 +00:00
Daira Hopwood 8f77f6f1df Acknowledge the developers of Bitcoin Core (as distinct from the designers of the
Bitcoin protocol).

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-18 00:58:54 +00:00
Daira Hopwood 27f5bb1e68 Correct a type error in the usage of Commit^ivk: the output type Commit^ivk.Output includes 0,
but the type of incoming viewing keys should not include 0 because KA^Orchard.Private does not.
This is now handled by explicitly rejecting 0 as output from Commit^ivk when generating ivk
in \crossref{orchardkeycomponents}.

An encoding of ivk as 0 is also rejected in \crossref{orchardinviewingkeyencoding} when parsing
an incoming viewing key.

The action circuit needed no changes because pk_d already could not be the zero point, and
therefore the 'Diversified address integrity' condition fails when ivk = 0.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-18 00:56:59 +00:00
Daira Hopwood 5c7c728e63 In \crossref{blockchain}, define what a settled network upgrade is, specify requirements
for checkpointing, and allow nodes to impose a limitation on rollback depth. Also in
\crossref{bctv}, note that this checkpointing requirement mitigates the risks of not
performing BCTV14 zk proof verification.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-18 00:50:06 +00:00
dependabot[bot] a2efd493bb Bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-02 16:29:17 -05:00
Daira Hopwood c94c2a5517 ZIP 239: regenerate HTML.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-02-23 21:26:59 +00:00
Daira Hopwood 6bf7703684
ZIP 239: Clarify the behaviour of zcashd and the intended behaviour for unrecognized inventory types (#545)
* ZIP 239: Clarify the behaviour of zcashd and the intended behaviour for unrecognized inventory types.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>

* Update zip-0239.rst

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2022-02-23 16:21:28 -05:00
Daira Hopwood 28a3404ce0 Fix typo in README.template (which generates README.rst and index.html).
Co-authored-by: mg0716 <matt.galligan@gmail.com>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-02-16 21:07:06 +00:00
mg0716 0275b41fb0 Fix typo in README.rst 2022-02-16 15:19:23 -05:00
dependabot[bot] 73dc201033 Bump EndBug/add-and-commit from 7.5.0 to 8.0.2
Bumps [EndBug/add-and-commit](https://github.com/EndBug/add-and-commit) from 7.5.0 to 8.0.2.
- [Release notes](https://github.com/EndBug/add-and-commit/releases)
- [Changelog](https://github.com/EndBug/add-and-commit/blob/main/CHANGELOG.md)
- [Commits](https://github.com/EndBug/add-and-commit/compare/v7.5.0...v8.0.2)

---
updated-dependencies:
- dependency-name: EndBug/add-and-commit
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-10 19:51:17 -05:00
github-actions ba9137def1 Commit from GitHub Actions (Render pdfs) 2022-02-09 21:46:28 +00:00
Deirdre Connolly f56cf0d38e
Add GitHub Actions workflow that renders and commits spec pdfs (#579)
* Add GitHub Actions workflow that renders and commits the spec pdfs

* Try to run make

* Try our custom action

* Add link to Dockerfile to make action happy

* Update render workflow to manual render only

* Update .github/actions/render-protocol-pdf/action.yml

* Update .github/dependabot.yml
2022-02-09 16:34:55 -05:00
Daira Hopwood 81af218ef3 ZIP 316: further clarify which OVK is to be used when the sending Account is undetermined.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-02-07 14:51:53 +00:00
Daira Hopwood 0bfb157db3 ZIPs 143 and 243: fix links to zcash-test-vectors code.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-29 22:27:56 +00:00
Daira Hopwood dba647f121 ZIP 224: fix a broken link.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-29 21:02:24 +00:00
Daira Hopwood 8e2215c577 ZIP 32: Fix an error in #588; "ZcashIP32_Sprout" was a personalization for BLAKE2b-512, not BLAKE2b-256.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-28 18:33:31 +00:00
Daira Hopwood 2a4ab049b9
Merge pull request #588 from daira/zip-32-remove-sprout-hd
ZIP 32: Remove Sprout-related specifications
2022-01-28 18:24:51 +00:00
Daira Hopwood 7bd2845dbd ZIP 32: Remove Sprout-related specifications. fixes #581
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-28 17:44:15 +00:00
Deirdre Connolly de6dcad4df
Merge pull request #587 from str4d/zip-244-coinbase-fix
ZIP 244: Fix ill-defined commitments for shielded coinbase
2022-01-26 16:20:01 -05:00
Jack Grigg 4075c18cc4 ZIP 244: Fix ill-defined commitments for shielded coinbase
In zcash/zips#577 we altered ZIP 244 to have shielded signatures commit
to the same data as transparent inputs, in transactions that contain
transparent components. However, the edge case of shielded coinbase was
not correctly handled; they contain both a consensus-required "dummy"
transparent input, and binding signatures which would be required to
commit to a `CTxOut` that does not exist.

We resolve this by partially reverting one of the zcash/zips#577 changes,
by having S.2 for coinbase transactions be identical to T.2. This reverts
binding signatures in coinbase transactions to effectively signing the
transaction ID.

At the same time, we also revert the same change for transactions with no
transparent inputs but some transparent outputs; these also now revert to
using the transaction ID for all shielded signatures (like fully-shielded
transactions). The hardware wallet edge case does not apply here, as all
input values are shielded and therefore directly committed to.
2022-01-24 22:46:41 +00:00
Daira Hopwood 43c8cae266
Merge pull request #576 from daira/internal-key-derivation
ZIPs 32 and 316: add internal key derivation for Sapling, Orchard, and P2PKH
2022-01-19 19:12:14 +00:00
Daira Hopwood 8734965d0c ZIPs 32 and 316: Regenerate HTML.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-19 19:11:28 +00:00
Daira Hopwood df0f9e6bee ZIP 32: Wording improvements to avoid implying that we want an internal address/FVK for every
external address/FVK.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-19 19:09:56 +00:00
Daira Hopwood 8b8b3f7c5d ZIP 316: UAs can be used in Payment Requests without any change to ZIP 321.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-19 19:00:52 +00:00
Daira Hopwood c562b100f8 ZIP 316: add "Usage of Outgoing Viewing Keys" section.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-19 19:00:52 +00:00
Daira Hopwood ca302f40ef ZIPs 32 and 316: update and correct protocol spec references.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-19 19:00:52 +00:00
Daira Hopwood 2b5c860df5 ZIP 32: Add Sean Bowe, Kris Nuttycom and Ying Tong Lai to Credits.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-19 19:00:52 +00:00
Daira Hopwood 61223ae9b0 ZIP 32: Simplify Orchard internal key derivation diagram.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-19 19:00:51 +00:00
Daira Hopwood d27d2fd836 ZIP 316: Clarify that UAs/UVKs MUST contain at least one shielded item. This is stronger than
the former requirement that a UA/UVK MUST NOT contain only P2SH or P2PKH items, due to the
existence of Typecodes that are not currently defined.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-19 19:00:51 +00:00
Daira Hopwood 4683507160 ZIP 316: add Deriving Internal Keys section, and minor cleanups.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-19 19:00:51 +00:00
Daira Hopwood 7b70d343b7 ZIP 316: link to the section of the protocol spec describing QR encoding.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-19 19:00:51 +00:00
Daira Hopwood 79e6a10f0a ZIP 32: add internal key derivation for Sapling and Orchard.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-19 19:00:51 +00:00
Daira Hopwood 98515d003f ZIP 32: cosmetics.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-19 19:00:51 +00:00
Daira Hopwood d2b0f2d861 ZIP 32: disambiguate ToScalar and DiversifyHash for Sapling vs Orchard.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-19 19:00:51 +00:00
Daira Hopwood 82c59282fe Regenerate PDFs. 2022-01-19 18:16:51 +00:00
Daira Hopwood 81858fff41 Set Change History entry date.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-19 18:09:23 +00:00
Daira Hopwood 6c32c7c7ea Cosmetics.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-19 18:09:23 +00:00
Daira Hopwood dcc5532d61 In \crossref{sighash}, add a consensus rule that SIGHASH type encodings MUST be canonical
for v5 transactions.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-19 18:09:23 +00:00
Daira Hopwood 24cfab0b55 Add reference to [BCGGMTV2014] when discussing an example of an incorrect security claim.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-19 18:09:23 +00:00
Daira Hopwood 4ef578706b In \crossref{internalh}, add a security argument for why the SHA-256-based commitment scheme
NoteCommit^Sprout is binding and hiding, under reasonable assumptions about SHA256Compress.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-19 18:09:23 +00:00
Daira Hopwood 0cdab5071b In \crossref{joinsplit}, clarify that balance for JoinSplit transfers is enforced by the
JoinSplit statement, and that there is no consensus rule to check it directly.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-19 18:09:23 +00:00
Daira Hopwood ac9dd97f77
Merge pull request #577 from str4d/574-changes-to-zip-244-transparent
[ZIP 244] Changes to transparent component of signature digest
2022-01-13 14:32:13 +00:00
Daira Hopwood 2ae8fc6cec Minor wording nits.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-01-13 14:29:30 +00:00
Jack Grigg 1b30e57bde ZIP 244: Commit to scriptPubKey in txin_sig_digest instead of scriptCode
This is a no-op for every scriptPubKey format except P2SH, where we now
commit to the digest of the redeemScript instead instead of redeemScript
directly.
2022-01-12 22:08:22 +00:00
Jack Grigg 509b7a2b0c ZIP 244: Rename script_codes_sig_digest to scriptpubkeys_sig_digest 2022-01-12 16:00:23 +00:00
Jack Grigg 8e74c62a21 ZIP 244: Fix numbering of BIP 341 references
Co-authored-by: Kris Nuttycombe <kris@nutty.land>
2022-01-12 15:58:51 +00:00