< jl2012>
dcousens: "A non-witness program (defined hereinafter) txin MUST be associated with an empty witness field, represented by a 0x00." means if an input is non-witness program, its associated witness must be empty, which is a 0x00
< jl2012>
tx format is [nVersion][marker][flag](varint)[txins](varint)[txouts][witness][nLockTime]
< jl2012>
[witness] format is [varint][stack][stack].....[varint][stack][stack]...........
< jl2012>
[stack] format is [varint][data]
< jl2012>
the varint inside stack is size of data
< jl2012>
the varint(s) inside witness is the number of stack for a txin
< jl2012>
if an input is non-witness program, the corresponding varint in witness is 0x00, means no stack
< jl2012>
if all inputs are non-witness program, the tx must be serialized in the old way