body
, , are defined as:ChainTag
β last byte of the genesis block ID which is used to identify a blockchain to prevent the cross-chain replay attack;BlockRef
- reference to a specific block;Expiration
β how long, in terms of the number of blocks, the transaction will be allowed to be mined in DeltaChain;Clauses
β an array of Clause objects each of which contains fields To
, Value
and Data
to enable a single transaction to carry multiple tasks issued by the transaction sender;GasPriceCoef
β coefficient used to calculate the gas price for the transaction.Gas
β maximum amount of gas allowed to pay for the transaction;DependsOn
β ID of the transaction on which the current transaction depends;Nonce
β number set by user;Reserved
- reserved Object contains two fields: Features
and Unused
.Feature
as 32-bit unsigned integer and default set as 0
.For Designated Gas Payer(VIP191) must be set as 1
Unused
: an array of reserved field for backward compatibility,it MUST be set to empty array for now otherwise the transaction will be considered invalid.Signature
- transaction signature, ,where is the transaction sender's private key.TxID
, can be calculated as:TxID
and checks whether it has been used before.Clause
structure to represent a single task and allow multiple tasks defined in one transaction.To
β recipientβs address;Value
β amount transferred to the recipient;Data
β input data.Clauses
as a Clause
array in the transaction model to make it possible for a transaction to conduct multiple tasks.Clauses
.DependsOn
allows us to systematically define an order for a sequence of transactions and such an order is guaranteed by the rules hard-coded as part of the consensus of DeltaChain. Moreover, the system requires the prior transaction depended on by the current transaction to be truly executed, adding another useful layer of security on the dependency.BlockRef
and Expiration
allows us to set the life cycle of a transaction that has not been included in a block. The former defines the starting point and the latter its active period. With such a handful feature, we would no longer be troubled by the situation that a transaction was stuck for hours or even days waiting to be processed and we could not do anything about it. The inclusion of two fields would make transactions safer since it prevents them from being hijacked and later re-used to cause problems.DependsOn
stores the ID of the transaction on which the current transaction depends. In other words, the current transaction cannot be processed without the success of the transaction referred by DependsOn
. Here by βsuccessβ, we mean that the referred transaction has been executed without state reversion.BlockRef
stores the reference to a particular block whose next block is the earliest block the current transaction can be included. In particular, the first four bytes of BlockRef
contains the block height, , while the second four bytes can be used to prove that the referred block is known before the transaction is assembled. If that is the case, the value of BlockRef
should match the first eight bytes of the ID of the block with height .Expiration
stores a number that can be used, together with BlockRef
, to specify when the transaction expires. Specifically, the sum of Expiration
and the first four bytes of BlockRef
defines the height of the last block that the transaction can be included.Feature
as 32-bit unsigned integer and default set as 0
.For Designated Gas Payer(VIP191) must be set as 1
Unused
: an array of reserved field for backward compatibility,it MUST be set empty as empty array for now otherwise the transaction will be considered invalid.