AION: Timewarps

A simple concept that got complicated

This article is, not surprisingly, about timewarps! Part of what is explained is already implemented and some parts of it are still work in progress. This article serves to document my ideas and general design but also to let the broader iota community become familiar with the concepts. And last but not least: so others can poke holes in.

timewarps

One of the core concepts of my selective permanode project for IOTA are timewarps. The concept is very simple: one of the tips of a transaction points to a much older transaction, essentially ‘skipping’ large parts of the tangle. If confirmed it takes part in tip selection and therefore becomes part of the tangle.

Why do this? Optimization of storage and pathfinding. An optimization that is, unfortunately, a requirement for AION to work.

The base concept of timewarps is very simple. But it becomes tricky pretty quickly if you don’t want to flood the tangle with a large number of transactions constantly and want to reuse an existing one. If my node would be the only one issuing these timewarps and I am the only one using it then well… easy. However what if a 1000 people want to run AION nodes? Are all of them going to issue timewarp transactions? All the time? That would mean a lot of extra stress on the network and we don't want that if it can be avoided.

However, the tangle is an open data-structure so anyone can anything. Now, what if someone wants to hijack your timewarp? What is someone stopping from issuing timewarp transactions referencing your timewarp? Which one is actually correct or honest? Both? One? And when do I even decide? Could someone do this all the time and point to a useless part of the tangle? Making AION’s timewarping essentially useless?

How do we even convey these timewarps? How are they defined and how strong can we trust this definition? Timestamps are mostly unreliable in the tangle. The closest thing we have is trusting the coordinator’s timestamps but we also want AION to work in a post coordinator network.

Here we see a very simple concept turn in a bit more complex problem. However…. and I really want to stress this, we are in the world of crypto and discussions about security are usually very opinionated. I want to point out that AION does not work with funds a thus concepts of rigorous and very strong consensus are not that relevant here. Everything described is just to ‘be nice’ for the tangle and prevent the standard use of AION to flood the network with transactions.

Given the above-described complexities we roughly have six problems to solve:

How do we detect a timewarp?

How do we detect it stopped or is faulty?

How do we know the same person/actor is issuing timewarp transactions continuously?

How many active timewarps at any time are needed?

If there are too few active timewarps, how do we know which AION node needs to start issuing a new timewarp?

How do we prevent dishonest or accidentally faulty transactions from influencing/gaming this leadership election process too much?

Timewarp autonomy.

To start off it is important to know what timewarps exactly are in AION, what is in the transactions and why. Some of these concepts have interdependencies to the other stated problems and will be explained further down the article.

“A timewarp is a set of signed transactions that connect distant parts of the tangle with the goal of fast graph traversal, a tangle index.”

In order to achieve this, I had to construct a unique WOTS based signature scheme that fits all into a single standard transaction. I am building a storage reduction system, so fewer transactions are better.

For the key generation, the signature scheme uses the normal address generation from the IOTA lib. So Seed+Index with security one, because we only want to use a single transaction.

Normally the IOTA signature scheme signs the bundle essence hash. But for timewarp signing, we construct this essence hash a bit differently. Let's take a look at the following diagram to make it more clear.