Skip to main content
QUICK REVIEW

[论文解读] Formal Specification and Verification of Smart Contracts for Azure Blockchain

Shuvendu K. Lahiri, Shuo Chen|arXiv (Cornell University)|Dec 20, 2018
Blockchain Technology Applications and Security参考文献 17被引用 55
一句话总结

本文提出 VeriSol,一种用于 Solidity 智能合约的正式验证工具,可确保合约在访问控制策略下的状态机模型语义一致性。该工具自动化验证了 Azure Blockchain Workbench 中的所有智能合约,发现了此前未知的错误,并支持修复,之后所有合约均成功完成完整验证。

ABSTRACT

Ensuring correctness of smart contracts is paramount to ensuring trust in blockchain-based systems. This paper studies the safety and security of smart contracts in the \emph{Azure Blockchain Workbench}, an enterprise Blockchain-as-a-Service offering from Microsoft. As part of this study, we formalize \emph{semantic conformance} of smart contracts against a state machine model with access-control policy and develop a highly-automated formal verifier for Solidity that can produce proofs as well as counterexamples. We have applied our verifier {\sc VeriSol} to analyze {\it all} contracts shipped with the Azure Blockchain Workbench, which includes application samples as well as a governance contract for Proof of Authority (PoA). We have found previously unknown bugs in these published smart contracts. After fixing these bugs, {\sc VeriSol} was able to successfully perform full verification for all of these contracts.

研究动机与目标

  • 通过在 Azure Blockchain Workbench 中正式验证智能合约,确保企业级区块链系统的正确性与可信性。
  • 定义并强制执行智能合约与带访问控制策略的状态机模型之间的语义一致性。
  • 开发一种自动化形式化验证工具 VeriSol,能够为 Solidity 合约生成证明或反例。
  • 分析随 Azure Blockchain Workbench 一起发布的所有智能合约,包括治理和应用示例,以发现此前未被检测到的漏洞。

提出的方法

  • 使用扩展了访问控制策略的状态机模型形式化描述智能合约行为,以捕捉安全语义。
  • 设计 VeriSol 为高度自动化的 Solidity 形式化验证器,集成符号执行与定理证明技术。
  • 将验证器应用于分析 Azure Blockchain Workbench 发行版中包含的所有智能合约。
  • 在验证失败时生成正确性证明或反例,实现精确的错误定位。
  • 使用该工具链验证应用层合约及一个权威证明治理合约。
  • 迭代修复发现的错误并重新验证,以确认修复有效并实现完全正确性。

实验结果

研究问题

  • RQ1形式化验证方法能否有效检测部署在 Azure Blockchain Workbench 上的企业级智能合约中的语义错误与安全漏洞?
  • RQ2自动化验证在现实世界智能合约中,对符合带访问控制约束的状态机模型的验证效果如何?
  • RQ3在主要云提供商的区块链服务中,生产就绪的智能合约中存在哪些此前未被发现的漏洞?
  • RQ4自动化形式化验证能否在无需人工干预的情况下,覆盖生产级区块链平台中的所有合约?
  • RQ5形式化验证在修复发现的漏洞后,能在多大程度上实现完整验证?

主要发现

  • VeriSol 在随 Azure Blockchain Workbench 发行的所有智能合约中成功识别出此前未知的错误,包括应用示例和 PoA 治理合约。
  • 修复报告的错误后,VeriSol 成功对发行版中的每个合约完成了完整的形式化验证。
  • 形式化验证过程揭示了先前测试或代码审查未能发现的语义不一致和访问控制违规。
  • 结果表明,即使来自企业级平台的生产就绪智能合约,也可能包含细微且可被利用的缺陷。
  • VeriSol 在修复后实现完整验证的成功,证实了其自动化验证流程的有效性。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。