forked from zcash/zips
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ZIP 244: Fix ill-defined commitments for shielded coinbase
In zcash#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#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.
- Loading branch information
Showing
2 changed files
with
27 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters