We are in the middle of the January 2018 snapshot. Time to understand the inner workings.

First: The upcoming IRI update includes a long list of addresses and balances.

However, strictly speaking there is no such entity as an address on the tangle. There are only transactions. The sum of all non-zero transactions pointing towards address A constitute its balance.

Now, a snapshot removes all zero-transactions from the tangle but doesn’t touch those with value. Is this correct?

If it is: Why do we need Snapshot.txt at all?

Second: How does IRI make use of Snapshot.txt? Does it use it to seed an (empty / new) database? Is reading it into memory and performing lookups?

  • Hunting down how all of this works, as far as I understand the IRI codebase, Snapshot.txt is read on every IRI start triggered by this line: github.com/iotaledger/iri/blob/…. The question remains, how bundles based off of the initial milestone are built. – ralf Jan 28 '18 at 21:20

A snapshot removes all transactions from the tangle, and only keeps the balances. The balances at snapshot time (you can verify them if you are running a full node right now) are moved into Snapshot.txt instead. Also the minimum milestone number and minimum transaction time gets increased a bit (to avoid new nodes to see old transactions from before the snapshot).

When the new iri is released, the Coordinator will create a new milestone with the milestone number in MILESTONE_START_INDEX approving NULL_HASH (i. e. 999⋯9) twice. This will be seen by iri as the initial milestone (compare to genesis block on a blockchain) and this milestone is considered by iri to have the balances that are in Snapshot.txt.

A new tangle will then grow from this transaction until it gets too big again, and the snapshot process repeats.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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