summaryrefslogtreecommitdiff
path: root/bip-0141.mediawiki
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2016-04-23 20:20:53 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2016-04-23 20:20:53 +0000
commit2e5533849e7186182dde0ae76c2063de13ad9449 (patch)
treec2f831d7b15cdd1ae336a5fe6d88bd3b7da202b2 /bip-0141.mediawiki
parent4683a9b71424bac4d43af2236f36fdc2b0c9f470 (diff)
parent5bf411856e7146608be77d3d3c4e778689679f7a (diff)
Merge remote-tracking branch 'personal-github/segwit_gbt_updates_20160330' into segwit_gbt_updates_20160330
Diffstat (limited to 'bip-0141.mediawiki')
-rw-r--r--bip-0141.mediawiki6
1 files changed, 3 insertions, 3 deletions
diff --git a/bip-0141.mediawiki b/bip-0141.mediawiki
index e10ff53..e3ffa9b 100644
--- a/bip-0141.mediawiki
+++ b/bip-0141.mediawiki
@@ -82,8 +82,8 @@ If all transactions in a block do not have witness data, the commitment is optio
A scriptPubKey (or redeemScript as defined in BIP16/P2SH) that consists of a 1-byte push opcode (for 0 to 16) followed by a data push between 2 and 32 bytes gets a new special meaning. The value of the first push is called the "version byte". The following byte vector pushed is called the "witness program".
There are two cases in which witness validation logic are triggered. Each case determines the location of the witness version byte and program, as well as the form of the scriptSig:
-# Triggered by a scriptPubKey that is exactly a push of a version byte, plus a push of a witness program. The scriptSig must be exactly empty or validation fails.
-# Triggered when a scriptPubKey is a P2SH script, and the BIP16 redeemScript pushed in the scriptSig is exactly a push of a version byte plus a push of a witness program. The scriptSig must be exactly a push of the BIP16 redeemScript or validation fails.
+# Triggered by a scriptPubKey that is exactly a push of a version byte, plus a push of a witness program. The scriptSig must be exactly empty or validation fails. (''"native witness program"'')
+# Triggered when a scriptPubKey is a P2SH script, and the BIP16 redeemScript pushed in the scriptSig is exactly a push of a version byte plus a push of a witness program. The scriptSig must be exactly a push of the BIP16 redeemScript or validation fails. (''"P2SH witness program"'')
If the version byte is 0, and the witness program is 20 bytes:
* It is interpreted as a pay-to-witness-public-key-hash (P2WPKH) program.
@@ -124,7 +124,7 @@ Sigops in the current pubkey script, signature script, and P2SH check script are
The sigop limit is likewise quadrupled to ≤ 80,000.
In addition, opcodes within the witness program are counted identical to as previously within the P2SH check script.
-That is, CHECKSIG is counted as only 1 sigop in a witness program, despite P2SH check script's CHECKSIG becoming 4 sigops with the forementioned change.
+That is, CHECKSIG in a witness program is counted as only 1 sigop, and CHECKMULTISIG in a witness program is counted as 1 to 20 sigops according to the arguments. This rule applies to both native witness program and P2SH witness program.
== Examples ==