2

I'm trying to understand how my node would interperet a SegWit transaction if I do not upgrade.

  1. Even if I do not upgrade, I should be receiving the exact same block data as everyone else, correct?

If so, let's say my node receives a block that contains a segwit transaction (i.e. one with a [marker][flag] and some [witness] data). I'm not sure how my node is going to interpret the data...

  1. If the [marker][flag] is [00][01], does my node read this as being 0 inputs and 1 output, and still consider this transaction valid?
  2. If so, how can it go about recreating the TXID from the [version][txins][txouts][locktime] if the transaction data is of the format [version][marker][flag][txins][txouts][witness][locktime]?

Basically, I don't understand how my node could receive transactions with [witness] data and still consider those blocks to be valid.

inersha
  • 2,928
  • 1
  • 17
  • 41

1 Answers1

1

Segwit node will convert transactions and blocks "on-the-fly" while sending them to your non-upgraded node. You will see anyone-can-spend outputs and redeems from such outputs. You will not see any additional flags, witness data and any other segwit stuff.

amaclin
  • 6,718
  • 1
  • 20
  • 32
  • Thanks. So basically, Segwit nodes send a stripped-down version of blocks to their connected non-Segwit nodes? – inersha Apr 27 '17 at 13:21
  • What happens during relay? Like, if a segwit node sends a segwit transaction to an old node, is that transaction junk after that, or can a segwit node that receives the transaction from an old node reconstruct that data somehow? – B T Mar 10 '22 at 04:25