# Towards an Optimized Blockchain-Based Secure Medical Prescription-Management System
## 5 Experimental Results
### Performance Analysis  
After studying the energy consumption and obtaining better results with the QBFT consensus algorithm, one other crucial aspect that warrants further investigation is the scalability issue. Specifically, it is imperative to study the impact of scaling up the system and increasing the number of nodes on the DApp performances. Accurately assessing and evaluating the performance of a blockchain network relies heavily on the utilization of specific metrics [28; 29]. In this paper, our focus lies in evaluating the Quorum blockchain network operating under the QBFT consensus mechanism focusing on the following metrics:  
Figure 9: Energy consumption (measured in watts) according to the number of function parameters in Quorum blockchain. * Transaction throughput: This metric measures the number of transactions the blockchain can process per second (tps). Higher throughput indicates better performance and scalability. * Latency: This refers to the time it takes for a transaction to be propagated across the network and confirmed. Lower latency is desirable for time-sensitive applications. To achieve this, we utilized the Hyperledger Caliper tool [30]. Specifically, we made use of a customized version of the Caliper tool, designed to be compatible with the Quorum blockchain since Quorum is not yet supported as a System Under Test [31]. On the other side, we opted for the most commonly used functions in the system to execute the experiments. Table 3 shows the details of the selected functions. The addPresc() and updatePresc() functions are the most invoked by the blockchain network in real-word applications. We conducted a comprehensive evaluation of these selected functions by performing a series of experiments within Quorum networks of varying sizes. The experimentation involved three distinct network configurations, specifically 5 nodes, 10 nodes, and 20 nodes, each utilizing the Quorum Byzantine fault tolerance (QBFT) consensus algorithm. To carry out the experiments, we executed the chosen functions under different send rates (25, 50, 75, 100, and 200), ensuring a wide range of data points to assess system performance comprehensively. All the experiments were conducted on the same machine with 16 CPUs (two sockets with 8 CPUs per socket running one thread each) and 32 GB of RAM. Finally, a Ubuntu 20.04.4 LTS was installed on this machine. Throughout the experiments, we recorded the throughput results of the selected functions within the 5-node, 10-node, and 20-node networks. These results are shown in Figure 10. The throughput results of the functions addPresc() and updatePresc() are depicted in Figure 10a and 10b, respectively. The curves of the studied functions exhibit a comparable pattern and network behavior with better results for the function updatePresc(). This can be explained by the fact that the function addPresc() has more string parameters, which might require additional processing and a longer computation time. On the other side, both functions demonstrate that the throughput is higher in blockchain networks with fewer nodes due to the smaller number of voters compared to larger networks. This can be attributed to the reduced complexity and overhead in \begin{table}
\begin{tabular}{l l} \hline \hline
**Function** & **Parameters** \\ \hline addPresc() & uint256 prescRef, string memory PatientName, \\  & string memory DrName, string memory DrCity, uint TotDrugs, uint[] \\  & memory drugsRef, uint[] memory Qtt,uint[] memory Qts, issueDate \\ \hline updatePresc() & uint256 prescRef,uint256 drugRef,uint256 newServedQ, \\ \hline getPresc() & uint256 prescRef \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Details of the studied functions. Figure 10: Effect of send rate on throughput. blockchain networks with fewer nodes. Since the number of voters, which participate in the QBFT consensus process (2/3 of the total voters), is smaller in these networks, the coordination and agreement among nodes are achieved more swiftly.