-
Notifications
You must be signed in to change notification settings - Fork 129
Introducing new tx versioning
Currently custom transaction in defichain are part of vout0 scriptPubKey starting by OP_RETURN say 6a4466547843 + marker DfTx + tx type 'C' for createmasternode the bytes afterwards are floating, that means protocol unstable between hardforks.
The main goal of tx versioning is to have deterministic version on every tx type, so when one version is supported it's unchanged and stable on protocol side. Increasing version on blockchain side means the type structure is completely different and it should have new handler at protocol side. By changing marker from DfTx to something similar but difference to indicate we start tx type versioning, let's say DfcTx - DeFichain Transaction, we can introduce an well cooperate new marker with legacy one.
The proposal is quite simple and well defined:
DfcTx marker + 8 bytes timestamp + tx type say createmasternode C + one byte version 0-255 followed by the data.
On blockchain side both markers will be supported, all tx type versions at same type, no deprecation. Timestamp stays to ensure when exactly tx is being constructed and it can live some time, on mempool or wherever, but it cannot be part of blockchain, somehow resend, if it's too old, covered by consensus.