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 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 scriptSig
field for P2WSH and P2WPKH native inputs will be zero as described in BIP141.
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.