# Secure Trust-Based Blockchain Architecture to Prevent Attacks in VANET
## 5 Simulation Tool and Set-Up
### Selection of Simulation Tool  
The selection of a network communication simulator is highly crucial when it comes to potentially transmitting several messages per second when simulating a VANET environment with a large number of vehicles. The first assumption about the automobiles in the network was that every vehicle is able to communicate with other entities either by V2V and V2I communications that can associate with the internet connectivity perfectly [39]. Every automobile was assumed to be equipped with three important components, called the OBUs, sensors, and GPS. A total of 10 RSUs were spread over 1 km radius [40]. The total number of RSUs that were malicious were considered to be less than the number of non-malicious RSUs that were placed alongside the roadway in a network. A genesis block was able to create and start a blockchain based on local events if it was an RSU that was legitimate and the certificate authority (CA) was a trusted entity. Besides this, the participating automobiles were assumed to be able to handle high computing power and have a high trust level which was also considered a complete vehicular node that could take part in the mining process. In addition, the malicious vehicles could not outrun the number of total vehicles in the network, since it had not much capacity to compromise more than one to the ratio of two. Another assumption taken into consideration was that a received signal strength indicator (RSSI) is included together with the critical event messages in a specific geographical location [41]. The unencrypted critical messages were also available to other neighboring automobiles in real time and the timers of all the nodes were synchronized. Lastly, a total of 15 event messages was required to confirm a new event that was reported through the critical messaging to testify an event to be truthful.  
Veins was chosen as the simulation tool for this study due to the following features: online re-configuration and re-routing of vehicles in reaction to network simulator, fully-detailed models of IEEE 802.11p and IEEE 1609.4 dedicated short-range communications/wireless access in vehicular environments (DSRC/WAVE) network layers, supporting the realistic map and traffic scenario, user friendliness, and the ability to interconnect. The Veins hybrid simulator was chosen in order to achieve the bidirectional coupled simulation, with benefits from state-of-the-art simulation techniques of both the network simulation and the road traffic micro simulation domains. In Veins, objective modular network testbed in C++ (OMNeT++) works as the network simulator and simulation of urban mobility (SUMO), on the other hand, acts as the road traffic simulator. The traffic control interface (TraCI) integrated both SUMO and OMNeT++ to provide a transmission control protocol (TCP) connection between the simulators. A real time communication between the network simulation module and road traffic simulation module could be generated in Veins. Besides this, the network simulation module was able to influence the road traffic simulation module.