sustainability Article Empowering Communications in Vehicular Networks with an Intelligent Blockchain-Based Solution Bacem Mbarek 1 , Nafaa Jabeur 2,* , Tomás Pitner 1 and Ansar-Ul-Haque Yasar 3 1 Faculty of Informatics, Masaryk University, Botanická 68A, 602 00 Brno, Czech Republic; bacem.mbarek@mail.muni.cz (B.M.); tomp@fi.muni.cz (T.P.) 2 Department of Computer Science, German University of Technology in Oman (GUtech), P.O. Box 1816, Athaibah, Muscat PC 130, Oman 3 Transportation Research Institute Hasselt University, Martelarenlaan 42, 3500 Hasselt, Belgium; ansar.yasar@uhasselt.be * Correspondence: nafaa.jabeur@gutech.edu.om Received: 15 August 2020; Accepted: 20 September 2020; Published: 24 September 2020 Abstract: Blockchains have emerged over time as a reliable and secure way to record transactions in an immutable manner in a wide range of application domains. However, current related solutions are not yet capable of appropriately checking the authenticity of data when their volumes are huge. They are not also capable of updating Blockchain data blocks and synchronizing them within reasonable timeframes. This is the case within the specific context of Blockchain vehicular networks, where these solutions are commonly cumbersome when attempting to add new vehicles to the network. In order to address these problems, we propose in this paper a new Blockchain-based solution that intelligently implement selective communication and collaborative endorsement approaches to reduce communications between vehicles. Our solution represents the vehicles of the Blockchain as intelligent software agents with a Belief–Desire–Intention (BDI) architecture. Furthermore, we propose an approach based on multi-endorsement levels to exchange data of varying sensitive categories. This approach, which is based on endorsing scores, is also used to shorten the admission of new vehicles into the Blockchain. We run simulations using the Hyperledger Fabric Blockchain tool. Results show the efficiency of our solution in reducing the processing times of transactions within two different scenarios. Keywords: blockchain; vehicular network; belief–desire–intension architecture; multi-endorsement levels; collaborative endorsement; selective communication 1. Introduction Thanks to the increasing adoption of Internet of Things (IoT) devices into today’s vehicles, the acquisition of road traffic-related data has become easier. In addition to sharing these data, vehicles have also become capable of interconnecting and requesting services, on-the-fly, from third parties (e.g., insurance companies) as well as from roadside infrastructure (e.g., road traffic signs) for safer and more efficient commutes. To leverage these capabilities, intensive efforts, particularly from car industries, are being spent to ultimately create autonomous connected vehicles, which represent a key concept in the next generation of Intelligent Transportation Systems (ITS) [1]. Vehicles are, therefore, evolving toward becoming cyber–physical systems that create Vehicular Ad-hoc NETworks (VANET) through which relevant information is timely-provided to a wide range of stakeholders (including drivers, road traffic authorities, manufactures, maintenance companies, and insurance companies) for various applications [2]. Collecting and disseminating information on life-threatening traffic events with VANET have, particularly, become of utmost importance [3]. Sustainability 2020, 12, 7917; doi:10.3390/su12197917 www.mdpi.com/journal/sustainability Sustainability 2020, 12, 7917 2 of 13 However, due to the current processing and communication restrictions of onboard IoT devices, enabling secure communications while fulfilling the latency requirements between vehicles is yet a major concern [1]. Indeed, these communications are still prone to various types of attacks, including Sybil, Denial-of-Service (DoS) attack, jamming, and fabrication [2]. In addition to preventing vehicles from conveying secure messages, these attacks are increasing privacy concerns in VANETs, such as reliability, anonymity, and traceability [4]. Blockchain has recently arisen as a promising technology for sharing and protecting vulnerable data in distributed and decentralized systems [5,6]. Blockchain essentially uses public-key cryptography to sign transactions among various parties. Transactions are afterward stored in a distributed ledger. The ledger comprises cryptographically-linked data blocks (i.e., transactions), which are practically impossible to alter or remove. Thanks to its unique values of trust, immutability, transparency, and disintermediation, Blockchain is being increasingly used by governmental, industrial, and academic entities in a wide range of application domains, including banking, healthcare, logistics, and transportation [2]. In the particular field of transportation, various Blockchain-based solutions have been proposed, for example, for interconnected smart vehicles (e.g., [7]), ITS (e.g., [8]), forensic applications (e.g., [9]), secure key management (e.g., [10]), data collection and sharing (e.g., [7,11,12]), and vehicle communications (e.g., [1,3,5,8,13,14]). In spite of the relevant approaches that have addressed vehicular communications, Blockchain solutions are still computationally expensive. Indeed, accepting new vehicles in the Blockchain and/or carrying out transactions yet require intensive exchanges with endorsing peers. As road traffic data are increasingly voluminous, these endorsing peers are becoming practically unable to verify transactions and deliver their verdicts within reasonable timeframes. The entire Blockchain is consequently slow in updating, synchronizing, and distributing new copies of the data blocks. This slowness is significantly hindering the scalability of any Blockchain-based solution. In the specific context of a vehicular network, current Blockchain mechanisms include a higher number of endorsing peers, unless they are thoroughly adapted to fit the available limited resources or replaced with revolutionary approaches. To address these shortcomings, we argue that vehicles must be capable of selecting the right endorsing peers for the right transactions they want to perform in order to reduce their communication overheads. As VANET is by nature highly dynamic and opportunistic, we argue that vehicles must be aware of their surrounding contexts and rely on the minimum number of peers to carry out their transactions. To reach these goals, we propose in this paper to model the participant vehicles in the Blockchain according to a Belief–Desire–Intension (BDI) architecture. This architecture has been intensively and successfully used in the Multi-Agent System paradigm to intelligently model human behaviors and interactions [15]. Our contributions in this paper are summarized as follows: (1) a BDI architecture that endows vehicles with intelligent mechanisms to optimize communications via a selective endorsement approach; (2) a new approach that relies on collecting minimum endorsing scores to carry out transactions through multiple endorsing levels; (3) an approach to promote vehicles to higher endorsing levels based on the history and impact of their transactions; and (4) a new approach for collaborative endorsement. In the remainder of this paper, Section 2 highlights the current literature on using Blockchain in vehicular networks. A special attention is given to optimizing and securing communications among vehicles. Section 3 outlines the system model of our solution. It also explains our concept of multi-endorsing levels to manage and optimize communications in the vehicular network. Section 4 presents our approach for admitting new vehicles in the Blockchain. Section 5 is dedicated to our solution for empowering vehicle communications with intelligence. This section particularly focuses on our proposed BDI architecture to model the vehicle participating in the Blockchain. It also focuses on our approaches for selective communication, collaborative endorsement, and promoting endorsers to higher levels. Section 6 reports and assesses the results of our simulations. Section 7 presents a brief discussion of the results obtained. Finally, Section 8 concludes the paper and outlines future works. Sustainability 2020, 12, 7917 3 of 13 2. Related Work Several studies (e.g., [5,6]) have reported that Blockchain is a promising alternative to solve the recurrent issues of data privacy, protection, and ownership, particularly thanks to its peer-to-peer structure, the mechanisms it offers to increase anonymity, transparency, and protection as well as to the absence of a trusted central authority [12]. Within the specific realm of vehicular networks, various related architectures have been proposed. In this regard, [16] described an architecture of a model Block-Vehicular Network (VN) in the context of smart cities. The architecture could be used as a basis for the implementation of large-scale vehicular networks where resources are shared more effectively. In the proposed architecture, nodes can decide from whom they would request services based on a rating list. Ref. [17] have presented a trust-based architecture that uses Blockchain technology to increase the privacy of users in the VANET. The architecture also aims to improve security against MAC layer attacks, including DoS attacks, Sybil attacks, and fabrication. The solution uses hashing techniques and timestamps to preserve the freshness of messages delivered. It also uses message rating and a credibility approach (i.e., vehicles that convey fake messages will have low credibility) to manage trust among vehicles during information exchange. Ref. [6] have presented a Blockchain-based vehicle network architecture called Block-VN. Block-VN operates in a distributed way to create a distributed transport management system within the context of smart city. Furthermore, several Blockchain-based solutions for vehicular networks have been proposed for secure key management (e.g., [10]), data collection and sharing (e.g., [4,7,9,11,12]), as well as vehicle communications (e.g., [1,3,5,8,13,14,18]). With respect to key management, [10] have designed a framework to manage security keys within an heterogeneous vehicular network. The framework includes security managers that capture relevant vehicle information, encapsulate block to transport keys, and perform rekeying to vehicles inside the same security domain. The framework is based on a decentralized structure where Blockchain is used to simplify distributed key management. With respect to data collection and sharing, [9] have proposed a permissioned Blockchain framework for the management of information collected through vehicle on-board sensors. The framework includes a fragmented ledger to store this information as well as additional relevant data (including reports on car diagnosis and the history of car maintenance). The authors have included Vehicular Public Key Management (VPKI) into the Blockchain to enable vehicles to join the proposed system as members while ensuring their privacy. Ref. [4] have presented a privacy-preserving incentive announcement network that enables several users to anonymously send messages within a non-fully trusted environment. To this end, the network, called CreditCoin, is using Blockchain to ensure privacy, trace malicious users’ identities, incentivize users to share traffic information, and implement tamper-resistant transactions. Ref. [7] have investigated how the joint use of Blockchain and interconnected vehicles can solve the security issues related information management. In this regard, the authors have proposed a Blockchain solution using an overlay network. The nodes of the network are divided into clusters. The heads of the clusters are responsible for the management and the operation of the Blockchain functions. [11] have proposed a Blockchain solution that includes an incentive-based approach to identify road conditions, detect road accidents, and encourage the use of less congested roads. The solution uses beacons mounted on roadside sections to detect approaching vehicles, get their destinations, and estimate the conditions of roads accordingly. Ref. [12] have recommended the joint use of IoT and Blockchain technologies to manage road hazards. The authors have used the hashgraph technology (which is a distributed ledger technology) to create communication networks between vehicles as well as other components of the vehicular network. They have also suggested to use hashgraph to schedule requests based on their priorities and ensure better Quality of Service (QoS) accordingly. With respect to communication within the vehicular network, [1] have proposed the use of a ring-signature based scheme to check the identity of vehicles that are requesting to join the network. The authors have also used a Blockchain solution to verify and secure the exchange of information among the successfully identified vehicles. To this end, they have created secure communication Sustainability 2020, 12, 7917 4 of 13 channels using multi-party smart contracts. The proposed solution is capable of enabling the members of the vehicular network to exchange almost instantaneous messages anonymously by means of cryptographic primitives. Ref. [13] have presented a Blockchain solution to secure communications among intelligent vehicles by using acoustic side channels and visible light communications. To solve the critical issue of message dissemination in VANET, [3] have created a local Blockchain for the exchange of real-world event messages between vehicles within the same country. They have also presented a public Blockchain to store the trustworthiness of messages and nodes in a distributed ledger. This ledger is then used to ensure appropriate secure message dissemination. Ref. [14] have used Blockchain technology for a secure distributed message passing. The proposed framework does not rely on a centralized server. It also rates the credibility of a message and then forwards it through designated short-range communication. Ref. [5] have used Blockchain technology to implement an Intelligent Vehicle-Trust Point (IV-TP) solution for secure and reliable communications among intelligent vehicles. The solution assesses the trustworthiness of vehicles and identifies their legal and illegal actions. It also uses a reward-based system to motivate sharing information between vehicles. Ref. [8] have developed a trust-extended decentralized authentication mechanism (TEAM) for decentralized communications between vehicles. TEAM implements a mechanism for transitive trust relations to improve the performance of authenticating vehicles within the Blockchain. Ref. [18] have developed an encryption system based on Blockchain to enable the management of trust during vehicle communications as well as during real-time cloud-based video monitoring. The aforementioned works have proposed relevant Blockchain-based solutions for vehicular networks. However, we argue that the use of intelligent approaches is still insufficient, particularly to address issues related to vehicle communications. In this respect, we argue that the extensive literature in the artificial intelligence domain will definitively enable more flexible, secure, context-aware, privacy-aware, and resource-aware communications among vehicles. 3. System Model Let us consider in this paper a Blockchain consisting of V connected vehicles (V = {V1, V2, ..., Vn}) and E endorsing peers (E = e1, e2, ..., em), E ⊆ V, and m ≤ n. Every vehicle uses the Blockchain by submitting transactions as requests for services of individual interest (e.g., car maintenance) or by sharing information of common interest (e.g., road traffic accident). These transactions will be examined by the endorsing peers and then written along with their validity in a distributed ledger. We assume that data stored in the Blockchain are classified into p categories, based on several parameters, such as sensitivity. Without loss of generality, we assume that the p categories are predefined and are known by all the vehicles which are members of the Blockchain network (Figure 1). We also assume that the Blockchain includes a node called Ordering Service that is responsible for adding the transactions (after their validations) to the Blockchain Block and sharing them with the members of the network. The Block could be written as follows: Block = {t11, t12, ..., t21, ..., tp1, tp2, ... } where tij refers to the transaction j of data category i. In our model, we classify the endorsing peers into q levels (Figure 2). The higher the level of the endorsing peer, the higher the categories of data the peer has access to as well as the higher the categories of data it can share. For example, an endorsing peer with level 1 will have access to and can share data of categories 1 and 2 only, whereas an endorsing peer with level 3 will have access to and share data of categories 1, 2, 3, 4, and 5. Endorsing levels are earned over time. The Ordering Service will keep track of the number, veracity, and impact of transactions carried out by each endorser and generate a h-index accordingly (the h-index summarizes the value of the contributions of the vehicle in the Blockchain as well as its trust and its endorsing levels). The endorsing level of the endorser (i.e., the vehicle) will then be issued regularly (for example after a given number of transactions or after a specific period) based on this h-index. In Figure 2, we explain how vehicles can join the different levels of our endorsing structure. In fact, when a new vehicle wants to join the Blockchain, it must collect a prerequisite minimum score (also called consensus) from endorsing peers (as recommendation Sustainability 2020, 12, 7917 5 of 13 scores). We say in this case that the vehicle is joining a consensus level. Vehicles that are already members of the Blockchain have two options: (1) join a higher endorsing level temporarily (in this case they need a minimum consensus score); or (2) join a higher level officially (in this case they need a minimum endorsing score. The endorsing score is higher than the consensus score, particularly since being part of an endorsing level is an official commitment from the vehicle). Vehicles can also be promoted to the next levels, either automatically based on their h-indexes (calculated by the Ordering Service) or by collecting the necessary remaining scores for their promotions. We assume in this paper that the consensus scores as well as the endorsement scores are predefined. We also assume that endorsers have weights depending on their levels. These weights are also predefined. Figure 1. Copies of the Blockchain Block with varying data categories. Figure 2. Cases of vehicle car join consensus or endorser levels. Sustainability 2020, 12, 7917 6 of 13 4. Admission Control in the Blockchain During the registration phase, a new vehicle willing to join the Blockchain has the choice to join a consensus level (see Figure 2) temporarily (i.e., without being an endorser) or officially (i.e., the vehicle will be an endorser). To this end, the vehicle must collect the minimum score for the selected level. This score will be obtained based on recommendations from neighboring vehicles at the moment of submitting the request to join the Blockchain. Since the vehicular network is by nature highly dynamic, the endorsing peers in the vicinity of the vehicle will vary over time. The vehicle may be capable of collecting the required score easily. The vehicle may also find difficulties to reach its aim. In this case, it may consider waiting until better options for obtaining the required score are available. Waiting could be the best option for the vehicle. Indeed, if the vehicle decides to join the Blockchain officially, it will be registered in the level for which it obtained the necessary score. To go for higher levels, the vehicle will need to increase its contributions to the Blockchain and carry out trusted transactions with high impact. To do so, the vehicle must be endowed with intelligent mechanisms to make the appropriate decisions at the right time, based on the available contextual data as well as the data of the vehicle itself. In this paper, we calculate the score S of a given vehicle Sv as follows: Sv = q ∑ i=1 ( k ∑ j=1 Sv,j)Wi, (1) where Wi denotes the weight of the endorser of level i, SV,j is the score given to V by the neighbor vehicle j which is an endorsing peer in the Blockchain of level i. We assume here that scores are received only from the neighbors who accepted the request to score V. For example, in the scenario of Figure 3, the vehicle V (represented with a black circle) has 7 neighbors of level 2. However, only 4 of them accepted giving scores (represented in Figure 3 as circles with bold boundaries). According to the configuration of Figure 3, the score of the vehicle V is calculated as follows: SV = (S(V,v1) + S(V,v2) + s(V,v4) + S(V,v8)) ∗ w3 + (S(V,v3) + S(V,v5) + s(V,v6)) ∗ w2 + S(V,v7) ∗ w1 Figure 3. Scenario for the calculation of the score of a vehicle. 5. Empowering Vehicle Communications with Intelligence During the admission control phase, any vehicle willing to join the Blockchain temporarily or officially will need the bare minimum score for the consensus level it is aiming for. This approach Sustainability 2020, 12, 7917 7 of 13 will enable the vehicle to reduce the number of endorsers and therefore reduce the number of communications. If the vehicle is lucky enough, it may obtain the required score via the recommendations of currently available endorser vehicles in the neighborhood. Once the vehicle is admitted officially in the Blockchain, it should start building trust relationships with peers, especially the endorsing ones. These relationships will be particularly helpful in decreasing communication overheads and obtaining recommendations with higher weights (based on the weight of the endorsers’ levels). To build and sustain trust relationships as well as identify the appropriate endorsing collaborators, the vehicle must be capable of intelligently identifying its current options, plan its actions, and reflect on their outcomes. We explain in what follows our solution to reach this goal. 5.1. Belief–Desire–Intension Architecture for Blockchain Vehicles In order to allow the vehicles to reason adequately about occurring events as well as contribute to the Blockchain (for example by sharing information or endorsing new vehicles to join the network), we propose to represent every vehicle that has successfully joined the Blockchain by an intelligent software agent. We also propose to model this agent according to a Belief–Desire–Intension (BDI) architecture (Figure 4). BDI is a widely used architecture in multi-agent systems. It has particularly proven its performance in intelligently modelling human behaviours, their reasoning, and their interactions [15]. Beliefs include the local information that the agent (i.e., vehicle) has about itself (e.g., its current speed, position, engine status, etc.) and its surrounding (e.g., road infrastructure, neighboring vehicles, and events of interest in the vicinity like announced obstacles/crashes). Beliefs also include a copy of the Blockchain containing the data belonging to the categories that the vehicle has access to. Beliefs could be true or false and are subject to change during the operation of the agent. Desires reflect the objectives or the situations that the agent would like to accomplish. Desires could be the sharing of given information or the acceptance/refusal to endorse a given vehicle. Intentions refer to the actions that the agent has chosen to execute. Figure 4. Belief–Desire–Intention (BDI) architecture for Blockchain vehicles. Sustainability 2020, 12, 7917 8 of 13 The basic operation of the agent is as follows: every vehicle will be always listening to beacons and communications from neighboring vehicles. Once new information is received, a Revision Function (RF) is executed in order to update its current beliefs. For example, if the temperature of the engine is reported to be high then the RF will update the status of the vehicle to “maintenance needed”. Based on the new beliefs, an Option Generation Function (OGF) is run to update the desires of the vehicle. For example, if the temperature of the engine has reached a worrying level then the agent will explore the possible options, like stopping the car and call for support, attending the first car-repair workshop, or calling the insurance company. The option of stopping the car may be inappropriate if the vehicle is currently located in a remote area at a night time. Here, for each possible action, the agent will calculate its related reward (if any), its communication cost, its priority, etc. Once the set of possible actions are identified, an Analysis Function (AF) is executed to elaborate and execute an action plan. The outputs of the actions are assessed and the intentions of the agent are updated accordingly. The new updates will be used by the RF for further actions. We explain this concept within the specific context of carrying out a transaction in the Blockchain (Figure 5). Figure 5. UML state-diagram for carrying out a transaction in the Blockchain. 5.2. Collaborative Endorsement Agent A may request agent B with a higher endorsing level to help in sharing sensitive information as explained in the previous section. A will select B based on its recorded trust. If B accepts the request of A then both agents will conclude an agreement according to which B will carry out the transaction on its name and share the reward with A. If the level of B is not enough to carry out the transaction then A and B may consider to create a Transaction Team (TT) and share the information on both names. A may also consider inviting additional trusted neighboring peers to join the TT. In this case, Sustainability 2020, 12, 7917 9 of 13 the members of the team will share the reward based on their levels. Sharing the reward could be done in several ways. In this paper, we use the following formula: Ri = WiciR ∑n j=1 Wjcj , (2) where Wi denote the weight of the level of the agent i, ci denote the contribution of the agent i in the consensus score (i.e., required score to carry out the transaction), and R is the total reward that will be obtained from sharing the information. 5.3. Promotion of Endorsers’ Levels As mentioned in Section 3, the participants in the Blockchain are classified into several levels. Higher endorsing levels will allow the corresponding vehicle to get higher priorities in carrying out transactions, obtaining higher trust levels, accessing more data with higher categories, etc. Joining higher endorsing levels is a right that a vehicle can claim or could obtain automatically. To upgrade a given endorsing level, the Blockchain will examine the history of transactions and contributions performed by the vehicle. This history is weighed based on its credibility as well as on its impact. For example, an information about an oil spill on a road section would save lives and avoid serious damages to vehicles. If this information is found to be useful to vehicles crossing this road section then its impact is high and the vehicle will be rewarded. Based on a predefined schedule (e.g., every month or after a specific number of transactions), the Blockchain will calculate the total reward obtained by the vehicle and convert them into a score. This score is added to the current score of the vehicle and a related h-index is generated. If the vehicle reaches an h-index sufficient enough for a given higher endorsing level then the Blockchain will automatically announce its promotion to that level. The vehicle can accept or refuse the promotion based on its own interest. The vehicle can also explicitly request to be promoted from the Blockchain based on its current contributions as well as based on recommendations obtained from endorsers with higher levels. To do the right calculations, the Blockchain will announce to the vehicles the scores that they must obtain to get promoted to the next levels. Announcements will be done when the Blockchain calculates the rewards of the vehicles. 6. Performance Evaluation To assess the performance of our solution, we used the Hyperledger Caliper software tool [19]. This tool can produce reports containing various performance indicators, including resource utilization, transactions per second, and transaction latency. We mainly focused on analyzing the transactions’ execution times. To this end, we ran our simulations within two scenarios: (1) by varying the number of vehicles in the Blockchain network; and (2) by varying the number of transactions while maintaining a fixed number of vehicles (Table 1). We ran our simulations for 80 s on a 2 km-long four-lane road section (two lanes in each direction). Table 1. Simulation parameters. Parameter Value Range of vehicle speeds 40 to 120 km/h Number of road lanes 4 (two in each direction) Road length 2 km Time of simulation tend = 80 s MAC IEEE 802.11b In the first scenario, the number of vehicles ranged from 50 to 250. We considered the scenario of sharing data about road traffic. The execution time was mainly spent on processing transactions, peer-to-peer communications, and updating the Blockchain ledger accordingly. According to our obtained results (reported in Figure 6), an average time of about 50 ms was needed to read one Sustainability 2020, 12, 7917 10 of 13 transaction in the Blockchain. This time was shorter than what was reported in several studies (e.g., [20]). We can particularly remark that the number of vehicles had limited effects on the processing time of transactions. Indeed, in contrast with the existing approaches where the vehicle should be endorsed by a number of peers that increases with the number of vehicles in the simulations, our solution keeps the number of endorsing entities limited as long as a minimum endorsing score is obtained. This is mainly enabled by our BDI agents that intelligently identify and communicate with the right peers to process the transactions. In the second scenario of our simulations, we report in Figure 7 the total execution times to process a varying number of transactions while fixing the number of vehicles to 250. As expected, processing more transactions increased the execution time. However, if we consider individual transactions, we can remark that the average execution time with our solution decreased. Indeed, when the number of transactions is equal to 50, the total time to process all the transactions is 4 s. The average time to process one transaction is, therefore, 0.08 s. However, for 250 transactions, the total execution time is 14 s and, hence, each transaction needs an average of 0.056 s to be executed. We explain this performance by the fact that the BDI agents did not need to repeat the same process of identifying and contacting peers to endorse their transactions. They, indeed, examined the transactions and followed the same procedures to carry out transactions involving similar data categories and requiring similar endorsing scores. Figure 6. Average execution time of each transaction by varying the number of vehicles. Figure 7. Execution time of processing all the transactions by varying the number of transactions. 7. Discussions We have implemented a new Blockchain-based solution using the Blockchain open-source platform: Hyperledger Fabric [21]. This platform has been reported as one of the most suitable platforms for the vehicular network [22]. It particularly allowed us to manage huge amounts data collected thanks on-board vehicle devices. Sustainability 2020, 12, 7917 11 of 13 Thanks to their on-board devices, vehicles are now capable of acquiring huge amounts of data. To make the best use of these data, vehicles must be capable of exchanging them securely and anonymously. However, sharing large volumes of data over the Blockchain will make it slower and more cumbersome. In order to address this issue, our solution includes intelligent mechanisms for selective communications. In fact, if an important change happens in the vehicle (e.g., engine crash), the agent will need to identify the required score to submit an urgent transaction to the Blockchain. If the vehicle is able to obtain this score thanks to its endorsement level then the transaction is submitted right away to the Blockchain. In the opposite case, the agent must identify and contact the appropriate group of endorsers that will help collect the expected score. The vehicle may have varying neighbors in time and space with various levels in the Blockchain. The agent must reuse its previous experience to make an optimum selection of the endorsers. It is sufficient for the agent to secure the bare minimum number of endorsers to collect the required score. Nevertheless, the agent would seek higher scores in the hope to obtain a higher priority for the processing of its transaction and/or to upgrade its level in the Blockchain (see Section 5.2). Upgrading this level is necessary and would motivate agents to share data through the Blockchain. Indeed, it may happen that the agent is attempting to carry out a transaction that includes sensitive data for which it does not have the required sharing rights (for example, a private vehicle may cross a criminal accident. It comes only to the police, but not to private cars, to announce that the driver is armed and dangerous). Three options are possible for the agent. In the first option, the agent will seek to collect the necessary consensus score to temporarily join the endorsing level that will allow for performing the transaction. In this case, the agent will run the same admission control process described in Section 3. In the second option, the agent will carry out a collaborative endorsement process (see Section 5.2). To execute the transaction with the first or the second options, we propose to allow the agent to record its mutual trust with the agents with whom it is dealing. This trust will particularly allow the agent to focus on exchanging with the right endorsing peers for the right transaction (e.g., the endorsing peers that will accept scoring requests). Communications with the Blockchain could, therefore, be reduced and response time for data sharing could be shortened. In the third option, the agent will submit the transaction to the Blockchain. The transaction will then be scheduled and processed based on the level of the agent as well as the priorities of any other transactions submitted to the Blockchain. In this case, the transaction may be delayed and the vehicle would not obtain the requested service at a convenient time. 8. Conclusions Several solutions have used Blockchain to enable increasingly voluminous data to be securely and anonymously exchanged within vehicular networks. However, due to the growing number of related transactions, the Blockchain endorsing processes have become slow and cumbersome. The existing approaches that have attempted to solve this issue are not flexible enough to speed up this process and allow the admission of new vehicles into the Blockchain within reasonable timeframes. In order to solve these challenges, we proposed in this paper a new Blockchain-based solution that intelligently implements selective communication and collaborative endorsement to reduce communications among vehicles. Our solution models the vehicles of the Blockchain as intelligent software agents with Belief–Desire–Intention (BDI) architecture. It also uses an approach based on multi-endorsement levels to exchange data of varying sensitive categories. According to our approach, it is sufficient for a vehicle to collect the bare minimum score to carry out a transaction through the appropriate endorsing level for its data. Furthermore, our approach uses scoring mechanisms to enable new vehicles to join the Blockchain. The same approach is enabling the vehicles of the Blockchain to get promoted to higher endorsing levels and thus increase their priorities in sharing data and reducing the duration of their endorsement processes. We simulated our solution within two basic scenarios and obtained encouraging results. Indeed, our initial performance measures reflect shorter transaction processing times as well as shorter times to admit new vehicles in the vehicular network Blockchain. As future works, we plan to improve the operation of our BDI agents Sustainability 2020, 12, 7917 12 of 13 as well as to enhance the implementation of our scoring mechanisms toward a better collaborative endorsement between vehicles. Another future work is to use IEEE 802.11p based on real-world measurements and radio propagation models of Vehicle-to-Vehicle (V2V) networks in different environments, including highway, rural, and urban areas. Author Contributions: The authors confirm contribution to the paper as follows: Study conception and design: B.M., and N.J. Data collection and validation: B.M. and N.J. Software, analysis and interpretation of results: B.M. Manuscript preparation, writing, and editing: B.M., N.J, T.P., and A.-U.-H.Y. All authors reviewed the results and approved the final version of the manuscript. Funding: This research received no external funding Acknowledgments: This research was supported by ERDF “CyberSecurity, CyberCrime and Critical Information Infrastructures Center of Excellence” (No. CZ.02.1.01/0.0/0.0/16 019/0000822). Conflicts of Interest: The authors declare no conflict of interest. References 1. Calvo, J.A.L.; Mathar, R. Secure blockchain-based communication scheme for connected vehicles. In Proceedings of the 2018 European Conference on Networks and Communications (EuCNC), Ljubljana, Slovenia, 18–21 June 2018; pp. 347–351. 2. Mbarek, B.; Jabeur, N.; Pitner, T.; Yasar, A.-U.H. MBS: Multilevel blockchain system for IoT. Pers. Ubiquitous Comput. 2019, 1–8. [CrossRef] 3. Shrestha, R.; Bajracharya, R.; Shrestha, A.P.; Nam, S.Y. A new type of blockchain for secure message exchange in VANET. Digit. Commun. Netw. 2020, 6, 177–186. [CrossRef] 4. Li, L.; Liu, J.; Cheng, L.; Qiu, S.; Wang, W.; Zhang, X.; Zhang, Z. Creditcoin: A privacy-preserving blockchain-based incentive announcement network for communications of smart vehicles. IEEE Trans. Intell. Transp. Syst. 2018, 19, 2204–2220. [CrossRef] 5. Singh, M.; Kim, S. Introduce reward-based intelligent vehicles communication using blockchain. In Proceedings of the 2017 International SoC Design Conference (ISOCC), Seoul, Korea, 5–8 November 2017; pp. 15–16. 6. Sharma, P.K.; Moon, S.Y.; Park, J.H. Block-VN: A distributed Blockchain based vehicular network architecture in smart city. J. Inf. Process. Syst. 2017, 13. 7. Dorri, A.; Steger, M.; Kanhere, S.S.; Jurdak, R. Blockchain: A distributed solution to automotive security and privacy. IEEE Commun. Mag. 2017, 55, 119–125. [CrossRef] 8. Chuang, M.C.; Lee, J.F. TEAM: Trust-extended authentication mechanism for vehicular ad hoc networks. IEEE Syst. J. 2013, 8, 749–758. [CrossRef] 9. Cebe, M.; Erdin, E.; Akkaya, K.; Aksu, H.; Uluagac, S. Block4forensic: An integrated lightweight blockchain framework for forensics applications of connected vehicles. IEEE Commun. Mag. 2018, 56, 50–57. [CrossRef] 10. Lei, A.; Cruickshank, H.; Cao, Y.; Asuquo, P.; Ogah, C.P.A.; Sun, Z. Blockchain-based dynamic key management for heterogeneous intelligent transportation systems. IEEE Internet Things J. 2017, 4, 1832–1843. [CrossRef] 11. Fujihara, A. Proposing a system for collaborative traffic information gathering and sharing incentivized by blockchain technology. In Proceedings of the International Conference on Intelligent Networking and Collaborative Systems, Bratislava, Slovakia, 5–7 September 2018; Springer: Berlin/Heidelberg, Germany, 2018; pp. 170–182. 12. Prashar, D.; Jha, N.; Jha, S.; Joshi, G.P.; Seo, C. Integrating IoT and Blockchain for Ensuring Road Safety: An Unconventional Approach. Sensors 2020, 20, 3296. [CrossRef] [PubMed] 13. Rowan, S.; Clear, M.; Gerla, M.; Huggard, M.; Goldrick, C.M. Securing vehicle to vehicle communications using blockchain through visible light and acoustic side-channels. arXiv 2017, arXiv:1704.02553. 14. Awais Hassan, M.; Habiba, U.; Ghani, U.; Shoaib, M. A secure message-passing framework for inter-vehicular communication using blockchain. Int. J. Distrib. Sens. Netw. 2019, 15, 1550147719829677. [CrossRef] 15. Thomson, A.M.; Perry, J.L.; Miller, T.K. Conceptualizing and measuring collaboration. J. Public Adm. Res. Theory 2009, 19, 23–56. [CrossRef] Sustainability 2020, 12, 7917 13 of 13 16. Jamshaid, J.; Javaid, N. A Distributed Blockchain based Decentralized Trust Management Vehicular Network in Smart City. 2019. Available online: https://www.researchgate.net/publication/334696720_ A_Distributed_Blockchain_based_Decentralized_Trust_Management_Vehicular_Network_in_Smart_City (accessed on 15 August 2020). 17. Khan, A.S.; Balan, K.; Javed, Y.; Tarmizi, S.; Abdullah, J. Secure Trust-Based Blockchain Architecture to Prevent Attacks in VANET. Sensors 2019, 19, 4954. [CrossRef] [PubMed] 18. Xie, L.; Ding, Y.; Yang, H.; Wang, X. Blockchain-based secure and trustworthy Internet of Things in SDN-enabled 5G-VANETs. IEEE Access 2019, 7, 56656–56666. [CrossRef] 19. Sukhwani, H.; Wang, N.; Trivedi, K.S.; Rindos, A. Performance modeling of hyperledger fabric (permissioned blockchain network). In Proceedings of the 2018 IEEE 17th International Symposium on Network Computing and Applications (NCA), Cambridge, MA, USA, 1–3 November 2018; pp. 1–8. 20. Li, W.; Nejad, M.; Zhang, R. A blockchain-based architecture for traffic signal control systems. In Proceedings of the 2019 IEEE International Congress on Internet of Things (ICIOT), Milan, Italy, 8–13 July 2019; pp. 33–40. 21. Hyperledger. Hyperledger Fabric, 2019. Available online: https://www.hyperledger.org/ (accessed on 15 August 2020). 22. Yu, Y.; Guo, Y.; Min, W.; Zeng, F. Trusted Transactions in Micro-Grid Based on Blockchain. Energies 2019, 12, 1952. [CrossRef] © 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).