## 4 Experiments and Results: Performance Analysis
### Experimental Methodology: ns-3 Simulations
This number was sufficient to examine network behaviors, such as node interaction, data propagation, and congestion effects, without overwhelming computational resources. Data Packet Size: The size of data or user requests was set to 512 bytes, thereby reflecting typical communication packets in VANETs. This size is representative of various vehicular communication scenarios ranging from simple status updates to more complex data exchanges. Physical Layer and Transmission Range: The simulation utilized the PHY 802.11p standard, which was tailored for vehicular environments. A transmission range of 250 m was chosen to represent realistic vehicular communication distances, thereby accounting for urban infrastructures and potential obstructions. Node Mobility Speed: The speed of the nodes was varied between 10 to 30 m/s to simulate different driving conditions, such as city driving and highway travel. This variability was crucial to understanding the system's performance in diverse mobility scenarios. Simulation Time: The duration of each simulation run was set to 300 s, thereby providing adequate time to observe and analyze the network's response to various events and interactions. By integrating these parameters, our simulation aimed to provide a holistic and realistic assessment of the proposed architecture's performance in a VANET environment. This setup allowed us to thoroughly analyze the robustness, efficiency, and scalability of the dual-layer blockchain architecture under different traffic conditions and vehicular dynamics. To rigorously test the efficacy of our proposal, we meticulously developed simulation scripts in Python. This programming language was selected for its versatility and powerful capabilities, especially when combined with the ns-3 simulator via Python bindings [83; 85]. This integration enabled us to design a variety of complex simulation scenarios, which was tailored to explore every facet of our proposed VANET architecture. The use of Python also afforded us access to its extensive suite of data analysis and visualization libraries, such as NumPy, Pandas, and Matplotlib. These tools were instrumental in conducting a thorough analysis of our simulation data, thereby allowing us to generate insightful and visually \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline Grid Dimension & 5000 m \(\times\) 5000 m \\ Number of Nodes in VANET & 50, 500 \\ Size of Data or User Request & 512 Bytes \\ Physical Layer & PHY 802.11p \\ Transmission Range & 250 m \\ Node Speed & 10–30 m/s \\ Simulation Time & 300 s \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Simulation parameters for VANET. compelling representations of the network's performance under various conditions. The simulation environment was set up across multiple virtual machines (VMs) to emulate different network densities and operational scenarios within the VANET. Each VM hosted a specific configuration of nodes, including a distinct number of compromised nodes and miners, to simulate varied and realistic network environments (see Table 2). This setup enabled us to assess the resilience of our architecture against diverse security threats and operational challenges. To further enhance the realism of our simulations, we incorporated various probabilities to reflect the likelihood of malicious node addition and compromised nodes (see Table 3). These probabilities were carefully calibrated to mimic real-world scenarios where VANETs may be exposed to cybersecurity threats. The application of these probabilities within our simulations allowed us to observe and analyze the network's response to these adversarial conditions. The diverse scenarios and network conditions tested helped to establish a comprehensive understanding of the proposed technology's capabilities in mitigating security threats in VANETs.