Citation: | LIU H Y,MA Z Q,YE Y F,et al. Smart contracts-as-a-service with on-chain and off-chain collaboration[J]. Journal of Beijing University of Aeronautics and Astronautics,2024,50(10):3262-3273 (in Chinese) doi: 10.13700/j.bh.1001-5965.2022.0784 |
A smart contract is a software service on blockchain with the characteristics of value transfer, contractuality, and trustworthiness. The quantity of smart contracts on blockchain systems is currently rising, together with the application scope's expansion and the restrictions of conventional smart contracts' growing number. Isolated sandbox environment execution makes it difficult for smart contracts to interact with the outside world, and resources are limited, limiting the use scenarios and performance of smart contracts. At the same time, off-chain services have the risk of centralization and lack of trust mechanisms to protect them. We propose a Smart Contract-as-a-Service solution, which provides a method for on-chain contracts to collaborate with off-chain services. Through on-chain authentication of off-chain services, the service lifecycle is incorporated into blockchain management, so that it has the trustworthy characteristics of contract services and supports the registration, customization and combination of services. We proposes a communication and collaboration method based on transaction triggering and event-driven mechanisms, where smart contracts can be combined with extended services to construct workflows in the face of complex business scenarios or tasks with high resource demands. Empirical verification demonstrates that Smart Contracts-as-a-Service can significantly expand contract application scenarios and boost performance by shifting resource-intensive tasks from within the contract to computational extension services. The benefit of increased performance is positively correlated with the off-chain speedup ratio, for example, a 64% improvement in performance when performing multiplication of a
[1] |
VACCA A, DI SORBO A, VISAGGIO C A, et al. A systematic literature review of blockchain and smart contract development: techniques, tools, and open challenges[J]. Journal of Systems and Software, 2021, 174: 110891. doi: 10.1016/j.jss.2020.110891
|
[2] |
MOHANTA B K, PANDA S S, JENA D. An overview of smart contract and use cases in blockchain technology[C]// 2018 9th International Conference on Computing, Communication and Networking Technologies (ICCCNT). Piscataway: IEEE Press, 2018: 1-4.
|
[3] |
袁勇, 王飞跃. 区块链技术发展现状与展望[J]. 自动化学报, 2016, 42(4): 481-494.
YUAN Y, WANG F Y. Blockchain: the state of the art and future trends[J]. Acta Automatica Sinica, 2016, 42(4): 481-494 (in Chinese).
|
[4] |
王鹏, 魏必, 王聪. 区块链技术在政务数据共享中的应用[J]. 大数据, 2020, 6(4): 105-114. doi: 10.11959/j.issn.2096-0271.2020037
WANG P, WEI B, WANG C. Application of blockchain technology in government data sharing[J]. Big Data Research, 2020, 6(4): 105-114 (in Chinese). doi: 10.11959/j.issn.2096-0271.2020037
|
[5] |
周立群, 李智华. 区块链在供应链金融的应用[J]. 信息系统工程, 2016(7): 49-51. doi: 10.3969/j.issn.1001-2362.2016.07.033
ZHOU L Q, LI Z H. Application of blockchain in supply chain finance[J]. China CIO News, 2016(7): 49-51 (in Chinese). doi: 10.3969/j.issn.1001-2362.2016.07.033
|
[6] |
ZOU W Q, LO D, KOCHHAR P S, et al. Smart contract development: challenges and opportunities[J]. IEEE Transactions on Software Engineering, 2021, 47(10): 2084-2106. doi: 10.1109/TSE.2019.2942301
|
[7] |
BUTERIN V. A next generation smart contract & decentralized application platform[EB/OL]. ( 2022-07-29)[ 2022-09-05]. https://ethereum.org/zh/whitepaper/.
|
[8] |
GANESHBABU S N, SRIRAM S, RANGARAJU K G. Smart cyber physical systems: advances, challenges and opportunities[M]. Abingdon: Taylor & Francis, 2020: 255-268.
|
[9] |
Spring Cloud. Service registration and discovery[EB/OL]. (2022-05-10)[2022-09-05]. https://spring.io/guides/gs/service-registration-and-discovery.
|
[10] |
Nacos. An easy-to-use dynamic service discovery, configuration and service management platform for building cloud native applications[EB/OL]. (2022-06-12)[2022-09-14]. https://nacos.io/en/docs/v1/what-is-nacos/.
|
[11] |
HARN L, REN J. Generalized digital certificate for user authentication and key establishment for secure communications[J]. IEEE Transactions on Wireless Communications, 2011, 10(7): 2372-2379. doi: 10.1109/TWC.2011.042211.101913
|
[12] |
PARK J S, YOUN T Y, KIM H B, et al. Smart contract-based review system for an IoT data marketplace[J]. Sensors, 2018, 18(10): 3577. doi: 10.3390/s18103577
|
[13] |
ABDELMABOUD A , AHMED A I A , ABAKER M, et al. Blockchain for IoT applications: taxonomy, platforms, recent advances, challenges and future research directions[J]. Electronics, 2022, 11(4): 11040630.
|
[14] |
ZHENG Z B, XIE S A, DAI H N, et al. An overview on smart contracts: challenges, advances and platforms[J]. Future Generation Computer Systems, 2020, 105(C): 475-491.
|
[15] |
SUNYAEV A, SUNYAEV A. Internet computing: principles of distributed systems and emerging internet-based technologies [M]. Switzerland: Springer Cham, 2020: 195-236.
|
[16] |
ZHENG W L, ZHENG Z B, CHEN X P, et al. NutBaaS: a blockchain-as-a-service platform[J]. IEEE Access, 2019, 7: 134422-134433. doi: 10.1109/ACCESS.2019.2941905
|
[17] |
魏凯, 卿苏德, 杨白雪, 等. 区块链即服务平台BaaS白皮书[R]. 北京: 中国信息通信研究院, 2019.
WEI K, QING S D, YANG B X, et al. Blockchain as a service platform baas white paper [R]. Beijing: China Institute of Information and Communications, 2019(in Chinese).
|
[18] |
张富利, 侯培宇, 李杉杉, 等. 一种智能合约微服务化框架[J]. 软件学报, 2021, 32(11): 3423-3439.
ZHANG F L, HOU P Y, LI S S, et al. Framework for architecting smart contracts using microservices[J]. Journal of Software, 2021, 32(11): 3423-3439 (in Chinese).
|
[19] |
TONELLI R, PINNA A, BARALLA G, et al. Ethereum smart contracts as blockchain-oriented microservices[C]// Proceedings of the 19th International Conference on Agile Software Development: Companion. New York: ACM, 2018: 1-2.
|
[20] |
HU K, WAN J, LUO K, et al. Verification algebra for multi-tenant applications in VaaS architecture[J]. Software Testing, Verification and Reliability, 2021, 31(6): e1763. doi: 10.1002/stvr.1763
|
[21] |
王子凯, 朱健, 张伯钧, 等. 区块链与智能合约并行方法研究与实现[J]. 计算机科学, 2022, 49(9): 318-323. doi: 10.11896/jsjkx.220300190
WANG Z K, ZHU J, ZHANG B J, et al. Research and implementation of blockchain and smart contract parallel methods[J]. Computer Science, 2022, 49(9): 318-323(in Chinese). doi: 10.11896/jsjkx.220300190
|
[22] |
MIR U B, KAR A K, DWIVEDI Y K, et al. Realizing digital identity in government: Prioritizing design and implementation objectives for Aadhaar in India[J]. Government Information Quarterly, 2020, 37(2): 101442. doi: 10.1016/j.giq.2019.101442
|
[23] |
SALAH K, REHMAN M H U, NIZAMUDDIN N, et al. Blockchain for AI: review and open research challenges[J]. IEEE Access, 2019, 7: 10127-10149. doi: 10.1109/ACCESS.2018.2890507
|