LoginSignup
2
1

More than 5 years have passed since last update.

Hyperledger Fabric 1.3 と Hyperledger Explorer をインストールしてみる。

Last updated at Posted at 2018-12-23

Hyperledger Fabric 1.3 + Hyperledger Explorer をインストール

ubunutu 16.04 に対して、Hyperledger Fabric のインストールとHyperledger Explorerをインストール

事前準備

https://hyperledger-fabric.readthedocs.io/en/release-1.3/prereqs.html

に従って、

  • cURLのインストール
  • Docker と Docker Composeのインストール
  • Go 言語のインストール
  • Node.js Runtime と NPM のインストール
  • Python のインストール

を実施。

cURLのインストール

Ubuntu 16.04LTSには、cURLは入っていたので、省略

バージョンの確認

$ curl --version
curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 GnuTLS/3.4.10 zlib/1.2.8 libidn/1.32 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets

Docker-ce のインストール

https://docs.docker.com/install/linux/docker-ce/ubuntu/#prerequisites

に従ってdocer

docker の古いVerをアンインストール

$ sudo apt-get remove docker docker-engine docker.io

apt パッケージインデックスを更新

$ sudo apt-get update

apt HTTPS経由でリポジトリを使用できるようにパッケージをインストール

$ sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common

ドッカーの公式GPGキーを追加

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

確認

$ sudo apt-key fingerprint 0EBFCD88

pub   4096R/0EBFCD88 2017-02-22
      Key fingerprint = 9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
uid                  Docker Release (CE deb) <docker@docker.com>
sub   4096R/F273FCD8 2017-02-22

レポジトリの追加

$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

更新を反映

$ sudo apt-get update

DOCKER CEをインストール

インストールできるバージョンを確認

$ apt-cache madison docker-ce docker-ce | 5:18.09.0~3-0~ubuntu-xenial | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
 docker-ce | 18.06.1~ce~3-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
 docker-ce | 18.06.0~ce~3-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
 docker-ce | 18.03.1~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
 docker-ce | 18.03.0~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
 docker-ce | 17.12.1~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
 docker-ce | 17.12.0~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
 docker-ce | 17.09.1~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
 docker-ce | 17.09.0~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
 docker-ce | 17.06.2~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
 docker-ce | 17.06.1~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
 docker-ce | 17.06.0~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
 docker-ce | 17.03.3~ce-0~ubuntu-xenial | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
 docker-ce | 17.03.2~ce-0~ubuntu-xenial | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
 docker-ce | 17.03.1~ce-0~ubuntu-xenial | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
 docker-ce | 17.03.0~ce-0~ubuntu-xenial | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages

Docker version 17.06.2-ce 以上をインストールする。

17.06.2-ceを指定する。指定なしだと最新版がインストールする。

sudo apt-get install docker-ce=17.06.2~ce-0~ubuntu

インストールしたバージョンの確認

$ sudo docker version
Client:
 Version:      17.06.2-ce
 API version:  1.30
 Go version:   go1.8.3
 Git commit:   cec0b72
 Built:        Tue Sep  5 20:00:17 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.06.2-ce
 API version:  1.30 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   cec0b72
 Built:        Tue Sep  5 19:59:11 2017
 OS/Arch:      linux/amd64
 Experimental: false

docker-composeのインストール

$ sudo apt-get install docker-compose

インストールしたバージョンの確認

$ $ docker-compose version
docker-compose version 1.8.0, build unknown
docker-py version: 1.9.0
CPython version: 2.7.12
OpenSSL version: OpenSSL 1.0.2g  1 Mar 2016

ユーザをdockerグループに登録して、sudo なしでdocker がコントロールできるようにする。

※設定が反映されるのは、リブート後

$ sudo gpasswd -a <ユーザ名> docker
ユーザ <ユーザ名> をグループ docker に追加

Go 言語のインストール

Go言語の取得と、インストール

$ wget https://dl.google.com/go/go1.11.4.linux-amd64.tar.gz
$ sudo tar -C /usr/local -xzf go1.11.4.linux-amd64.tar.gz
$ export PATH=$PATH:/usr/local/go/bin
$ export GOPATH=$HOME/go

設定が保存されるように、.profile に以下の2行を追加する。

export PATH=$PATH:/usr/local/go/bin
export GOPATH=$HOME/go
vi ~/.profile 

バージョンの確認

$ go version
go version go1.11.4 linux/amd64

Node.js Runtime と NPM のインストール

nodeとnpmのインストール

$ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
$ sudo apt-get install -y nodejs

バージョンの確認

$ node --version
v8.14.0
$ npm version
{ npm: '6.4.1',
  ares: '1.10.1-DEV',
  cldr: '32.0',
  http_parser: '2.8.0',
  icu: '60.1',
  modules: '57',
  napi: '3',
  nghttp2: '1.33.0',
  node: '8.14.0',
  openssl: '1.0.2q',
  tz: '2017c',
  unicode: '10.0',
  uv: '1.23.2',
  v8: '6.2.414.72',
  zlib: '1.2.11' }

Python のインストール

Python 2.7のインストール
※Ubuntu16.04LTSでは、最初からPython2.7が入っているので以下のようになる。

$ sudo apt-get install python
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています                
状態情報を読み取っています... 完了
python はすでに最新バージョン (2.7.12-1~16.04) です。
python は手動でインストールしたと設定されました。
アップグレード: 0 個、新規インストール: 0 個、削除: 0 個、保留: 0 個。

バージョンの確認

$ python --version
Python 2.7.12

設定を反映させるためには、システムをリブート


Hyperledger Fabric 1.3のインストール

Hyperledger Fabric 1.3 と、SDK、以下のtool をインストール

  • configtxgen
  • configtxlator
  • cryptogen
  • discover
  • idemixgen
  • orderer
  • peer
  • fabric-ca-client
$ curl -sSL http://bit.ly/2ysbOFE | bash -s 1.3.0

Toolにパスを通す。

$ export PATH=<path to download location>/bin:$PATH

設定が保存されるように、.profile に以下の1行を追加する。

export PATH=<path to download location>/bin:$PATH
vi ~/.profile 

インストールしたイメージの確認

$ docker images
REPOSITORY                     TAG                 IMAGE ID            CREATED             SIZE
hyperledger/fabric-ca          1.4.0-rc1           ebef9b071211        5 days ago          244MB
hyperledger/fabric-ca          latest              ebef9b071211        5 days ago          244MB
hyperledger/fabric-zookeeper   0.4.14              d36da0db87a4        2 months ago        1.43GB
hyperledger/fabric-zookeeper   latest              d36da0db87a4        2 months ago        1.43GB
hyperledger/fabric-kafka       0.4.14              a3b095201c66        2 months ago        1.44GB
hyperledger/fabric-kafka       latest              a3b095201c66        2 months ago        1.44GB
hyperledger/fabric-couchdb     0.4.14              f14f97292b4c        2 months ago        1.5GB
hyperledger/fabric-couchdb     latest              f14f97292b4c        2 months ago        1.5GB
hyperledger/fabric-javaenv     1.3.0               2476cefaf833        2 months ago        1.7GB
hyperledger/fabric-javaenv     latest              2476cefaf833        2 months ago        1.7GB
hyperledger/fabric-tools       1.3.0               c056cd9890e7        2 months ago        1.5GB
hyperledger/fabric-tools       latest              c056cd9890e7        2 months ago        1.5GB
hyperledger/fabric-ccenv       1.3.0               953124d80237        2 months ago        1.38GB
hyperledger/fabric-ccenv       latest              953124d80237        2 months ago        1.38GB
hyperledger/fabric-orderer     1.3.0               f430f581b46b        2 months ago        145MB
hyperledger/fabric-orderer     latest              f430f581b46b        2 months ago        145MB
hyperledger/fabric-peer        1.3.0               f3ea63abddaa        2 months ago        151MB
hyperledger/fabric-peer        latest              f3ea63abddaa        2 months ago        151MB

コマンドの確認

peerコマンドにパスが通っているか確認する。

$ peer
Usage:
  peer [command]

Available Commands:
  chaincode   Operate a chaincode: install|instantiate|invoke|package|query|signpackage|upgrade|list.
  channel     Operate a channel: create|fetch|join|list|update|signconfigtx|getinfo.
  help        Help about any command
  logging     Log levels: getlevel|setlevel|revertlevels.
  node        Operate a peer node: start|status.
  version     Print fabric peer version.

Flags:
  -h, --help                   help for peer
      --logging-level string   Default logging level and overrides, see core.yaml for full syntax

Use "peer [command] --help" for more information about a command.

First-networkの実行

First-networkのフォルダに移動

$ cd ~/fabric-samples/first-network/

証明書やgenesis blockの作成

$ ./byfn.sh generate

First-networkの起動

$ ./byfn.sh up

実行後に、以下の画面が出たら起動完了

========= All GOOD, BYFN execution completed =========== 


 _____   _   _   ____   
| ____| | \ | | |  _ \  
|  _|   |  \| | | | | | 
| |___  | |\  | | |_| | 
|_____| |_| \_| |____/  


Hyperledger Explorerの事前準備

PostgreSQL インストール

パッケージのダウンロード一覧にPostgresを追記

$ sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main' > /etc/apt/sources.list.d/pgdg.list"

公開鍵を信頼キーリストに追加

$ wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
OK

apt-key list で追加されたか確認

$ apt-key list
/etc/apt/trusted.gpg
--------------------
pub   1024D/437D05B5 2004-09-12
uid                  Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>
sub   2048g/79164387 2004-09-12

pub   4096R/C0B21F32 2012-05-11
uid                  Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>

pub   4096R/EFE21092 2012-05-11
uid                  Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>

pub   1024D/FBB75451 2004-12-30
uid                  Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu.com>

pub   1024R/3DF71FB4 2016-04-26
uid                  live-build local packages key <live-build-local-key@invalid>
sub   1024g/64E8CE16 2016-04-26

pub   1024D/0C4ECFEC 2005-05-24
uid                  Ubuntu-ja Archive Automatic Signing Key <archive@ubuntulinux.jp>
sub   2048g/40A3E9B2 2005-05-24

pub   1024R/CDC1D865 2009-04-05
uid                  Launchpad PPA for Ubuntu Japanese Team

pub   4096R/0EBFCD88 2017-02-22
uid                  Docker Release (CE deb) <docker@docker.com>
sub   4096R/F273FCD8 2017-02-22

pub   4096R/68576280 2014-06-13
uid                  NodeSource <gpg@nodesource.com>
sub   4096R/AA01DA2C 2014-06-13

pub   4096R/ACCC4CF8 2011-10-13
uid                  PostgreSQL Debian Repository

最後に追加されていることが確認できる

apt updateで反映

$ sudo apt-get update

インストール可能なバージョンを確認

$ apt-cache madison postgresql
postgresql | 11+197.pgdg16.04+1 | http://apt.postgresql.org/pub/repos/apt xenial-pgdg/main amd64 Packages
postgresql | 11+197.pgdg16.04+1 | http://apt.postgresql.org/pub/repos/apt xenial-pgdg/main i386 Packages
postgresql | 9.5+173ubuntu0.2 | http://jp.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
postgresql | 9.5+173ubuntu0.2 | http://jp.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages
postgresql | 9.5+173ubuntu0.1 | http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
postgresql | 9.5+173ubuntu0.1 | http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages
postgresql |    9.5+173 | http://jp.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
postgresql |    9.5+173 | http://jp.archive.ubuntu.com/ubuntu xenial/main i386 Packages

最新のpostgreSQLをインストールする。

$ sudo apt-get install postgresql

インストールの確認

psqlコマンド

$  which psql
/usr/bin/psql

postgresプロセス

$ ps aux | grep postgres | grep -v grep
postgres  6710  0.0  0.6 312808 26620 ?        S    22:19   0:00 /usr/lib/postgresql/11/bin/postgres -D /var/lib/postgresql/11/main -c config_file=/etc/postgresql/11/main/postgresql.conf
postgres  6712  0.0  0.1 312928  6892 ?        Ss   22:19   0:00 postgres: 11/main: checkpointer   
postgres  6713  0.0  0.0 312808  4000 ?        Ss   22:19   0:00 postgres: 11/main: background writer   
postgres  6714  0.0  0.2 312808  8956 ?        Ss   22:19   0:00 postgres: 11/main: walwriter   
postgres  6715  0.0  0.1 313212  6532 ?        Ss   22:19   0:00 postgres: 11/main: autovacuum launcher   
postgres  6716  0.0  0.0 167724  3428 ?        Ss   22:19   0:00 postgres: 11/main: stats collector   
postgres  6717  0.0  0.1 313104  4860 ?        Ss   22:19   0:00 postgres: 11/main: logical replication launcher   

DBユーザの確認

postgresユーザーにスイッチ

$ sudo -u postgres -i

psqlコマンドでDBにアクセス

$ psql
psql (11.1 (Ubuntu 11.1-1.pgdg16.04+1))
"help" でヘルプを表示します。

ユーザーの確認

postgres=# \du
                                              ロール一覧
 ロール名 |                                    属性                                    | 所属グループ 
----------+----------------------------------------------------------------------------+--------------
 postgres | スーパーユーザ, ロール作成可, DB作成可, レプリケーション可, RLS のバイパス | {}

抜ける

postgres=# \q
$ exit
ログアウト

jq のインストール

$ sudo apt install jq

Hyperledger Explorerのインストール

リポジトリをクローン

$ git clone https://github.com/hyperledger/blockchain-explorer.git

データベースのセットアップ

postgresqlのプロパティの初期値は以下のようになっている、今回は変更なしで使用する。

※環境に合わせて適宜ホスト/port/ユーザ名/パスワードを変更する。

$ cd blockchain-explorer/app
$ cat explorerconfig.json 
{
  "persistence": "postgreSQL",
  "platforms": ["fabric"],
  "postgreSQL": {
    "host": "127.0.0.1",
    "port": "5432",
    "database": "fabricexplorer",
    "username": "hppoc",
    "passwd": "password"
  },
  "sync": {
    "type": "local",
    "platform": "fabric",
    "blocksSyncTime": "3"
  }
}

configの修正

初期値は、以下のようになっている。

$ cat app/platform/fabric/config.json
{
  "network-configs": {
    "network-1": {
      "version": "1.0",
      "clients": {
        "client-1": {
          "tlsEnable": true,
          "organization": "Org1MSP",
          "channel": "mychannel",
          "credentialStore": {
            "path": "./tmp/credentialStore_Org1/credential",
            "cryptoStore": {
              "path": "./tmp/credentialStore_Org1/crypto"
            }
          }
        }
      },
      "channels": {
        "mychannel": {
          "peers": {
            "peer0.org1.example.com": {}
          },
          "connection": {
            "timeout": {
              "peer": {
                "endorser": "6000",
                "eventHub": "6000",
                "eventReg": "6000"
              }
            }
          }
        }
      },
      "organizations": {
        "Org1MSP": {
          "mspid": "Org1MSP",
          "fullpath": false,
          "adminPrivateKey": {
            "path": "fabric-path/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore"
          },
          "signedCert": {
            "path": "fabric-path/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts"
          }
        },
        "Org2MSP": {
          "mspid": "Org2MSP",
          "adminPrivateKey": {
            "path": "fabric-path/fabric-samples/first-network/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore"
          }
        },
        "OrdererMSP": {
          "mspid": "OrdererMSP",
          "adminPrivateKey": {
            "path": "fabric-path/fabric-samples/first-network/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/keystore"
          }
        }
      },
      "peers": {
        "peer0.org1.example.com": {
          "tlsCACerts": {
            "path": "fabric-path/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
          },
          "url": "grpcs://localhost:7051",
          "eventUrl": "grpcs://localhost:7053",
          "grpcOptions": {
            "ssl-target-name-override": "peer0.org1.example.com"
          }
        },
        "peer1.org1.example.com": {
          "url": "grpcs://localhost:8051"
        },
        "peer0.org2.example.com": {
          "url": "grpcs://localhost:9051"
        },
        "peer1.org2.example.com": {
          "url": "grpcs://localhost:10051"
        }
      },
      "orderers": {
        "orderer.example.com": {
          "url": "grpcs://localhost:7050"
        }
      }
    },
    "network-2": {}
  },
  "configtxgenToolPath": "fabric-path/fabric-samples/bin",
  "license": "Apache-2.0"
}

初期値は、fabric-sampleのFirst-network に対応したものとなっている。今回は、First-networkでの確認とするため、環境に合わせた修正のみとする。

fabric-path → 各環境に合わせて変更

今回は、ホームディレクトリ直下にFabricをインストールしているため、以下のように修正する。

$ cat app/platform/fabric/config.json
{
  "network-configs": {
    "network-1": {
      "version": "1.0",
      "clients": {
        "client-1": {
          "tlsEnable": true,
          "organization": "Org1MSP",
          "channel": "mychannel",
          "credentialStore": {
            "path": "./tmp/credentialStore_Org1/credential",
            "cryptoStore": {
              "path": "./tmp/credentialStore_Org1/crypto"
            }
          }
        }
      },
      "channels": {
        "mychannel": {
          "peers": {
            "peer0.org1.example.com": {}
          },
          "connection": {
            "timeout": {
              "peer": {
                "endorser": "6000",
                "eventHub": "6000",
                "eventReg": "6000"
              }
            }
          }
        }
      },
      "organizations": {
        "Org1MSP": {
          "mspid": "Org1MSP",
          "fullpath": false,
          "adminPrivateKey": {
            "path": "~/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore"
          },
          "signedCert": {
            "path": "~/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts"
          }
        },
        "Org2MSP": {
          "mspid": "Org2MSP",
          "adminPrivateKey": {
            "path": "~/fabric-samples/first-network/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore"
          }
        },
        "OrdererMSP": {
          "mspid": "OrdererMSP",
          "adminPrivateKey": {
            "path": "~/fabric-samples/first-network/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/keystore"
          }
        }
      },
      "peers": {
        "peer0.org1.example.com": {
          "tlsCACerts": {
            "path": "~/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
          },
          "url": "grpcs://localhost:7051",
          "eventUrl": "grpcs://localhost:7053",
          "grpcOptions": {
            "ssl-target-name-override": "peer0.org1.example.com"
          }
        },
        "peer1.org1.example.com": {
          "url": "grpcs://localhost:8051"
        },
        "peer0.org2.example.com": {
          "url": "grpcs://localhost:9051"
        },
        "peer1.org2.example.com": {
          "url": "grpcs://localhost:10051"
        }
      },
      "orderers": {
        "orderer.example.com": {
          "url": "grpcs://localhost:7050"
        }
      }
    },
    "network-2": {}
  },
  "configtxgenToolPath": "~/fabric-samples/bin",
  "license": "Apache-2.0"
}

Hyperledger Explorerのセットアップ

blockchain-explorer$ cd ~/blockchain-explorer/
blockchain-explorer$ npm install
blockchain-explorer$ cd app/test
blockchain-explorer/app/test$ npm install
blockchain-explorer/app/test$ npm run test
blockchain-explorer/app/test$ cd ../../client/
blockchain-explorer/client$ npm install
blockchain-explorer/client$ npm test ---u --coverage

以下のように表示される

No tests found related to files changed since last commit.
Press `a` to run all tests, or run Jest with `--watchAll`.

Watch Usage
 › Press a to run all tests.
 › Press f to run only failed tests.
 › Press p to filter by a filename regex pattern.
 › Press t to filter by a test name regex pattern.
 › Press q to quit watch mode.
 › Press Enter to trigger a test run.

a を入力して、すべてのテストを実施する。

テストが終わったら、q で抜ける。

※エラーが出ていても動作には問題ないもよう。

buildを実施

blockchain-explorer/client$ npm run build
blockchain-explorer/client$cd ..

Hyperledger Explorerを起動する。

blockchain-explorer$ ./start.sh

************************************************************************************
**************************** Hyperledger Explorer **********************************
************************************************************************************
***** Please check the log [logs/console/console-2018-12-16.log] for any error *****
************************************************************************************

ログを確認してきちんと起動しているかを確認する。

$ cat logs/console/console-2018-12-16.log 
postgres://hppoc:password@127.0.0.1:5432/fabricexplorer
(node:21661) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead


Please open web browser to access :http://localhost:8080/


pid is 21661


postgres://hppoc:password@127.0.0.1:5432/fabricexplorer

Sync process is started for the network : [network-1] and client : [client-1]
(node:21684) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead
Insert sql is INSERT INTO channel  ( "name","createdt","blocks","trans","channel_hash","channel_genesis_hash" ) VALUES( $1,$2,$3,$4,$5,$6  ) RETURNING *;
INSERT ID: 3
Insert sql is INSERT INTO peer  ( "mspid","requests","events","server_hostname","channel_genesis_hash","peer_type" ) VALUES( $1,$2,$3,$4,$5,$6  ) RETURNING *;
INSERT ID: 1
Insert sql is INSERT INTO peer_ref_channel  ( "peerid","channelid" ) VALUES( $1,$2  ) RETURNING *;
INSERT ID: 1
Insert sql is INSERT INTO peer  ( "mspid","requests","events","server_hostname","channel_genesis_hash","peer_type" ) VALUES( $1,$2,$3,$4,$5,$6  ) RETURNING *;
INSERT ID: 2
Insert sql is INSERT INTO peer_ref_channel  ( "peerid","channelid" ) VALUES( $1,$2  ) RETURNING *;
INSERT ID: 2
Insert sql is INSERT INTO peer  ( "mspid","requests","events","server_hostname","channel_genesis_hash","peer_type" ) VALUES( $1,$2,$3,$4,$5,$6  ) RETURNING *;
INSERT ID: 3
Insert sql is INSERT INTO peer_ref_channel  ( "peerid","channelid" ) VALUES( $1,$2  ) RETURNING *;
INSERT ID: 3
Insert sql is INSERT INTO peer  ( "mspid","requests","events","server_hostname","channel_genesis_hash","peer_type" ) VALUES( $1,$2,$3,$4,$5,$6  ) RETURNING *;
INSERT ID: 4
Insert sql is INSERT INTO peer_ref_channel  ( "peerid","channelid" ) VALUES( $1,$2  ) RETURNING *;
INSERT ID: 4
Insert sql is INSERT INTO peer  ( "mspid","requests","server_hostname","channel_genesis_hash","peer_type" ) VALUES( $1,$2,$3,$4,$5  ) RETURNING *;
INSERT ID: 5
Insert sql is INSERT INTO peer_ref_channel  ( "peerid","channelid" ) VALUES( $1,$2  ) RETURNING *;
INSERT ID: 5
Insert sql is INSERT INTO chaincodes  ( "name","version","path","txcount","createdt","channel_genesis_hash" ) VALUES( $1,$2,$3,$4,$5,$6  ) RETURNING *;
INSERT ID: 10
Insert sql is INSERT INTO peer_ref_chaincode  ( "chaincodeid","cc_version","peerid","channelid" ) VALUES( $1,$2,$3,$4  ) RETURNING *;
INSERT ID: 1
Insert sql is INSERT INTO peer_ref_chaincode  ( "chaincodeid","cc_version","peerid","channelid" ) VALUES( $1,$2,$3,$4  ) RETURNING *;
INSERT ID: 2
Insert sql is INSERT INTO peer_ref_chaincode  ( "chaincodeid","cc_version","peerid","channelid" ) VALUES( $1,$2,$3,$4  ) RETURNING *;
INSERT ID: 3


Synchronizer pid is 21684


read_set length 469
write_set size >>>>>>>>> :  0.5007524490356445 MB
Insert sql is INSERT INTO transactions  ( "blockid","txhash","createdt","chaincodename","chaincode_id","status","creator_msp_id","endorser_msp_id","type","read_set","write_set","channel_genesis_hash","validation_code","envelope_signature","payload_extension","creator_nonce","chaincode_proposal_input","endorser_signature","creator_id_bytes","payload_proposal_hash","endorser_id_bytes" ) VALUES( $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21  ) RETURNING *;
INSERT ID: 6
Insert sql is INSERT INTO blocks  ( "blocknum","datahash","prehash","txcount","createdt","prev_blockhash","blockhash","channel_genesis_hash" ) VALUES( $1,$2,$3,$4,$5,$6,$7,$8  ) RETURNING *;
INSERT ID: 1

エラーが出ていなければ、ブラウザから http://localhost:8080/ に接続する。

hyperledger Explorerの画面が表示される。
hyperledger-exploror.png


2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1