Professional Documents
Culture Documents
Hierarchical Distributed Ledger For IoT Using Ethereum Blockchain
Hierarchical Distributed Ledger For IoT Using Ethereum Blockchain
Hierarchical Distributed Ledger For IoT Using Ethereum Blockchain
Ethereum Blockchain
Prof. Irfan Siddavatam Prof. Ashwini Dalvi
KJ Somaiya College of Engineering KJ Somaiya College of Engineering
Mumbai, India Mumbai, India
irfansiddavatam@somaiya.edu ashwinidalvi@somaiya.edu
Abstract— In the domain of Internet of things there are large maintained by all the nodes in the network [1]. Using
number of devices generating data in the network and submitting blockchains, we can easily verify the authenticity of the data
it to their respective configured data collectors. When the sensors in a decentralized manner.
are preconfigured by the data collectors, they can easily verify
the data coming from those sensors for its authenticity using The project provides a platform for buying and selling of
cryptography. But if a third party wants to buy that data, how sensor data which also ensures that the data in the given
can they trust the data collector for the authenticity of that data scenario is authentic and the ownership of that data is
i.e whether the data they are buying is real data or some established from the moment it is created. We will accomplish
randomly generated stream of numbers. In fact, the only option this need by keeping track of each instance of data along with
left is to trust the claim made by the collectors that the data they
are providing is authentic. This project resolves the trust issue by
maintaining a distributed public ledger of all the transactions
creating a distributed application using blockchains by happening in the network regarding data generated by sensor
distributing the trust factor to the entire network instead of nodes. The key concepts used in the projects are explained
trusting a single entity [5]. This system provides authenticity of further.
data generated by sensor nodes in the network.
A. Distributed Ledger
Keywords—Internet of things, Distributed Ledger, Blockchain, It is a type of digital database which is replicated across
Ethereum, Smart Contracts, DAPP multiple nodes where cloning of the database is defined by a
consensus algorithm and hence a single copy of the database is
shared among all of the nodes. It is employed in peer to peer
I. INTRODUCTION network model to counter centralized server model, where
The Internet of Things is nothing but connection of variety network resilience is of crucial importance.
of objects not limited to industrial machines to wearable B. Blockchain
devices. These devices by means of integral sensors collect
A blockchain is a type of data structure considered to be a
data and perform required task [2]. This data gathered by IOT
distributed ledger, which is cryptographically secured using
sensors is of critical value to many companies as they use this
consensus protocol [2]. It is created and maintained so as no
data for analysis to drive their business needs. The data
entity can tamper with the blockchain data without the
generated by sensors is ubiquitous, keeping track of its
approval of majority of the network. Blockchain in itself is
origination and trusting the data obtained from third party data
nothing but chain of blocks in which each block is a list of
generators is merely impossible without a system in place to
transactions along with the hash, timestamp and other
handle this issue. And even a central authority cannot be
metadata minted inside each one of them.
trusted to a great extent and another issue is that as the number
of devices in the network grows, the central server also needs C. Ethereum
to be upgraded exponentially. So we need a better solution to Ethereum is a blockchain platform that provides a global
address this problem of trusting the authenticity of data and infrastructure for creating and deploying distributed
management of the whole network in an efficient manner. applications on it [7]. It is most widely used platform for
Therefore, to provide data authenticity in a distributed distributed applications because it provides developers to
manner we have created a blockchain based distributed deploy turing complete code on the blockchain which are
application. A blockchain is cryptographically secured known as smart contracts and the language used to code the
distributed ledger which keeps on growing continuously and is contract is solidity. We can also create private blockchain
network easily using this platform. The infrastructure can within their own local network. And the global blockchain
move value around and represent the ownership of property. maintains a distributed ledger of data trading among the farm
managers and bidders. Inter-farm interaction happens only in
Below listed are some terminologies used for in-depth
the global blockchain by the farm managers of the respective
explanation of project implementation:
blockchains where data bidding takes place. The global
● Farm: It is a network of Iot nodes which generally blockchain consists of farm manager nodes only and there is
includes a number of Raspberry pis (or some data only one such blockchain in the entire network. In the global
collecting and computing device) as sensor nodes and blockchain, a normal user who is only interested in buying
full-fledged computer nodes as user nodes. sensor data can also take part, whom we may call as bidder.
● Farm Manager: This is the machine in the network This entire architecture is summarised in figure [1]. In the
which essentially acts as a data collector and and is mentioned figure, there are 4 different sensor farms, farm
the farm head who maintains and holds responsibility managers representing respective farms and 2 bidders. The
for the farm. farm manager is the only node which is involved in both local
● Bidders: A user who does not manage any farm but is and global blockchains. It carries the information back and
interested in buying the data. forth between local and global blockchain.
● Tokens: It is a representation of real world data
chunk inside the blockchain and the process creating
such instance of data is called tokenization. III. IMPLEMENTATION
To develop our distributed application we have created
II. ARCHITECTURE some private blockchains using ethereum platform. We
created 5 blockchains in total, 4 local and 1 global. In each
It is a distributed peer to peer modeled architecture. The
farm, there are 2 to 3 Raspberry Pis which collect and publish
network architecture of our implemented system is
sensor data to their respective farm managers and this is
hierarchical which has two levels of blockchain network viz
registered as a transaction in the blockchain. So the local
local and global. The purpose of having two levels of
blockchain contains information about who generated what
blockchain network is to make it more scalable in an
data and the essential attributes of the data and not the data
organised manner. All the networks implemented are private
itself because storing the data in the blockchain would mean
by design. There are multiple local farms each having their
exponential growth in the size if the blockchain which would
own unique blockchain and a farm manager in it who manages
require large amount of storage for the sensor nodes. So all the
the entire farm. And then there is one global blockchain which
trading takes place by tokenizing the data captured by sensor
connects all the farm managers from each farm.
nodes for a particular period of time. In local blockchain the
The local farm blockchain maintains a distributed ledger raspberry pis themselves perform the mining work and hence
of data interaction between sensor nodes and farm manager the sensor nodes themselves compete to add a block in the