Professional Documents
Culture Documents
TehreemAshfaq ConsensusBasedMechanismUsingBl
TehreemAshfaq ConsensusBasedMechanismUsingBl
net/publication/334824147
CITATIONS READS
0 227
6 authors, including:
Some of the authors of this publication are also working on these related projects:
Load Balancing on Cloud Using Professional Service Scheduler Optimization View project
All content following this page was uploaded by Nadeem Javaid on 02 November 2019.
1 Introduction
In the modern era, vehicle sector is getting modernized with the advancement in
the infrastructure and the communication sector. With the immense increase in
the population over the past few years, number of vehicles running on the roads
has also increased. With this advancement, the transport sector has undergone a
whole new driving experience, comprising of autonomous cars, self-driven cars,
c Springer Nature Switzerland AG 2020
L. Barolli et al. (Eds.): BWCCA 2019, LNNS 97, pp. 44–55, 2020.
https://doi.org/10.1007/978-3-030-33506-9_5
Consensus Based Mechanism Using Blockchain 45
etc. Not just the infrastructure of the vehicles is changing, also new services
are being introduced, particularly the communication services [1]. Blockchain
is an emerging technology. It is a distributed ledger that can record the trans-
actions between two nodes/vehicles managed by a Peer-to-Peer (P2P) network.
Blockchain is about the transparency, security and trust without any third party.
Third party is like a centralized system. Blocks are connected to each other
and each block has its own hash. Blockchain is also about transparency; dis-
tributed ledger is managed by network nodes, each having the copy of ledger.
Nowadays, blockchain based P2P smart contracts for Internet Vehicles (IVs) are
one of the recent applications of blockchain which is growing rapidly. With the
increase in IVs, many problems arise, e.g., huge amount of data generated, lim-
ited storage capacity, lack of management, etc. Privacy and security issues also
exist.
According to [1], number of IVs will increase to 140 million by 2030. These
figures show that it is just a matter of time when the conventional vehicles will
totally be replaced by the IVs. Even now, the conventional vehicles are being
equipped with latest technologies. IVs communicate in a P2P manner, which
removes the involvement of the third party. Still, the security issues exist in the
vehicle sector and the vehicle users are hesitant to interact and communicate
with each other. The users personal data can be hacked by the malicious users,
as this data is quite easily accessible and can be tampered.
To overcome the security issues, blockchain technology has been proposed.
Blockchain is an emerging technology which promotes decentralization along
with security, data immutability and transparency [2]. Therefore, people are
migrating towards blockchain technology. In blockchain, data is stored in a dis-
tributed ledger, copy of which is available with all the participants of the network.
All the transactions taking place in a blockchain network are stored in blocks;
each having a unique hash [3].
The blockchain based IV scenario is proposed, which deals with the issues of:
lack of coordination between vehicles and generation of intensive data. It also
manages the storage and channel reliability. The vehicles are added in the net-
work and assigned unique cryptographic identities. The consensus mechanism
is used whenever a new vehicle is added in the network and it requires 51%
positive response. The proposed blockchain network is divided in two separate
branches. i.e., Integrity Chain (I-Chain) and Fraud chain (F-Chain). The val-
idated vehicles and the associated transactions are stored in integrity I-Chain
whereas the malicious users are added to the F-Chain [4]. Figure 1 shows the in-
depth communication between the vehicles and also the following of the smart
contract.
1.1 Motivation
After reviewing the past work done by many authors for secure communication
between vehicles, sellers and buyers in [1,2,4], we have the following motivations
for this paper:
46 T. Ashfaq et al.
2 Related Work
Proof of Work (PoW) to ensure the privacy and security of a network. In the
proposed architecture, there is no privacy encryption and no user involvement.
In [13], authors used Provable Data Possession (PDP) technique instead of
PoW to obtain better results. They also applied preserving hash function to
compare the existing data of nodes with the new one. The only problem with
PDP is that it can identify the damaged data on nodes, but is unable to recover
it.
3 System Model
In smart cities, communication of smart vehicles is not secure. So, we proposed a
secure ITS scenario for the secure communication of the intelligent smart vehicles
Consensus Based Mechanism Using Blockchain 49
using blockchain which can keep data of smart vehicles and their transactions.
When vehicles communicate with each other, they use proof of work for mining
of blocks. In the proposed model, there is an IVTP which assigns the unique ID
to each vehicle. This IVTP is generated by crypto mechanism. Vehicles use this
IVTP during communication for building the trust and for using the network
services. Each vehicle has its own IVTP known as IVTP-ID of that particular
vehicle. The details of the vehicles are stored in separate blocks and when these
blocks are joined together, a blockchain is formed. Each block has its current
hash and previous hash, time stamp, nonce number and targeted address of the
previous block. When more vehicles are added to the network, the computational
power is increased and the data of vehicles becomes more intensive. From the
user’s perspective, it becomes difficult to deal with such type of data. To deal
with intensive data, consensus based scheme for authentication of data is used.
This scheme is used to add the user to the network on the basis of authenticity
while enhancing the efficiency and performance of the network.
The blockchain based proposed IV scenario deals with the issues of: lack of
coordination between vehicles and intensive data. Moreover, it also deals with
the issues of limited storage and channel reliability. The vehicles are added in the
network and are assigned unique crypto identities, respectively. The consensus
mechanism is used to achieve 51% positive response. The validated vehicles and
the associated transactions are stored in I-chain; whereas, the malicious users
are added to the F-chain [4].
Whenever a new user joins the network, the ledger broadcasts this on the
mobile gateway for all the users. When the broadcast message is received by all
other users then the consensus mechanism is applied to check the authenticity.
Once a user is verified to be authentic then a message is sent to the I-chain; oth-
erwise, if the user is not authentic and a message is sent to the F-chain. Figure 2
shows the proposed system model in which the V2V communication, V2X com-
munication and the central trust point is shown. The idea of this proposed model
is taken from [4].
4 Reasoning of Graphs
In this section, the results are displayed and their discussion is also given. Ini-
tially, when the smart contracts are made and deployed, the transaction and exe-
cution costs are calculated. Simulations are performed on Solidity and RemixIDE
(online platform); Solidity is used for writing the smart contracts and Remix-
IDE is used to deploy the smart contracts. For the testing of smart contracts,
we use Ganache and for the validation of transactions, we use MetaMask. Sim-
ulations are run on the system having specifications: Intel Core i5, 4 GB RAM
and 500 GB storage. Presently, the conversion rate of gas and ether is as follows,
taken from [22].
There are some performance parameters for the proposed system.
The execution cost of a smart contract depends upon the processing power of
the system that how many tasks are performed. The execution cost is directly
proportional to the processing power. The execution cost is the cost of executing
only a certain function.
The transaction cost depends on: the cost of data being sent, operations being
performed and the storage of contract. It can be said that transaction cost is the
sum of the execution cost and the deployment cost.
Consensus Based Mechanism Using Blockchain 51
Figures 3 and 4 shows the transaction and execution costs for the smart
contracts and the functions are deployed in terms of gas. These values are taken
from RemixIDE. Fluctuations can be observed in the gas values for different
functions. The function “transferring balance” has the maximum cost. It can be
observed that the function “transferring balance” has the maximum cost because
it is a function that used more processing power. Similar is the case with the
function “assigning plate number”. This function is intended to add new IVs
to the blockchain network. The transaction costs are always higher than the
execution costs. The reason is because the transaction costs are the costs of
deploying the contract whereas the execution costs are the costs of executing
only a certain function.
The six functions shown in these figures are: assigning the plate number, acti-
vating the car, signing a car, sharing request, transferring balance and assigning
value to car. When the smart contract is deployed, then less gas consumption is
used for the activation function that is 21650 gwei. The gas consumption also
shows the complexity of different functions; the computational power decreases
with the decrease in gas consumption.
In Fig. 5, the increasing trend between the amount of data generated and
the computational time is shown. When the number of vehicles to be added in
the network increases, the data associated with the vehicles also increases. This
in turn increases the computational time which is required to access that data.
It is seen that the increasing trend is exponential in nature. The reason is that
Consensus Based Mechanism Using Blockchain 53
Figure 6 shows the number of total users, authentic users, unauthentic users
and the total number of requests made. By users we mean vehicles, which are
to be added in the network. The authentic users will be added to the I-chain;
whereas, the unauthentic users will be added to the F-chain. The graph is plotted
between the number of participants (vehicles) and the requests made by them.
It is seen that, the proposed model behaves in an efficient manner and is able to
respond to large number of authentic requests made and only a few are marked
as unauthentic.
5 Conclusion
In this paper, the blockchain technology is proposed in the EV sector to solve
the existing issues. The proposed work helped to solve the trust issue among
the users, ensured the data immutability and distinction among the authentic
and unauthentic data. The vehicles are validated by the use of unique crypto
identities being assigned to all the vehicles. All vehicles communicate through
these crypto identities. Each vehicle is connected with its neighbors. When two
vehicles want to communicate, they broadcast a message on network and then a
smart contract is deployed for their communication. The consensus mechanism
is employed to ensure the transparency and the transaction data is stored in
the form of distributed ledger, i.e., copy of data which is available at all nodes.
The proposed work surpasses the existing work as it involves the concept of
branching the vehicles in two different branches instead of keeping the data in a
54 T. Ashfaq et al.
References
1. Bahga, A., Madisetti, V.K.: Blockchain platform for industrial Internet of Things.
J. Softw. Eng. Appl. 9(10), 533 (2016)
2. Nakamoto, S.: Bitcoin: a peer-to-peer electronic cash system (2008)
3. Lin, D., Tang, Y.: Blockchain consensus based user access strategies in D2D net-
works for data-intensive applications. IEEE Access 6, 72683–72690 (2018)
4. Khan, R.J.H., Javaid, N., Iqbal, S.: Blockchain based node recovery scheme for
wireless sensor networks. MS thesis, COMSATS University Islamabad (CUI),
Islamabad 44000, Pakistan, July 2019
5. Li, J.: Data transmission scheme considering node failure for blockchain. Wireless
Pers. Commun. 103(1), 179–194 (2018)
6. Jia, B., Zhou, T., Li, W., Liu, Z., Zhang, J.: A blockchain-based location privacy
protection incentive mechanism in crowd sensing networks. Sensors 18(11), 3894
(2018)
7. Ali, I., Javaid, N., Iqbal, S.: An incentive mechanism for secure service provision-
ing for lightweight clients based on blockchain. MS thesis, COMSATS University
Islamabad (CUI), Islamabad 44000, Pakistan, July 2019
8. Naz, M., Javaid, N., Iqbal, S.: Research based data rights management using
blockchain over ethereum network. MS thesis, COMSATS University Islamabad
(CUI), Islamabad 44000, Pakistan, July 2019
9. Noshad, Z., Javaid, N., Imran, M.: Analyzing and securing data using data science
and blockchain in smart networks. MS thesis, COMSATS University Islamabad
(CUI), Islamabad 44000, Pakistan, July 2019
10. Samuel, O., Javaid, N., Awais, M., Ahmed, Z., Imran, M., Guizani, M.: A
blockchain model for fair data sharing in deregulated smart grids. In: IEEE Global
Communications Conference (GLOBCOM 2019) (2019)
11. Rehman, M., Javaid, N., Awais, M., Imran, M., Naseer, N.: Cloud based secure
service providing for IoTs using blockchain. In: IEEE Global Communications Con-
ference (GLOBCOM 2019) (2019)
12. Novo, O.: Scalable access management in IoT using blockchain: a performance
evaluation. IEEE IoT J. https://doi.org/10.1109/JIOT.2018.2879679(2018)
13. Jiang, T., Fang, H., Wang, H.: Blockchain-based Internet of vehicles: distributed
network architecture and performance analysis. IEEE Internet Things J. 6(3),
4640–4649 (2019)
14. Ren, Y., Liu, Y., Ji, S., Sangaiah, A.K., Wang, J.: Incentive mechanism of data
storage based on blockchain for wireless sensor networks. Mobile Inf. Syst. 2018,
10 p. (2018). Article no. 6874158
15. Sharma, P.K., Singh, S., Jeong, Y.-S., Park, J.H.: Distblocknet: distributed
blockchains-based secure SDN architecture for iot network. IEEE Commun. Mag.
55(9), 78–85 (2017)
16. Awais, M., Javaid, N., Imran, M.: Energy efficient routing with void hole allevi-
ation in underwater wireless sensor networks. MS thesis, COMSATS University
Islamabad (CUI), Islamabad 44000, Pakistan, July 2019
Consensus Based Mechanism Using Blockchain 55
17. Mateen, A., Javaid, N., Iqbal, S.: Towards energy efficient routing in blockchain
based underwater WSNs via recovering the void holes. MS thesis, COMSATS Uni-
versity Islamabad (CUI), Islamabad 44000, Pakistan, July 2019
18. Javaid, A., Javaid, N., Imran, M.: Ensuring analyzing and monetization of data
using data science and blockchain in loT devices. MS thesis, COMSATS University
Islamabad (CUI), Islamabad 44000, Pakistan, July 2019
19. Kazmi, H.S.Z., Javaid, N., Imran, M.: Towards energy efficiency and trustfulness
in complex networks using data science techniques and blockchain. MS thesis,
COMSATS University Islamabad (CUI), Islamabad 44000, Pakistan, July 2019
20. Zahid, M., Javaid, N., Rasheed, M.B.: Balancing electricity demand and supply in
smart grids using blockchain. MS thesis, COMSATS University Islamabad (CUI),
Islamabad 44000, Pakistan, July 2019
21. Dai, M., Zhang, S., Wang, H., Jin, S.: A low storage room requirement framework
for distributed ledger in blockchain. IEEE Access 6, 22970–22975 (2018)
22. https://currencio.co/gas/eth/. Accessed 10 May 2019