Iota Asked by userven on August 21, 2021
As written in multiple forums, IoTA tips are chosen using the random walk method starting at the milestone transaction.
The milestone transaction will have the reference to the old transactions. Tip transactions are added after the milestone transaction and there is no link or reference from milestone to tip transaction but tip to milestone transaction is there directly or indirectly.
How can the random walk method start from the milestone transaction and move to the tip transaction when there is not reference.
In simple way,
a<-b<-c ; in this a is milestone and c is tip
How can we move from a to c, when there is no reference? or Any other method is followed to choose the tip.
in your example, when b
is received, then:
b
is validated and stored.
b
is added to a.approvees
so each transaction is aware of which other transactions directly reference it.
given transaction a
, you can traverse the tangle till the tips by following the approvers
relationship.
Answered by Alon Elmaliah on August 21, 2021
While the transaction representation does not (and can not) contain a reference to the child transactions, a IOTA node will store recent transactions it knows in a database and/or in RAM in a structured way that enables it to quickly find child transactions for a transaction.
If you want to do the same via API, you can pass the approvees
parameter to findTransactions
API.
(But do not use this API if you want to find tips for your new transaction; in that case, getTransactionsToApprove
will perform the whole trip selection in one API call; this will be a lot faster and require less traffic to the API endpoint.)
Answered by mihi on August 21, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP