A Cost Analysis of Internet of Things Sensor Data Storage on Blockchain via Smart Contracts

A Cost Analysis of Internet of Things Sensor Data Storage on Blockchain via Smart Contracts
复制标题

DOI:
10.3390/electronics9020244
复制
发表时间:
2020-02
期刊:
影响因子:
2.9
通讯作者:
Yesem Kurt Peker;Xavier Rodriguez;James Ericsson;S. Lee;Alfredo J. Perez
Yesem Kurt Peker;Xavier Rodriguez;James Ericsson;S. Lee;Alfredo J. Perez
中科院分区:
工程技术3区
文献类型:
--
作者:
Yesem Kurt Peker;Xavier Rodriguez;James Ericsson;S. Lee;Alfredo J. Perez

文献摘要

相似文献

区块链是一种发展中的技术,可用于安全的数据存储和共享。在这项工作中,我们研究了受限物联网(IoT)设备基于区块链的数据存储的成本。我们的研究分为两个阶段。在第一阶段,我们使用智能合约以两种不同的方式存储从连接到以太坊测试网区块链的温度/湿度传感器中检索的数据:首先,将新数据附加到现有数据,存储所有传感器数据;其次,将新数据添加到现有数据中,仅存储最近的一部分数据。在第二阶段,我们将来自多个传感器的模拟数据存储在区块链上,假设传感器数据是数字。我们提出了一种方法,用于编码的数据从传感器在一个变量,并比较了存储在一个数组中的数据与存储在一个变量中的所有传感器的编码数据的成本。我们还比较了在智能合约内和智能合约外进行编码的成本。在第一阶段,我们的研究结果表明,增加数据点比增加数据点更具成本效益。在第二阶段,如果编码是在智能合约之外完成的,那么使用所提出的编码方法来存储来自多个传感器的数据的成本远远低于将数据存储在数组中的成本。如果在智能合约中进行编码,其成本仍然低于将数据存储在数组中,但是差异并不显著。该研究表明,即使昂贵,对于数据的完整性和透明度至关重要的应用程序,将物联网传感器数据存储在以太坊上可能是一个可靠的解决方案。
Blockchain is a developing technology that can be utilized for secure data storage and sharing. In this work, we examine the cost of Blockchain-based data storage for constrained Internet of Things (IoT) devices. We had two phases in the study. In the first phase, we stored data retrieved from a temperature/humidity sensor connected to an Ethereum testnet blockchain using smart contracts in two different ways: first, appending the new data to the existing data, storing all sensor data; and second, overwriting the new data onto the existing data, storing only a recent portion of the data. In the second phase, we stored simulated data from several sensors on the blockchain assuming sensor data is numeric. We proposed a method for encoding the data from the sensors in one variable and compared the costs of storing the data in an array versus storing the encoded data from all sensors in one variable. We also compared the costs of carrying out the encoding within the smart contract versus outside the smart contract. In the first phase, our results indicate that overwriting data points is more cost-efficient than appending them. In the second phase, using the proposed encoding method to store the data from several sensors costs significantly less than storing the data in an array, if the encoding is done outside the smart contract. If the encoding is carried out in the smart contract, the cost is still less than storing the data in an array, however, the difference is not significant. The study shows that even though expensive, for applications where the integrity and transparency of data are crucial, storing IoT sensor data on Ethereum could be a reliable solution.