Entangled relationship with 
 Tangle Technology

Entangled relationship with Tangle Technology

The how and why of IOTA

Table of contents

The Tangle

The IOTA is a cryptocurrency that was created with a focus on the Internet of Things to solve the problems of scalability, control centralization and post-quantum security that characterizes other cryptocurrencies em- ploying the blockchain technology. The Tangle is its key contribution and builds on the concept of Directed Acyclic Graphs (DAGs) to substitute to blockchains. In the Tangle each node is a transaction. For a trans- action to be added to the Tangle it must approve two other transactions by doing a small amount of “proof- of-work”. All transactions which have not been yet approved are called tips. A Markov Chain Monte Carlo algorithm is used to chose the tips that will be submitted for approval in the Tangle . Starting from a random transaction A the algorithm selects another transaction which approves A with a bias towards the ones with larger cumulative weight. The algorithm keeps running until it reaches a tip. Running through transactions with larger cumulative weight ensures that the most worthy tips (i.e. the tips with a larger PoW) are chosen to be approved. Currently, the Tangle is small in size. Hence, enti- ties with malicious intents and sufficient computational power when compared to other users can carry out attacks such as double-spending transactions. In this type of attack, the attacker creates two different out- going transactions in the same timeframe in a effort to spend his total wallet balance two times, effectively be- coming negative. Using sufficient computational power the attacker could create a considerable amount of transactions that would directly and indirectly approve the double-spending ones thus rendering them reputable and accepted by the Tangle network. Due to the current small size of the Tangle anyone with sufficient com- putational power can carry out attacks such as these. Therefore, due to this Tangle “Beta” status, the exact rules of tip selection are not publicly available currently. A central node called Coordinator is given the role of electing the tips to approve while the Tangle scale is not large enough to guarantee its independent operation. A transaction approved by the Coordinator is said to be “Confirmed”. The process of electing tips to approve occurs with a period of one minute and the result is a transaction called “Milestone”. This transaction is similar to any other transaction, i.e., it approves two other transactions, but contains the Coordinator’s signature. A particular transaction is deemed “Confirmed” if the latest Milestone enforces its approval, directly or indirectly (there exists an approval path leading to the latest Milestone). Every transaction can carry a message. This allows for two parties to communicate between each other. The drawback is, since anyone can see every transaction in the Tangle this type of communication is not really feasible when the content must be kept confidential. De- veloped by the IOTA Foundation, a messaging protocol was introduced called Masked Authenticated Messaging (MAM). This protocol uses the Tangle network as one normally does, communicating by adding transactions, but with an extra layer of encryption. Messages are encrypted before adding the transactions on to the Tangle. In this case only the target party (or parties) can decode the encrypted message of the appended transaction. The next section describes the setup used to conduct an evaluation of several Tangle key performance param- eters and documents the obtained results and discussion

The Setup

In order to evaluate the transaction writing times in the Tangle a basic test setup encompassing two nodes was used: a public node at wallet2.iota.town:443 (Node A), hosted in Norway, and a private node (node B) hosted in a Virtual Private Server (VPS) in Germany. The latter was connected to the Tangle network using the CarrIOTA Nelson project. Regarding the hardware, the private node employs a 4 core Xeon CPU E5-2620 v3 running at 2.40GHz, with a 12 GB RAM memory and a 300 GB SSD disk for storage. The hardware specification of the public node was not available at the time of writing of this paper. Using the IOTA’s Python API, PyOTA, transactions with payloads of different lengths were added in order to assess their influence on the transaction writing time. An IOTA transaction is characterized by a payload length of 2187 trytes. If the content to be stored into the transaction is larger than 2187 trytes, it is segmented in two transactions added to the Tangle. In our case two message lengths were considered: u with 1093 trytes and m with 2405 trytes. Three different scenarios have been considered re- garding the Tangle performance: appending transactions and appending Masked Authenticated Messages. Their specific testing conditions are detailed bellow: 1) Append transactions to the Tangle: The tests were conducted in two phases. In the first, a set of 100 trials was conducted and the overal delay of adding these transactions to the tangle was measured. In the second phase, also for a set of 100 trials, in order to better understand the delays experienced at each stage of the transaction creation, the delay measurement was segmented in terms of its “tip selection”, “attach to tangle” and “broadcast” operations. 2) Append MAMs to the Tangle: The tests were con- ducted for a set of 100 trials by measuring the overall delay of appending a Masked Authenticated Message to the Tangle segmented in terms of its “encoding”, “tip selection”, “attach to tangle”,“broadcast” and “get message” operations.