dgpv / bsst

B'SST: Bitcoin-like Script Symbolic Tracer
Other
32 stars 5 forks source link

tx.nVersion is only restricted by standartness; also, version 0 is not standard #29

Closed dgpv closed 7 months ago

dgpv commented 7 months ago

Currently transaction version is always restricted by values 0, 1, 2; This is not correct - the only place where it is restricted in the Core source is IsStandardTx() that does

if (tx.nVersion > TX_MAX_STANDARD_VERSION || tx.nVersion < 1) {
        reason = "version";
        return false;
    }

That means only versions 1 and 2 are currently standard, and also means that miner can set any version