Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nakamoto Signer[3.0] - A signer must be able to save multiple DKG aggregate key round states and load it where appropriate #4654

Open
jferrant opened this issue Apr 8, 2024 · 4 comments

Comments

@jferrant
Copy link
Collaborator

jferrant commented Apr 8, 2024

See:

// TODO: this will never work as is. We need to have stored our party shares on the side etc for this particular aggregate key.

If signers see that a threshold has been reached and no approved key set, they may trigger a new DKG round. However, the key could have been approved but not yet set in the contract and this new round should be aborted once they read that it is actually set in the contract. However, they must also load the appropriate DKG shares associated with this successful round to successfully participate.

As part of this ticket, store DKG private shares per round.
If DKG is set in the contract, abort any ongoing rounds and update state.

  • Overwrite local shares with the ones corresponding to the winning round (also be sure to update current_dkg_id to match)
  • If the signer has no shares for that DKG round, print a warning that it cannot participate in signing asit did not participate in the winning DKG round and ignore any incoming sign requests
@netrome
Copy link
Contributor

netrome commented Apr 11, 2024

Implementation note: We need to ensure the structure we store in StackerDB has a bounded size as discussed here #4659 (comment)

@netrome
Copy link
Contributor

netrome commented Apr 23, 2024

If signers see that a threshold has been reached and no approved key set, they may trigger a new DKG round. However, the key could have been approved but not yet set in the contract.

So I'm working on an integration test for this, and I suspect that this scenario is not attainable in the current implementation. If the threshold has been reached, the vote has been concluded and the approved key must be set in the contract. This is happening in the same transaction, so there shouldn't exist an intermediate inconsistent state as I

Has this scenario been observed in practice? Am I missing something here? Ping @jferrant

That being said, I still think the feature of storing a few previous aggregate keys makes sense. There could potentially be other scenarios where a redundant DKG round is triggered. I'll see if I can figure out any good scenario to test.

@saralab saralab changed the title [stacks-signer] A signer must be able to save multiple DKG aggregate key round states and load it where appropriate Nakamoto Signer[3.0] - A signer must be able to save multiple DKG aggregate key round states and load it where appropriate Apr 30, 2024
@saralab saralab added 3.0-Signer and removed signer labels Apr 30, 2024
@saralab saralab added 3.1 and removed 3.0-must labels May 13, 2024
@netrome
Copy link
Contributor

netrome commented May 14, 2024

Closing this ticket given that the premise has been invalidated, and recent discussions have lead to a different direction in the signer development.

@netrome netrome closed this as not planned Won't fix, can't repro, duplicate, stale May 14, 2024
@saralab
Copy link
Contributor

saralab commented May 16, 2024

We deprioritized this for a later time, is this still needed for when we kick off the WSTS work?

@saralab saralab reopened this May 16, 2024
@netrome netrome removed their assignment May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment