跳到主要內容

簡易檢索 / 詳目顯示

研究生: 蔡詠捷
論文名稱: 區塊鏈中介服務設計探討-以Ethereum為例
Blockchain Middleware Design Base on Ethereum Platform
指導教授: 陳恭
口試委員: 王大為
廖峻鋒
學位類別: 碩士
Master
系所名稱: 理學院 - 資訊科學系碩士在職專班
Excutive Master Program of Computer Science
論文出版年: 2017
畢業學年度: 105
語文別: 中文
論文頁數: 65
中文關鍵詞: 區塊鏈以太坊中介元件
外文關鍵詞: Blockchain, Ethereum, Middleware
相關次數: 點閱:111下載:76
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 隨著近年來區塊鏈的興起與發展,許多軟體開發商認識到區塊鏈的技術。其特色可以帶來改變世界的巨大價值,遂投入區塊鏈技術的研究與開發。而眾多數位貨幣中最有潛力的莫過於Ethereum所提出的智能合約,因此,如何快速簡單的開發Ethereum上的智能合約以及去中心化的應用程式,將會是一個帶動區塊鏈加速發展的重要因素。
    為了讓開發人員能夠快速部署及測試智能合約,並且簡化開發去中心化應用程式的複雜度,本研究提出區塊鏈中介服務的軟體框架建構方式與實作流程,在開發去中心化應用程式時,讓開發人員僅著重於開發應用程式的邏輯判斷,不需要再花時間去部署以及設定Ethereum的核心程式,透過本研究所提供的服務,可以直接將Ethereum視為一個後端伺服器,透過用API串接的方式與應用程式交互溝通。本研究所提出的區塊鏈軟體中介服務經過技術的封裝,開發人員不需要了解區塊鏈底層核心的相關技術,就能完成去中心化應用程式的開發。


    With the rise and development of blockchain in recent years, many software developers have realized that the technology of blockchain can bring great value to change the world, thus put into research and development of blockchain technology. Technology with highest potential is Ethereum with the smart contract. Therefore, how to quickly and easily develop Ethereum smart contract and develop the decentralized application will be an important factor to the growth of blockchain.
    In order to enable developers to quickly deploy and testing smart contracts, and to simplify the complexity of the development of decentralized application, this thesis proposed blockchain middleware, software architecture and implementation process.
    For using this middleware, developer only need to focus on the logic of the application during the development phase, they do not need to spend a lot of time to deploy and set the core program in Ethereum. Through this middleware to provide services, developer can use Ethereum as a backend server, through the communication API in of the middleware.
    In this research, the blockchain middleware is encapsulated by the technology, developer can complete development of the decentralized application without knowing the related technology of the core of the blockchain.

    第一章 緒論 1
    1.1 研究背景與動機 1
    1.2 研究目的 2
    1.3 研究貢獻 2
    第二章 相關研究與技術背景 3
    2.1 區塊鏈 3
    2.1.1 Consensus 4
    2.1.2 Consistent Hashing 5
    2.1.3 P2P Network 6
    2.1.4 Digital Signature 6
    2.2 Ethereum 7
    2.2.1 Web3 7
    2.2.2 Ethereum Virtual Machine 8
    2.2.3 Decentralized Application 8
    2.2.4 Smart Contract 9
    2.3 Message Oriented Middleware 9
    2.4 PostgreSQL 10
    2.5 Elasticsearch 11
    2.6 Docker 11
    2.7 Swagger 12
    2.7.1 Open API規範 12
    2.8 BlockApps 13
    2.8.1 BlockApps STRATO Architecture 14
    2.9 Etherscan 16
    第三章 區塊鏈中介元件軟體設計探討 16
    3.1 BlockChainBox架構設計 17
    3.1.1 連線至區塊鏈網路 18
    3.1.2 開發人員Ethereum地址管理 18
    3.1.3 智能合約部署與管理 19
    3.1.4 管理區塊鏈智能合約與交易之間的關聯性資訊 19
    3.1.5 區塊鏈交易的失敗處理 19
    3.1.6 區塊鏈的非即時處理導致外部頻繁呼叫Ethereum的問題 20
    3.2 BlockChainBox模組化設計 21
    3.2.1 Message Oriented Middleware實作 22
    3.2.2 Docker導入 24
    3.2.3 Account Management 24
    3.2.4 Ethereum Gateway 26
    3.2.5 Contract Handler 27
    3.2.6 Transaction Handler 31
    3.2.7 Event Handler 33
    3.2.8 Webhook Support 35
    3.2.9 Ethereum Explorer 37
    3.2.10 Swagger UI 41
    3.2.11 Docker Support 42
    第四章 區塊鏈中介元件軟體使用探討 43
    4.1 Account Management 43
    4.2 Ethereum Gateway 44
    4.3 Contract Handler 45
    4.3.1 Contract Function 46
    4.3.2 Contract Event 46
    4.4 Transaction Handler 46
    4.5 Event Handler 47
    4.6 Webhook 47
    4.7 Ethereum Explorer 47
    4.8 效能測試 48
    4.8.1 Amazon Web Service 49
    4.8.2 測試環境 49
    4.9 系統比較 51
    4.9.1 系統使用性與操作性比較 53
    4.9.2 比較Webhook、WebSocket與Long Polling 54
    4.10 系統使用情境 55
    4.10.1 API操作流程範例 55
    4.10.2 範例程式 57
    第五章 結論與未來研究方向 60
    5.1 結論 60
    5.2 未來研究方向 61
    5.2.1 跨區塊鏈的功能 61
    5.2.2 提供SDK支援 61
    5.2.3 提供WebSocket支援 61
    參 考 文 獻 62
    附 錄 65

    【1】 Satoshi Nakamoto. "Bitcoin: A Peer-to-Peer Electronic Cash System", October 2008, https://bitcoin.org/bitcoin.pdf.
    【2】 Ethereum.org, "A Next-Generation Generalized Smart Contract and Decentralized Application Platform.", January 2014, https://github.com/ethereum/wiki/wiki/White-Paper.
    【3】 Ethereum (2015)
    https://www.ethereum.org/
    【4】 Smart Contract (2016)
    https://en.wikipedia.org/wiki/Smart_contract
    【5】 Blockchain: The Invisible Technology That's Changing the World (2017)
    http://www.pcmag.com/article/351486/blockchain-the-invisible-technology-thats-changing-the-wor
    【6】 Karger, D.; Lehman, E.; Leighton, T.; Panigrahy, R.; Levine, M.; Lewin, D. "Consistent Hashing and Random Trees: Distributed Caching Protocols for Relieving Hot Spots on the World Wide Web. ", Proceedings of the Twenty-ninth Annual ACM Symposium on Theory of Computing. ACM Press New York, NY, USA: 654–663. 1997. doi:10.1145/258533.258660
    【7】 A. Back, "Hashcash - a denial of service counter-measure,"
    http://www.hashcash.org/papers/hashcash.pdf, 2002.
    【8】 R.C. Merkle, "Protocols for public key cryptosystems," In Proc. 1980 Symposium on Security and Privacy, IEEE Computer Society, pages 122-133, April 1980.
    【9】 BlockApps GitHub (2016)
    https://github.com/blockapps/strato-getting-started
    【10】 Swagger (2015)
    http://swagger.io/
    【11】 Blockchain Technologies (2017)
    http://www.blockchaintechnologies.com/blockchain-smart-contracts
    【12】 訊息導向中介軟體 (2010)
    http://docs.oracle.com/cd/E19957-01/820-0534/aeraq/
    【13】 Proof of Work vs Proof of Stake
    https://blockgeeks.com/guides/proof-of-work-vs-proof-of-stake/
    【14】 Digital Signature
    http://searchsecurity.techtarget.com/definition/digital-signature
    【15】 Simple Decentralized App Architecture
    https://karl.tech/simple-dapp-architecture/
    【16】 Introducing Project "Bletchley"
    https://github.com/Azure/azure-blockchain-projects/blob/master/bletchley/bletchley-whitepaper.md
    【17】 O'Gara, Maureen. Ben Golub, Who Sold Gluster to Red Hat, Now Running dotCloud. SYS-CON Media. 26 July 2013
    【18】 Docker overview
    https://docs.docker.com/engine/docker-overview/#docker-engine
    【19】 Making Sure The Most Important Layers Of API Space Stay Open
    http://apievangelist.com/2014/12/21/making-sure-the-most-important-layers-of-api-space-stay-open/
    【20】 Microsoft BlockApps STRATO Blockchain LTS
    https://azuremarketplace.microsoft.com/en-us/marketplace/apps/blockapps.strato-blockchain-lts-vm
    【21】 BlockApps Website
    http://blockapps.net/blockchain-software-microsoft-azure/
    【22】 PostgreSQL
    https://www.postgresql.org/about/
    【23】 Etherscan
    https://etherscan.io/
    【24】 Solidity語言
    http://www.tryblockchain.org/

    QR CODE
    :::