## 4 Implementation and Discussion
### Blockchain Performance Results  
The four main functions of the smart contracts that make up the proposed system are as follows: Deployment, EntityRegistration(0), AuthenticationMessageUploading(0), and AuthenticationMessageAccessing(). The Ethereum blockchain platform compiles and deploys these contracts, determining how much gas is needed for each operation. Table 7 presents the basic gas consumption for each smart contract operation in our proposed system. To calculate the basic gas consumption, first, one user registered and then uploaded an authentication message to the block of the blockchain. After that, another user accessed this authentication message from the block. To do so, the gas values for every operation were calculated. The experimental results indicate that, out of these four basic operations, the maximum gas usage for the Deployment operation is GWEI 1,145,042, significantly lower than the block gas limit of GWEI 6,721,975, demonstrating the practicality of our system. The transaction costs in Ethereum correlate with gas prices, with a baseline of GWEI 1 equating to \(10^{-9}\) Ether. Throughout the analysis period, on 10 February 2024, the Ethereum to US dollar exchange rate stood at 1 Ether = USD 2487.23. Initially, the smart contract's deployment cost is approximated. This preliminary cost is essential for system initialization. Following this, the costs of execution for various smart contract operations are computed. The corresponding transaction cost of basic gas consumption by the system is also listed in Table 7. This analysis demonstrates that the proposed strategy is practical for real-world implementation, considering the system's transaction costs [44]. We also analyzed the impact of the quantity of vehicles on the system's gas values. In this study, we varied the number of vehicles from 1 to 200 and calculated the corresponding gas values for several operations. Increasing the number of vehicles means more authentication messages must be stored in the blockchain block, affecting the gas values for the Deployment and AuthenticationMessageUploading(0) operations, as these two oper \begin{table}
\begin{tabular}{l l l l} \hline \hline \multirow{2}{*}{**Operation**} & **Gas Consumption** & \multirow{2}{*}{**Tx Cost (Ether)**} & **Tx Cost (in** \\  & **(GWEI)** & & **USD)** \\ \hline Deployment & 1,145,042 & 0.001145 & 2.8478 \\ \hline EntityRegistration() & 112,223 & 0.000112 & 0.2785 \\ \hline AuthenticationMessageUploading() & 29,733 & 0.000029 & 0.0721 \\ \hline AuthenticationMessageAccessing() & 27,208 & 0.000027 & 0.0671 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: The gas used for several operations of smart contracts. Figure 10: Signalling overhead. ations depend on the number of authentication messages. Figure 11 depicts this variance by showing that when the number of vehicles grows from 1 to 200, the gas value increases linearly. The study also highlighted the system's practicality, with the highest required gas value being GWEI 3,270,774 to execute the Deployment operation for 200 vehicles, which is well below the block's maximum gas limit of GWEI 6,721,975. The overall message size is crucial for effective message transfer communication in the VANET system. However, the size of an authentication message in a VANET system varies depending on the authentication protocol used. In general, the message size can range from hundreds of bytes to a few kilobytes, depending on the cryptographic algorithm, security features, and the specific VANET application. In [45], the authors used the message size ranges from 50 to 1200 bytes for secure messaging in the VANET system. In our study, we used the authentication message size of 32 bytes (without encryption), and we achieved an authentication message size of 48 bytes (after executing AES-128 encryption). The Ethereum blockchain regulates the size of blocks using the concept of gas, which calculates the amount of memory and processing time required for a transaction.