BIP: ?? Title: Block size following technological growth Author: Pieter Wuille <[email protected]> Status: Draft Type: Standards Track Created: 2015-07-21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<pre> | |
SEGWIT BIP...yada yada... | |
</pre> | |
==Abstract== | |
This BIP defines a new structure called a "witness" that is committed to blocks separately from the transaction merkle tree. This structure contains data required to check transaction validity but not required to determine transaction effects. In particular, scripts and signatures are moved into this new structure. | |
The witness is committed in a tree that is nested into the block's existing merkle root via the coinbase transaction for the purpose of making this BIP soft fork compatible. A future hard fork can place this tree in its own branch. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Traditional Chinese | |
Title: 比特幣系統擴展 | |
我們連署支持<link to Capacity incresases for the Bitcoin system 比特幣系統擴展>路線圖。我們已在Bitcoin Core計劃內為可擴展性工作多年,認為這是最可以延續我們一直以來努力的方向。 | |
(Signatures) | |
我們正準備一份常見問答集,完成後會在此連結。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# General segwit address by jl2012 2015 (Public domain) | |
# Damm checksum code by Ilmari Karonen | |
# reduction bitmasks for GF(2^n), 2 <= n <= 32 | |
masks = (3, 3, 3, 5, 3, 3, 27, 3, 9, 5, 9, 27, 33, 3, 43, 9, | |
9, 39, 9, 5, 3, 33, 27, 9, 27, 39, 3, 5, 3, 9, 141) | |
#base32 = "0123456789ABCDEFGHJKMNPQRSTUVWXY" | |
base32 = "ybndrfg8ejkmcpqxot1uwisza345h769" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Next block and weak block | |
Objective: to minimize the network and validation lantency when a block is found. | |
"Next block" committment: | |
1. We introduce a non-consensus enforced, optional committment in coinbase tx: "next" | |
2. "next" is a set of txs proposed for the next block, given that this block has full PoW | |
3. There are 2 miners: Alice and Bob | |
4. Alice is mining {A,B,C}; Bob is mining {A,B,E} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
v0.13.0 (no #8524 or #8654) | |
Test: 14-of-14 CHECKMULTISIG P2SH/P2WSH inputs with different variations of SIGHASH_ALL | |
**Non-witness** | |
Transaction weight : 3987928 | |
Validation time : 5.946058988571167 | |
**Witness** | |
Transaction weight : 3816865 | |
Validation time : 3.072489023208618 | |
Test: 14-of-14 CHECKMULTISIG P2SH/P2WSH inputs with same SIGHASH_ALL | |
**Non-witness** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Patched | |
========== | |
Test: 14-of-14 CHECKMULTISIG P2SH/P2WSH inputs with different variations of SIGHASH_ALL | |
**Non-witness** | |
Transaction weight : 3800384 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int FindAndMask(CScript& script) | |
{ | |
int masked = 0; | |
bool skip_next = false; | |
CScript result; | |
CScript::const_iterator pc = script.begin(), pc2 = script.begin(); | |
opcodetype opcode; | |
while (script.GetOp(pc, opcode)) { | |
if (opcode == OP_MASK) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int FindAndMaskPush(CScript& script) | |
{ | |
int masked = 0; | |
bool skip_next = false; | |
CScript result; | |
CScript::const_iterator pc = script.begin(), pc2 = script.begin(); | |
opcodetype opcode; | |
while (script.GetOp(pc, opcode)) { | |
if (skip_next) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int inputtype = nHashType & SIGHASH2_INPUT_MASK; | |
const int outputtype = nHashType & SIGHASH2_OUTPUT_MASK; | |
CHashWriter ss(); | |
ss << static_cast<uint8_t>(nHashType); | |
// tx-level data | |
ss << txTo.nVersion; | |
if (inputtype == SIGHASH2_ALL) { |