IOTA Tangle

Guides: What is IOTA?


IOTA is a permissionless distributed ledger with a DAG-type topology designed for micro/nano-transactions and the fleshing out of strong economic signals in the emerging groundwork of the machine-to-machine economy that make up the IoT (Internet-of-Things). IOTA’s tangle essentially constitutes an abstract machinery of a rhizomatic kind, “ceaselessly establishing connections between semiotic chains”.


Table of Contents

What is the Tangle?

Detailed Overview & Implications


 

IOTA: What is the Tangle?

Architecture Overview


The particular DAG data structure IOTA pioneers for the purpose is called the tangle. Since the underlying rationale in IOTA is such that it favors speed of efficiency over consistency while allowing for unlimited scalability (i.e. speed is a function of the size of the network), it necessarily does away with the shared database of legacy blockchain technology and introduces an entirely different mechanisms of how consensus is dynamically achieved to form the tangle’s backbone.

In DAG-based architectures, it is accepted that forks can and will continuously occur (that surface can be thought of as a stochastic process). So, the first transaction which initializes all iotas and spawns the network is called the Genesis. Unapproved limbo transactions are called tipsDepth represents the longest path from Genesis to a tip, and hight the longest reverse oriented path (in blockchain vernacular any tip may potentially initiate a fork).

Directed acyclic graphs are generally represented by vertices and edges/arrows. In the tangle, vertices are transactions, and edges are approvals (to put things in perspective, in Nano – another DAG structured protocol, vertices and edges are respectively represented by nodes and transactions).

Bitcoin Exchange CEX.IO

 

Tangle

The tangle in low (top) and high (bottom) load regimes of transaction flow. Grey vertices represent tips. From the IOTA white paper

 

In IOTA, if there is an edge from A to B, it is said that A approves B. When a node issues a new transaction it must approve two previous transactions (tips), thereby pulling them within the orbits of the tangle. If there is a traceable path from A to B, it is said that A references B (all transactions reference genesis, directly or indirectly). By choosing tips to approve, consensus moves Bayesianly capture-pull-entangle forwards (and not hash-append-bloat backward).

Each transaction carries information in the form of “A paid B X iotas”. Approving a transaction involves verifying that it doesn’t breach the rules of consensus: in particular, that none of the accounts have negative balances and the chosen transactions don’t contradict each other.

To enter the tangle a transaction has to choose two previous ones to approve via a tip selection algorithm which performs two weighted random walks from Genesis to the tips. The walk is inclined towards transactions with more cumulative weight (i.e., the sum of transactions referencing them) that way creating an incentive to approve new transactions rather than old ones.

Must be mentioned though that node are not obligated to follow the recommended algorithm, although protocol is so designed that if most nodes do follow it, the rest are incentivized to follow suit (this will make more sense further on).

In order to function as a payment network, IOTA must equip a method of knowing when a transaction can safely be considered confirmed. A confirmed transaction once embedded within the tangle is unlikely to be removed from it.

There are two approaches to establishing consensus in the tangle: the one currently in play involves a Central Coordinator (the Coo), and the distributed approach involving a Markov Chain Monte Carlo type of algorithm where the tip selection algorithm is run an arbitrary number of times (by default 100, but that number can be adjusted as needed) to give a probabilistic answer of confirmation confidence metric. That way consensus is no longer decoupled from and delegated to, but an intrinsic part of a self-regulating peer-to-peer organism.

And since the tangle is not a blockchain-type ledger, the problem of double-spending is addressed differently, and here the importance of the Coordinator’s function is highlighted. Since speed is a function of the network’s size, security, on the other hand, is a function of the network’s speed. The Coordinator is a closed-source entity controlled by the IOTA foundation (a regulated Berlin-based non-profit), which issues zero-valued transactions every two minutes, called a milestone (can be thought of as stepping stones of sort).

Using the coordinator, the definition of consensus is simple: any transaction referenced by a milestone is confirmed, and the others are not. This is critically important in the growth phase of the network’s infancy as otherwise an attacker may begin out-pacing the network and start double-spending by referencing their own transactions, building up a parasite sub-tangle and infiltrating the network (and a lot of methodical and consistent effort goes there around the clock).

There is much economic theory behind the proposed ways in which the smooth transition phase from a coordinated environment to non-coordinated one will happen, and it will in all likelihood begin with decentralizing the coordinator itself between trusted federated nodes (rather than an on/off switch).

The tangle itself can be partitioned in sub tangles, as already hinted – for example, a partition can go off-line and later be re-attached, or somebody can grow a tangle outside the main tangle and then try to reattach it. When the network reaches a certain threshold of cumulative weight it could be said to be self-sustainable and sufficiently secure.

Also, similar to Nano, IOTA uses a short computation Proof-of-Work as an anti-spam mechanism, the values of which is also adjustable (and, for example, different for mainnet and testnet).

 

The Controversies


So, in relation to the recent attacks (NextWeb’sMIT-DCI’s, and their respectively addressed responses) that have generated much unnecessary controversy (the HackerNews/Reddit polarization and concurrent Twitter blitzkriegs):

1) Anybody can spin up their own IOTA tangle unrelated to the mainnet consensus protocol and execute all kinds of attacks by adjusting parameters. None of this, however, holds water as one would then need to attach his tangle to the mainnet one for the attack to be successful (and since the genesis-to-tip random walk iterations favor the total weight of confidence, and the network is coordinated, it is a highly unlikely scenario).

2) There is no need in IOTA’s case for the cryptographic protocol to be theoretically perfect, just good enough. Again, by opening up attack vectors in the vacuum of executing them, this doesn’t prove anything.

It really is as simple as that, to the embarrassment of many.

 

Provided Tools and Testnet


Running an IOTA full node (or many of them) on a VPS in the Nelson neighborhood contributes to strengthening the network (nodes need to be set up and operated by the community) and donations are divided among participants (CarrIOTA Field helps transactions clear out rapidly and serves as a load balancer and incentivizer). The infrastructure is pragmatically deployed and the process intelligently automated, taking about half an hour. The playbook and set of scripts can be found here.

A sandboxed testnet environment for beginning to prototype IOTA applications has also just been launched.


 

IOTA: Detailed Overview and Implications

The IOTA foundation was set up as a regulated non-profit entity in Berlin (meaning that it could lose its status as such if caught doing anything shady) whose ambitious goals of laying the groundwork for a machine-to-machine economy/ecosystem (both words, curiously, derive from the Greek oikos) brings up the elephant in the room of the notoriously insecure-by-design Internet-of-Things (with vulnerabilities having quadrupled in 2017), and for some, evoking apocalyptic visions of Skynets unleashed and short-circuited global catastrophes. And this is just one reason that explains the surrounding FUD and coordinated efforts to discredit and infiltrate the project.

 

IOTA’s necessarily unconventional approach (Bayesian methods are slow to gain traction, mostly due to academic and professional inertia, and financial interests at stake in numerous departments) IOTA adapts is applicable precisely to the present state of affairs in the IoT. Nowadays, when an exposed device is hacked, the attacker then proceeds to laterally infect other devices within the network in escalating access control over an entire connected building. And because the threat originates from within the network (hence, the Coordinator, and IoT every blackhat’s wet dream), it is crucial to have security solutions in place which create device profiles (as IOTA’s tangle does) and identify anomalies through machine learning and artificial intelligence.

 

Already aiming at the cracking walls of digital feudalism with their pilot showcase of a decentralized data marketplace intended to open up the data silos locked under the control of a few entities, it makes sense that this might make said entities uneasy. The marketplace enables owners of sensors around the globe to open up channels to their sensors and streamline (and iterate statistic calculations) particular data in a peer-to-peer fashion to interested parties for financial rewards. The various applications of this technology not only enable one to exercise jurisdiction over his own data and decide who to share it with and in exchange for what, but above all has particular relevance as it relates to Artificial Intelligence and machine learning, as the basis for any machine learning is data (“data is the new crude”).

 

Furthermore, it is particularly important that the data is precisely carved out in tightly bundled signals (we’ll dissect a IOTA transaction in the next post) as specified in the protocol, so as to prevent any garbage in/garbage out contamination and ensure validated high quality data streams traveling across the tangle.

 

Security expert Bruce Schneier paints an accurate picture of where the IOTA project is aiming in an essay entitled “The Internet of Things Will be the World’s Biggest Robot” dating back in February 2016:

 

These “things” will have two separate parts. One part will be sensors that collect data about us and our environment. Already our smartphones know our location and, with their onboard accelerometers, track our movements. Things like our thermostats and light bulbs will know who is in the room. Internet-enabled street and highway sensors will know how many people are out and about­ — and eventually who they are. Sensors will collect environmental data from all over the world.

The other part will be actuators. They’ll affect our environment. Our smart thermostats aren’t collecting information about ambient temperature and who’s in the room for nothing; they set the temperature accordingly. Phones already know our location, and send that information back to Google Maps and Waze to determine where traffic congestion is; when they’re linked to driverless cars, they’ll automatically route us around that congestion. Amazon already wants autonomous drones to deliver packages. The Internet of Things will increasingly perform actions for us and in our name.

Increasingly, human intervention will be unnecessary. The sensors will collect data. The system’s smarts will interpret the data and figure out what to do. And the actuators will do things in our world. You can think of the sensors as the eyes and ears of the Internet, the actuators as the hands and feet of the Internet, and the stuff in the middle as the brain. This makes the future clearer. The Internet now senses, thinks, and acts.

We’re building a world-sized robot, and we don’t even realize it.

I’ve started calling this robot the World-Sized Web.

The World-Sized Web — can I call it WSW? — is more than just the Internet of Things. Much of the WSW’s brains will be in the cloud, on servers connected via cellular, Wi-Fi, or short-range data networks. It’s mobile, of course, because many of these things will move around with us, like our smartphones. And it’s persistent. You might be able to turn off small pieces of it here and there, but in the main the WSW will always be on, and always be there.

None of these technologies are new, but they’re all becoming more prevalent. I believe that we’re at the brink of a phase change around information and networks. The difference in degree will become a difference in kind. That’s the robot that is the WSW.

This robot will increasingly be autonomous, at first simply and increasingly using the capabilities of artificial intelligence. Drones with sensors will fly to places that the WSW needs to collect data. Vehicles with actuators will drive to places that the WSW needs to affect. Other parts of the robots will “decide” where to go, what data to collect, and what to do.

 

By and large, the WSW will be a benign robot. It will collect data and do things in our interests; that’s why we’re building it. But it will change our society in ways we can’t predict, some of them good and some of them bad. It will maximize profits for the people who control the components. It will enable totalitarian governments. It will empower criminals and hackers in new and different ways. It will cause power balances to shift and societies to change.

 

Maybe the WSW is more like an organism. It won’t have a single mind. Parts of it will be controlled by large corporations and governments. Small parts of it will be controlled by us. But writ large its behavior will be unpredictable, the result of millions of tiny goals and billions of interactions between parts of itself.

 

The Trusted IoT Alliance was formed similar to the Ethereum Enterprise Alliance, but with the purpose of forming strategically relevant partnerships and bringing together companies to develop and set a standards for an open-source protocol for the IoT. And in light of IOTA’s long-term goal to renew the very firmware on which devices run (the Jinn microprocessor, based on trinary calculation methods), partnerships such as Taiwanese Foxconn (HCM International) – the world’s largest custom electronics manufacturer (and also interestingly Taipei City), Bosch and Volkswagen only hasten IOTA’s standing in what they’ve set out to deliver.

 


 

IOTA builds upon exotic technology deriving from newly rediscovered concepts across a number of disciplines so it is not surprising that many are in puzzlement and looking for explanations. We’ll try and simply summarize some of IOTA’s unique features and components and how they fit in with the tangle and its relation to the IoT.

 

First off, some common properties of ‘DAGs’ in the context of IOTA:

 

  • Asynchronicity: No necessity for sequential “wait your turn on the clock” canonically chained order. Transactions can be executed locally or off-line and re-attached or confirmed at later points. Topology can be decentralized and variously distributed with transactions stored on different devices at various locations, unordered or split, so when syncing a node it iterates through all transactions which constitute the abstraction of the tangle.
  • Latency: Speed of execution is not constrained by block-size, but bandwidth between communicating peers, i.e. timing and confirmation rates speed up with increase in network effects. Stress test conducted in April 2017 shows 112 confirmed transactions per second in a network of 250 nodes.
  • Feeless (“pre-mined”): Fixed supply, no mining involved. Every transaction issuer is simultaneously a validator. This enables thermodynamically viable micro and nano transactions as you’re only paying for the energy expenditure of computing the PoW (think gas in Ethereum, but in a DAG setting).
  • Zero-value transactions: E.g. messages, or otherwise transactions not requiring digital signatures and fitting in a UDP packet.
  • Periodic database purging: For the purposes of keeping size small to the optimum of what is relevant and necessary. Snapshotting in IOTA and pruning in Nano.

 

Ternary Logic and the Jinn Microprocessor


The IOTA project was born from a hardware initiative in 2014 that intended to produce a ternary-based general purpose microprocessor (JINN) capable of executing thousands of transactions per second. JINN was announced in September 2014 on the NXT forum and, understandably, there isn’t much public information available on the matter, but it’s clear that its design targets the IoT and embedded devices (enabling them to do the PoW and thus efficiently transact within the tangle).

Founder David Sønstebø on JINN: “JINN is a custom made Polymorphic Processing Unit which utilizes asynchronous circuits and trinary logic gates, a component of this is the ‘Curl Hasher’ (essentially a tiny ASIC), this ‘Curl Hasher’ component will be made open source so that any chip manufacturer can add it to their chips trivially. We’re talking a completely negligible amount of logic gates here, so zero extra cost, size trade off or implementation issues

This is key in understanding all of the underlying logic that IOTA builds upon, so let’s quickly explain what is ternary logic.

Most hardware in use today operates on binary logic. A binary digit is a number that can adopt one of possible two values (0 and 1), whereas a bit is the maximum amount of information that can be conveyed by a binary digit. In a sense, a binary digit is like a container, whereas the amount of information in that container represents the bit.

By analogy, a trinary digit has three possible state values and a trit stands for the encapsulated information within those possibilities.

Trinary numerical systems are two types:

  • Balanced: a trit (trinary digit) has the possible state-values of -1, 0 and 1. This is the ternary used by IOTA.
  • Unbalanced: a trit has the values of 0, 1 and 2.

1 tryte equals 3 trits, which 3^3 = 27 combinations ranging from -13 to 13 (values in a trinary system are balanced around zero). The maximum value a tryte can have is 13.

This balancing is particularly useful when building self-organizing and self-sustainable ensambles as the tangle.

To make trytes more human readable, the IOTA dev team created the tryte alphabet (consisting of 26 letters and the number 9, as a tryte has 27 combinations).

 



 

IOTA seeds, addresses, hashes, etc. are trytes represented by characters from the tryte alphabet.

 

Seeds, Addresses and Keys


A IOTA seed is 81 character long string (which maps to 81 trytes) consisting of A-Z uppercase letters and the number 9. Each seed generates addresses similar to mnemonics in Ethereum wallets.

A IOTA seed can be generated safely with the following command in Linux shell prompt:

cat /dev/urandom |tr -dc A-Z9|head -c${1:-81}

/dev/random generates pseudo-random numbers by gathering environmental noise from device drives, network packets, etc. into an entropy pool.

Once a transaction is sent from an address that address should never be reused as each output reveals part of the private key. Receiving outputs can be pooled in a single address, but once that address is emptied it shouldn’t be reused for either sending or receiving. The seed is not compromised if funds are received in a spent from address, the funds are.

This is due to the quantum-resistant cryptographic scheme used by IOTA.

One time signature schemes are methods for constructing digital signatures using one-way cryptographic functions. Similar in principle to one-time pads and, as the name implies, this works by using public/private keys only once. In essence, once bits are looped they must consumed. IOTA uses the Winternitz OTS scheme as its quantum-resistant algorithm.
a name=”wallets”>
 

Wallets


The current IOTA light wallet is built from the Electron framework which packs Chromium and Node.js in a single application. By default, the wallet uses the Webgl 2 Curl implementation which is a JavaScript ported library for WebGL-enabled browsers (i.e. Chromium). In case one gets an invalid transaction hash however, a C port of the Curl library is provided, which uses the CPU for executing computations (PoW is obviously computed faster via GPUs).

 

Trinity wallet (for its relation to the number three) began as a Master’s thesis project by Charlie Varley in University College of London. Planned to be released in the next few weeks, it is intended to provide basic user-friendly cross-platform interface to the tangle and deliver an easy and intuitive module for the seed and address handling logic.

 

Transactions and Bundles


A transaction on the tangle consists of an encoded 2673 tryte string which translates an object with address, signature, value and tag attributes (last 81 trytes reserved for the PoW nonce). Transactions are usually grouped in arrays called bundles which wrap together value transactions containing outputs to receiving addresses and inputs to spending ones. Value transactions as such require that inputs are signed.

Making a transaction is a three-fold process of:

  • Signing: node (computer/mobile/etc.) creates a transaction and signs it with private key.
  • Tip selection: node chooses two unconfirmed tip transactions via the Random Walk Monte Carlo algorithm (RWMC) which traverses the tangle to choose two transactions (designated as branchTransaction and trunkTransaction) to validate and constructs a bundle from. The general purpose of aligning with the RWMC is to generate fair samples from a distribution.
  • PoW: Once a bundle of tips is assembled and signed, PoW has to be done for each transaction. The PoW generates a nonce required for verifying that transactions are not conflicting and is similar to the one used in Hashcash, serving the same purpose of preventing spam and Sybil attacks.

The transaction is now broadcasted and awaits approval from within the tangle. Transactions can be monitored via the the tangle explorer at https://thetangle.org/

 

Snapshotting and Partitioning

Snapshotting is a method for reducing the size of the database by grouping non-zero balances into a single record and shedding off the rest (a similar process in Nano is called pruning). The addresses with balances function as new genesis addresses but with no previous history attached.

Snapshotting is currently done manually by the foundation, but the process will be automated in the future and permanodes put in place for storing the entire tangle history.

As we mentioned above, a tangle can branch off back and forth into the network. For example, sensors on cargo ship containers could lose connectivity with the main tangle as the ship navigates across the ocean and so sensors can create an off-line tangle cluster.

 

The Coordinator


The Coo constitutes of several nodes across the globe run by the IOTA foundation whose function is to create zero-value transactions (milestones) which full nodes can reference to, thereby deciding which transactions are fully confirmed and accepted within the tangle and setting the direction for the tangle growth by coordinating the steps.

Nodes on their part verify that the Coo is not breaking consensus rules by creating iotas out of thin air or approving double-spendings.

For now, the tangle is not allowing out-of-order tangles because the milestone-coordinator is organizing transactions in order to establish the tangle. The purpose is to temporary protect the network in its stages of infancy in order to sustain against large scale attacks.

When the volume of organic activity on the tangle reaches a sufficient threshold for it be self-sustainable and evolve unassisted the Coordinator will be shut off.

 

Weights


Weights are a key tangle metric. There is three kinds of weights: own weight, cumulative weight and minimum weight magnitude.

Every transaction has an initial, own weight which can have values 1, 3, 9, etc. 3 to the power of n-th. This weight depends on the effort put by its issuing node.

The cumulative weight of a transaction is the weight of that transaction plus the sum of all weights of all transactions that directly or indirectly approve it. This is a key metric for transactions on their way to network approval within the tangle and a mechanism for preventing spamming and other attack vectors.

Each new transaction added to the tangle increases the ancestor cumulative weight by its own weight, thus positioning it ‘deeper’ within the tangle as it grows in importance over time.

The minimum weight magnitude sets the PoW difficulty and uses an algorithm analogous to that in Hashcash (basically the number of trailing zeroes after the hash).

 

 

“Data is The New Crude”


Time-space compression refers to the transitive phenomenon of altering the qualities of the relationships between space and time (a change in degree becomes a change in kind).

Paul Virilio, a French thinker/theorist known for his writings on technology as it developed in relation to speed and power coined the term ‘dromology’ to describe the “speed-space” as the foundation of technological society. According to Virilio, time-space compression is an essential facet of present-day life: “Today we are entering a space which is speed-space … This new other time is that of electronic transmission, of high-tech machines, and therefore, man is present in this sort of time, not via his physical presence, but via programming.”

And just as the anaerobic decomposition of organic matter compressed enormous amounts of energy in the hydrocarbon bonds of fossil fuels, which upon discharge propelled the velocity of production cycles, speeding up history and innovation, so do the compact micro-scale transactions between actor-networks on a global scale set the stage for potentially yet another industrial revolution.

Did you like this?
Tip Martin Banov with Cryptocurrency

Donate Bitcoin to Martin Banov

Scan to Donate Bitcoin to Martin Banov
Scan the QR code or copy the address below into your wallet to send some bitcoin:

Donate Bitcoin Cash to Martin Banov

Scan to Donate Bitcoin Cash to Martin Banov
Scan the QR code or copy the address below into your wallet to send bitcoin:

Donate Ethereum to Martin Banov

Scan to Donate Ethereum to Martin Banov
Scan the QR code or copy the address below into your wallet to send some Ether:

Donate Litecoin to Martin Banov

Scan to Donate Litecoin to Martin Banov
Scan the QR code or copy the address below into your wallet to send some Litecoin:

Donate Monero to Martin Banov

Scan to Donate Monero to Martin Banov
Scan the QR code or copy the address below into your wallet to send some Monero:

Donate ZCash to Martin Banov

Scan to Donate ZCash to Martin Banov
Scan the QR code or copy the address below into your wallet to send some ZCash:
564 Total Views 2 Views Today

Martin Banov

Martin Banov is a nerd of various stripes that seeks to cultivate a more nuanced, trans-disciplinary perspective with the underlying assumption that a chicken is just an egg's way of making more eggs. Hayekian in the economics department, Deleuzian in the philosophy wing and McLuhanist in his reasoning about technology.

Leave a Reply

Your email address will not be published. Required fields are marked *