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

ZIP 244: Clarify that shielded inputs can't sign the txid if there is a transparent bundle #910

Open
str4d opened this issue Oct 8, 2024 · 0 comments

Comments

@str4d
Copy link
Collaborator

str4d commented Oct 8, 2024

The Signature Digest first paragraph states:

A new per-input transaction digest algorithm is defined that constructs a hash that may be signed by a transaction creator to commit to the effects of the transaction. A signature digest is produced for each transparent input, each Sapling input, and each Orchard action. For transparent inputs, this follows closely the algorithms from ZIP 143 and ZIP 243. For shielded inputs, this algorithm has the exact same output as the transaction digest algorithm, thus the txid may be signed directly.

This last sentence was an original design goal, and IIRC was originally correct, but due to changes later on in the design of ZIP 244, it is now incorrect because the sighash commits to information about the transparent outputs that are being spent (such as their amounts) in order to make the lives of hardware wallets easier.

Fix this paragraph to say something like:

This follows closely the algorithms from ZIP 143 and ZIP 243. For transactions without transparent inputs, this algorithm has the exact same output as the transaction digest algorithm, thus the txid may be signed directly.

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

No branches or pull requests

1 participant