Abstract

A smart contract is a program running on a blockchain platform. Smart devices send data to smart contracts or change their own status based on smart contracts. Businesses want to use smart devices and smart contracts to streamline workflow because smart contracts reduce the need in trusted intermediators and cut down enforcement costs. However, developing smart contract applications is challenging due to different memory models, different interaction models, and a dearth of supporting tools and libraries. When developers are asked to reimplement conventional applications to smart contracts, it is thus ideal to automatically transform them, avoiding manual labor, as well as ensuring reliability and security. This paper contributes a set of rules to transform conventional applications in the Model-View-Controller (MVC) pattern into smart contracts running on Hyperledger Fabric, a blockchain platform preferred by businesses. Major transformations are performed in the model, while in the controller, model calls are replaced by smart contract calls. The source application and the target smart contract are all written in Java. Our rules add read-your-writes consistency that Hyperledger Fabric does not natively support. Runtime pre- and post-condition checking in the original application is supported in the transformed smart contract. We evaluated our rules on CoCoME and other MVC applications, and all code ran correctly and passed unit tests.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.