學術產出-Theses

Article View/Open

Publication Export

Google ScholarTM

政大圖書館

Citation Infomation

題名 用事件溯源技術實現可溯源的智能合約
Implementation of traceable smart contracts with event sourcing
作者 鄭智豪
Cheng, Chih-Hao
貢獻者 陳恭<br>陳宜秀
Chen, Kung<br>Chen, Yi-Hsiu
鄭智豪
Cheng, Chih-Hao
關鍵詞 區塊鏈
智能合約
CQRS
Event Sourcing
日期 2020
上傳時間 2-Sep-2020 13:07:43 (UTC+8)
摘要 近年來許多企業紛紛投入區塊鏈的應用開發,區塊鏈具有非常完整的交易歷程儲存機制,鏈上發生過的每筆交易都會被保存在區塊中,再加上區塊鏈具有去中心化與無法竄改的特性,這些資料在商業用途可做為業務的存證或稽核用途。然而區塊鏈紀錄的是「區塊本身被確認的歷史」,而非「合約狀態被修改的歷史」,而且許多不同合約產生的交易紀錄都被保存在同一個區塊中,若沒有一套可行的機制作為輔助,要從鏈上取出特定合約狀態的歷史資料,唯一的做法為遍歷所有區塊並擷取特定合約相關的歷史紀錄。隨著時間的推移,區塊鏈保存的資料只會越來越多,進而導致從鏈上取出特定資料的時間變的非常緩慢,更不用說同時因應大量的查詢需求。此外,區塊鏈在特定情況下會有資料遺失的問題,雖然理論上發生的機率很低,但在實務上如果一筆重要且有爭議的交易遺失將造成重大的損失。鑑於上述問題本,研究使用命令與查詢責任分離模式 (CQRS,Command Query Responsibility Segregation)結合事件回溯 (ES,Event Sourcing)機制提出一套可行的解決方案,並透過實作與案例研討初步驗證所設計機制的可行性。
參考文獻 [1]黃方佐,2017,應用區塊鏈技術設計具資料隱私性之綠色供應鏈管理平台框架
[2]Satoshi Nakamoto. 2008. Bitcoin:A Peer-to-Peer Electronic Cash System
[3]The Economist. 2015. The trust machine
[4]EC Ferrer. 2016. The blockchain: a new framework for robotic swarm systems.
[5]Martin Fowler. 2006. Development of Further Patterns of Enterprise Application Architecture
[6]Chris Richardson. 2017. Developing Transactional Microservices Using Aggregates, Event Sourcing and CQRS
[7]會計研究月刊. 2019. 會計研究月刊第405期新興籌資工具 證券型代幣發行(STO)
[8]Timothy McCallum. 2018. Diving into Ethereum’s world state
[9]Lee Thomas. 2016. An Interpretation of Ethereum Project Yellow Paper
[10] Vitalik Buterin. 2013. A Next-Generation Smart Contract and Decentralized Application Platform Paper
[11] Nick Szabo. 1996. Smart Contracts: Building Blocks for Digital Markets
[12] Dr. Gavin Wood. 2014. Ethereum: A Secure Decentralized Generalized Transaction Ledger
網路資料
[1]以太坊詳解之Merkle Patricia Trie,2018,https://yuan1028.github.io/ethereum-mpt/
[2]以太坊源碼(一)Merkle-Patricia Trie(MPT)的實現,2018,https://www.jianshu.com/p/1e7455d00065
[3] 一文讀懂以太坊存儲數據核心數據結構:MPT,2019,https://www.chainnews.com/zh-hant/articles/547512219774.htm
[4] 證券型代幣(STO)規範出爐 — 政府要你殺雞用牛刀,2019,https://vocus.cc/@astro/5d1adf00fd897800019e2c62
[5] The 1.x Files: The State of Stateless Ethereum,2019,https://blog.ethereum.org/2019/12/30/eth1x-files-state-of-stateless-ethereum/
[6] CQRS and Event Sourcing as an antidote for problems with retrieving application states,2018,https://nexocode.com/blog/posts/cqrs-and-event-sourcing/
[7] Indexer for Ethereum to get transaction list by address,2019,https://medium.com/adamant-im/indexer-for-ethereum-to-get-transaction-list-by-address-f5e5b38d5e8e
[8] 什麼是圖靈完備?,2011,https://www.zhihu.com/question/20115374
描述 碩士
國立政治大學
數位內容碩士學位學程
107462002
資料來源 http://thesis.lib.nccu.edu.tw/record/#G0107462002
資料類型 thesis
dc.contributor.advisor 陳恭<br>陳宜秀zh_TW
dc.contributor.advisor Chen, Kung<br>Chen, Yi-Hsiuen_US
dc.contributor.author (Authors) 鄭智豪zh_TW
dc.contributor.author (Authors) Cheng, Chih-Haoen_US
dc.creator (作者) 鄭智豪zh_TW
dc.creator (作者) Cheng, Chih-Haoen_US
dc.date (日期) 2020en_US
dc.date.accessioned 2-Sep-2020 13:07:43 (UTC+8)-
dc.date.available 2-Sep-2020 13:07:43 (UTC+8)-
dc.date.issued (上傳時間) 2-Sep-2020 13:07:43 (UTC+8)-
dc.identifier (Other Identifiers) G0107462002en_US
dc.identifier.uri (URI) http://nccur.lib.nccu.edu.tw/handle/140.119/131899-
dc.description (描述) 碩士zh_TW
dc.description (描述) 國立政治大學zh_TW
dc.description (描述) 數位內容碩士學位學程zh_TW
dc.description (描述) 107462002zh_TW
dc.description.abstract (摘要) 近年來許多企業紛紛投入區塊鏈的應用開發,區塊鏈具有非常完整的交易歷程儲存機制,鏈上發生過的每筆交易都會被保存在區塊中,再加上區塊鏈具有去中心化與無法竄改的特性,這些資料在商業用途可做為業務的存證或稽核用途。然而區塊鏈紀錄的是「區塊本身被確認的歷史」,而非「合約狀態被修改的歷史」,而且許多不同合約產生的交易紀錄都被保存在同一個區塊中,若沒有一套可行的機制作為輔助,要從鏈上取出特定合約狀態的歷史資料,唯一的做法為遍歷所有區塊並擷取特定合約相關的歷史紀錄。隨著時間的推移,區塊鏈保存的資料只會越來越多,進而導致從鏈上取出特定資料的時間變的非常緩慢,更不用說同時因應大量的查詢需求。此外,區塊鏈在特定情況下會有資料遺失的問題,雖然理論上發生的機率很低,但在實務上如果一筆重要且有爭議的交易遺失將造成重大的損失。鑑於上述問題本,研究使用命令與查詢責任分離模式 (CQRS,Command Query Responsibility Segregation)結合事件回溯 (ES,Event Sourcing)機制提出一套可行的解決方案,並透過實作與案例研討初步驗證所設計機制的可行性。zh_TW
dc.description.tableofcontents 第一章 緒論 5
第一節 研究背景與動機 5
第二節 研究目的 5
第二章 文獻探討 6
第一節 區塊鏈 6
第二節 以太坊與智能合約 8
第三節 可溯源的重要性及其挑戰 16
第四節 Event Sourcing與CQRS 17
第五節 文獻探討小結 19
第三章 系統設計 21
第一節 系統架構與設計 21
第二節 合約歷史狀態保存 22
第三節 合約歷史狀態查詢 23
第四節 THR(Transaction History Root) 25
第四章 系統實作與評估 27
第一節 系統實作 27
第二節 系統評估 27
第五章 結論 36
參考文獻 37
網路資料 37
zh_TW
dc.format.extent 1475190 bytes-
dc.format.mimetype application/pdf-
dc.source.uri (資料來源) http://thesis.lib.nccu.edu.tw/record/#G0107462002en_US
dc.subject (關鍵詞) 區塊鏈zh_TW
dc.subject (關鍵詞) 智能合約zh_TW
dc.subject (關鍵詞) CQRSen_US
dc.subject (關鍵詞) Event Sourcingen_US
dc.title (題名) 用事件溯源技術實現可溯源的智能合約zh_TW
dc.title (題名) Implementation of traceable smart contracts with event sourcingen_US
dc.type (資料類型) thesisen_US
dc.relation.reference (參考文獻) [1]黃方佐,2017,應用區塊鏈技術設計具資料隱私性之綠色供應鏈管理平台框架
[2]Satoshi Nakamoto. 2008. Bitcoin:A Peer-to-Peer Electronic Cash System
[3]The Economist. 2015. The trust machine
[4]EC Ferrer. 2016. The blockchain: a new framework for robotic swarm systems.
[5]Martin Fowler. 2006. Development of Further Patterns of Enterprise Application Architecture
[6]Chris Richardson. 2017. Developing Transactional Microservices Using Aggregates, Event Sourcing and CQRS
[7]會計研究月刊. 2019. 會計研究月刊第405期新興籌資工具 證券型代幣發行(STO)
[8]Timothy McCallum. 2018. Diving into Ethereum’s world state
[9]Lee Thomas. 2016. An Interpretation of Ethereum Project Yellow Paper
[10] Vitalik Buterin. 2013. A Next-Generation Smart Contract and Decentralized Application Platform Paper
[11] Nick Szabo. 1996. Smart Contracts: Building Blocks for Digital Markets
[12] Dr. Gavin Wood. 2014. Ethereum: A Secure Decentralized Generalized Transaction Ledger
網路資料
[1]以太坊詳解之Merkle Patricia Trie,2018,https://yuan1028.github.io/ethereum-mpt/
[2]以太坊源碼(一)Merkle-Patricia Trie(MPT)的實現,2018,https://www.jianshu.com/p/1e7455d00065
[3] 一文讀懂以太坊存儲數據核心數據結構:MPT,2019,https://www.chainnews.com/zh-hant/articles/547512219774.htm
[4] 證券型代幣(STO)規範出爐 — 政府要你殺雞用牛刀,2019,https://vocus.cc/@astro/5d1adf00fd897800019e2c62
[5] The 1.x Files: The State of Stateless Ethereum,2019,https://blog.ethereum.org/2019/12/30/eth1x-files-state-of-stateless-ethereum/
[6] CQRS and Event Sourcing as an antidote for problems with retrieving application states,2018,https://nexocode.com/blog/posts/cqrs-and-event-sourcing/
[7] Indexer for Ethereum to get transaction list by address,2019,https://medium.com/adamant-im/indexer-for-ethereum-to-get-transaction-list-by-address-f5e5b38d5e8e
[8] 什麼是圖靈完備?,2011,https://www.zhihu.com/question/20115374
zh_TW
dc.identifier.doi (DOI) 10.6814/NCCU202001323en_US