3

Do transactions have to have a minimum version to denote that they are using seg-wit? What changes have been made to the transaction's version field?

The MAX_STANDARD_VERSION is still set to 2 in src/primitives/transaction.h, will that change when seg-wit reaches the soft-fork thresholds?

4

Segwit does not use the transaction version field at all.

One reason for this is that it isn't really the right scope. Outputs and inputs are witness-specific, but whole transactions are not.

The transaction version also cannot be used to indicate the presence of the optional witness record. Because the transaction version is part of the "base" transaction data (covered under the txid hash), you'd get compatibility problems when a segwit transaction would be relayed to an old node, and back to a new node. That new node would see the new transaction version number, expect a witness encoding, but the old node cannot give that. Instead, BIP144 introduces a new extensible transaction format with optional records. The encoding used is independent of any data "inside" the base transaction.

It also isn't needed. Specific template transaction outputs are fine to indicate new semantics.

All in all, segregated witness just adds extra records to existing transactions. It does not modify the structure of the existing base part (including the version number).

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.