學術產出-學位論文

文章檢視/開啟

書目匯出

Google ScholarTM

政大圖書館

引文資訊

TAIR相關學術產出

題名 基於狀態的可修改智能合約
State-based modifiable smart contract
作者 劉皪
Liu, Lee
貢獻者 郁方<br>蕭舜文
Yu, Fang<br>Hsiao, Shun-Wen
劉皪
Liu, Lee
關鍵詞 區塊鏈
智能合約
有限狀態機
Solidity
Blockchain
Smart Contract
Finite state machine
Solidity
日期 2019
上傳時間 7-八月-2019 16:09:46 (UTC+8)
摘要 部署在區塊鏈上的智能合約意味著不可改變;然而在不同的時間點,各方在實作的過程中,實作的方向跟內容可能會有改變。例如,修復安全問題,因此合約需要被調整或修改。我們提出了一種基於狀態的智能合約框架,可以讓合約順利被修改,已部署的智能合約可以部分地更新邏輯,同時保持先前的狀態一致。
具體來說,我們將普通合約劃分為四種不同類型的合約,在框架中合約分別負責不同部分。控制合約使用有限狀態機管理控制邏輯,其中狀態受版本控制保護以區分合約的不同版本;儲存合約會負責儲存不同使用者每一個狀態下的全域變數;主要合約實作應用邏輯的主要部分;更新契約實作以基於狀態的方式設計的程式碼,如此會比較容易更新合約內容。
並且,我們已經實施了概念驗證保險智能合約,如何在此框架下開發、部署、執行和更改可修改的智能合約。
A smart contract deployed on the blockchain is meant to be immutable; however, in practice, the consensus and operations among parties may change as time goes by, e.g., to fix security frauds, leading to the need of flexibility on contract modification. We propose a state-based smart contract framework that facilitates contract modification, where a deployed smart contract can be altered partially with update operations or control logic while keeping previous transactions (blocks) consistent.
Specifically, we divide an ordinary contract into four functional contracts that are linked by the framework to work together. The control contract manages the control logic with a finite state machine where transactions are guarded with version control to distinguish different versions of the contract; the storage contract that accesses global variables synchronizes the view of state variables; the main contract implements the main part of application logic, and the update contract implements codes that are designed in a state-based fashion to allow to be swapped with update operations.
We have implemented a proof-of-concept insurance smart contract to demonstrate how to develop, deploy, execute and alter a modifiable smart contract under the proposed framework.
參考文獻 1. Bitcoin: A peer-to-peer electronic cash system, Nakamoto, Satoshi
2. Secure property titles with owner authority, Szabo, Nick
3. A next-generation smart contract and decentralized application platform, Buterin, Vitalik
4. Decentralizing privacy: Using blockchain to protect personal data, Zyskind, Guy and Nathan, Oz and Pentland, Alex
5. Bitcoin: An innovative alternative digital currency, Grinberg, Reuben
6. 11 Blockchain technology: principles and applications, Pilkington, Marc
7. Blockchains and smart contracts for the internet of things, Christidis, Konstantinos and Devetsikiotis, Michael
8. Making smart contracts smarter, Luu, Loi and Chu, Duc-Hiep and Olickel, Hrishi and Saxena, Prateek and Hobor, Aquinas
9. The DAO (organization)
10. Blockchain and smart contracts for insurance: Is the technology mature enough, Gatteschi, Valentina and Lamberti, Fabrizio and Demartini, Claudio and Pranteda, Chiara and Santamara, Victor
11. Ethereum: A secure decentralised generalised transaction ledger, Wood, Gavin
12. The Ethereum block explorer, https://etherscan.io/
13. ERC-1504 Upgradable Smart Contract, Kaidong Wu, Chuqiao Ren, Ruthia He, Yun Ma
14. Double-spending fast payments in bitcoin, Karame, Ghassan O and Androulaki, Elli and Capkun, Srdjan
15. Decentralization in bitcoin and ethereum networks, Gencer, Adem Efe and Basu, Soumya and Eyal, Ittay and Van Renesse, Robbert and Sirer
16. Solidity, https://solidity.readthedocs.io/en/v0.4.25/
17. Ethereum, Introduction to Smart Contracts, https://solidity.readthedocs.io/en/v0.4.24/
18. How to write upgradable smart contracts in solidity, https://medium.com/quillhash/d8f1b95a0e9a
19. Ethereum Name Service, https://ens.domains/
20. Upgradeable Smart Contracts, https://hackernoon.com/a7e9aef76fdd
21. Testing software design modeled by finite-state machines, Chow, Tsun S.
22. Finite-state machine - Wikipedia
23. Remix - Solidity IDE, https://remix.ethereum.org/
描述 碩士
國立政治大學
資訊管理學系
106356003
資料來源 http://thesis.lib.nccu.edu.tw/record/#G1063560032
資料類型 thesis
dc.contributor.advisor 郁方<br>蕭舜文zh_TW
dc.contributor.advisor Yu, Fang<br>Hsiao, Shun-Wenen_US
dc.contributor.author (作者) 劉皪zh_TW
dc.contributor.author (作者) Liu, Leeen_US
dc.creator (作者) 劉皪zh_TW
dc.creator (作者) Liu, Leeen_US
dc.date (日期) 2019en_US
dc.date.accessioned 7-八月-2019 16:09:46 (UTC+8)-
dc.date.available 7-八月-2019 16:09:46 (UTC+8)-
dc.date.issued (上傳時間) 7-八月-2019 16:09:46 (UTC+8)-
dc.identifier (其他 識別碼) G1063560032en_US
dc.identifier.uri (URI) http://nccur.lib.nccu.edu.tw/handle/140.119/124725-
dc.description (描述) 碩士zh_TW
dc.description (描述) 國立政治大學zh_TW
dc.description (描述) 資訊管理學系zh_TW
dc.description (描述) 106356003zh_TW
dc.description.abstract (摘要) 部署在區塊鏈上的智能合約意味著不可改變;然而在不同的時間點,各方在實作的過程中,實作的方向跟內容可能會有改變。例如,修復安全問題,因此合約需要被調整或修改。我們提出了一種基於狀態的智能合約框架,可以讓合約順利被修改,已部署的智能合約可以部分地更新邏輯,同時保持先前的狀態一致。
具體來說,我們將普通合約劃分為四種不同類型的合約,在框架中合約分別負責不同部分。控制合約使用有限狀態機管理控制邏輯,其中狀態受版本控制保護以區分合約的不同版本;儲存合約會負責儲存不同使用者每一個狀態下的全域變數;主要合約實作應用邏輯的主要部分;更新契約實作以基於狀態的方式設計的程式碼,如此會比較容易更新合約內容。
並且,我們已經實施了概念驗證保險智能合約,如何在此框架下開發、部署、執行和更改可修改的智能合約。
zh_TW
dc.description.abstract (摘要) A smart contract deployed on the blockchain is meant to be immutable; however, in practice, the consensus and operations among parties may change as time goes by, e.g., to fix security frauds, leading to the need of flexibility on contract modification. We propose a state-based smart contract framework that facilitates contract modification, where a deployed smart contract can be altered partially with update operations or control logic while keeping previous transactions (blocks) consistent.
Specifically, we divide an ordinary contract into four functional contracts that are linked by the framework to work together. The control contract manages the control logic with a finite state machine where transactions are guarded with version control to distinguish different versions of the contract; the storage contract that accesses global variables synchronizes the view of state variables; the main contract implements the main part of application logic, and the update contract implements codes that are designed in a state-based fashion to allow to be swapped with update operations.
We have implemented a proof-of-concept insurance smart contract to demonstrate how to develop, deploy, execute and alter a modifiable smart contract under the proposed framework.
en_US
dc.description.tableofcontents 第一章 Introduction 1
第二章 Related Work 4
第一節 Background: Blockchain 4
第二節 Background: Smart Contract 5
第三節 Background: Smart Contract Language 6
第四節 ERC-54 Upgradable Smart Contract (USC) 7
第五節 Upgradeable Smart Contract Structure 8
第六節 Upgradeable Smart Contracts by CMC 9
第三章 Modifiable Smart Contract 11
第一節 Overview 11
第二節 An Ordinary Smart Contract 14
第三節 State-based Contract 16
第四節 Control Contract 17
第四章 Implementation 18
第一節 Implementation of Control Contract 19
第二節 Implementation of Storage Contract 22
第三節 Implementation of Main Contract 23
第四節 Implementation of Update Contract 24
第五章 Modification Scenario 25
第一節 Change the Application Logic 26
第二節 Add a New Function 26
第三節 Add a new Storage 28
第四節 Case Study: Annuity Insurance 29
第六章 Threat Model 33
第一節 Unauthorized Modifiaction to Smart Contract 33
第二節 The Bad Design the FSM 34
第七章 Discussion 34
第一節 Storing Global Vriables 34
第二節 Generic Programming 35
第三節 Cost Issues 35
第四節 Compare to Other Modifiable Smart Contract 35
第八章 Conclusion 38
第九章 References 40
zh_TW
dc.format.extent 1127656 bytes-
dc.format.mimetype application/pdf-
dc.source.uri (資料來源) http://thesis.lib.nccu.edu.tw/record/#G1063560032en_US
dc.subject (關鍵詞) 區塊鏈zh_TW
dc.subject (關鍵詞) 智能合約zh_TW
dc.subject (關鍵詞) 有限狀態機zh_TW
dc.subject (關鍵詞) Solidityzh_TW
dc.subject (關鍵詞) Blockchainen_US
dc.subject (關鍵詞) Smart Contracten_US
dc.subject (關鍵詞) Finite state machineen_US
dc.subject (關鍵詞) Solidityen_US
dc.title (題名) 基於狀態的可修改智能合約zh_TW
dc.title (題名) State-based modifiable smart contracten_US
dc.type (資料類型) thesisen_US
dc.relation.reference (參考文獻) 1. Bitcoin: A peer-to-peer electronic cash system, Nakamoto, Satoshi
2. Secure property titles with owner authority, Szabo, Nick
3. A next-generation smart contract and decentralized application platform, Buterin, Vitalik
4. Decentralizing privacy: Using blockchain to protect personal data, Zyskind, Guy and Nathan, Oz and Pentland, Alex
5. Bitcoin: An innovative alternative digital currency, Grinberg, Reuben
6. 11 Blockchain technology: principles and applications, Pilkington, Marc
7. Blockchains and smart contracts for the internet of things, Christidis, Konstantinos and Devetsikiotis, Michael
8. Making smart contracts smarter, Luu, Loi and Chu, Duc-Hiep and Olickel, Hrishi and Saxena, Prateek and Hobor, Aquinas
9. The DAO (organization)
10. Blockchain and smart contracts for insurance: Is the technology mature enough, Gatteschi, Valentina and Lamberti, Fabrizio and Demartini, Claudio and Pranteda, Chiara and Santamara, Victor
11. Ethereum: A secure decentralised generalised transaction ledger, Wood, Gavin
12. The Ethereum block explorer, https://etherscan.io/
13. ERC-1504 Upgradable Smart Contract, Kaidong Wu, Chuqiao Ren, Ruthia He, Yun Ma
14. Double-spending fast payments in bitcoin, Karame, Ghassan O and Androulaki, Elli and Capkun, Srdjan
15. Decentralization in bitcoin and ethereum networks, Gencer, Adem Efe and Basu, Soumya and Eyal, Ittay and Van Renesse, Robbert and Sirer
16. Solidity, https://solidity.readthedocs.io/en/v0.4.25/
17. Ethereum, Introduction to Smart Contracts, https://solidity.readthedocs.io/en/v0.4.24/
18. How to write upgradable smart contracts in solidity, https://medium.com/quillhash/d8f1b95a0e9a
19. Ethereum Name Service, https://ens.domains/
20. Upgradeable Smart Contracts, https://hackernoon.com/a7e9aef76fdd
21. Testing software design modeled by finite-state machines, Chow, Tsun S.
22. Finite-state machine - Wikipedia
23. Remix - Solidity IDE, https://remix.ethereum.org/
zh_TW
dc.identifier.doi (DOI) 10.6814/NCCU201900330en_US