A Blockchain Definition To Clarify Its Role For IoT
A Blockchain Definition To Clarify Its Role For IoT
Abstract—The term blockchain is used for disparate projects, that are possible source of misunderstanding and confusion.
ranging from cryptocurrencies to applications for the Internet On the one hand, we still have the permissionless blockchains
of Things (IoT). The concept of blockchain appears therefore like the original Bitcoin, celebrated for their Proof of Work
blurred, as the same technology cannot empower applications
with extremely different requirements, levels of security and (PoW)-based cryptographical security, their decentralization and
performance. This position paper elaborates on the theory of strict privacy defense through anonymity. On the other hand,
distributed systems to advance a clear definition of blockchain many more recent “blockchains” are permissioned, require user
allowing us to clarify its possible role in the IoT. The definition identities, and their internal security does not depend on some
binds together three elements that, as a whole, delineate those hard cryptographical problem such as the PoW. The single term
unique features that distinguish the blockchain from other
distributed ledger technologies: immutability, transparency and blockchain appears therefore overloaded, resulting ambiguous,
anonymity. We note that immutability—which is imperative for as it is used to indicate ledger technologies that address security,
securing blockchains—imposes remarkable resource consumption. performance, and decentralization in completely different ways.
Moreover, while transparency demands no confidentiality, This position paper analyzes the multiple technologies prof-
anonymity enhances privacy but prevents user identification. As fered under the term blockchain from a distributed systems
such, we raise the concern that these blockchain features clash
with the requirements of most IoT applications where devices are perspective, and proposes a clear definition of blockchain that
power-constrained, data needs to be kept confidential, and users allows arguing its role in the IoT. Our definition identifies
to be clearly identifiable. We consequently downplay the role of three elements that, only when combined together, give to
the blockchain for the IoT: this can act as a ledger external to the blockchains their specific features of openness, decentralization,
IoT architecture, invoked as seldom as possible and only to record security, and privacy: i) a S TRONG D ISTRIBUTED C ONSENSUS
the aggregate results of myriads of local (IoT) transactions that
are most of the time performed off-chain to meet performance P ROTOCOL, which makes the blockchain immutable and frees
and scalability requirements. them from centralized trusted authorities; ii) a F ULL & P UBLIC
H ISTORY OF T RANSACTIONS, which allows their distributed
I. I NTRODUCTION and completely transparent validation; and iii) to be O PEN TO
The blockchain came into the limelight with the advent of A NONYMOUS U SERS, allowing complete users privacy.
the Bitcoin, which is the most successful blockchain application To convey our crucial blockchain definition and the ar-
to date, hitting a US$1 trillion market capitalization in Febru- guments on the blockchain role in the IoT, this paper is
ary 2021—a new record. Some features observed in Bitcoin, structured as follows. Sect. II critically analyses the genesis
i.e., decentralization, resistance to powerful cyberattacks and of the blockchain, stressing on the technical reasons motivating
preservation of user privacy, raised the enthusiasm of many the design of a blockchain like Bitcoin. Sect. III discusses the
communities, leading to an explosion of disparate proposals for trade-offs inherent to the design of consensus protocols, that
using the blockchain in many different applications comprising are key for determining the properties of any shared ledger,
Supply Chain Management [1], E-Voting [2], Smart Grid [3], either blockchain-based or not. Sect. II and III are the basis
Healthcare [4], Banking [5], Smart Cities [6], and even Vehicu- for the formulation of our blockchain definition, reported in the
lar and Aerial Networks [7, 8], to name a few. Surveys focusing main Sect. IV. In light of the provided definition, in Sect. V
on the applications of the blockchain for the Internet of Things we outline the marginal role we envision for the blockchain in
(IoT), for instance, already abound [9, 10]. the IoT.
This vast application range makes the blockchain look like an An extended version of this paper, available on arXiv [12],
almost universal technology. We note however that the original includes a more complete background with a review of con-
Bitcoin blockchain supports less than 10 Transactions per sensus protocols as well as a discussion about what we call
Second (TPS) and consumes as much power as Ireland [11]: it is “The blockchain pitfalls,” i.e., those common abuses of the
therefore unclear how a similar blockchain will ever be so versa- blockchain in applications whose requirements contrast with the
tile to support all of the documented applications, especially the features of the same blockchain.
IoT ones involving millions of TPS and tight power constraints.
II. B LOCKCHAIN F UNDAMENTALS
Indeed, moving to application domains different from cryp-
tocurrencies, the characteristics of the original blockchain have Fig. 1 illustrates the general life-cycle of a transaction in
been completely transformed, leading to “mutated blockchains” a blockchain system. A user that issues a new transaction
announces it in the Peer-to-Peer (P2P) network and waits for the replace the resource-hungry consensus protocols of permission-
correctness check performed by validator nodes. These nodes less blockchains with more traditional, efficient, and faster ones.
run a consensus protocol to determine if the issuer owns the
B. The Need of the Transactions History
resources it is spending or not. A transaction that is considered
valid is grouped with others to form a new block of transactions, Validators need the history of transactions to determine
and this block is later registered in the ledger by appending it who owns resources and how many. However, building this
to the blockchain. At the end, the success of the transaction is history in a distributed system is complicated by the double
notified to the users. spending problem. This problem arises from transactions that
spend the same resources “twice”, but are received by distinct
validators in diverse orders because of different propagation
delays. Validators need to run a consensus protocol for sorting
transactions into a unique chronological order, fundamental to
determine which among two conflicting transactions should be
Nodes run a
(1) A Transaction (TRX) (2)The TRX is broadcast
(3)
Consensus protocol
considered first (valid) and which other second (rejected). The
is submitted in a P2P network to validate the TRX
blockchain captures this chronological history of transactions,
necessary for validation purposes, by grouping transactions in
(4)If valid, the TRX is
(5)The new block is appended to the grouped with other
TRXs to form a new
timestamped blocks. Unfortunately, the transactions history may
(6) TRX completed! blockchain, linked to the last block
block of the Ledger not be enough. Indeed, a malicious user can alter the content
of a block to repudiate an unwanted transaction, falsifying
this way the validation procedure. To fend off falsification
attacks, a blockchain must be Tamper-proof and Immutable.
The tamper-proof property is achieved by a clever embedding
Figure 1: Processing of a transaction before storage in the blockchain.
of Cryptographic Hash Functions (CHFs) into the blockchain
data structure, while the PoW makes the blockchain immutable
At first glance, the blockchain may look as a plain data as well.
structure used to record transactions; however, from a broader
perspective, a blockchain is a distributed system that includes: C. The Proof of Work (PoW)
• A P2P network made of all those nodes that either read or
The Bitcoin protocol dictates that a block is valid only if the
cooperatively write transactions in the blockchain, and the application of the mandated CHF (i.e., double-SHA256) to
• a consensus protocol, namely, a set of policies agreed upon
the block content produces a digest smaller than a given target.
and implemented by all nodes, which are the rules that The smaller the target the higher will be the required number
regulate which and how new transactions can be added to of leading zeros in the most significant digits of the digest, a
the blockchain. number we call Z. Notice that the double-SHA256 produces
digests of 256 bits and that a miner can include an arbitrary
A blockchain can thus be seen as a possible implementation
piece of information in the block, the nonce, to influence the
of a Shared Ledger, which can be either public or private
result of the CHF. The probability for a random nonce to lead
depending on who is allowed to append new transactions to
to a valid digest can be approximately computed as a function
the blockchain.
of Z, resulting to be equal to P (n) ≈ 21Z . The Z number is an
A. Public vs. Private Ledger indicator of the mining difficulty and can be adjusted to tune
the generation rate of valid blocks. Finding a valid nonce is the
In a public (permissionless) ledger, the record of transactions proof of work (PoW), i.e., the proof of the effort in terms of
is public and the consensus protocol is open to anybody. This computing power and energy spent to find such nonce.
means that i) anyone in the world can verify the correctness
of the ledger and ii) even anonymous strangers without explicit D. Block Generation/Propagation and Forks
permission can join the network and participate in the validation Bitcoin targets an average Block Generation Interval (BGI )
process of transactions. Users are thus not accountable, and of 10 minutes. Fig. 2 reveals how the growth of the network
security must be enforced through a technical solution. For computing power over time results in the need for dynamically
example, in permissionless blockchains such as Bitcoin and adjusting Z to keep the desired target BGI . The BGI must be
Ethereum the anonymous proposer of a new block must provide kept high to avoid the production of two simultaneous blocks.
the solution to a very hard crypto-problem, the so-called Proof Two blocks are considered “simultaneous” if the second one is
of Work (PoW). On the one hand, the PoW proves the honest generated within the average block propagation time (BP ) of the
commitment of the proposer, but on the other hand it hampers first one. In general, the BP of a block of a few megabytes (MB)
performance and gobbles (computational) resources. in any P2P overlay is in the order of seconds to a maximum
Private (Permissioned) ledgers arose as an attempt to im- of a few tens of seconds [13]. Simultaneous blocks divide the
prove performance and to have more control on users. A nodes of the Bitcoin network into two parts that will append the
shared and mutual level of trust is given for granted, as only two different blocks to the blockchain forming two branches: a
registered (hence accountable) entities have the permission to “fork.” The existence of a fork means that there is no consensus
write data into the blockchain. The security of permissioned on the order of blocks (i.e., transactions), therefore the system
blockchains depends therefore on classical authentication mech- is again exposed to double spending attacks. Usually forks are
anisms. The resulting model allows blockchain managers to transient and are cleared as soon as another block is presented,
Bitcoin Relative Difficulty
PoW advantages are many: it is secure, fully distributed, and
Miners Comput. Power & Block Difficulty
1012 Hash Rate [Hash/sec] user-agnostic. Ultimately, the PoW i) protects the user privacy
109 and ii) frees users from trusted authorities. The popularity of
106
blockchains, above all with cryptocurrencies, is most probably
grounded in these two key aspects.
103
It can be observed that consensus protocols are a crucial
100 component of a Shared Ledger: performance, consistency, poli-
10−3 cies of governance, security, and tolerance to failures are all
10−6
properties of a Shared Ledger that depend on the selected
consensus protocol rather than on the data structure used to
20
10
20
11
20
12
20
13
20
14
20
15
20
16
20
17
20
18
20
19
20
20
20
21 record transactions. However, a question arises: Is it possible
Time to design a consensus protocol that preserves the PoW advan-
Figure 2: Evolution of the Bitcoin network computing power, measured tages but, at the same time, avoids its drawbacks to meet the
in hash per second. Over time the block difficulty has been adjusted typical requirements of IoT applications? In the rest of this
to keep a constant Block Generation Interval BGI . Statistics are taken section, we briefly review the theory of distributed consensus
from blockchain.com protocols, reviving those theorems that limit the design of
making one branch longer than the other. In general, validators consensus protocols for blockchains in general, representing
will prefer and give their consensus to this longer branch crucial bounds especially for IoT applications. We omit a full
because of the so-called “longest-chain rule” [14]. According to review of consensus protocols, which is available in [12].
this rule, only the blocks of the longest chain are valid, while the The CAP1 theorem [17] is a pillar of the theory of distributed
blocks on “stale” branches are not, meaning also that validators systems and states that, whenever a system gets Partitioned,
that want to gain the Bitcoin reward by submitting valid blocks then only two options are available: i) grant Consistency by
are encouraged to dedicate their computational power only to safely blocking the system to fix the failures; or ii) keep process-
the growth of the main chain. ing transactions favoring Availability, with the risk that the two
One intrinsic limit of a blockchain is the propagation time conflicting (double-spending) transactions could be recorded,
necessary to distribute a newly created block in the peer-to- one per partition. The CAP theorem may be considered only
peer network of miners. Assume that miners are competing to mildly relevant since it is valid only for ill-behaving systems,
mine block bi , and at time Ti a miner generates the block. At while in practice a system is built to work properly for most
Ti + BP all miners know that they should stop mining bi and of its lifetime. However, it is the anteroom for the definition of
start mining bi+1 , but in the interval [Ti , Ti + BP ] miners are two trade-offs of tremendous practical importance.
using resources to mine a block that will most likely not enter The first trade-off is known as PACELC [18], which advances
the blockchain. As an example BP to reach 90% of the Bitcoin the CAP theorem (shuffling the acronym) adding: Else Latency
miners is in the order of tens of seconds [13]. One goal of a or Consistency. The PACELC theorem focuses on the trade-off
blockchain is thus to reduce the blockchain overhead [15]: between Latency and Consistency arising from the propagation
BP delays inescapable for any distributed system, thus valid also
Oh ∝ (1) for not partitioned systems. In Sect. II, we have analyzed the
BGI
Bitcoin design choices to calibrate this trade-off, showing how
A large BGI is essential to maintain a low overhead, and
Bitcoin clearly favors consistency (security) over availability
prevents the deployment of a fast blockchain.
by setting the quite high BGI of 10 minutes that, together with
E. PoW and Immutability the 6 confirmations rule,2 introduces a large delay to record
transactions in the ledger.
Consider a malicious user that wants to cancel an unwanted
The second trade-off is known as the “blockchain trilemma”,
transaction from, let’s say, block i. This alteration would
illustrated in Fig. 3, which is essentially the reformulation of
invalidate block i digest and, due to block chaining, also all
the PACELC theorem for the blockchain domain [19]. In par-
the following ones, so that all validators would immediately
ticular, the trilemma illustrates the conjecture that a blockchain
notice the manipulation and refuse the tampered branch.
system cannot exhibit maximum decentralization, security and
Another attack strategy exploits the longest chain rule and
scalability (performance) at the same time. Limited by the
consists in generating a longer branch of blocks that replaces
trilemma, an IoT developer willing to improve the network
the previous one starting from block i−1. This attack is usually
scalability may chose a consensus protocol less expensive than
referred to as the 51% attack, as it becomes likely when some
PoW or reduce the mining difficulty to speed up the block
miner owns the majority of the mining resources [16], so it is
generation rate. However, this would compromise security,
extremely important that the mining power is not monopolized
since less computing power becomes sufficient to perform a
by one or a coalition of miners.
successful attack. Another strategy could be to change the trust
III. T HE L IMITS OF C ONSENSUS P ROTOCOLS model, for example, by restricting the access to the blockchain
only to trusted, registered users. This is fundamentally the
Sect. II posed the distributed consensus problem on the order strategy adopted with permissioned ledgers, in which a central
of transactions and explained how the PoW solves it. It turned
out that the PoW must be necessarily power-hungry to make 1 The CAP acronym stands for Consistency, Availability and Partition-tolerance
the cost of chain replacement attacks prohibitive.In general, the 2 More on Bitcoin Confirmations at https://en.bitcoin.it/wiki/Confirmation
SCALABILITY Classic Blockchains
Energy Consumption Decentralized Managed DB
Centralized Managed DB
HIGH
Communication
Effort Immutability
MEDIUM
LOW
TRX Rate
DECENTRALIZATION SECURITY Transparency
registrar is introduced to authenticate users, but in this case Users Trustworthiness Decentralization
NO
Centralized
Managed DB end-to-end cryptography
Do you need to keep YES
is enough to protect data, while in a
data confidential? blockchain data is necessarily exposed
for validation and transparency
NO
NO
Energy Consumption
Traditional Distributed Ledgers
PoS
OPENNESS OF
CONSENSUS
Leader
Based
LOW
WEAK STRENGTH OF TRUST ASSUMPTIONS STRONG
Assumptions Assumptions
LOW HIGH
Latency Latency
Figure 8: Different IoT clusters, made of devices managed either
Figure 7: Bubblechart comparing the most popular consensus fabrics by private (home/enterprises) or public (institutional) entities perform
by trustworthiness of users (x-axis) and openness of the consensus most transactions locally, in the IoT layer. For interoperability purposes
protocol (y-axis). The color and the size of each bubble offer a quick the different clusters access intermediary platforms. At this stage
indication of resource consumption and transaction rate. blockchain-based ledgers can provide a unique service independent
of any trusted authority.