summaryrefslogtreecommitdiff
path: root/bip-0143.mediawiki
diff options
context:
space:
mode:
authorJohnson Lau <jl2012@users.noreply.github.com>2016-01-12 03:09:50 +0800
committerJohnson Lau <jl2012@xbt.hk>2016-01-12 03:21:10 +0800
commitae529c3f0488fec6ebc335f2bdb0e623af6a6a5c (patch)
tree8d1fd95cc2cfa74f1319f526ef8001d1cb5d8913 /bip-0143.mediawiki
parent858a4a70ea2dfde140c22e5535d1eabb182663b2 (diff)
downloadbips-ae529c3f0488fec6ebc335f2bdb0e623af6a6a5c.tar.xz
Fix links in BIP142-144. Corrections in BIP142.
Diffstat (limited to 'bip-0143.mediawiki')
-rw-r--r--bip-0143.mediawiki6
1 files changed, 3 insertions, 3 deletions
diff --git a/bip-0143.mediawiki b/bip-0143.mediawiki
index 276e2cb..4aca2db 100644
--- a/bip-0143.mediawiki
+++ b/bip-0143.mediawiki
@@ -19,7 +19,7 @@ Unfortunately, there are at least 2 weaknesses in the original transaction diges
* For the verification of each signature, the amount of data hashing is proportional to the size of the transaction. Therefore, data hashing grows in O(n<sup>2</sup>) as the number of sigops in a transaction increases. While a 1 MB block would normally take 2 seconds to verify with an average computer in 2015, a 1MB transaction with 5569 sigops may take 25 seconds to verify. This could be fixed by optimizing the digest algorithm by introducing some reusable “midstate”, so the time complexity becomes O(n). <ref>[https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-2292 CVE-2013-2292]</ref><ref>[https://bitcointalk.org/?topic=140078 New Bitcoin vulnerability: A transaction that takes at least 3 minutes to verify]</ref><ref>[http://rusty.ozlabs.org/?p=522 The Megatransaction: Why Does It Take 25 Seconds?]</ref>
* The algorithm does not involve the amount of Bitcoin being spent by the input. This is usually not a problem for online network nodes as they could request for the specified transaction to acquire the output value. For an offline transaction signing device ("cold wallet"), however, the unknowing of input amount makes it impossible to calculate the exact amount being spent and the transaction fee. To cope with this problem a cold wallet must also acquire the full transaction being spent, which could be a big obstacle in the implementation of lightweight, air-gapped wallet. By including the input value of part of the transaction digest, a cold wallet may safely sign a transaction by learning the value from an untrusted source. In the case that a wrong value is provided and signed, the signature would be invalid and no funding might be lost. <ref>[https://bitcointalk.org/index.php?topic=181734.0 SIGHASH_WITHINPUTVALUE: Super-lightweight HW wallets and offline data]</ref>
-Deploying the aforementioned fixes in the original script system is not a simple task. That would be either a hardfork, or a softfork for new sigops without the ability to remove or insert stack items. However, the introduction of segregated witness softfork offers an opportunity to define a different set of script semantics without disrupting the original system, as the unupgraded nodes would always consider such a transaction output is spendable by arbitrary signature or no signature at all. <ref>[https://github.com/CodeShark/bips/blob/segwit/bip-codeshark-jl2012-segwit.mediawiki BIPx: Segregated Witness (Consensus layer)]</ref>
+Deploying the aforementioned fixes in the original script system is not a simple task. That would be either a hardfork, or a softfork for new sigops without the ability to remove or insert stack items. However, the introduction of segregated witness softfork offers an opportunity to define a different set of script semantics without disrupting the original system, as the unupgraded nodes would always consider such a transaction output is spendable by arbitrary signature or no signature at all. <ref>[https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki BIP141: Segregated Witness (Consensus layer)]</ref>
== Specification ==
A new transaction digest algorithm is defined, but only applicable to sigops in version 0 and version 1 witness program:
@@ -114,7 +114,7 @@ Refer to the reference implementation, reproduced below, for the precise algorit
== Deployment ==
-This proposal is deployed with Segregated Witness softfork (BIP x)
+This proposal is deployed with Segregated Witness softfork (BIP 141)
== Backward compatibility ==
@@ -122,7 +122,7 @@ As a soft fork, older software will continue to operate without modification. No
== Reference Implementation ==
-https://github.com/sipa/bitcoin/commits/segwit
+https://github.com/sipa/bitcoin/commits/segwit2
== References ==