Translations: How Tx Processing Works/7/en
From ArdorDocs
The details of a Ardor transaction are as follows:
- The sender specifies parameters for the transaction. Types of transactions vary (sending money, creating an alias, transmitting a message, issuing an asset or an order for an asset) but several parameters must be specified for any transaction:
- the secret passphrase for the sending account
- a specified fee of the transaction
- a deadline for the transaction
- an optional "referenced" transaction
- All values for the transaction inputs are checked. For example, mandatory parameters must be specified; fees cannot be less than or equal to zero; a transaction deadline cannot be less than 1 minute into the future.
- If no exceptions are thrown as a result of parameter checking:
- The public key for the generating account is computed using the supplied secret passphrase
- Account information generating account is retrieved, and transaction parameters are further validated:
- The sending account's balance cannot be zero
- The sending account's confirmed balance must not be lower than the transaction amount plus the transaction fee
- If the sending account has sufficient funds for the transaction:
- A new transaction is created, with a type and subtype value set to match the kind of transaction being made (sending money, creating an alias, sending a message, etc.). All specified parameters are included in the Transaction object. A unique transaction ID is generated with the creation of the object
- The transaction is signed using the sending account's private key
- The encrypted transaction data is placed within a message instructing network peers to process the transaction
- The transaction is broadcast to all peers on the network
- The server responds with a result code: the transaction ID, if the transaction creation was successful; an error code and error message if any of the parameter checks failed.