Sunday, December 22, 2024

segregated witness – marker byte interpretation by legacy transaction parser

The marker byte is interpreted by a legacy transaction parser as variety of inputs within the transaction and is at all times 0. My query is, why is a transaction with 0 inputs thought-about legitimate by a legacy transaction parser?

Mastering Bitcoin e-book mentions marker byte interpretation by legacy transaction parser

In legacy serialization, the marker byte would have been interpreted
because the variety of inputs (zero). A transaction can’t have zero inputs,
so the marker indicators to fashionable packages that prolonged serialization
is getting used. The flag subject gives an identical sign and likewise
simplifies the method of updating the serialization format within the
future.

Additionally this reply by Ava Chow mentions the identical:

Particularly, what you’re lacking is that the sphere instantly
following the model quantity is a single 0 byte (known as the
marker byte), as a substitute of the enter depend. This was carried out particularly
to make a transaction seem as if it has no inputs to a legacy
transaction parser.

My understanding is that the minimal variety of inputs for a transaction is 1, so why does a legacy transaction parser that sees a transaction with 0 inputs (the marker byte) think about the transaction legitimate?

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles