Open HAOYUatHZ opened 4 years ago
Can you edit the title and the description before we can merge this PR?
Ideally we would like more details on what this DockerFile will do if we run it. Thanks!
Can you edit the title and the description before we can merge this PR?
Ideally we would like more details on what this DockerFile will do if we run it. Thanks!
Hi Gary, I have improved the titles and descriptions in both https://github.com/KZen-networks/multi-party-ecdsa/pull/87 and https://github.com/KZen-networks/multi-party-ecdsa/pull/88
Please take a look, thanks!
@omershlo You can squash and merge (make sure to select this option).
@HAOYUatHZ how do I test it on my computer?
@omershlo for now u can try it this way
mkdir ~/temp
cp params.json ~/temp/
cp Rocket.toml ~/temp/
docker run -p 8001:8001 -v ~/temp:/multi-party-ecdsa/temp -e ROCKET_ENV=development -it multi-party-ecdsa
once entering the container, run
cp ./temp/* .
./sm_manager
then open another window, run this script
n=`cat params | sed -n 1p`
t=`cat params | sed -n 2p`
rm keys?.store
killall sm_manager gg18_keygen_client gg18_sign_client 2> /dev/null
for i in $(seq 1 $n)
do
echo "key gen for client $i out of $n"
./target/release/examples/gg18_keygen_client http://0.0.0.0:8001 keys$i.store &
sleep 3
done
sleep 5
echo "sign"
for i in $(seq 1 $((t+1)));
do
echo "signing for client $i out of $((t+1))"
./target/release/examples/gg18_sign_client http://0.0.0.0:8001 keys$i.store "KZen Networks" &
sleep 3
done
Note that this only runs sm_manager inside docker but not keygen_client and sign_client. So this only proves the docker image building & communication (address binding) are correct.
I will write a better run.sh
to get all binaries running in dockers.
is there a way to get "1 click" solution? l
is there a way to get "1 click" solution? l
no problem. I will write a 'run.sh' for it.
@omershlo now you can run demo/docker_demo.sh
in repo root directory
(But for the first time you will need to run docker build . -t=multi-party-ecdsa
to build the image. This has been commented out in https://github.com/KZen-networks/multi-party-ecdsa/pull/88/files#diff-e023b047c4c5d3b9773f8bcf08e71535R4)
This Dockerfile compiles
examples/sm_manager.rs
,examples/gg18_keygen_client.rs
&examples/gg18_sign_client.rs
, and build an docker image for cross-platform use.