When is the nonce generated? What parts of a transaction can be changed after the nonce was generated? How is the nonce connected to a transaction's children/parents?
1 Answer
The last step, after bundle and tips have been set up, is calculating a nonce matching the minimum weight magnitude (MWM). On the mainnet, MWM is 14, which means the transaction hash has to have 14 trailing 0-trits.
None. Transaction hash is calculated by absorbing all transaction trytes and create a 81 characters transaction hash. This means, if you change any characters, it will give you a complete different transaction hash.
It is not connected. Nonce only affects that transaction (not the bundle, and not other transaction in the bundle).
For how a transaction were generated in IOTA, you can take a look at this article: In-depth explanation of how IOTA making a transaction (with picture)
-
trunkTransaction
andbranchTransaction
are part of the transaction trytes, aren't they? You said the transaction hash is calculated by absorbing the whole transaction trytes. So how is the nonce not connected to branch and trunk?– ZauzFeb 5, 2018 at 14:13 -
branch and trunk are part of a transaction. But what Louie says is still true. Transactions in a bundle are atomic units on their own. They are chained via trunkTransaction. But the nonce always relates to a single transaction. So in a bundle with 5 transactions you’d have 5 nonces, one for each transaction.– ralfFeb 6, 2018 at 7:44
-
Yes, trunk and branch are parts of the transaction, but in that transaction, that is just an 81 characters string, nothing else. Nonce will only care about its transaction, not others (e.g. the "trunk transaction" itself, nor other transaction in the bundle)– Louie LuFeb 6, 2018 at 8:40