-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Define SIGHASH_MASK in validation and determine the use of SIGHASH_SINGLE in signing #13357
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
Conversation
|
How about giving |
|
@Empact : 0x1f also used in |
|
@jl2012 Sorry to be unclear, was referring to |
|
(& ~SIGHASH_ANYONECANPAY) has no consensus meaning. Not sure why it was used here in the first place |
|
I would like to see it named utack 283b96b |
|
@Christewart added a commit to define SIGHASH_MASK. I'm fine with or without that. @MarcoFalke does it need a Validation tag? |
|
re-utack b84c353 . Don't we have a Policy label? |
|
One more use of |
|
@Empact that one is correct. It makes only 6 types of SIGHASH standard: 1, 2, 3, 0x81, 0x82, 0x83 |
| The last travis run for this pull request was 52 days ago and is thus outdated. To trigger a fresh travis build, this pull request should be closed and re-opened. |
|
utACK 283b96b |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
| Needs rebase |
We should use exactly the same code to determine the use of SIGHASH_SINGLE, in both validation and signing.
The existing signing code is safe because SIGHASH is restricted to 6 types. However, if further types are introduced (e.g. SIGHASH_NOINPUT) and we forget to make changes here, people might accidentally sign with SIGHASH_SINGLE when there is no corresponding output and lose money. So it's better to fix it when we still remember