bitcoin-segwit
Segregated Witness, or SegWit Bitcoin Improvement Proposal number BIP141
The declared purpose was to prevent nonintentional bitcoin transaction malleability, allow optional data transmission, and to bypass certain protocol restrictions (such as the block size limit) with a soft fork.[2]
It was also intended to mitigate a blockchain size limitation problem that reduces bitcoin transaction speed.
It does this by splitting the transaction into two segments, removing the unlocking signature (“witness” data) from the original portion and appending it as a separate structure at the end.[3] The original section would continue to hold the sender and receiver data, and the new “witness” structure would contain scripts and signatures. The original data segment would be counted normally, but the “witness” segment would, in effect, be counted as a quarter of its real size.
隔离见证做了什么改动?
隔离见证就是把脚本签名(scriptSig)信息从基本结构 (base block) 里拿出来,放在一个新的数据结构当中。做验证工作的节点和矿工也会验证这个新的数据结构里的脚本签名,以确保交易是有效的。
当审核统计区块大小不能超过1M的时候。脚本签名大小不会被计算在内。
隔离见证重新整理了每个交易内容的布局方式。把脚本签名从交易内容的结构里面拿出来,放到了最下面,并有一个指针Pointer指向它。