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

[Feature]: Signers allow second DKG after specific block height #1200

Closed
1 task
djordon opened this issue Jan 9, 2025 · 0 comments · Fixed by #1205
Closed
1 task

[Feature]: Signers allow second DKG after specific block height #1200

djordon opened this issue Jan 9, 2025 · 0 comments · Fixed by #1205
Assignees
Labels
key rotation The functionality to rotate a private key for a signer in sBTC-v1. sbtc signer binary The sBTC Bootstrap Signer.

Comments

@djordon
Copy link
Collaborator

djordon commented Jan 9, 2025

Feature - Signers allow second DKG after specific block height

1. Description

The signers currently allow DKG only if it hasn't run before. The change is for the signers to allow DKG a second time if it hasn't run twice and only allow a second run if the current bitcoin block height is greater than some configured block height.

1.1 Context & Purpose

We want to support full DKG. But that is difficult so we are tackling it in phases. Phase 0 was running DKG once. Phase 1 was supporting DKG a second time, and this ticket is part of phase 1.

2. Technical Details:

The current check stops the signer from participating in DKG if there exists keys in the dkg_shares table, since that indicates that DKG has succeeded. We need to change this to stop the signer from participating in DKG if the number of rows in the DKG shares table greater than 1 or if the current block height is less than the some configured block height (the one from #1199).

2.1 Acceptance Criteria:

  • In TxSignerEventLoop, the signer will participate in DKG if it has never been run, or if it has run once and the current block height is greater than the one that they have "configured".

Although the above acceptance criteria mentions the configured variable, we can settle for some variable in the TxSignerEventLoop struct that gets set to whatever variable if the config work isn't done. That way we can do this task in parallel to #1199.

3. Related Issues and Pull Requests (optional):

This is related to #1199.

@djordon djordon added sbtc signer binary The sBTC Bootstrap Signer. key rotation The functionality to rotate a private key for a signer in sBTC-v1. labels Jan 9, 2025
@djordon djordon added this to the sBTC: Key rotation milestone Jan 9, 2025
@djordon djordon added this to sBTC Jan 9, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in sBTC Jan 9, 2025
@djordon djordon moved this from Needs Triage to Todo in sBTC Jan 9, 2025
@cylewitruk cylewitruk self-assigned this Jan 10, 2025
@cylewitruk cylewitruk moved this from Todo to In Progress in sBTC Jan 10, 2025
@cylewitruk cylewitruk moved this from In Progress to In Review in sBTC Jan 13, 2025
cylewitruk added a commit that referenced this issue Jan 14, 2025
…ght (#1205)

* allow at most 2 dkg runs

* db int bug

* fmt

* lint

* use dkg rounds target config parameter

* add tests, pr comments

* logging

* test explicitly for the expected err

* additional test

* remove whitespace

* dkg_share to dkg_shares

* more naming

* update match

* update match
@github-project-automation github-project-automation bot moved this from In Review to Done in sBTC Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
key rotation The functionality to rotate a private key for a signer in sBTC-v1. sbtc signer binary The sBTC Bootstrap Signer.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants