香港開源區塊鏈活動 Hyperledger BootCamp 2019

3月7-8日 Linux 基金會在香港數碼港舉行開源區塊鏈活動 Hyperledger BootCamp 2019,為 Hyperledger 旗下不同開源區塊鏈專案「開坑」,讓新開發者加速了解不同專案的入門方法,速成教導新開發者貢獻專案的程序。

BootCamp形式像BarCamp那像Unconfernce形式,由參加者設定每節題目。而不同之處是每節都需要參加者自備手提電腦,按不同專案和類型,分作12個10人大圓桌小組,跟主持(Session Leader)做一些習作和互動。主持按照該節目的,或多或少指導參加者作業,甚至交由參加者主導作業。另設三間10-20人培訓室,多作入門教學。

源自 IBM 釋出源碼的Hyperledger Fabric自然有不少人棒場,而筆者在兩日活動主要參加Hyperledger Iroha和Hyperledger Indy相關環節。

區塊鏈入門環節The Forest & the Trees! The unifying foundations of Blockchain,為區塊鏈新手講解區塊鏈技術。

以下是筆者英文速記:

  • DLT = Distributed Ledger Technology
  • Hash and Message Digest
  • Public Key Crypto
  • Merkle Tree
  • Transaction Chain
  • Blockchain
    • Header- contains
    • Chaining-achieved through hashing of previous blocks
    • Merkle Root: Hash based data structure of transactions (here Hash of Block data)
  • Permissioned vs Permissionless
  • Block-Fabric
    • Blockchain
    • Additional items in header and transactions…..
  • Block-Sawtooth
    • additional items in header an batches are to do with permission ledgers.

Hyperledger Indy需要懂Rust的開發者,所以設有入門環節Introduction to Rust and Cargo,讓不認識Rust的開發者快速了解這Rust語言。以下是筆者英文速記:

  • WASM!!
    • Web app server -> middleware -> browser code, all in RUST!
  • cargo init –bin myproject
  • Cargo.toml
    • .toml json file in different layout.
  • cargo build
  • cargo run
    • Finished dev [unoptimized + debuginfo] target(s) in 4.53 secs
  • optimised version
    • cargo build —release
    • Finished release [optimized] target(s) in 0.0 secs
  • https://doc.rust-lang.org/stable/book/
  • https://doc.rust-lang.org/stable/cargo/
  • https://doc.rust-lang.org/stable/rust-by-example/
  • https://crates.io/
    • More packages than Python, Node
    • Most Recommended Package: serde
      • a generice serialisation/deserialization framework
  • IRON extensible web framework for rust
    • ironframework.io
  • enum = data type
  • pub fn fn_name() {… } = public function
  • for i in a {… } = for loop
  • let, let out something = 0;
  • impl

筆者在Hyperledger Iroha入門環節Getting Started with Iroha Session I 的英文速記。

  • Features
    • Command-driven architecture
      • Asset management
      • Identify management
    • Byzantine fault-tolerant ordering service and consensus
    • Role-based access control
    • Mutlo-signature transactions
    • Universal peer role and easy scripted deployment with Docker and Ansible
  • Why Iroha
    • Distributed Ledger platform for simple use-cases of payments and identify storage.
    • Uses fixed set of commands 16 in total (eg. asset creation, transfers, account creation) and ?? queues.
  • Successful Proof of Concept projects: cross-chain exchange, bank settlements, etc.
  • Data structure
    • User account {account_name}@{domain}
    • Each user have some Asset {asset_name}#{domain}
  • Works
    • Run Iroha locally
    • Create simple web service to interact with Iroha
  • Workshop 1

irohad –config ~/config.docker –keypair_name ~/node0

[2019-03-07 10:57:01.576692300] [I] [CLI/ResponseHandler/Query]: [Account Assets]
[2019-03-07 10:57:01.576748700] [I] [CLI/ResponseHandler/Query]: -Account Id:- test@test
[2019-03-07 10:57:01.576762100] [I] [CLI/ResponseHandler/Query]: -Asset Id- coolcoin#test
[2019-03-07 10:57:01.576776500] [I] [CLI/ResponseHandler/Query]: -Balance- 100.5

[2019-03-07 10:57:40.420019600] [I] [CLI/ResponseHandler/Query]: [Account Assets]
[2019-03-07 10:57:40.420044900] [I] [CLI/ResponseHandler/Query]: -Account Id:- admin@test
[2019-03-07 10:57:40.420052900] [I] [CLI/ResponseHandler/Query]: -Asset Id- coolcoin#test
[2019-03-07 10:57:40.420063700] [I] [CLI/ResponseHandler/Query]: -Balance- 100.0

筆者在Hyperledger Indy入門環節Getting Started with Indy的英文速記。

  • Sovrin Foundation, Sovrin Alliance
  • Identity
  • Sovrin donate source code to LF.
  • Most Bottom Layer: Indy-Crypto -> HyperLedger Ursa
  • Client side: Indy-SDK (libIndy & libVCX), Agent (on top SDK) (Python, Node), Sovrin Connector-App
  • Ledger side: Indy Plenum (Communicate with Nodes), Indy-Node (on top of Plenum)(Handling Identity), Sovrin Ledger plugin
  • Look for: Agent Protocol, Schema2.0, DKMS Efforts (Decentrailised Key Management System), Ledger 2.0 (Python?).

然後是Indy Agent的英文速記。

在結束環節最後,Hyperledger 團隊宣佈 David Liu 被選為新的義務宣傳大使(ambassador)。

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

*