stacks-network / stacks-core

The Stacks blockchain implementation
https://docs.stacks.co
GNU General Public License v3.0
3.01k stars 664 forks source link

[stacks-signer] Publish DKG results to the .pox-4 contract #3973

Closed jferrant closed 6 months ago

jferrant commented 1 year ago

Currently stacks-signer does not publish the results of a DKG round anywhere. It should be stored within the .pox-4 contract.

Relates to https://github.com/stacks-network/stacks-blockchain/issues/3968 Relates to https://github.com/stacks-network/stacks-blockchain/issues/3972

Duplicates https://github.com/stacks-network/sbtc/issues/392 and https://github.com/stacks-network/sbtc/issues/394

friedger commented 1 year ago

Pox-4 is mainly about stacking, the result of the dkg round could go into sbtc-db.clar

jcnelson commented 10 months ago

This is the "cast the vote for aggregate public key and tapscripts/taproot address" issue. Note that all tapleafs must be disclosed to verify that there are no hidden spending conditions.

setzeus commented 10 months ago

Pasting design doc that mentions this issue for reference: https://docs.google.com/document/d/1IFTaHjEGHJkdFiEfKNayfmD0UlseoXpVcoMgJv0VW1g/edit?usp=sharing

setzeus commented 10 months ago

Re-reading your most recent comment @jcnelson, here confirming this means we need a parameter or two for the tapleafs so we can verify no hidden conditions using a merkle proof?

jcnelson commented 10 months ago

We need the votes to contain enough data to reconstruct all tapleaf scripts. The pox-4 contract does not need to validate them (the node will do this), but we do need to have enough data to prove that there can be no other spending conditions besides the stackers' spending the wallet and the user clawing back an unclaimed deposit.