Transaction Model
An introduction and overview of the VeChainThor blockchain transaction model.
Last updated
An introduction and overview of the VeChainThor blockchain transaction model.
Last updated
VeChainThor defines a transaction in Golang as:
Fields within the transaction 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 VeChainThor;
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
– a random number set by the wallet / 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 (VIP-191) must be set as 1
Unused
an array of reserved field for backward compatibility, it MUST be set as an empty array for now otherwise the transaction will be considered invalid.
Refer to the Meta Transaction Features section for more detail on the unique aspects of transactions within the VeChainThor blockchain when compared to other blockchains.
Signature
- transaction signature, ,where is the transaction sender's private key.