arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1907.09208cs.SE
收藏

Truffle免费测试--重放以太坊智能合约以提高透明度

Truffle tests for free -- Replaying Ethereum smart contracts for transparency

Pieter Hartel, Mark van Staalduinen

摘要:

以太坊区块链本质上是一个全球复制的公共数据库。被称为智能合约的程序可以访问这个数据库。超过1000万个智能合约已部署在以太坊区块链上。执行智能合约的方法会生成一个交易,该交易也存储在区块链上。迄今为止,以太坊交易超过10亿笔。功能透明的智能合约比不透明的合约更成功。因此,我们开发了一个工具(ContractVis)来探索智能合约的透明度。该工具为智能合约的历史交易生成重放脚本。该脚本使用与区块链上记录的相同参数执行交易,但在最小的测试环境中。运行重播脚本可以深入了解合约,以及用于检索合约及其历史的区块链浏览器。我们为Etherscan等区块链探索者提供了五项具体建议,以提高智能合约的透明度。

英文摘要:

The Ethereum blockchain is essentially a globally replicated public database. Programs called smart contracts can access this database. Over 10 million smart contracts have been deployed on the Ethereum blockchain. Executing a method of a smart contract generates a transaction that is also stored on the blockchain. There are over 1 billion Ethereum transactions to date. Smart contracts that are transparent about their function are more successful than opaque contracts. We have therefore developed a tool (ContractVis) to explore the transparency of smart contracts. The tool generates a replay script for the historic transactions of a smart contract. The script executes the transactions with the same arguments as recorded on the blockchain, but in a minimal test environment. Running a replay script provides insights into the contract, and insights into the blockchain explorer that was used to retrieve the contract and its history. We provide five concrete recommendations for blockchain explorers like Etherscan to improve the transparency of smart contracts.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑