<p>There aren't two part to a block like you describe. The word segregated in segwit means that the witness data isn't included in the TXID computation similar to how it always wasn't included in the signature hash computation. It's still included in transactions and blocks. </p>

<p>With segwit, the signatures are in each transaction in a witness field that is included before the nlocktime field.</p>

<p>When a node relays a segwit using block to a peer that doesn't understand segwit, it strips the witness fields out of all the transactions that have them.  Since they don't have any rules pertaining to segwit data they're perfectly fine with this.</p>

<p>If you were to hand a stripped block to a non-outdated node, it would just drop it and ban you for giving it invalid data-- it knows about the segwit rules and attempts to validate the additional data.</p>

CC BY-SA 4.0
2018-11-16T01:05:03.327Z
2018-11-16T01:05:03.327Z
G. Maxwell
<blockquote>
  <p>In this block some transactions will be non-segwit and some will be segwit?</p>
</blockquote>

<p>Yes. Both types of transactions can be included in the same block.
Segwit transactions generally consume all types of UTXOs; while non-segwit transactions exclusively consume <code>P2SH/P2PKH/P2PK</code> type UTXOs.</p>

<blockquote>
  <p>The block contains two parts</p>
</blockquote>

<p>No. Its mostly the same, segwit only has to do with how the transaction identifier (i.e. <code>txid</code>) is computed, which is pretty much just the hash of everything in a transaction excluding its signature. And similarly, the block simply contains all the transactions.</p>

<blockquote>
  <p>To old nodes non-segwit transactions look normal, and segwit transactions look like no-signature-needed valid transactions? These nodes don't see the segregated part containing signatures?</p>
</blockquote>

<p>EDIT #1: As per Pieter Wuille pointed out -- no, old nodes will not see the same. New nodes will it simply remove the witness before sending. Post-reivision, I noticed this is because the <code>scriptSig</code> field for P2WSH and P2WPKH native inputs will be zero as described in <a href="https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki" rel="nofollow noreferrer">BIP141</a>.</p>

<blockquote>
  <p>To new nodes non-segwit transactions look normal, and they recognize segwit transactions and check the segregated part to validate the signatures?</p>
</blockquote>

<p>Yes. New nodes have to do signature validation as per the convention of old nodes. Again, just to re-iterate, there is no segregated part for signatures. </p>

CC BY-SA 4.0
2018-11-11T17:58:45.660Z
No, old nodes will not see the same. When a segwit-compatible node sends a block to an old nodes, it simply removes the witness before sending.
Pieter Wuille
CC BY-SA 4.0
2018-11-11T12:39:02.307Z
2018-11-15T15:38:07.297Z
2018-11-15T15:38:07.297Z
rny
<p>Let's say a miner mines a block.</p>

<ol>
<li><p>In this block some transactions will be non-segwit and some will be segwit?</p></li>
<li><p>The block contains two parts:</p>

<ul>
<li>The part with transactions</li>
<li>The segregated part with signatures of segwit transactions?</li>
</ul></li>
<li><p>To old nodes non-segwit transactions look normal, and segwit transactions look like no-signature-needed valid transactions? These nodes don't see the segregated part containing signatures?</p></li>
<li><p>To new nodes non-segwit transactions look normal, and they recognize segwit transactions and check the segregated part to validate the signatures?</p></li>
</ol>

<transactions><block><segregated-witness>
How segwit blocks are seen by segwit and non-segwit nodes?
croraf
# How segwit blocks are seen by segwit and non-segwit nodes?

(Asked by: username_0 on 2017-11-28)

Let's say a miner mines a block.

1. In this block some transactions will be non-segwit and some will be segwit?
2. The block contains two parts:

   * The part with transactions
   * The segregated part with signatures of segwit transactions?
3. To old nodes non-segwit transactions look normal, and segwit transactions look like no-signature-needed valid transactions? These nodes don't see the segregated part containing signatures?
4. To new nodes non-segwit transactions look normal, and they recognize segwit transactions and check the segregated part to validate the signatures?

**Tags:** transactions, block, segregated-witness


---

## 2 answers

### Answer by username_1 on 2018-11-16. Score: 3

There aren't two part to a block like you describe. The word segregated in segwit means that the witness data isn't included in the TXID computation similar to how it always wasn't included in the signature hash computation. It's still included in transactions and blocks.

With segwit, the signatures are in each transaction in a witness field that is included before the nlocktime field.

When a node relays a segwit using block to a peer that doesn't understand segwit, it strips the witness fields out of all the transactions that have them. Since they don't have any rules pertaining to segwit data they're perfectly fine with this.

If you were to hand a stripped block to a non-outdated node, it would just drop it and ban you for giving it invalid data-- it knows about the segwit rules and attempts to validate the additional data.


---

### Answer by username_2 on 2018-11-11. Score: 0

> In this block some transactions will be non-segwit and some will be segwit?

Yes. Both types of transactions can be included in the same block.
Segwit transactions generally consume all types of UTXOs; while non-segwit transactions exclusively consume `P2SH/P2PKH/P2PK` type UTXOs.

> The block contains two parts

No. Its mostly the same, segwit only has to do with how the transaction identifier (i.e. `txid`) is computed, which is pretty much just the hash of everything in a transaction excluding its signature. And similarly, the block simply contains all the transactions.

> To old nodes non-segwit transactions look normal, and segwit transactions look like no-signature-needed valid transactions? These nodes don't see the segregated part containing signatures?

EDIT #1: As per username_3 username_3 pointed out -- no, old nodes will not see the same. New nodes will it simply remove the witness before sending. Post-reivision, I noticed this is because the `scriptSig` field for P2WSH and P2WPKH native inputs will be zero as described in [BIP141](https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki).

> To new nodes non-segwit transactions look normal, and they recognize segwit transactions and check the segregated part to validate the signatures?

Yes. New nodes have to do signature validation as per the convention of old nodes. Again, just to re-iterate, there is no segregated part for signatures.

> **Comments:**
> **username_3**: No, old nodes will not see the same. When a segwit-compatible node sends a block to an old nodes, it simply removes the witness before sending.  

---

