分散ネットワークChristieによるBlockchainの実装

Takahiro Ikki, Shinji Kono 琉球大学

研究目的

Christie

Christieのコード例

package christie.example.HelloWorld;

import christie.codegear.CodeGearManager;
import christie.codegear.StartCodeGear;

public class StartHelloWorld extends StartCodeGear {

    public StartHelloWorld(CodeGearManager cgm) {
        super(cgm);
    }

    public static void main(String[] args){
        CodeGearManager cgm = createCGM(10000); #ポート番号を指定してCGMを立ち上げ。
        cgm.setup(new HelloWorldCodeGear()); #立ち上げたCGMへCGを待ちあわせる。
        cgm.getLocalDGM().put("helloWorld","hello"); #key "helloWorld"にhelloをput
        cgm.getLocalDGM().put("helloWorld","world");
    }
}

ChristieDaemon.listen: bind to /0:0:0:0:0:0:0:0:10000
hello world

DGM

MetaGear

Annottation

package christie.example.HelloWorld;

import christie.annotation.Take;
import christie.codegear.CodeGear;
import christie.codegear.CodeGearManager;

public class HelloWorldCodeGear extends CodeGear {
    @Take
    String helloWorld;

    @Override
    protected void run(CodeGearManager cgm) {
        System.out.print(helloWorld + " ");
        cgm.setup(new HelloWorldCodeGear());
    }
}

DGのアノテーション

TopologyManager

digraph test {
	node0 -> node1 [label="right"]
	node1 -> node2 [label="right"]
	node2 -> node0 [label="right"]
}
 MetaGear

ブロックチェーン

ブロックチェーンのトランザクション

 MetaGear

Transaction

Blockの動作

コンセンサスアルゴリズム

Proof of Work

Proof of Workのブロック生成手順

 MetaGear

Proof of workの欠点

Paxos

Paxosの役割ノード

Paxosの役割定義

paxosのアルゴリズム

paxosのアルゴリズム prepare-promise

 MetaGear

paxosのアルゴリズム accept-accepted

 MetaGear

PaxosとProof of Workの比較

Christieにおけるブロックチェーンの実装の利点

Christieにおけるブロックチェーンの実装の欠点

実験

Torque

実際の実験内容

 MetaGear

実際にPaxosを動かした際の解説

 MetaGear

まとめ