6

I am trying to understand IOTA at code level and the APIs.

1) How does a client know that there is a new transaction that it needs to fetch from a node? Does it keep calling findTransactions and downloading all transactions related to a given set of addresses?

2) I notice there is no pagination in findTransactions. How should a client behave which could have an extremely high level of transactions?

  • What's a client in your words? A wallet? A node? – Helmar Dec 4 '17 at 15:47
  • client would be anybody who wants to consume findTransactions. May be a wallet or any future app. – Klaus Dec 4 '17 at 15:58
6

1) Every fullnode must reference neighbors and must be referenced by (same) neighbors. When a new transaction is submited to a fullnode: it immediately broadcast it to all it's neighbors. So a node don't need to "fetch" transactions from another node, it just receive them (it just have to permanently listen for broadcast).

1a) In addition to real-time broadcast : full nodes will also check for received milestones and try to load the whole tangle "hanging below" it from its neighbors. So old nodes (or nodes that were down) will get up to date

Light nodes don't need to be aware of every new transaction.

2) By default, there is a maximum of 100000 transactions returned when you call findTransactions(criterias...). The fullnode can decide to decrease/increase this number (it's a simple configuration parameter)

  • 1a) Full nodes will also check for received milestones and try to load the whole tangle "hanging below" it from its neighbors. So old nodes (or nodes that were down) will get up to date 3) If you run a full node and want to run some other software that should process all transactions, they can subscribe to your full node's transaction feed via ZMQ. – mihi Dec 4 '17 at 22:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.