## 1 Introduction  
With the drastic advancements made during the last few years, the number of smart vehicles has increased manifold. These smart vehicles come together and establish a Vehicular Network (VN), which serves various purposes, such as traffic regulation, prevention of accidents and critical message sharing between vehicles [1]. Nowadays, electric car manufacturers are developing autonomous vehicles equipped with a number of different functionalities like cruise control, intelligent decision making, auto pilot driving modes, etc. According to some studies, the market size of autonomous vehicles will increase tenfold and the market value will grow from $54.23 billion to $555.67 billion in near future [2]. Smart vehicles are equipped with different sensors and wireless communication modules that allow vehicles to sense various information, such as road conditions, traffic rates, accident reports, etc. This sensory information is shared with other smart vehicles and Road Side Units (RSUs) and is known as Vehicle-to-Vehicle (V2V) communication and Vehicle-to-Road-Side-Unit (V2R) communication, respectively. During the last few years, smart vehicles have gained much popularity due to their excellent features and capabilities. The huge increase in the number of smart vehicles leads to the generation of huge amount of real-time sensory data, which become quite difficult to handle as the time progresses. To store this huge data in a secured manner, a secure communication channel is required. The traditional centralized systems lack in providing required functionalities. Therefore, to overcome the above mentioned limitations, there is a need for a decentralized architecture that fulfills the VN's requirements. However, decentralized systems still face some issues like lack of security and privacy, lack of trust, etc.  
To provide security, ensure privacy and establish trust between entities, blockchain technology was introduced by [PERSON] in 2008 [3]. It is an increasing list of records, stored in the form of blocks, which are joined together in a chronological order to form a chain using cryptographic hashes. Each block contains multiple components, such as a cryptographic hash of the previous block, timestamp at which block is generated, transaction data in the form of Merkle root tree and nonce, which is an arbitrary number used for mining process. The basic structure of the block is shown in Figure 1. With the invention of blockchain, limitations of centralized architecture are eliminated. Blockchain ensures security, privacy preservation, decentralized architecture and data integrity. Due to the excellent features of blockchain, it is being used in various fields of life like Internet-of-Things (IoT) [4], smart grids [5], VNs, etc. Secure data sharing among smart vehicles is also made possible because of blockchain technology. Existing blockchain systems are designed for resource-efficient devices.  
This research work is an extension of [6]. In this paper, a secure blockchain-based data sharing architecture is proposed for VNs. Each ordinary vehicle communicates with edge node vehicle for the required service. There are predefined service charges against each service. Whenever an ordinary node requests for a service, a predefined amount is deducted from its account. For the storage of data generated by vehicles, a distributed data storage mechanism is used. For each vehicle, the trust value is calculated to determine the reputation of each vehicle. Crypto ID is assigned to each vehicle for the reduction of malicious activities in the network. The reputation values of vehicles are stored in blockchain against their respective IDs.  
Figure 1: Basic Structure of Block.