Research on Performance Optimization and Application in Smart Home for Hyperledger Fabric
Abstract
:1. Introduction
2. Related Works
3. Discussion of Performance in Fabric
- Endorsement stage
- 2.
- Ordering stage
- 3.
- Committing stage
3.1. Key Factors
- Endorsement Stage
- Complexity of algorithm: As the signature follows the entire Fabric process, the algorithm complexity of the signature directly influences the efficiency of the endorsement.
- Complexity of endorsement: The endorsement strategy specifies how many endorsers participated in the endorsement process. The more endorsers engage in the process, the longer the processing delay.
- Performance of database: In this stage, the endorser needs to query the state database and simulate the execution of transactions. The performance of the state database directly impacts endorsement efficiency.
- The consistency of ledger: The consistency of the ledger in different endorsers determines the validation of the endorsement responses. If they are inconsistent with each other, the re-endorsement is needed.
- The processing mode of transaction: The processing mode of endorsement responses affect the efficiency of the endorsement stage. Whether the endorsement request is processed in parallel or serially results in different influences on performance.
- The system performance: The peers with high CPU and big memory have faster processing efficiency.
- 2.
- Ordering Stage
- Complexity of algorithm: Similar to the endorsement process, after receiving the ordering request, the orderer needs to verify the validity of the signature. Therefore, the complexity of the signature algorithm directly influences the performance.
- Size of message: After receiving the client’s request, the orderer needs to order all of the proposals globally. Actually, the orderer receives ordering requests from multiple clients at the same time. Therefore, the size of the proposal message will impact the ordering efficiency. Obviously, the smaller the message, the quicker the ordering.
- Ordering mechanism: Different ordering mechanisms have different effects on the ordering results and efficiency.
- The rate of block generation: The rate of block generation influences the performance of the system. If the time interval between block generations is too short, it may cause system congestion. And if the time interval is too long, it will cause waste of idle system resources. Intervals that are too long or too short can affect system performance.
- Block broadcast strategy: When the orderer broadcasts the packaged blocks to the committers, different broadcast strategies (for example, real-time broadcast, set threshold batch broadcast) also have an impact on the processing.
- Range of block broadcast: The orderer broadcasts a block to the committers in the system. The larger the broadcast range, the longer the delay.
- Protocol of block broadcast: The protocol of block broadcasting also impacts the efficiency.
- 3.
- Committing Stage
- Complexity of algorithm: After receiving the blocks, the committer firstly verifies the signature. Therefore, the complexity of the signature algorithm directly influences the efficiency.
- The size of block: The size of the block itself and the number of transactions contained in it determine the workload of the committer. The larger the blocks, the longer the processing delay.
- Performance of database: When verifying the transaction, the committer needs to access the local ledger database. The performance of the database seriously influences the processing efficiency.
- The mechanism of verification: In the committing stage, the mechanism of transaction verification greatly determines the workload and efficiency of the committers. Specifically, when the committer needs to verify all of the transactions in blocks, parallel or serial verification processing have different influences on the Fabric performance.
- 4.
- Discussion
3.2. Existing Solutions
- Endorsement Stage
- 2.
- Ordering Stage
- 3.
- Committing Stage
3.3. New Proposals
- Endorsement Stage
- (a)
- Verify authority firstly, then uniqueness.
- (b)
- Merging two queries from the local database into one.
- 2.
- Ordering Stage
- T1: the top one without read set and the transaction of T1 is marked as valid.
- T2: the transaction is invalid, because T1 has changed k1.
- T3: without read set, marked valid directly.
- T4: the transaction is invalid, because it reads k2 but the T1 has changed k2.
- T5: the transaction is valid, because it reads k5 and k5 without being modified by other transactions.
- (a)
- Optimize the ordering mechanism based on the read-write set of the transaction.
- First read then write: the transaction with the read set is ordered before the write set;
- Write last: the transaction with only the write set is ordered last.
- (b)
- First confliction detecting then ordering.
- 3.
- Committing Stage
- In Fabric, the committers need to verify all transactions in a new block. For example, if there are N committers and 10 transactions in each block, these need to be verified times for each block. This method is a waste of resources and influences the performance of Fabric.
- After finishing the verification, each of the committers needs to write the local ledger and update the local state database. Repeated storage consumes a lot of resources and the synchronization of different ledger files is also a problem.
- (a)
- Transaction grouping verification
- (b)
- Splitting the ledger
- (c)
- Merging one Ledger
- 4.
- Evaluation
4. Design of Smart Home Security Control System Based on Fabric
4.1. System Architecture
4.2. Access Control
- Registering:
- Step 1: Manufacturers subscribe the device with its certificate for the smart home gateway. If there is no certificate for the device, the manufacturer needs to apply for one from the CA agency (Step 0). For this registering, the certificate and configuration information of smart home devices are necessary.
- Step 2: After receiving the registration request, the security smart home gateway implements certificate authentication by interacting with CA.
- Step 3: After successful authentication, the security smart home gateway writes the certificate and configuration information of the device on the chain. With the detailed process of writing, it needs to go through the endorsement, ordering and committing of other smart home gateways in the network.
- Step 4: After completing the registration, the manufacturer loads the certificate into the device. This certificate is used for accessing the smart home system.
- 2.
- Access control:
- Step 1: After installing and deploying, the smart home device initiates a primary accessing request to the security smart home gateway with its certificate.
- Step 2: When receiving the device’s accessing request, the security smart home gateway obtains the device’s certificate from the local ledger.
- Step 3: The security smart home gateway implements the accessing control by comparing the two certificates. Once the certificate submitted by the smart device is inconsistent with the one stored in the local ledger, the device is not allowed to access the smart home system.
- Step 4: If it succeed, the smart device is allowed to connect.
4.3. Security Control
- Step 1: During the operating processing, the security smart home gateway initiates integrity verification irregularly, and requests the current key information of the smart home device.
- Step 2: The smart home device responds to the request and submits the current configuration and port opening information.
- Step 3: After receiving the response, the security smart home gateway downloads the benchmark configuration information from the local ledger, which is written in Fabric when the device is registered.
- Step 4: The security smart home gateway compares the two pieces of information and makes a decision, whether access should continue or not.
- Step 5: For devices where the configuration information has not been modified, they are allowed to access the system continually. If not, the device’s connection will be immediately interrupted and reported to the system administrator and users.
5. Experimental Results
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Conflicts of Interest
References
- Yin, M.; Malkhi, D.; Reiter, M.K.; Gueta, G.G.; Abraham, I. HotStuff: BFT consensus in the lens of blockchain. arXiv 2018, arXiv:1803.05069. [Google Scholar]
- Pissadaki, E.; Varshney, K.R.; Raman, R.K.; Vaculín, R.; Srivastava, B. Trusted multi-party computation and verifiable simulations: A scalable blockchain approach. arXiv 2018, arXiv:1809.08438. [Google Scholar]
- Hyperledger Fabric. Available online: https://www.hyperledger.org/projects/fabric (accessed on 15 July 2021).
- Tu, Z.; Zhou, H.; Li, K.; Li, G. DCTG: Degree constrained topology generation algorithm for software-defined satellite network. J. Internet Serv. Inf. Secur. 2019, 9, 49–58. [Google Scholar]
- Shih, C.; Hsieh, W.; Kao, C. Traceability for vehicular network real-time messaging based on blockchain technology. J. Wirel. Mob. Netw. Ubiquitous Comput. Dependable Appl. 2019, 10, 1–21. [Google Scholar]
- Hyperledger Caliper. Available online: https://www.hyperledger.org/projects/caliper (accessed on 15 July 2021).
- Pongnumkul, S.; Siripanpornchana, C.; Thajchayapong, S. Performance analysis of private blockchain platforms in varying workloads, 2017. In Proceedings of the 26th International Conference on Computer Communication and Networks (ICCCN), 2017, Vancouver, BC, Canada, 31 July–3 August 2017. [Google Scholar]
- Baliga, A.; Solanki, N.; Verekar, S.; Pednekar, A.; Chatterjee, S. Performance characterization of hyperledger fabric. In Proceedings of the 2018 Crypto Valley Conference on Blockchain Technology (CVCBT), Zug, Switzerland, 20–22 June 2018. [Google Scholar]
- Nasir, Q.; Qasse, I.A.; Abu Talib, M.; Nassif, A.B. Performance analysis of hyperledger fabric platforms. Secur. Commun. Netw. 2018, 2018, 3976093. [Google Scholar] [CrossRef] [Green Version]
- Bergman, S.; Asplund, M.; Tehrani, S.N. Permissioned blockchains and distributed databases: A performance study. Concurr. Comput. Pract. Exp. 2019, 32, e5227. [Google Scholar] [CrossRef]
- Vukoli, M. The quest for scalable blockchain fabric: Proof-of-work vs. BFT replication. In Proceedings of the International Workshop on Open Problems in Network Security, Zurich, Switzerland, 29 October 2015. [Google Scholar]
- Bessani, A.; Sousa, J.; Vukoli, M. A byzantine fault-tolerant ordering service for the hyperledger fabric blockchain platform. In Proceedings of the 2018 48th Annual IEEE/IFIP International Conference on Dependable Systems and Networks (DSN), Luxembourg, 25–28 June 2018. [Google Scholar]
- Misra, S. A step by step guide for choosing project topics and writing research papers in ICT related disciplines. In Proceedings of the Information and Communication Technology and Applications, Third International Conference, ICTA 2020, Minna, Nigeria, 24–27 November 2020. Revised Selected Papers. [Google Scholar]
- Liao, K. Design of the Secure Smart Home System Based on the Blockchain and Cloud Service. Wirel. Commun. Mob. Comput. 2022, 2022, 4393314. [Google Scholar] [CrossRef]
- Ammi, M.; Alarabi, S.; Benkhelifa, E. Customized blockchain-based architecture for secure smart home for lightweight IoT. Inf. Process. Manag. 2021, 58, 102482. [Google Scholar] [CrossRef]
- Zhang, W.; Yan, H. A blockchain-based access control scheme for smart home. J. Phys. Conf. Ser. 2022, 1971, 012049. [Google Scholar] [CrossRef]
- Mukherjee, A.; Balachandra, M.; Pujari, C.; Tiwari, S.; Nayar, A.; Payyavula, S.R. Unified smart home resource access along with authentication using Blockchain technology. Glob. Transit. Proc. 2021, 2, 29–34. [Google Scholar] [CrossRef]
- Kwon, M.; Yu, H. Performance improvement of ordering and endorsement phase in hyperledger fabric. In Proceedings of the 2019 Sixth International Conference on Internet of Things: Systems, Management and Security (IOTSMS), Granada, Spain, 22–25 October 2019. [Google Scholar]
- Gorenflo, C.; Lee, S.; Golab, L.; Keshav, S. FastFabric: Scaling hyperledger fabric to 20000 transactions per second. Int. J. Netw. Manag. 2020, 30, e2099. [Google Scholar] [CrossRef] [Green Version]
- Sharma, A.; Schuhknecht, F.M.; Agrawal, D.; Dittrich, J. Blurring the Lines between Blockchains and Database Systems: The Case of Hyperledger Fabric. In Proceedings of the ACM SIGMOD 2019, Amsterdam, The Netherlands, 30 June–5 July 2019. [Google Scholar]
- Berendea, N.; Mercier, H.; Onica, E.; Rivière, E. Fair and efficient gossip in hyperledger fabric. In Proceedings of the 2020 IEEE 40th International Conference on Distributed Computing Systems (ICDCS), Singapore, 29 November–1 December 2020. [Google Scholar]
- Javaid, H.; Hu, C.; Brebner, G. Optimizing validation phase of hyperledger fabric. In Proceedings of the 2019 IEEE 27th International Symposium on Modeling, Analysis, and Simulation of Computer and Telecommunication Systems (MASCOTS), Rennes, France, 21–25 October 2019. [Google Scholar]
- Thakkar, P.; Nathan, S. Scaling hyperledger fabric using pipelined execution and sparse peers. arXiv 2020, arXiv:2003.05113. [Google Scholar]
- König, L.; Unger, S.; Kieseberg, P.; Tjoa, S.; Blockchains, J.R.C. The risks of the blockchain a review on current vulnerabilities and attacks. J. Internet Serv. Inf. Secur. 2021, 10, 110–127. [Google Scholar]
- Alizadeh, M.; Andersson, K.; Schelén, O. A survey of secure internet of things in relation to blockchain. J. Internet Serv. Inf. Secur. 2020, 10, 47–75. [Google Scholar]
- Androulaki, E.; Cachin, C.; Caro, A.D.; Kokoris-Kogias, E. Channels: Horizontal scaling and confidentiality on permissioned blockchains. In European Symposium on Research in Computer Security; Springer: Cham, Switzerland, 2018. [Google Scholar]
- Lei, H.; Kim, D.H. Design and Implementation of an Integrated IoT Blockchain Platform for Sensing Data Integrity. Sensors 2019, 19, 2228. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Stamatellis, C.; Papadopoulos, P.; Pitropakis, N.; Katsikas, S.; Buchanan, W.J. A privacy-preserving healthcare framework using hyperledger fabric. Sensors 2020, 20, 6587. [Google Scholar] [CrossRef] [PubMed]
- Pajooh, H.H.; Rashid, M.; Alam, F.; Demidenko, S. Hyperledger fabric blockchain for securing the edge internet of things. Sensors 2021, 21, 359. [Google Scholar] [CrossRef] [PubMed]
Different Stages | Performance Factors | Weights |
---|---|---|
Endorsement stage | Complexity of algorithm | high |
Complexity of endorsement | middle | |
Performance of database | middle | |
The consistency of ledger | middle | |
Transaction processing mode | middle | |
The performance of peers | low | |
Ordering stage | Complexity of algorithm | high |
Size of message | high | |
Ordering mechanism | high | |
The rate of block generation | middle | |
Block broadcasting strategy | middle | |
The range of broadcasting | low | |
The protocol of broadcasting | middle | |
Committing stage | Complexity of algorithm | high |
The size of block | middle | |
Performance of database | high | |
The mechanism of verification | high |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Ren, L.; Zhou, H.; Hang, X.; Yang, B.; Su, L. Research on Performance Optimization and Application in Smart Home for Hyperledger Fabric. Sensors 2022, 22, 3222. https://doi.org/10.3390/s22093222
Ren L, Zhou H, Hang X, Yang B, Su L. Research on Performance Optimization and Application in Smart Home for Hyperledger Fabric. Sensors. 2022; 22(9):3222. https://doi.org/10.3390/s22093222
Chicago/Turabian StyleRen, Lanfang, Huachun Zhou, Xiaoyong Hang, Bo Yang, and Li Su. 2022. "Research on Performance Optimization and Application in Smart Home for Hyperledger Fabric" Sensors 22, no. 9: 3222. https://doi.org/10.3390/s22093222
APA StyleRen, L., Zhou, H., Hang, X., Yang, B., & Su, L. (2022). Research on Performance Optimization and Application in Smart Home for Hyperledger Fabric. Sensors, 22(9), 3222. https://doi.org/10.3390/s22093222