# Hash-Chain-Based Cross-Regional Safety Authentication for Space-Air-Ground Integrated VANETs +
## 5 Experiment
### Hash-Chain-Based Vehicle Cross-Regional Authentication Simulation
#### 5.2.2 Distributed Network Based on the PBFT Consensus  
For the PBFT consensus algorithm, when the transaction is initiated, the broadcast message step is gradually performed, and two organizations are still used. Initially set two order nodes and progressively increase, the remaining parameters are consistent with Kafka consensus settings. The experimental delay data in _ms_ of the PBFT consensus algorithm is shown in Table 3.  
\begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline \multirow{2}{*}{**Number of Nodes**} & \multicolumn{8}{c}{**Number of Transactions**} \\ \cline{2-9}  & **10** & **20** & **50** & **100** & **150** & **200** & **250** & **300** \\ \hline
4 & 26.356 & 25.342 & 27.708 & **33.708** & 25.53 & **31.881** & 26.511 & **34.902** \\
6 & 27.138 & 26.241 & 25.908 & **34.331** & 25.866 & **33.241** & 28.186 & **33.98** \\
8 & 27.202 & 25.313 & 26.464 & **36.392** & 25.957 & **36.395** & 25.267 & **36.191** \\
10 & 27.317 & 26.541 & 26.457 & **37.045** & 26.757 & **37.425** & 26.847 & **36.754** \\
12 & 26.15 & 26.952 & 26.796 & **38.281** & 28.26 & **38.434** & 27.461 & **40.098** \\ \hline \hline \end{tabular}
\end{table}
Table 2: Delay based on the [PERSON] consensus algorithm.  
\begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline \multirow{2}{*}{**Number of Nodes**} & \multicolumn{8}{c}{**Number of Transactions**} \\ \cline{2-9}  & **10** & **20** & **50** & **100** & **150** & **200** & **250** & **300** \\ \hline
4 & 24.778 & 25.53 & 26.942 & **31.318** & 25.733 & **30.238** & 27.42 & **29.311** \\
6 & 25.305 & 25.27 & 26.511 & **34.866** & 25.981 & **33.238** & 28.902 & **36.238** \\
8 & 28.181 & 26.15 & 26.952 & **41.434** & 26.066 & **41.216** & 28.864 & **42.271** \\ \hline \hline \end{tabular}
\end{table}
Table 3: Delay based on the PBFT consensus algorithm.  
Due to the limitation of the experimental simulation server device, when the number of nodes exceeds 8, the server memory overflows, and the system crashes. Therefore, we introduce the memory ratio parameter and used cloud server devices with a total memory space of 8 GB to conduct simulation experiments. As the number of nodes increases, the change in memory ratio is shown in Table 4.  
As can be seen from the data in the table above, for the Kafka consensus algorithm, as the number of nodes increases, the memory ratio changes less, and the load on the network is smaller. However, for the PBFT consensus, as the number of nodes increases, the proportion of memory increases exponentially. When the number of nodes reaches 8, the percentage of memory is limited to 80% due to server configuration restrictions. The stage with the highest proportion is committing, which makes the system unable to simulate more nodes. Furthermore, when the number of nodes is small, such as four nodes, the efficiency of PBFT is higher than that of Kafka. However, as the number of nodes increases, PBFT loses this advantage. After averaging the above two consensus simulation results, the average delay of a single transaction generated block is compared. The result is shown in Figure 10.