  Today, the audit and diagnosis of the causal relationships between the events
in a trigger-action-based event chain (e.g., why is a light turned on in a
smart home?) in the Internet of Things (IoT) platforms are untrustworthy and
unreliable. The current IoT platforms lack techniques for transparent and
tamper-proof ordering of events due to their device-centric logging mechanism.
In this paper, we develop a framework that facilitates tamper-proof
transparency and event order in an IoT platform by proposing a Blockchain
protocol and adopting the vector clock system, both tailored for the
resource-constrained heterogeneous IoT devices, respectively. To cope with the
unsuited storage (e.g., ledger) and computing power (e.g., proof of work
puzzle) requirements of the Blockchain in the commercial off-the-shelf IoT
devices, we propose a partial consistent cut protocol and engineer a modular
arithmetic-based lightweight proof of work puzzle, respectively. To the best of
our knowledge, this is the first Blockchain designed for resource-constrained
heterogeneous IoT platforms. Our event ordering protocol based on the vector
clock system is also novel for the IoT platforms. We implement our framework
using an IoT gateway and 30 IoT devices. We experiment with 10 concurrent
trigger-action-based event chains while each chain involves 20 devices, and
each device participates in 5 different chains. The results show that our
framework may order these events in 2.5 seconds while consuming only 140 mJ of
energy per device. The results hence demonstrate the proposed platform as a
practical choice for many IoT applications such as smart home, traffic
monitoring, and crime investigation.
