sigma0-dev / zkbitcoin

zkBitcoin: zero-knowledge proofs on Bitcoin!
MIT License
163 stars 32 forks source link

how to generate MPC keys? #29

Closed 0xBEEFCAF3 closed 9 months ago

0xBEEFCAF3 commented 9 months ago

I was setting up the full stack and ran into an issue running the MPC node against a regtest environment. When I run cargo run -- start-committee-node I get

error: the following required arguments were not provided:
  --key-path <KEY_PATH>
  --publickey-package-path <PUBLICKEY_PACKAGE_PATH>

How do I perform DKG? Can I generate new keys or should I always be using the keys defined in the container? https://github.com/sigma0-xyz/zkbitcoin/blob/main/DEVELOPER.md#run-an-mpc-node-with-docker

Thanks

ppoliani commented 9 months ago

There is this command which you should probably run.

for example:

cargo run -- generate-committee --num 5 --threshold 3 --output-dir ./committee

This will create the keys for all 5 nodes.

This looks like a trusted key generation, not a DKG (I believe).

mimoo commented 9 months ago

yes this is generation of keys via a trusted dealer, we haven't exposed the DKG stuff yet but this is planned work

ppoliani commented 9 months ago

@0xBEEFCAF3 have you had any luck creating the MPC keys? Shall we close this issue?

0xBEEFCAF3 commented 9 months ago

yes! Thank you for your help! Closing. One more thing. If you guys need a hand with the DKG things lmk or point me to an issue. I am currently developing it for another project with the same frost lib and would be happy to contribute here.

Thanks again 👍

ppoliani commented 9 months ago

@0xBEEFCAF3 you can probably share your thoughts here https://github.com/sigma0-xyz/zkbitcoin/issues/32