Skip to content

Latest commit

 

History

History
16 lines (12 loc) · 4.62 KB

transactionid.md

File metadata and controls

16 lines (12 loc) · 4.62 KB

TransactionID

The ID for a transaction. This is used for retrieving receipts and records for a transaction, for appending to a file right after creating it, for instantiating a smart contract with bytecode in a file just created, and internally by the network for detecting when duplicate transactions are submitted. A user might get a transaction processed faster by submitting it to N nodes, each with a different node account, but all with the same TransactionID. Then, the transaction will take effect when the first of all those nodes submits the transaction and it reaches consensus. The other transactions will not take effect. So this could make the transaction take effect faster, if any given node might be slow. However, the full transaction fee is charged for each transaction, so the total fee is N times as much if the transaction is sent to N nodes.

Applicable to Scheduled Transactions

  • The ID of a Scheduled Transaction has transactionValidStart and accountIDs inherited from the ScheduleCreate transaction that created it. That is to say that they are equal
  • The scheduled property is true for Scheduled Transactions
  • transactionValidStart, accountID and scheduled properties should be omitted
Field Type Description
transactionValidStart Timestamp The transaction is invalid if consensusTimestamp < transactionID.transactionStartValid
accountID AccountID The Account ID that paid for this transaction
scheduled bool Whether the Transaction is of type Scheduled or no
nonce int32

The identifier for an internal transaction that was spawned as part of handling a user transaction. (These internal transactions share the transactionValidStart and accountID of the user transaction, so a

nonce is necessary to give them a unique TransactionID.)


An example is when a "parent" ContractCreate or ContractCall transaction calls one or more HTS precompiled contracts; each of the "child" transactions spawned for a precompile has a id with a different nonce.