<blockquote>
  <p>For SegWit node, is <code>witness</code> necessary to verify a block? Because I know <code>witness</code> are committed as <code>wtxid</code> merkle node in coinbase. What's the purpose of the <code>wtxid</code> merkle node?</p>
</blockquote>

<p>If a block contains transactions that have witnesses, if the block then does not have a witness, the Segwit node will still validate it, but it will find it to be invalid. Because segwit is a soft fork, Segwit nodes still know what blocks without witnesses look like and can verify them as such. This is because the block structure actually did not change, what changed was the transaction structure.</p>

<blockquote>
  <p>If <code>witenss</code> is necessary for SegWit node, then can I say <code>witness</code> is an part of blockchain in SegWit node's view?</p>
</blockquote>

<p>Yes.</p>

CC BY-SA 3.0
2017-12-02T07:22:57.787Z
So miners will keep all `witness` and never discard them, isn't it? People always say block size haven't changed and `witness` is not an part of blockchain after implementing Segwit. But now I got it. It is only for the non-SegWit node's view. Your answer make me clear. Thank you!
fjchen
CC BY-SA 3.0
2017-12-01T22:58:45.853Z
2017-12-01T22:58:45.853Z
Ava Chow
<p>Well, a segwit node will indeed classify a block that have transactions without a witness as 'invalid'. </p>

<p>See this answer, <a href="https://bitcoin.stackexchange.com/questions/54697/transaction-verification-by-miner-vs-full-node-with-without-segwit">Transaction verification by miner VS full node with &amp; without SegWit</a></p>

<p>I believe it answers the most part  of your question better/more in-depth then i could.</p>

CC BY-SA 3.0
2017-12-02T07:25:33.143Z
So 1MB block size is only for non-SegWit nodes and it is more than 1MB for SegWit nodes, right?
fjchen
CC BY-SA 3.0
2018-04-05T14:34:00.837Z
That's not really true. There is simply a new unit "weight" which is defined as 4*non_witness_size + witness_size, which is restricted to 4000000. If a block has 1000000 bytes of non-witness data, there is no more space for witness data.
Pieter Wuille
CC BY-SA 3.0
2017-12-01T16:06:54.650Z
2017-12-02T11:37:54.993Z
2017-12-02T11:37:54.993Z
Jan Janssen
<p>I know that non-SegWit node could verify a block without <code>witness</code>.</p>

<p>For SegWit node, is <code>witness</code> necessary to verify a block? Because I know <code>witness</code> are committed as <code>wtxid</code> merkle node in coinbase. What's the purpose of the <code>wtxid</code> merkle node?</p>

<p>If <code>witenss</code> is necessary for SegWit node, then can I say <code>witness</code> is an part of blockchain in SegWit node's view?</p>

<bitcoin-core><segregated-witness><segwit2x><witness-data>
How does a SegWit node verify a block?
fjchen
# How does a SegWit node verify a block?

(Asked by: username_0 on 2017-12-01)

I know that non-SegWit node could verify a block without `witness`.

For SegWit node, is `witness` necessary to verify a block? Because I know `witness` are committed as `wtxid` merkle node in coinbase. What's the purpose of the `wtxid` merkle node?

If `witenss` is necessary for SegWit node, then can I say `witness` is an part of blockchain in SegWit node's view?

**Tags:** bitcoin-core, segregated-witness, segwit2x, witness-data


---

## 2 answers

### Answer by username_1 on 2017-12-01. Score: 1

> For SegWit node, is `witness` necessary to verify a block? Because I know `witness` are committed as `wtxid` merkle node in coinbase. What's the purpose of the `wtxid` merkle node?

If a block contains transactions that have witnesses, if the block then does not have a witness, the Segwit node will still validate it, but it will find it to be invalid. Because segwit is a soft fork, Segwit nodes still know what blocks without witnesses look like and can verify them as such. This is because the block structure actually did not change, what changed was the transaction structure.

> If `witenss` is necessary for SegWit node, then can I say `witness` is an part of blockchain in SegWit node's view?

Yes.

> **Comments:**
> **username_0**: So miners will keep all `witness` and never discard them, isn't it? People always say block size haven't changed and `witness` is not an part of blockchain after implementing Segwit. But now I got it. It is only for the non-SegWit node's view. Your answer make me clear. Thank you!  

---

### Answer by username_2 on 2017-12-01. Score: 0

Well, a segwit node will indeed classify a block that have transactions without a witness as 'invalid'.

See this answer, [Transaction verification by miner VS full node with & without SegWit](https://bitcoin.stackexchange.com/questions/54697/transaction-verification-by-miner-vs-full-node-with-without-segwit)

I believe it answers the most part of your question better/more in-depth then i could.

> **Comments:**
> **username_0**: So 1MB block size is only for non-SegWit nodes and it is more than 1MB for SegWit nodes, right?  
> **username_3**: That's not really true. There is simply a new unit "weight" which is defined as 4*non_witness_size + witness_size, which is restricted to 4000000. If a block has 1000000 bytes of non-witness data, there is no more space for witness data.  

---

