Transformation from MVC Applications to Smart Contracts

Qiqi Gu, Wei Ke, Yilong Yang

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

1 Citation (Scopus)

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.

Original languageEnglish
Title of host publicationProceedings - 2022 IEEE 20th International Conference on Embedded and Ubiquitous Computing, EUC 2022
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages104-111
Number of pages8
ISBN (Electronic)9798350396355
DOIs
Publication statusPublished - 2022
Event20th IEEE International Conference on Embedded and Ubiquitous Computing, EUC 2022 - Virtual, Online, China
Duration: 9 Dec 202211 Dec 2022

Publication series

NameProceedings - 2022 IEEE 20th International Conference on Embedded and Ubiquitous Computing, EUC 2022

Conference

Conference20th IEEE International Conference on Embedded and Ubiquitous Computing, EUC 2022
Country/TerritoryChina
CityVirtual, Online
Period9/12/2211/12/22

Keywords

  • Code generation
  • Hyperledger fabric
  • IoT
  • Smart contract
  • Transformation

Fingerprint

Dive into the research topics of 'Transformation from MVC Applications to Smart Contracts'. Together they form a unique fingerprint.

Cite this