Skip to content

Commit

Permalink
fix a link and attempt to clarify SIGHASH_SINGLE
Browse files Browse the repository at this point in the history
  • Loading branch information
mruddy committed Jun 26, 2015
1 parent e7c9164 commit 0368f10
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion _data/glossary/en/sighash-anyonecanpay.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ optional:
- "`sighash_single|sighash_anyonecanpay`"

not_to_be_confused_with_capitalize_first_letter:
- SIGHASH_SINGLE (which signs only a single input, like SIGHASH_ANYONECANPAY, but also signs a single output)
- SIGHASH_SINGLE (which signs only a single output while allowing the sequence number of other inputs to be updated)

links_html_or_markdown_style_capitalize_first_letter:
- "[SIGHASH_ANYONECANPAY](/en/developer-guide#term-sighash-anyonecanpay) --- Bitcoin.org Developer Guide"
Expand Down
9 changes: 5 additions & 4 deletions _data/glossary/en/sighash-single.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ required:
title_max_40_characters_no_formatting: SIGHASH_SINGLE

summary_max_255_characters_no_formatting: >
Signature hash type which only signs its input and the output
with the same index value, allowing modification of other inputs
and outputs.
Signature hash type which signs all of the inputs, but only the one
output corresponding to this input (the one with the same index value),
allowing modification of other outputs and the sequence number of other
inputs.
synonyms_shown_in_glossary_capitalize_first_letter:
- SIGHASH_SINGLE
Expand All @@ -19,7 +20,7 @@ optional:
- "`SIGHASH_SINGLE`"

not_to_be_confused_with_capitalize_first_letter:
- SIGHASH_ANYONECANPAY (a flag to signature hash types that only signs a single input, like SIGHASH_SINGLE, but which doesn't sign any outputs.)
- SIGHASH_ANYONECANPAY (a flag to signature hash types that only signs this single input)

links_html_or_markdown_style_capitalize_first_letter:
- "[`SIGHASH_SINGLE`](/en/developer-guide#term-sighash-single) --- Bitcoin.org Developer Guide"
Expand Down
12 changes: 6 additions & 6 deletions _includes/guide_transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -517,12 +517,13 @@ currently available:
allowing anyone to change where the satoshis are going unless other
signatures using other signature hash flags protect the outputs.

* [`SIGHASH_SINGLE`][/en/glossary/sighash-none]{:#term-sighash-single}{:.term} signs only this input and only one corresponding
output (the output with the same output index number as the input), ensuring
* [`SIGHASH_SINGLE`][/en/glossary/sighash-single]{:#term-sighash-single}{:.term}
signs only the output corresponding to this input (the output
with the same output index number as the input), ensuring
nobody can change your part of the transaction but allowing other
signers to change their part of the transaction. The corresponding
output must exist or the value "1" will be signed, breaking the security
scheme.
scheme. The sequence numbers of other inputs are not signed and can be updated.

The base types can be modified with the [`SIGHASH_ANYONECANPAY`][/en/glossary/sighash-anyonecanpay]{:#term-sighash-anyonecanpay}{:.term} (anyone can
pay) flag, creating three new combined types:
Expand All @@ -536,9 +537,8 @@ pay) flag, creating three new combined types:
allows anyone to add or remove other inputs or outputs, so anyone who
gets a copy of this input can spend it however they'd like.

* `SIGHASH_SINGLE|SIGHASH_ANYONECANPAY` signs only this input and only
one corresponding output, but it also allows anyone to add or remove
other inputs.
* `SIGHASH_SINGLE|SIGHASH_ANYONECANPAY` signs this one input and its
corresponding output. Allows anyone to add or remove other inputs.

Because each input is signed, a transaction with multiple inputs can
have multiple signature hash types signing different parts of the transaction. For
Expand Down

0 comments on commit 0368f10

Please sign in to comment.