应用科学学报 ›› 2025, Vol. 43 ›› Issue (2): 195-207.doi: 10.3969/j.issn.0255-8297.2025.02.001

• 通信工程 • 上一篇    

面向交互智能合约运行的正确性判定

王嘉诚, 蒋佳佳, 李丹, 张玉书   

  1. 南京航空航天大学 计算机科学与技术学院/软件学院, 江苏 南京 211106
  • 收稿日期:2023-08-31 发布日期:2025-04-03
  • 通信作者: 蒋佳佳,博士生,研究方向为区块链、密码学。E-mail:jiangjiajia@nuaa.edu.cn
  • 基金资助:
    国家重点研发计划(No.2020YFB1005500)资助

Correctness Verification for Interactive Smart Contracts at Runtime

WANG Jiacheng, JIANG Jiajia, LI Dan, ZHANG Yushu   

  1. College of Computer Science and Technology/College of Software, Nanjing University of Aeronautics and Astronautics, Nanjing 211106, Jiangsu, China
  • Received:2023-08-31 Published:2025-04-03

摘要: 交互智能合约相较于单一智能合约,存在相互调用等复杂的交互关系。然而,现有的智能合约检测、验证方法仅考虑单个智能合约存在的问题,无法保证交互智能合约运行的正确性。因此,本文提出一种能够对交互智能合约运行的正确性进行判定的方法,对交互智能合约系统进行行为交互优先级(behavior-interaction-priority,BIP)建模,并引入Solidity部署图(Solidity deployment diagram,SDD)描述合约之间的交互关系。该方法采用形式化的方法对交互智能合约运行的正确性进行验证,并实现了对交互合约代码的重构。实验结果表明,该方法可以实现对交互智能合约系统运行正确性的有效判定。

关键词: 区块链, 交互智能合约, 正确性判定, 代码生成

Abstract: Compared with a single smart contract, interactive smart contracts have more complex interactions such as mutual calling. However, existing smart contract detection and verification methods primarily consider the problems existing in a single smart contract, and the correctness of interactive smart contracts cannot be guaranteed. To address this limitation, this paper proposes a method for verifying the correctness of interactive smart contracts, where behavior interaction priority (BIP) modeling is built for interactive smart contract systems and Solidity deployment diagram (SDD) is introduced to describe contract interactions. By employing formal verification techniques, the proposed approach ensures the correctness of the interactive smart contracts and realizes their reconstruction. Experimental results show that the proposed method can effectively verify the correctness of interactive contract systems.

Key words: blockchain, interactive smart contract, correctness determination, code generation

中图分类号: