4

I understand that non-segwit nodes interpret segwit txes as Anyone-Can-Spend txes, and they cannot validate txes that spend segwit outputs.

But when an old style miner receives a segwit tx to mine he consideres it invalid, right? (That's because it appears to them as a strange transaction with no input and 1 output.) So, does it follow that segwit txes can only be mined in a block by upgraded miners?

4

An old style miner would only receive a stripped transaction, i.e. a transaction from which the witness has been removed. They will consider a segwit transaction to be valid but non-standard because one element remains on the stack when resolving the redeem script.

If a miner included this transaction in their block, the block would appear valid to segwit-incapable nodes, but invalid to any segwit-capable nodes as any segwit input would be missing the required witness and thus would not be properly signed. This would lead to the block being rejected by 98% of the nodes on the network, and thus the segwit-incapable miner to lose their block reward as it would not become part of the heaviest blockchain. Segwit-incapable miners can however contribute blocks that only include non-segwit transactions that build on top of the chain that includes segwit-blocks.

This means that only a miner collecting transactions with a segwit-capable node is able to create a valid block that includes segwit transactions.

  • So, old miners can't create a block with segwit txs but can reiceve this block from new miners (stripped), right? Thank you for your explaination – Zaitsev Oct 12 '17 at 2:01
  • Exactly. And not only can't they produce SegWit blocks, they also won't, as SegWit transactions are non-standard. – Pieter Wuille Oct 12 '17 at 4:48
  • they won't receive the block from other (upgrade) miner? so old miner refuse them? – Zaitsev Oct 12 '17 at 15:09
  • The old nodes can redistribute the stripped block amongst each other, or any new nodes will create the stripped block when it is requested from any old node. – Murch Oct 12 '17 at 22:24
  • yes this is clear, my last question was about what pieter said ("they also won't"), because I understand that old miners don't want segwit txs, but they accept segwit blocks (stripped) – Zaitsev Oct 13 '17 at 0:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.