4

I am trying to create a transaction via the Iri API (using curl), I understand that I must first find 2 unapproved transactions using "getTransactionsToApprove". These unapproved transactions are also called tips, correct? And they are unconfirmed transactions, correct?

Once I get these 2 tip transactions hashes, if I take too much time creating my transaction object and running attachToTangle, won't those 2 transactions (trunkTransaction and branchTransaction) not be tips anymore, confirmed by another transaction??

GusGorman402
  • 577
  • 3
  • 10

1 Answers1

1

Transaction to approve are indeed called "tips". There is a tip selection algorithm doing the tip selection, and normally this algorithm should select transaction that are :

  • recent
  • probably not approved yet

Today, because with a coordinator, we can make a precise distinction between "confirmed" and "approved" transaction :

A transaction is "confirmed" when there is a milestone transaction approving it (directly or indirectly).

A transaction is "approved by at least one transaction" as soon as at least one random transaction is referencing it as "trunk" or "branch".

If you take a long time to approve the tips, it is indeed possible that some other transaction already approved them, or even possible that a milestone transaction already confirmed them (there is one milestone per minute).

There is no real problem with that, except that your transaction may have smaller probability to be approved/confirmed quickly because the tip selection algorithm will select in priority tips approving fresh transactions.

ben75
  • 5,344
  • 11
  • 32