Segregated Witness: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{infobox miner activated fork|title=SegWit|image=[[File:Segwit.png|256px]] | {{infobox miner activated fork|title=SegWit|image=<hr style="background-color: #f9f9f9;"/>[[File:Segwit.png|256px]]<hr style="background-color: #f9f9f9;"/> | ||
|fulltitle=Segregated Witness (Consensus layer) | |fulltitle=Segregated Witness (Consensus layer) | ||
|bipnumber=[[BIP_0141|BIP 141]] | |bipnumber=[[BIP_0141|BIP 141]] | ||
Line 11: | Line 11: | ||
}}'''Segregated Witness''' (abbreviated as '''SegWit''') is an implemented protocol upgrade intended to provide protection from [[transaction malleability]] and [[Block size limit controversy|increase block capacity]]. SegWit 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 is not required to determine transaction effects. In particular, signatures and redeem scripts are moved into this new structure, which does not count towards the traditional [[Block size limit controversy|1 MB block size limit]]. Instead, a new ''weight'' parameter is defined, and blocks are allowed to have at most 4 million weight units (WU). A byte in the original 1 MB zone of the block weighs 4 WU, but a byte in a witness structure only weighs 1 WU, allowing blocks that are technically larger than 1 MB without a hardforking change. | }}'''Segregated Witness''' (abbreviated as '''SegWit''') is an implemented protocol upgrade intended to provide protection from [[transaction malleability]] and [[Block size limit controversy|increase block capacity]]. SegWit 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 is not required to determine transaction effects. In particular, signatures and redeem scripts are moved into this new structure, which does not count towards the traditional [[Block size limit controversy|1 MB block size limit]]. Instead, a new ''weight'' parameter is defined, and blocks are allowed to have at most 4 million weight units (WU). A byte in the original 1 MB zone of the block weighs 4 WU, but a byte in a witness structure only weighs 1 WU, allowing blocks that are technically larger than 1 MB without a hardforking change. | ||
After the successful activations of | After the successful activations of OP_CLTV and OP_CSV, SegWit was the last protocol change needed to make the [[Lightning Network]] safe to deploy on the Bitcoin network. | ||
Because the witness structure contains [[Script]] versioning, it is also possible to make changes to or introduce new opcodes to SegWit scripts that would have originally required a hardfork to function without SegWit. | |||
==See Also== | ==See Also== |
Revision as of 06:51, 5 December 2017
Full title | Segregated Witness (Consensus layer) |
BIP number | BIP 141 |
Type | Miner-activated softfork |
Purpose | Prevent unintended transaction malleability |
Deployment | |
Signalling bit | Bit 1 "segwit" |
Starttime | 2016-11-15 00:00:00 |
Timeout | 2017-11-15 00:00:00 |
Supermajority | 95% of last 2016 block period |
Lock-in | Block #479708 2017-08-08 19:05:58 |
Activated | Block #481824 2017-08-24 01:57:37 |
Segregated Witness (abbreviated as SegWit) is an implemented protocol upgrade intended to provide protection from transaction malleability and increase block capacity. SegWit 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 is not required to determine transaction effects. In particular, signatures and redeem scripts are moved into this new structure, which does not count towards the traditional 1 MB block size limit. Instead, a new weight parameter is defined, and blocks are allowed to have at most 4 million weight units (WU). A byte in the original 1 MB zone of the block weighs 4 WU, but a byte in a witness structure only weighs 1 WU, allowing blocks that are technically larger than 1 MB without a hardforking change.
After the successful activations of OP_CLTV and OP_CSV, SegWit was the last protocol change needed to make the Lightning Network safe to deploy on the Bitcoin network.
Because the witness structure contains Script versioning, it is also possible to make changes to or introduce new opcodes to SegWit scripts that would have originally required a hardfork to function without SegWit.
See Also
- BIP 141 Segregated Witness (Consensus layer)
- BIP 143 Transaction Signature Verification for Version 0 Witness Program
- BIP 144 Segregated Witness (Peer Services)
- BIP 145 getblocktemplate Updates for Segregated Witness
- BIP 147 Dealing with dummy stack element malleability
- BIP 173 Base32 address format for native v0-16 witness outputs
- Segregated Witness Benefits
- Segregated Witness Wallet Developer Guide