4
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Blockcertsのcerts-issuerをethereumで動かしてみる

Last updated at Posted at 2020-11-17

Blockchainを使用したブロックチェーン証明書は発行したことがあったのですが、Ethereumチェーンを使用したことがなかったので使ってみました。

環境構築

1.docker のインストール

git clone https://github.com/blockchain-certificates/cert-issuer.git && cd cert-issuer

2.cert-issuerのディレクトリでコンテナをビルド

docker build -t bc/cert-issuer:1.0 .

3.dockerコンテナをコミット

docker ps -l docker commit <container for your bc/cert-issuer> my_cert_issuer

4.dockerを走らせる

docker run -v <cert-issuer>:/cert-issuer -it bc/cert-issuer:1.0 bash

5.今回はethereumを選択

python setup.py experimental --blockchain=ethereum

python setup.py experimental --blockchain=ethereum
Traceback (most recent call last):
  File "setup.py", line 6, in <module>
    from setuptools import find_packages

おっと??

dockerファイル内にsetuptools記述あったような気がしたのですが確認。

pip3 install setuptools --upgrade

Requirement already up-to-date: setuptools in /usr/lib/python3.6/site-packages (50.3.2)

やっぱり。。。

REAMD.meのコマンドではなくpython3で試してみたところ以下のエラーが出たのでrequirement.txtをpysha3==1.0b1に変更。

ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.

cert-issuer 2.0.24 requires pysha3==1.0b1, but you'll have pysha3 1.0.2 which is incompatible.

再度以下コマンド実行。
python3 setup.py experimental --blockchain=ethereum

成功!!

#issueしてみる

conf_ethtest.iniを編集して以下のコマンドで発行。

python3 cert_issuer -c conf_ethtest.ini

・・・
INFO - Your Blockchain Certificates are in /cert-issuer/data/blockchain_certificates

うまく行ったみたいです。

4
0
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
4
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?