|
March 16, 2017, 09:59:59 PM |
|
Segwit essentially introduces a new transaction format. It introduces a new transaction format which is just the current one but with 2 additional bytes signalling that it is the new format, and the additional witnesses field before the nLocktime. When a node connects to another node, it tells that node that it supports segwit. So, that other node, if it also supports segwit, will send transactions with the segwit format. When it goes to send a block, it will send the block with the transactions also serialized in the segwit format. If a node does not say that it supports segwit or if a transaction does not use the witnesses field, then the transaction will be sent with the original format without the witnesses field.
The merkle root of the block header contains the hash of the txids. There will be an additional merkle root of the hashes of all the transactions in the block which will be put in an OP_RETURN output of the coinbase.
|