Speeding Up IOTA Proof Of Work Using FPGAs

Blockchain has existed as a concept since the early 1990s, but keeping a distributed ledger for IoT transactions wasn’t widely implemented until IOTA developed Tangle. The blockchain company was initially founded as a hardware startup and pivoted to work on transactional settlement for IoT. The Tangle, their distributed ledger architecture based on a directed acyclic graph (DAG) works as a “blockchain without the blocks and the chain”.

As its name implies, the Tangle is a web of transactions that references its past two transactions and a subsection of other transactions. Rather than miners and stakers being responsible for overall consensus, all active participants are involved in the approval of transactions. The transaction process requires the client to sign with their private keys, select two random unconfirmed transactions to be referenced, and perform proof-of-work.

The proof-of-work has an unfortunately high difficulty as you might expect. The process is similar to finding a nonce in Bitcoin mining, although the difficulty is set at a lower threshold due to the transactions running on lower-power nodes. Even so, since IOTA transactions commonly occur on small embedded platforms this can take several minutes to complete, a relatively long time considering these are mere transactions.

Since Curl-P81 hashes should be computed in parallel, they can’t be computed efficiently on general purpose CPUs. The PiDiver 1.3, [Thomas Pototschnig]’s port of the IOTA Reference Implementation (IRI) PearlDiver, performs searches for nonces. Because it runs on FPGAs, it is able to speed up the proof-of-work by a factor of more than 140 when compared to a Raspberry Pi. The FPGA is able to calculate one round of the hash in a single clock cycle, and a complete hash in 85 cycles (as well as testing for a valid nonce). Seven parallel hashes can be calculated at once, giving 15.8MHash/s at a frequency of 188MHz. The proof-of-work takes ~300ms on the FPGA when compared to 90s on a Raspberry Pi, so this is a significant improvement in speed.

Since the project is open source, the core can be used by IRI for creating a modified version of their PearlDiver.  The board can be used as a Raspberry Pi HAT, although it can also be connected via USB to work without the Pi.

While this doesn’t address the security concerns of using IOTA with personal IoT devices, it is certainly a significant improvement on the speed of their proof-of-work process, and the software speedup is incredibly satisfying to watch.

5 thoughts on “Speeding Up IOTA Proof Of Work Using FPGAs

  1. Setting aside snide remarks about the topic or “is it a hack” aspect of this article…

    When you say such-and-such is “X times faster on FPGA than a Raspberry Pi,” what kind of Pi? Is the Pi running compiled and optimized code from something like C, or interpreted code from something like Python? Is the Pi code making use of the GPU for parallel operation? Is the FPGA architecture scalable (i.e. can computation speed be controlled by increasing or decreasing logic cell usage)?

  2. I believe in blockchain as a concept and there are several good use cases. This is one of those places where blockchain has jumped the shark. How can proof-of-work (POW) ever be reasonably hard on an IOT device? If you outsource POW, then you basically have a centralized system, so there’s not point in blockchain. I’m having a very hard time even picturing a use case for why you’d want a completely decentralized IoT network (especially a network of ONLY IOT devices), but if that use case exists, how does it not get immediately blown out of the water by a bad guy introducing a few devices with heavy duty GPU’s or ASIC’s?

    1. Making an attack really impractical would be great, but merely making it uneconomical would greatly cut down on incentive to attack in the first place. E.g. Swagbucks can be mined on a PC, but using mobile devices is more common since the power use of the PC offsets the mining profit.

  3. TY for posting. That said, IOTA is also adding in PoS capabilities, the IOTA device developer has a choice, can have an FPGA or even ASIC soon, as a proxy ‘master’ PoW and Staking node on behalf of really dumb ‘slave’ sensors and meters either running such FPGA/ASIC or custom hdw as a Hornet node, full node (more processor/ram required and storage too) or even acting as 3rd party gateway oracle connecting to same… so lots of ways to address this…

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.