Skip to main content
Log in

An SGX-based execution framework for smart contracts upon permissioned blockchain

  • Published:
Distributed and Parallel Databases Aims and scope Submit manuscript

Abstract

Since consensus protocol and execution mechanism act as two key factors for the overall throughput of blockchain systems, how to execute smart contracts efficiently becomes an emergent bottleneck as many high-performance consensus protocols have been proposed in recent years. Due to the existence of Byzantine nodes, existing concurrency approaches can only achieve intra-node concurrency, not inter-node concurrency. Fortunately, since the trust among nodes can be achieved based on the confidentiality guarantee provided by the trusted execution environment, such as Intel Software Guard Extensions (SGX), we propose a novel concurrent execution framework using SGX, which is the first to achieve both intra- and inter-node concurrency. Specifically, each replica executes the task assigned by the primary in parallel and gets trusted results using SGX firstly. Then, each node obtains the execution results of others via state replication to achieve consistency. However, we must ensure the integrity and correctness of all data transferred to SGX for getting the trusted results. Therefore, we design a novel approach to efficiently generate Merkle multiproofs and verify data in parallel. Theoretical analysis and experimental results show that the proposed scheme significantly outperforms state-of-art solutions.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19
Fig. 20
Fig. 21

Similar content being viewed by others

References

  1. Dinh, T.T.A., Wang, J., Chen, G., Liu, R., Ooi, B.C., Tan, K.L.: Blockbench: a framework for analyzing private blockchains. In: Proceedings of the 2017 ACM International Conference on Management of Data, pp. 1085–1100. ACM (2017)

  2. Gupta, S., Hellings, J., Sadoghi, M.: Fault-tolerant distributed transactions on blockchain. Synth. Lect. Data Manag. 16(1), 1–268 (2021)

    Article  Google Scholar 

  3. Zhu, Y., Zhang, Z., Jin, C., Zhou, A., Yan, Y.: SEBDB: semantics empowered blockchain database. In: 2019 IEEE 35th International Conference on Data Engineering (ICDE), pp. 1820–1831. IEEE (2019)

  4. Gupta, S., Hellings, J., Sadoghi, M.: RCC: resilient concurrent consensus for high-throughput secure transaction processing. In: 2021 IEEE 37th International Conference on Data Engineering (ICDE), pp. 1392–1403. IEEE (2021)

  5. Hellings, J., Sadoghi, M.: Byshard: sharding in a Byzantine environment. Proc. VLDB Endow. 14(11), 2230–2243 (2021)

    Article  Google Scholar 

  6. Miller, A., Xia, Y., Croman, K., Shi, E., Song, D.: The honey badger of BFT protocols. In: Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, pp. 31–42. ACM (2016)

  7. Stathakopoulou, C., David, T., Pavlovic, M., Vukolić, M.: Mir-BFT: High-throughput robust BFT for decentralized networks. arXiv preprint (2019). http://arxiv.org/abs/1906.05552

  8. Jin, C., Pang, S., Qi, X., Zhang, Z., Zhou, A.: A high performance concurrency protocol for smart contracts of permissioned blockchain. IEEE Trans. Knowl. Data Eng. (2021). https://doi.org/10.1109/TKDE.2021.3059959

  9. Vukolić, M.: Rethinking permissioned blockchains. In: Proceedings of the ACM Workshop on Blockchain, Cryptocurrencies and Contracts, pp. 3–7. ACM (2017)

  10. Anjana, P.S., Kumari, S., Peri, S., Rathor, S., Somani, A.: An efficient framework for optimistic concurrent execution of smart contracts. In: 2019 27th Euromicro International Conference on Parallel, Distributed and Network-Based Processing (PDP), pp. 83–92. IEEE (2019)

  11. Dickerson, T., Gazzillo, P., Herlihy, M., Koskinen, E.: Adding concurrency to smart contracts. In: Proceedings of the ACM Symposium on Principles of Distributed Computing, pp. 303–312. ACM (2017)

  12. Zhang, A., Zhang, K.: Enabling concurrency on smart contracts using multiversion ordering. In: Asia-Pacific Web (APWeb) and Web-Age Information Management (WAIM) Joint International Conference on Web and Big Data, pp. 425–439. Springer (2018)

  13. Costan, V., Devadas, S.: Intel SGX explained. IACR Cryptol. ePrint Arch. 2016(086), 1–118 (2016)

    Google Scholar 

  14. Arnautov, S., Trach, B., Gregor, F., Knauth, T., Martin, A., Priebe, C., Lind, J., Muthukumaran, D., O’keeffe, D., Stillwell, M.L., et al.: \(\{\)SCONE\(\}\): Secure Linux containers with intel \(\{\)SGX\(\}\). In: 12th \(\{\)USENIX\(\}\) Symposium on Operating Systems Design and Implementation (\(\{\)OSDI\(\}\) 16), pp. 689–703 (2016)

  15. Tsai, C.C., Porter, D.E., Vij, M.: Graphene-SGX: a practical library \(\{\)OS\(\}\) for unmodified applications on \(\{\)SGX\(\}\). In: 2017 \(\{\)USENIX\(\}\) Annual Technical Conference (\(\{\)USENIX\(\}\)\(\{\)ATC\(\}\) 17), pp. 645–658 (2017)

  16. Gjerdrum, A.T., Pettersen, R., Johansen, H.D., Johansen, D.: Performance principles for trusted computing with intel SGX. In: International Conference on Cloud Computing and Services Science, pp. 1–18. Springer (2017)

  17. Weichbrodt, N., Aublin, P.L., Kapitza, R.: sgx-perf: a performance analysis tool for Intel SGX enclaves. In: Proceedings of the 19th International Middleware Conference, pp. 201–213. ACM (2018)

  18. Performance Considerations for Intel SGX Applications. https://software.intel.com/content/dam/develop/public/us/en/documents/intel-sgx-performance-considerations.pdf

  19. Weisse, O., Bertacco, V., Austin, T.: Regaining lost cycles with hotcalls: A fast interface for SGX secure enclaves. ACM SIGARCH Comput. Archit. News 45(2), 81–93 (2017)

    Article  Google Scholar 

  20. Merkle, R.C.: Method of providing digital signatures. US Patent 4,309,569 (1982)

  21. Merkle, R.C.: A certified digital signature. In: Conference on the Theory and Application of Cryptology, pp. 218–238. Springer (1989)

  22. BFT-SMaRt. https://github.com/bft-smart/library

  23. Fang, M., Zhang, Z., Jin, C., Zhou, A.: High-performance smart contracts concurrent execution for permissioned blockchain using SGX. In: 2021 IEEE 37th International Conference on Data Engineering (ICDE), pp. 1907–1912. IEEE (2021)

  24. Szabo, N.: Formalizing and securing relationships on public networks. First Monday (1997). https://doi.org/10.5210/fm.v2i9.548

    Article  Google Scholar 

  25. Wood, G., et al.: Ethereum: a secure decentralised generalised transaction ledger. Ethereum Proj. Yellow Pap. 151(2014), 1–32 (2014)

    Google Scholar 

  26. Androulaki, E., Barger, A., Bortnikov, V., Cachin, C., Christidis, K., De Caro, A., Enyeart, D., Ferris, C., Laventman, G., Manevich, Y., et al.: Hyperledger fabric: a distributed operating system for permissioned blockchains. In: Proceedings of the Thirteenth EuroSys Conference, pp. 1–15 (2018)

  27. Solidity. https://solidity.readthedocs.io/en/latest/

  28. Minkin, M., Silberstein, M.: Improving performance and security of Intel SGX. Ph.D. thesis, Computer Science Department, Technion (2019)

  29. Amiri, M.J., Agrawal, D., El Abbadi, A.: Sharper: sharding permissioned blockchains over network clusters. In: Proceedings of the 2021 International Conference on Management of Data, pp. 76–88 (2021)

  30. Wüst, K., Matetic, S., Egli, S., Kostiainen, K., Capkun, S.: ACE: asynchronous and concurrent execution of complex smart contracts. In: Proceedings of the 2020 ACM SIGSAC Conference on Computer and Communications Security, pp. 587–600 (2020)

  31. Yang, Y., Papadias, D., Papadopoulos, S., Kalnis, P.: Authenticated join processing in outsourced databases. In: Proceedings of the 2009 ACM SIGMOD International Conference on Management of Data, pp. 5–18 (2009)

  32. Nilsson, A., Bideh, P.N., Brorsson, J.: A survey of published attacks on intel SGX. arXiv preprint. (2020). http://arxiv.org/abs/2006.13598

  33. van Schaik, S., Minkin, M., Kwong, A., Genkin, D., Yarom, Y.: Cacheout: Leaking data on intel CPUs via cache evictions. In: 2021 IEEE Symposium on Security and Privacy (SP), pp. 339–354. IEEE (2021)

  34. Wang, W., Chen, G., Pan, X., Zhang, Y., Wang, X., Bindschaedler, V., Tang, H., Gunter, C.A.: Leaky cauldron on the dark land: understanding memory side-channel hazards in SGX. In: Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security, pp. 2421–2434 (2017)

  35. Al-Bassam, M., Sonnino, A., Bano, S., Hrycyszyn, D., Danezis, G.: Chainspace: a sharded smart contracts platform. In: 25th Annual Network and Distributed System Security Symposium (NDSS) (2018)

  36. Chainspace. https://github.com/xuperchain/xuperchain

  37. Gupta, S., Rahnama, S., Sadoghi, M.: Permissioned blockchain through the looking glass: architectural and implementation lessons learned. In: 2020 IEEE 40th International Conference on Distributed Computing Systems (ICDCS), pp. 754–764. IEEE (2020)

  38. Cahill, M.J., Röhm, U., Fekete, A.D.: Serializable isolation for snapshot databases. ACM Trans. Database Syst. 34(4), 1–42 (2009)

    Article  Google Scholar 

  39. 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 2019 International Conference on Management of Data, pp. 105–122. ACM (2019)

  40. Chacko, J.A., Mayer, R., Jacobsen, H.A.: Why do my blockchain transactions fail? A study of hyperledger fabric. In: Proceedings of the 2021 International Conference on Management of Data, pp. 221–234 (2021)

  41. Kim, J.Y., Lee, J., Koo, Y., Park, S., Moon, S.M.: Ethanos: efficient bootstrapping for full nodes on account-based blockchain. In: Proceedings of the Sixteenth European Conference on Computer Systems, pp. 99–113 (2021)

  42. Ponnapalli, S., Shah, A., Banerjee, S., Malkhi, D., Tai, A., Chidambaram, V., Wei, M.: RainBlock: faster transaction processing in public blockchains. In: 2021 USENIX Annual Technical Conference (USENIX ATC 21), pp. 333–347 (2021)

  43. Guide, P.: Intel® 64 and IA-32 architectures software developer’s manual. Volume 3B: System programming Guide, Part 2(11) (2011)

  44. Orenbach, M., Lifshits, P., Minkin, M., Silberstein, M.: Eleos: Exitless OS services for SGX enclaves. In: Proceedings of the Twelfth European Conference on Computer Systems, pp. 238–253 (2017)

  45. Slither. https://github.com/crytic/slither

  46. Prasaad, G., Cheung, A., Suciu, D.: Handling highly contended OLTP workloads using fast dynamic partitioning. In: Proceedings of the 2020 ACM SIGMOD International Conference on Management of Data, pp. 527–542 (2020)

  47. Bitcoin. https://github.com/bitcoin/bitcoin

  48. Ethereum. https://github.com/ethereum

  49. Ramabaja, L., Avdullahu, A.: Compact Merkle multiproofs. arXiv preprint (2020). arXiv:2002.07648

  50. Rao, L., Zhang, H., Tu, T.: Dynamic outsourced auditing services for cloud storage based on batch-leaves-authenticated Merkle hash tree. IEEE Trans. Serv. Comput. 13(3), 451–463 (2017)

    Article  Google Scholar 

  51. Sparse Merkle Multiproofs. https://medium.com/@jgm.orinoco/understanding-sparse-merkle-multiproofs-9b9f049e8f08

  52. Castro, M., Liskov, B., et al.: Practical byzantine fault tolerance. OsDI 99, 173–186 (1999)

    Google Scholar 

  53. Intel SGX SDK. https://software.intel.com/en-us/sgx/sdk

  54. Kosba, A., Miller, A., Shi, E., Wen, Z., Papamanthou, C.: Hawk: the blockchain model of cryptography and privacy-preserving smart contracts. In: 2016 IEEE Symposium on Security and Privacy (SP), pp. 839–858. IEEE (2016)

  55. Zhang, F., Cecchetti, E., Croman, K., Juels, A., Shi, E.: Town Crier: an authenticated data feed for smart contracts. In: Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, pp. 270–282. ACM (2016)

  56. Yuan, R., Xia, Y.B., Chen, H.B., Zang, B.Y., Xie, J.: Shadoweth: private smart contract on public blockchain. J. Comput. Sci. Technol. 33(3), 542–556 (2018)

    Article  Google Scholar 

  57. Coco-Framework. https://github.com/Microsoft/CCF

  58. Russinovich, M., Ashton, E., Avanessians, C., Castro, M., Chamayou, A., Clebsch, S., Costa, M., Fournet, C., Kerner, M., Krishna, S., et al.: CCF: a framework for building confidential verifiable replicated services. Technical Report MSR-TR-2019-16, Microsoft (2019)

  59. Cheng, R., Zhang, F., Kos, J., He, W., Hynes, N., Johnson, N., Juels, A., Miller, A., Song, D.: Ekiden: A platform for confidentiality-preserving, trustworthy, and performant smart contracts. In: 2019 IEEE European Symposium on Security and Privacy (EuroS &P), pp. 185–200. IEEE (2019)

Download references

Acknowledgements

This work is partially supported by the National Science Foundation of China (U1811264, U1911203, and 61972152) and Guangxi Key Laboratory of Trusted Software (kx202005). The authors would like to thank the anonymous reviewers for their valuable feedback.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Cheqing Jin.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Fang, M., Zhang, Z., Jin, C. et al. An SGX-based execution framework for smart contracts upon permissioned blockchain. Distrib Parallel Databases 42, 143–178 (2024). https://doi.org/10.1007/s10619-022-07409-7

Download citation

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10619-022-07409-7

Keywords

Mathematics Subject Classification

Navigation