# OpticalTrust: A Sensor-to-Blockchain Framework Using Free-Space Optical Communication
## 4 Results and Discussion
### Blockchain  
To evaluate the blockchain network, three different scenarios are considered: default, optimized, and congested networks. Table 4 presents the parameters used to simulate the network under different techniques. The random delays are represented as base_time + U(0, 1), base_time + U(0, 0.5), and base_time + U(1, 3) for default, optimized, and congested scenarios, respectively. The comparative analysis of system performance across default, congested, and optimized scenarios reveals significant insights into the system's behavior under varying operational conditions. In the default scenario in Figure 3, the system demonstrates a baseline performance with average upload and download times of 0.52 and 0.53 s, respectively, indicating a balanced handling of bidirectional data transfer. The average bandwidth utilization in this configuration is 0.10 MB/s, with a throughput of 1.91 images per second, establishing a reference point for subsequent comparisons. Under congested conditions in Figure 4, the system exhibits severe performance degradation across all metrics. Upload and download times increase dramatically to 2.09 and 2.03 s, respectively, representing an approximate fourfold increase from the default scenario. This degradation is further evidenced by a significant reduction in average bandwidth to 0.02 MB/s and a concomitant decrease in throughput to 0.49 images per second. These metrics collectively underscore the system's vulnerability to high-load situations and highlight the critical impact of network congestion on overall system efficiency. The optimized scenario in Figure 5, in contrast, demonstrates marked improvements across all performance indicators. Upload and download times are reduced to 0.29 and 0.25 s, respectively, signifying a substantial enhancement over both the default and congested scenarios. This optimization extends to bandwidth utilization, which increases to 0.15 MB/s, representing a 50% improvement over the default configuration. The most notable enhancement is observed in throughput, which rises to 3.71 images per second, nearly doubling the performance of the default scenario. It is noteworthy that the average file size remains constant at 31.54 KB across all scenarios, providing a consistent baseline for inter-scenario comparisons. This constancy in file size allows for a more direct attribution of performance variations to the differences in system configurations and network conditions, rather than fluctuations in data volume. Comparing these scenarios reveals several key insights into the system's behavior and the efficacy of the implemented optimization strategies, as shown in Figure 6. Firstly, the severe performance degradation observed in the congested scenario underscores the critical necessity for robust congestion management mechanisms in maintaining system reliability under high-load conditions. Secondly, the substantial improvements evidenced in the optimized scenario across all metrics--particularly in upload and download times, bandwidth utilization, and throughput--validate the effectiveness of the employed optimization techniques. Furthermore, the optimization efforts appear to have engendered a more balanced system performance, as evidenced by the convergence of upload and download times in the optimized scenario. This balance suggests a more equitable allocation of system resources and a potential mitigation of the asymmetry observed in the default configuration. \begin{table}
\begin{tabular}{l c c c} \hline \hline
**Parameter** & **Default** & **Optimized** & **Congested** \\ \hline Network Delay & base\_time + U(0, 1) & base\_time + U(0, 0.5) & base\_time + U(1, 3) \\ \hline Packet Loss & 5\% & 1\% & 10\% \\ \hline Bandwidth & 5 MB/s & 10 MB/s & 1 MB/s \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Network simulation parameters for different techniques. Figure 3: Network simulation on default scenario. Figure 4: Network simulation on congested scenario. Figure 5: Network simulation on optimized scenario.