Ephemeral Blockchains or “Do we really need to keep all this data forever?”
Last week following a twitter post I had seen in passing by Péter Szilágyi I spun up an Geth Light node for Ethereum on an Raspberry Pi Zero. As a long time microcontroller fan, the Raspberry Pi Zero is kind of a marvel. A $10 computer with USB, MicroSD card, built in Wifi, hardware ports for hacking and Linux as an operating system. It’s smaller than a business card and orders of magnitude more powerful than other micro-controller based systems like Arduino (although I also love Arduino and there are some powerful Arduino systems to boot).
It is fantastic that Ethereum can be run on a device like this. So small! So cheap! With nodes this cheap you could place them anywhere and use them like IoT devices, collecting data, reacting to the blockchain, etc… Real hardware endpoints solving the last mile problem of blockchain.
However there is a catch- this isn’t really a full node, and at $10, it’s not as cheap as it could be. This node is also only a light node, meaning it relies upon other full nodes to ensure it’s contents make sense- it is not doing any of the heavy computational lifting itself which makes the network secure. Having fields full of computers like this doesn’t actually make the network any stronger, nor any more secure.
The largest problem to running any current public blockchain on IoT devices is the storage space required.
For just Ethereum to run a full node you need (as of Nov 2017) 385GB of data storage. While that would still fit on the highest of high end SD cards, only barely and with very little room to spare- meaning it’s highly impractical for embedded devices (especially because they are extremely expensive!). Holding and processing this kind of data just doesn’t work for IoT devices, both from storage space requirements point of view, and the computational heavy lifting needed for processing blocks.
But do we need all that data on a node? When talking about financial transactions, or long running smart contracts, the answer is a resounding yes. It’s part of the security and decentralization model. To ensure a transaction is 100% genuine you need to be able, if need be, to track it all the way back to the source. However if we are talking about small IoT sensors, perhaps keeping all this data forever is both impractical and perhaps unnecessary. Maybe a network of IoT devices located in HV Air-conditioning tubing or solar-powered sensors mounted on streetlights don’t really *need* to keep all this data forever. Perhaps there are blockchain implementations that can serve their purpose without also being eternal infinite repositories of data.
Enter the idea of Ephemeral blockchains.
Chains that exist for only limited amounts of time. Long enough for a network to reach consensus but shorter than the end of the Universe (or week?). In this scenario perhaps a network of IoT devices administer their own network, keep all of the data for only a set amount of time, and when the time (or more likely storage space) is up, they wipe the disks (or memory cards) and start over.
They don’t even necessarily need to ever “start over”, small IoT devices could conceivably create a new “genesis block” each round, a new “master seed” for the blockchain at each step, eventually dropping older chain segments as they fall out of range. In this scenario it would be assumed that once data is old enough, it’s not necessary anymore. Indeed if we are minting a new genesis block each round, and dropping older blocks as they fall out of range, we could conceivably imagine a network where no two nodes keep the same length of chain (which poses it’s own problems BTW) and where the only requirement is to keep some minimum amount of the chain in storage.
This of course would require new mechanisms to identify the “valid chain” as current blockchains such as bitcoin generally consider the “longest chain” the true blockchain. In this limited network though, if the complete history of the data isn’t important to keep, we perhaps might have less centralization fears as well. Perhaps all the nodes know each other in a permissioned model and there are no bad actors, or they communicate in a secure way that is inaccessible to outside parties. If it is necessary to have at least one copy of all the data, forever, it would be enough for one of the nodes to have comparatively unlimited storage capacity (a cloud based server running the blockchain) with no necessity to delete old material. Its’ not as secure as a bitcoin style blockchain, but if your IoT blockchain is engaged in monitoring your rose garden- perhaps it’s enough.
Recently I’ve been looking at articles like this:
The best way to understand blockchain is to build one
A blockchain in 200 lines of code
The basic concept of blockchain is quite simple: a distributed database that maintains a continuously growing list of…
I like to imagine the idea of small clusters of blockchains replacing traditional centralized storage models such as databases. In my current explorations with SupplyChains’ and their sustainability impacts, there are plenty of opportunities for IoT devices to play a role in collecting data in a decentralized way, but this data isn’t always critical to keep forever on each embedded node.