Professional Documents
Culture Documents
Short Communication
A R T I C L E I N F O A B S T R A C T
Keywords: Today’s networks are seeing a large influx of Internet connected devices that reside primarily on the edge of the
Blockchains network. Many of these devices, such as Internet of Things (IoT) devices, are resource constrained both by storage
Internet of Things capacity and power requirements that limit a device’s Internet availability. Several interesting architectures have
Wireless Communication
been proposed to address security, device management, configuration, and multi-party interaction concerns using
blockchain technology. These architectures require a trusted intermediary to interact with the blockchain on
behalf of the edge device. This introduces a single point of failure in trust and security. This paper proposes a
novel adaptation of blockchain technology to enable these edge devices to interact and participate with a
blockchain without requiring a trusted intermediary. The proposed architecture provides a flexible and extensible
framework that enables multi party interactions to take place at the edge of the network. The efficacy of the
proposed design is demonstrated through theoretical analysis and by an application to a network of resource
constrained IoT devices.
* Corresponding author.
E-mail addresses: adougla@ncsu.edu (A. Douglas), rphollow@ncsu.edu (R. Holloway), jclohr2@ncsu.edu (J. Lohr), ejmorga2@ncsu.edu (E. Morgan), kaharfou@
ncsu.edu (K. Harfoush).
https://doi.org/10.1016/j.bcra.2020.100004
Received 27 August 2020; Received in revised form 12 December 2020; Accepted 12 December 2020
2096-7209/© 2020 The Authors. Published by Elsevier B.V. on behalf of Zhejiang University Press. This is an open access article under the CC BY-NC-ND license
(http://creativecommons.org/licenses/by-nc-nd/4.0/).
A. Douglas et al. Blockchain: Research and Applications 1 (2020) 100004
Stake (PoS) rather than Proof-of-Work (PoW). Both PoS and PoW are of IoT setups. Specifically, they propose to use sharding techniques [21]
consensus mechanisms used to validate transactions that take place on a to validate transactions in parallel, reduce the signature size, and rely on
blockchain, without the need for a third party. In PoW [8–10], one signature to commit multiple packets in the same transaction. In
transactions are validated by miners through brute-force (trial-and- Ref. [22], Katende relies on a distributed Proof-of-Authority (PoA)
error) to solve complex cryptographic puzzles. The first miner that solves consensus to validate IoT transactions. Trusted validators, distributed in
the puzzle is rewarded. Solving these complex puzzles requires high-end the network, are responsible for keeping the network decentralized and
computational resources, leads to high energy consumption and long secure. In Ref. [23], Han et al. study the performance of consortium
delays before blocks are committed to a blockchain. Furthermore, PoW blockchains such as Hyperledger Fabric (HLF) [24] and Ripple [25]
leads to a fairness problem as the miner with the most resources will using the Byzantine Fault Tolerant (BFT) State Machine Replication
likely be the one rewarded. Also, there is a chance for one entity to (BFT-SMaRt) [26] and Ripple consensus [27] protocols and motivate the
control more than 51% of the total mining power, enabling this entity to need for a scalable variant of the classic Byzantine consensus problem in
make changes to blockchain blocks. Unlike PoW, in PoS systems [11–14], blockchains supporting IoT setups. Their results show that the perfor-
validator nodes put at stake (on hold) some number of system coins and mance of blockchains degrades significantly with the increase in the
earn a transaction fee for a validated block probabilistically in proportion number of devices, a prominent characteristic of IoT setups.
to the fraction of system coins they have at stake. The idea behind the proposed BCD architecture is orthogonal to
The more you stake the more likely you earn. The validation step is existing proposals and can complement them to further enable blockchain
not as complex as in the PoW case (no trial-and-error) and thus validation support for IoT setups without straining constrained IoT devices and
is more time-efficient and more energy-efficient. While miners with without sacrificing system security. Specifically, BCD further reduces the
higher stake are likely to earn more (the rich gets richer), the probabi- load and the on time of edge devices for consortium blockchains, which
listic PoS model is more fair that the PoW model and an entity with high are characterized by a relatively small number of validators [28,29].
stake cannot monopolize the network.1 PoS blockchain systems are thus
more suitable for constrained IoT devices than PoW systems. 3. Building blocks
In this paper, we make the following contributions: We introduce a
PoS Blockchain suitable for Constrained edge Devices (BCD). In BCD, 3.1. Byzantine Fault Tolerance
constrained devices do not rely on a TI and are able to get data from the
blockchain in a verifiable manner and the trust model rests solely on the A Byzantine fault is a condition of a system where components
blockchain. The assurance provided by the blockchain is well studied may fail and there is imperfect information on whether a compo-
[15,16] and can be proven. The BCD solution reduces the load on edge nent has failed. The term takes its name from the Byzantine Generals
devices and enables edge devices to query the blockchain at will without Problem used to describe a situation in which, in order to avoid
having to snoop on blocks for relevant transactions. This is particularly catastrophic failure of the system, the system’s actors must agree on a
important for IoT devices that are primarily constrained by power con- concerted strategy, but some of these actors are unreliable. BFT [30]
sumption related to transceiver on time. For these devices a 50% is an efficient partially synchronous consensus algorithm able to
reduction in overhead could represent months of additional operation tolerate 1/3 of the nodes behaving arbitrarily. In BFT, each node has
time. In general, BCD adds to the overhead of blockchain full nodes and the same weight.
to the blockchain storage needs in order to reduce the overhead at the
constrained edge nodes when downloading relevant transactions. Ex- 3.2. Merkle proofs
periments results reveal the potential savings for constrained devices
attained by BCD over Tendermint and Cosmos [14], state of the art Merkle proofs are used to prove the inclusion of a data element in a
blockchain solutions for IoT devices. data set without revealing either the set or the element. Merkle proofs
The rest of this paper is organized as follows: In Section 2, we survey make use of one-way cryptographic hashing, and arrange hashes of data
research efforts aimed at supporting IoT setups with blockchains. In elements into a Merkle tree in which a leaf node represents the hash
Section 3, we provide background information about building blocks value of an element, and an internal node represents a hash of the con-
used in the BCD proposal. In Section 4, we introduce the details of the catenation of the values of its children – Refer to Fig. 1 for an example.
proposed BCD model. In Section 5, we compare the performance of BCD Let Ti be a data element (blockchain transaction), Hi be the corresponding
to a vanilla Tendermint/Cosmos setup. In Section 6, we discuss BCD hash value, and Hij be a hash to of a concatenation of Hi and Hj. In order to
limitations and challenges. We finally conclude in Section 7. identify whether T5 is included in a data set (blockchain block) storing
the transactions T1 through T8, a device is provided, in addition to H5,
2. Related work with H6, H78, H1234, and H12345678 (Merkle root value). The device starts
by computing values for H56, then H5678, then H12345678 and matches the
Efforts aimed at supporting the IoT using Blockchains vary in their result to the given Merkle root value. If they match, then T5 is assumed
contributions. In Ref. [17], Dinh et al. compare the performance of slow included in the block. Demonstrating that a leaf node is a part of a given
PoW blockchains to more efficient blockchains based on Byzantine binary hash tree requires computing a number of hashes proportional to
consensus. In Ref. [18], Danzi et al. study the problem of efficiently the logarithm of the number of leaf nodes of the tree; this contrasts with
disseminating authenticated blockchain information from blockchain hash lists, where the number is proportional to the number of leaf nodes
nodes (servers) to IoT devices, by multicasting block headers together itself.
with the signatures of servers. Through a wireless base station (BS).
This proposal is based on the observation that if devices are connected to 3.3. Tendermint
the same blockchain network, they are likely to be interested in receiving
the same information (blocks or block headers). In Ref. [19], Niya et al. Tendermint [14] is a consensus engine together with an API used to
extend BAZO [20], a PoS based blockchain, to better meet the demands build blockchain applications. As opposed to classical BFT, in Tender-
mint, nodes have a non-negative, possibly different amount of voting
power, and nodes with positive voting power are called validators. Val-
1
Monopolizing the network would not make financial sense since increasing idators are identified by their public key and participate in the consensus
an entity’s stake will end up costing the entity more than it can gain from the protocol by broadcasting cryptographic signatures, votes, on block
attack. Also, once malicious behavior is detected, the malicious node will lose all headers to agree on the next block in a blockchain. The main benefit of
its stake. Tendermint over traditional BFT is that Tendermint has a simplified
2
A. Douglas et al. Blockchain: Research and Applications 1 (2020) 100004
3
A. Douglas et al. Blockchain: Research and Applications 1 (2020) 100004
4
A. Douglas et al. Blockchain: Research and Applications 1 (2020) 100004
bT ¼ h þ nz þ υs (1) vote on (verify transactions and sign) a block header. The time to verify a
transaction is negligible and it takes a validator on average 72 μs to sign a
bB ¼ h þ nz þ υs þ nυs (2) block on a PC (Intel Core i3-4130/3.40 GHz CPU). BCD adds overhead to
voting and instead of having a validator sign just the block header, the
B T
The extra nvs term in b compared to b represents the extra overhead validator will also sign each transaction in the block.
in the size of each block in the BCD case where each validator also signs Packet Size. Let pT and pB be the size of the packets in bytes down-
each transaction, and contributes to the overall blockchain size with the loaded by edge devices in Tendermint and BCD, respectively. In the
overhead growing as the numbers of blocks in the blockchain grows. Tendermint case, a packet consists of (1) a block header which includes
Fig. 6(a) plots bB/bT for different number of (power of two) validators, v, the Merkle root, (2) the signatures of the validators on this header, (3) a
and for different values of the transaction sizes, z, when n ¼ 1024 transaction of interest, and (4) the transaction hashes need for the Merkle
transactions per block. The trend from the figure is clear: BCD contributes proof. In the BCD case, a packet only consists of (1) a transaction of in-
to larger block sizes on the blockchain network, and this overhead in- terest and (2) the signatures of the validators on this transaction. pT and
creases as v increases. The relative overhead in block size is more pro- pB can be expressed as
nounced for smaller transaction size, z.
Block Voting Time. Let tT and tB be the time in secs for the validators pT ¼ h þ z þ υs þ xlog 2 n (5)
to verify the transactions in a block and vote for (sign) the block in
Tendermint and BCD, respectively. In the Tendermint case, each vali- pB ¼ z þ υs (6)
dator only signs the block header; while in the BCD case, it also signs each
transaction in the block. tT and tB are thus proportional to the number of Fig. 6(b) plots pB/pT for different numbers of validators, v, and for
signatures that need to be computed and can be expressed as follows different values of the transaction sizes, z, when n ¼ 1024 transactions
per block. BCD leads to much smaller packet sizes than Tendermint, a
tT / υ (3) reduction of 50% in packet size relative to Tendermint can be seen when
n ¼ 1024 and z ¼ 512. The reduction in packet size becomes evident for
t B / ðυ þ nυÞ (4) small transaction size (an expected feature of IoT devices). As the number
of validators increases, the gain from BCD fades. However, there is a clear
We conducted experiments to measure the time it takes a validator to space where BCD can excel. The reduction in packet size benefits con-
strained IoT devices and allows them to conserve their energy by sleeping
for longer periods of time.
Packet Processing Time. Let T T and T B be the time it takes edge
devices to (1) download a packet, (2) parse the packet to extract the
signatures, and (3) verify the signatures for Tendermint and BCD,
respectively. The download time depends on the size of the packet and
the download rate. The parsing time depends on the hardware used, the
parser selected and the size of the objects being parsed. The time to verify
signatures depends on the hardware being used. Still, T T and T B are
proportional to the number of signatures that need to be validated and
can be expressed as follows
TT / υ (7)
TB / υ (8)
T
Note that signature verification time in T is consumed in validating
the v signatures on the block header and in the Merkle proof to validate
the transaction enclosed in the packet, while T B is consumed in verifying
the v signatures on the transaction of interest as BCD does not perform
the Merkle proof at edge devices.
In order to understand how packet parsing and signature verification
contribute to the overall packet processing time and to identify whether
these operations are viable to run on a constrained micro-controller, we
ran experiments to capture baseline values for the parsing time and the
signature verification time. A lightweight parser, JSMN (pronounced
“jasmine”), was selected [32]. JSMN is written in C and is intended to be
minimalistic which is ideal for many micro-controllers. A JSMN imple-
mentation was used to parse JSON objects with different numbers of
transaction/signature pairs, where the transactions size is z ¼ 1000 bytes
and the signature size is s ¼ 64 bytes. The parsing function was enclosed
in a loop and executed 10,000 times and the average time to parse 16
signatures were found to be 13.15 μs. In our experiments, a signature
verification takes on average slightly less than 1 s and as much as 3 s in
some cases, depending on the specific micro-controller, what algorithm is
used, and whether hardware acceleration is utilized. Similar results were
found in Ref. [33] although with some outliers on the order of 6 s. The
Fig. 6. Comparison between BCD (Blockchain suitable for Constrained edge experiments in Ref. [33] we carried on Cortex-M ARM processors which
Devices) and Tendermint block (a) and packet sizes (b), for different number of offer limited CPU and memory capabilities. For a base comparison, we
(power of two) validators, v, and different transaction sizes, z, with n ¼ 1024 use 1 s as the average time to verify one signature. Furthermore, In order
transactions per block. to assess the computational burden of a Merkle proof in Tendermint, we
5
A. Douglas et al. Blockchain: Research and Applications 1 (2020) 100004
downloaded a reference implementation and a five-level (height is 4) Theoretical analysis and experimental results demonstrate that BCD
Merkle tree was specified. The code to build the Merkle tree was put into outperforms vanilla Tendermint’s solutions in accommodating the needs
a loop that executed 100,000 times. The average time to execute the of constrained devices, reducing their on time and extending their life-
Merkle proof was approximately 8 μs. time. This comes at the cost of more storage and computational overhead
These results highlight the fact that packet download time and the for the powerful blockchain full nodes. Creating and testing full-blown
signature verification time are the dominant factors in packet processing IoT applications on the Tendermint/Cosmos architecture will be part of
time, and that the cost of parsing and executing the Merkle proof is our future endeavors.
relatively small. This leads to almost matching signature parsing and
verification times for both Tendermint and BCD. However, the packet
download time in BCD is significantly smaller than in Tendermint, which Declaration of competing interest
is critical for many low-power IoT devices.
Many micro-controllers require on the order of 5 milliamps in full The authors declare that they have no known competing financial
operational mode. A small RF receiver could easily require 50 milliamps. interests or personal relationships that could have appeared to influence
For example, from Fig. 6(b), with a reduction of 50% in packet size the work reported in this paper.
relative to Tendermint, a receiver for Tendermint would need to remain
on 0.46 s longer than a BCD receiver. With a receive current of 50 mil- References
liamps, this would be a differentiator of 23 milliamp-seconds for each
transaction. If, for example, there is one transaction every hour this [1] S. Symanovich. reportThe Future of IoT: 10 Predictions about the Internet of Things.
would result in 552 milliamp-seconds per day or more than one Technical Report, (Norton), 2019.
[2] K. Christidis, M. Devetsikiotis, Blockchains and smart contracts for the Internet of
milliamp-hour per week. For many low power, battery-operated devices, Things, IEEE Access 4 (2016) 2292–2303.
this is significant because of their limited energy resources. Also recall [3] A. Damianou, C.M. Angelopoulos, V. Katos, An architecture for blockchain over
that as opposed to vanilla Tendermint, BCD allows a device to query edge-enabled IoT for smart circular cities, in: 2019 15th International Conference
on Distributed Computing in Sensor Systems (DCOSS); 29-31 May 2019; Santorini,
transactions from the chain when it wants to without the need to listen
Greece, IEEE, Piscataway, NJ, USA, 2019, pp. 465–472.
for blocks as they are broadcast through the network, which saves the [4] T. Dasaklis, F. Casino, Improving vendor-managed inventory strategy based on
device both receiver on time and processing time. Internet of Things (IoT) applications and blockchain technology, in: 2019 IEEE
International Conference on Blockchain and Cryptocurrency (ICBC); 14-17 May
2019; Seoul, Republic of Korea, IEEE, Piscataway, NJ, USA, 2019, pp. 50–55.
6. Limitations and challenges [5] S. Huh, S. Cho, S. Kim, Managing IoT devices using blockchain platform, in: 2017
19th International Conference on Advanced Commu- Nication Technology (ICACT);
The results shown in Section 5 provide insights into the characteris- 19-22 Feb 2017; PyeongChang, Republic of Korea, IEEE, Piscataway, NJ, USA,
2017, pp. 464–467.
tics of the blockchain networks that can benefit from BCD to support IoT [6] O. Novo, Blockchain meets IoT: an architecture for scalable access management in
setups. BCD’s main advantage is to reduce the size of the packets dealt IoT, IEEE Internet of Things Journal 5 (2) (2018) 1184–1195.
with at edge devices, without increasing the processing cost. However, [7] X. Xu, C. Pautasso, L. Zhu, et al., The blockchain as a software connector, in: 2016
13th Working IEEE/IFIP Conference on Software Architecture (WICSA); 5-8 Apr
this advantage holds for a relatively small number of validators (not 2016; Venice, Italy, IEEE, Piscataway, NJ, USA, 2016, pp. 182–191.
exceeding 128). The larger the number of validators the larger the BCD [8] Bitcoin Cash, Available on, https://www.bitcoincash.org/.
packet sizes and the packet processing time. The impact of the trans- [9] Litecoin, Available on, https://litecoin.org/.
[10] S. Nakamoto, Bitcoin: A Peer-To-Peer Electronic Cash System, Available on, https://bitc
action size, z, is less critical as one would expect IoT devices to tolerate oin.org/bitcoin.pdf, 2009.
the size of the transactions that they are interested in. This means that [11] Bitshares, Available on, https://bitshares.org/.
BCD is a good fit for consortium blockchains with a small number of [12] Dash, Available on, https://www.dash.org/.
[13] Neo, Available on, https://neo.org/.
validators, and is not beneficial for generic blockchains with potentially [14] J. Kwon, E. Buchman, Cosmos: a network of distributed ledgers, Accessed: 27/08/
thousands of validators without appropriate adaptation. One possible 2020; Available on, https://cointhinktank.com/upload/cosmos-ATOM-2018. pdf,
approach to incorporate BCD in public blockchains is by grouping vali- 2018.
[15] M. Muzammal, Q. Qu, B. Nasrulin, Renovating blockchain with distributed
dators into different zones while arranging zones in a hierarchy. Zone
databases: an open source system, Future generation computer systems 90 (2019)
validators are only responsible for validations of transactions related to 105–117, 01.
their zone. [16] E. Safak, A.F. Mendi, T. Erol, Hybrid database design combi- nation of blockchain
Also, in the BCD model, edge devices are pre-provided with vali- and central database, in: 2019 3rd International Symposium on Multidisciplinary
Studies and Innovative Technologies (ISMSIT); 11-13 Oct 2019; Ankara, Turkey,
dators’ keys. It is reasonable to assume that the list of validators will IEEE, Piscataway, NJ, USA, 2019, pp. 1–5.
change over time, and thus it is important to consider ways to dynami- [17] T.T.A. Dinh, J. Wang, G. Chen, et al., BLOCKBENCH: a framework for analyzing
cally synchronize the most recent list of validators with edge devices. private blockchains, in: Proceedings of the 2017 ACM International Conference on
Management of Data, SIGMOD ’17; 14-19 May 2017; Chicago, IL, USA, IEEE,
One way to handle this case is by allowing validators to join/leave the Piscataway, NJ, USA, 2017, pp. 1085–1100. Association for Computing Machinery.
system as transactions, which need to be validated by other system val- [18] P. Danzi, A.E. Kalor, C. Stefanovic, et al., Repeat- authenticate scheme for
idators. This enables the list of validators to change and the edge devices multicasting of blockchain information in IoT systems, in: 2019 IEEE Globecom
Workshops (GC Wkshps); 9-13 Dec 2019; Waikoloa, HI, USA, IEEE, Piscataway, NJ,
to be informed of the changes. USA, 2019, pp. 1–7.
Furthermore, a large number of malicious users may impact the [19] S.R. Niya, E. Schiller, I. Cepilov, et al., Adaptation of proof-of-stake- based
blockchain integrity. However, this is a known problem to consensus- blockchains for IoT data streams, in: 2019 IEEE International Conference on
Blockchain and Cryptocurrency (ICBC); 14-17 May 2019; Seoul, Republic of Korea,
based systems and the design of optimal consensus algorithms is an IEEE, Piscataway, NJ, USA, 2019, pp. 15–16.
active area of research [34,35]. On the other hand, a misbehaving vali- [20] S.R. Niya, B. Stiller, Technical Report: BAZO: A Proof-Of-Stake (PoS) Based
dator detected by a blockchain node can trigger a transaction to remove Blockchain. Technical Report MSU-CSE-06-2, University of Zurich, Switzerland,
2019.
him from the list of validators and the consensus algorithm validates the
[21] Y. Gao, H. Nobuhara, A Proof of Stake Sharding Protocol for Scalable Blockchains,
transaction as usual. If validators are not anonymous, as in the case of in: Proceedings of the Asia-Pacific advanced network; 26 Aug-1 Sep 2017; APAN,
consortium blockchains, malicious validators can be further pursued le- Dalian, China, 44, 2017, pp. 13–16.
gally outside the confines of the blockchain. [22] M. Katende, Combining MQTT and blockchain to improve data security, in: 3rd
International Workshop on Emerging Trends in Software Engineering for
Blockchain (WETSEB); 13 Jul 2020; Online, ICSE, 2020.
7. Conclusions and future work [23] R. Han, V. Gramoli, X. Xu, Evaluating blockchains for IoT, in: 2018 9th IFIP
International Conference on New Technologies, Mobility and Security (NTMS);
26–28 Feb 2018; Paris, France, IEEE, Piscataway, NJ, USA, 2018, pp. 1–5.
Our BCD proposal extends the trust model of blockchains to con- [24] Hyperledger Fabric, Available on, https://www.hyperledger.org/use/fabric.
strained IoT devices without the need for trusted intermediaries. [25] Ripple, Available on, https://ripple.com/.
6
A. Douglas et al. Blockchain: Research and Applications 1 (2020) 100004
[26] A. Bessani, J. Sousa, E.E.P. Alchieri, State machine replication for the masses with [30] M. Castro, B. Liskov, Practical Byzantine fault tolerance, in: Proceedings of the
BFT-SMART, in: 2014 44th Annual IEEE/IFIP International Conference on Third Symposium on Operating Systems Design and Implementation, OSDI ’99; Feb
Dependable Systems and Networks; 23–26 Jun 2014; Atlanta, GA, USA, IEEE, 1999; New Orleans, LA, USA, 1999, pp. 173–186. USENIX Association.
Piscataway, NJ, USA, 2014, pp. 355–362. [31] BCD, Blockchains for constrained edge devices, Available on, https://www.csc.
[27] D. Schwartz, N. Youngs, A. Britto, White reportPaper: the Ripple Protocol ncsu.edu/people/kaharfou.
Consensus Algorithm. Technical Report, Ripple Labs Inc, 2014. [32] JSMN, Available on, https://zserge.com/jsmn/.
[28] O. Dib, K. Brousmiche, A. Durand, et al., Consortium blockchains: overview, [33] H. Tschofenig, M. Pegourie-Gonnard, Performance of state-of-the- art cryptography
applications and challenges, International Journal on Advances in on ARM-based microprocessors, NIST Lightweight Cryptography Workshop; 20-21
Telecommunications 11 (1&2) (2018) 51–65. Available on, https://hal.arch Jul 2015; Gaithersburg, MD, USA, 2015.
ives-ouvertes.fr/hal-02271063. [34] E. Semsar-Kazerooni, K. Khorasani, Optimal consensus algorithms for cooperative
[29] G. Vizier, V. Gramoli, Comchain, Bridging the gap between public and consortium team of agents subject to partial information, Automatica 44 (11) (2008)
blockchains, in: 2018 IEEE International Conference on Internet of Things (iThings) 2766–2777.
and IEEE Green Computing and Commu- Nications (GreenCom) and IEEE Cyber, [35] Q. Wang, Z. Duan, J. Wang, Distributed optimal consensus control algorithm for
Physical and Social Computing (CPSCom) and IEEE Smart Data (SmartData); 30 continuous-time multi-agent systems, IEEE Transactions on Circuits and Systems II:
Jul–3 Aug 2018; Halifax, NS, Canada, IEEE, Piscataway, NJ, USA, 2018, Express Briefs 67 (1) (2020) 102–106.
pp. 1469–1474.