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

MPC-TSS(閾値署名)の実験(その2 環境準備編)

0
Last updated at Posted at 2026-03-20

こちらの続きです

まずは実験環境の説明です

:v: アピールポイント :v:

  • Keygen、Sign、Refresh を実現!
    • Refreshまで実行できるライブラリ:multi-party-sig-cpp にめぐり合うまで、別の2つのライブラリで七転八倒
  • Party間の データのやり取りを可視化!
    • Node-RED-FlexDash-vis-network でリアルタイム表示
  • 単一マシン上で 複数Partyが動作するPoC環境を実現!
    • 複数DockerコンテナをNode-REDで連携
  • コードはバイブコーディング

3人全員で署名する際のデータやり取りの様子
Sign.gif

環境立ち上げ手順

手順1~4で DockerコンテナのMPCアプリケーション部分を、
手順5~7で Node-REDのデータ連携、UI部分を立ち上げます

1.Docker Desktopをインストール

WindowsにDocker Desktopをインストールする
手順の説明は省略

2.MPC-TSSアプリケーションのファイルをダウンロード

以下のリポジトリからファイル一式をダウンロードする

フォルダ構成

C:¥mpc-tss-trialにダウンロードした前提で説明します。
ご自身の環境に読み替えてください。

3.MPCライブラリをビルド

本実験では MPCライブラリ:multi-party-sig-cpp を使用する

PowerShellコンソールで以下コマンドを実行し、
ライブラリのダウンロード&ビルドを行う

cd C:\mpc-tss-trial
docker build -f docker/Dockerfile.base -t mpc-base .

処理完了後、mpc-baseというイメージができていることを確認する

入力
docker images mpc-base
応答
IMAGE             ID             DISK USAGE   CONTENT SIZE   EXTRA
mpc-base:latest   xxxxxxxxxxxx       xxxxGB          xxxMB

4.MPC-TSSアプリケーションのビルドおよびコンテナ起動

PowerShellコンソールで以下コマンドを実行し、
アプリケーションのビルドと3つのコンテナを起動する

cd C:\mpc-tss-trial
docker-compose up --build

以下のようにビルドと3つのコンテナ起動が行われ、各コンテナでhttpの待ち受けが始まる

 ✔ Image mpc-tss-trial-party1    Built
 ✔ Image mpc-tss-trial-party2    Built
 ✔ Image mpc-tss-trial-party3    Built
 ✔ Network mpc-tss-trial_default Created
 ✔ Container party1              Created
 ✔ Container party2              Created
 ✔ Container party3              Created
Attaching to party1, party2, party3
party1  | Server starting for ID: co_signer1 on port 8080...
party2  | Server starting for ID: co_signer2 on port 8080...
party3  | Server starting for ID: co_signer3 on port 8080...
party1  | Listening on 0.0.0.0:8080...
party2  | Listening on 0.0.0.0:8080...
party3  | Listening on 0.0.0.0:8080...

停止する場合は Ctrl+C を押下

5.Node-REDをインストール

WindowsにNode-REDをインストールする
手順の説明は省略

6.Node-REDのFlexDashノードをインストール

本実験ではダッシュボード画面にFlexDashを使用する

  • Node-REDメニューの「パレットの管理」で、「@flexdash/node-red-fd-corewidgets」をインストール
  • インストール後、Node-REDの再起動が必要
  • 再起動するとNode-RED画面左にflexdashのノードが追加されている

7.Node-REDフローの読み込みとデプロイ

  • Node-REDメニューの「読み込み」で、手順2でダウンロードした C:\mpc-tss-trial\Node-RED-flow\flows.jsonを読み込む
    image.png

  • Node-REDの「デプロイ」を実行

  • ブラウザでhttp://localhost:1880/flexdashを開き、ダッシュボード画面が表示されることを確認
    image.png

以上で実験環境の準備完了

環境準備編 以上

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