build the blockchain as service (baas) using ethereum on kubernetes

31
Build the Blockchain as a Service (Baas) using Ethereum on Kubernetes 日期:2017.11.14 Speaker:李麒傑

Upload: inwin-stack

Post on 21-Jan-2018

123 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

Build the Blockchain as a

Service (Baas) using Ethereum

on Kubernetes

日期:2017.11.14Speaker:李麒傑

Page 2: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

• 早期著重於 Web 前後端開發

• 研究所開始學習雲端技術(OpenStack、Kubernetes)

• 近期接觸區塊鏈技術(Ethereum)

Github: Ci-Jie

Page 3: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

Agenda

何謂區塊鏈? 安全機制 問題探討架構

01 02 03 04

Page 4: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

01

何謂區塊鏈?

Page 5: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

為什麼我們覺得把錢

放在銀行很安全?

Page 6: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

因為我們信賴銀行!

他不會無緣無故倒閉

Page 7: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

但是你有想過人們某些

原因不再相信銀行…

Page 8: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

區塊鏈將所有節點串連

在一起,沒有所謂的中

心,並且將所有交易的

資訊備份到所有節點

Page 9: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

這樣的特性我們如何導入企業?

Page 10: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

公開貨幣如何推廣?與實際貨幣價值比?

分散式儲存將資料有效的備份到私有鏈的所有節點,並且提供高安全的特性確保

資料不容易被竄改

公司內部貨幣如何應用?應用在哪裡?

Page 11: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

02

資料安全

Page 12: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

一次的儲存等於一筆交易

(Transaction)

Page 13: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

Block 111 (hash: 123)

Transaction a

Transaction b

Block 112 (hash: 456)

Transaction c

456 = Hash ( hash 123 + hash (tansaction c) )

Page 14: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

假如你今天想惡意竄改交易記錄…

Page 15: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

Block 200 (hash: 123)

Transaction a

Transaction b

Block 201 (hash: 456)

Transaction c

Block 202 (hash: 789)

Transaction d

Transaction e

Transaction f

1. 假設竄改 Transaction a 的交易記錄

2. 因為 Block 201 的 hash 是由 Transaction a 與其他交易產生,所以需要重新計算

3. 若 Block 已產生到 1000 則需修改前 800 個 Block 的 hash

4. 若總共 n 個 nodes 則需修改 800 * (n / 2 + 1) 個 Blocks

5. 在竄改的同時又會產生新的 Blocks,所以惡意竄改非常困難

Page 16: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

愈久的交易記錄愈不容易被竄改

區塊鏈上愈多節點也會增加竄改的難度

Page 17: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

假如不竄改歷史記錄,而偽造新交易也

可能造成惡意攻擊

Page 18: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

Block 200 (hash: 123)

Transaction a

Transaction b

Block 201 (hash: 456)

Transaction c

Block 202 (hash: 789)

Transaction d

Transaction e

Transaction f

1. 在 transaction a 中我欠小明 500 元

2. 在最新的 transaction 中寫入一筆我已經還小明 500 元的交易,但是我沒還

3. 同時有 (n / 2) + 1 的節點中都同意,那麼這筆交易會變成事實

Page 19: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

但是收買超過 51% 的節點可能會超過

預期的價值!

Page 20: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

03

架構

Page 21: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

為什麼要把 Ethereum 建置在

Kubernetes 上?

Page 22: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

Ethereum Nodes 服務故障需要重新啟動

可以任意擴展與縮小 Ethereum 規模

方便管理與監控 Ethereum Nodes

Page 23: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

NetstatEthereum dashboard

NodeEthereum nodes

Miniter監控所有節點狀態,包括擴展與縮小節點規模時更改狀態

NFSEthereum 叢集整體狀態儲存

Netstat IP ?

Enode ?

Nodes IP ?

Accounts ?

Page 24: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes
Page 25: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

基本上已經有了雛形,那麼我們還可以

加入什麼功能?

Page 26: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

04

問題探討

Page 27: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

每筆交易都必須付出手續費!

如何讓錢花不完?

如何降低每筆交易的手續費?

Page 28: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

建置在 Kubernetes 上,如何找到

Account 所註冊的 Nodes?

Page 29: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

Demo

Ethereum on Kubernetes

POC

Page 30: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

Open Source education Lab

IMAC Cloud

Page 31: Build the Blockchain as service (BaaS) Using Ethereum on Kubernetes

Thank you