Transaction Format

Transactions in Pactus consists the following fields:

Size Field
1 byte Version
4 bytes Lock Time
Variant Fee
Variant Memo
1 byte Payload Type
Variant Payload Data
48 bytes Signature
96 bytes Public Key
  • Version is the version of the transaction format. Different versions may have different fields or a different layout, and the current transaction version is set to 1.
  • Lock Time specifies the block number at which the transaction can be unlocked.
  • Fee contains the fee paid by the sender to the network for processing the transaction. The fee is calculated based on the percentage fee model.
  • Memo is an optional message that can be included in the transaction. The message can be used to provide additional information about the transaction or to communicate with the recipient. The maximum size of the memo is 64 characters that is defined in the consensus parameters
  • Payload Type specifies the type of the transaction payload. Depending on the payload type, the payload data field is decoded differently.
  • Payload Data contains the actual data payload of the transaction. The payload data varies depending on the payload type.
  • Signature contains a cryptographic signature created by the sender using their private key. The signature is used to ensure that the transaction has not been tampered with and that it was indeed created by the sender.
  • Public Key contains the public key of the sender. The public key is used to verify that the sender has the authority to create the transaction. The sender’s address should be derived from this public key.

Payload Type

The payload type field determines the format of the payload data field in the transaction. Different payload types have different formats for the payload data. The following are the supported transactions in Pactus blockchain:

  1. Transfer transaction
  2. Bond transaction
  3. Sortition transaction
  4. Unbond transaction
  5. Withdraw transaction

Transaction ID

The Transaction ID is a unique identifier for a transaction on the blockchain. It is generated by taking the hash of the transaction data without including the public key and signature fields.