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]: Load the correct signer state machine when signing inputs #1152

Open
1 task
djordon opened this issue Dec 17, 2024 · 0 comments
Open
1 task

[Feature]: Load the correct signer state machine when signing inputs #1152

djordon opened this issue Dec 17, 2024 · 0 comments
Assignees
Labels
sbtc signer binary The sBTC Bootstrap Signer.

Comments

@djordon
Copy link
Contributor

djordon commented Dec 17, 2024

Feature - Load the correct signer state machine when signing inputs

1. Description

We currently load the state machine for the latest DKG shares. This is fine, for now, because we do not support running DKG more than once. But when we do, we need to make sure we load the correct state machine when signing a given input.

1.1 Context & Purpose

We won't provide a valid signature if we don't load the correct shares. So we need this for when we support rotate keys.

2. Technical Details:

In order to load the correct shares, we need to know the aggregate key that locks the input. That information is known to each signer when they write each sighash into their database, but it is not stored in the table. There are two options:

  1. We fetch the locking public key by executing a bunch of joins.
  2. We store the locking public key in the table.

Doing (1) involves a join on the dkg_shares table and the deposit_requests table. Doing (2) involves running a schema migration, doing a backfill migration, and storing the data in the table. At this time, I propose doing (2) since it is the better long term solution. In both cases the signers need to make sure that each signer loads the correct shares when we receive a sign request.

2.1 Acceptance Criteria:

  • We load the correct signing shares when we get a sign request.

3. Related Issues and Pull Requests (optional):

Signing with the right aggregate key was partially addressed in #1115, this should finish it.

@djordon djordon added the sbtc signer binary The sBTC Bootstrap Signer. label Dec 17, 2024
@djordon djordon added this to the sBTC: Nice to have milestone Dec 17, 2024
@djordon djordon added this to sBTC Dec 17, 2024
@github-project-automation github-project-automation bot moved this to Needs Triage in sBTC Dec 17, 2024
@djordon djordon moved this from Needs Triage to Todo in sBTC Dec 17, 2024
@djordon djordon self-assigned this Dec 19, 2024
@djordon djordon moved this from Todo to In Progress in sBTC Jan 2, 2025
@djordon djordon moved this from In Progress to Todo in sBTC Jan 9, 2025
@djordon djordon moved this from Todo to In Progress in sBTC Jan 10, 2025
@djordon djordon moved this from In Progress to Todo in sBTC Jan 10, 2025
@djordon djordon added key rotation The functionality to rotate a private key for a signer in sBTC-v1. and removed key rotation The functionality to rotate a private key for a signer in sBTC-v1. labels Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sbtc signer binary The sBTC Bootstrap Signer.
Projects
Status: Todo
Development

No branches or pull requests

1 participant