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]: More efficient validation of complete-deposit contract calls #1299

Open
1 task
djordon opened this issue Feb 3, 2025 · 0 comments
Open
1 task
Assignees
Labels
sbtc signer binary The sBTC Bootstrap Signer.

Comments

@djordon
Copy link
Collaborator

djordon commented Feb 3, 2025

Feature - More efficient validation of complete-deposit contract calls

1. Description

1.1 Context & Purpose

One of our slowest queries is the one behind get_swept_deposit_requests. The coordinator uses this query to figure out which deposit requests need a corresponding mint, and the other signers use this query during validation of the complete-deposit contract call. It would be more performant for the signers to use a more specialized query along with a request to their stacks node when validating the contract call. This approach has the benefit of allowing signers to miss the completed-deposit event from the stacks node for validation of contract call transactions.

2. Technical Details:

We'll need to add another method to the StacksInteract trait that fetches the "status" of a deposit request from the sbtc-registry by making a call to the get-deposit-status read-only function. Then we can use this during validation of the stacks transaction. We would also need to use the get_deposit_request_report query during validation, which should be much faster since it does not touch the stacks blockchain data.

2.1 Acceptance Criteria:

  • We do not use slow queries during validation of complete-deposit contract calls.

3. Related Issues and Pull Requests (optional):

This is tied to some other performance improvement tickets, like #1295.

@djordon djordon added the sbtc signer binary The sBTC Bootstrap Signer. label Feb 3, 2025
@djordon djordon added this to the sBTC: Deposits milestone Feb 3, 2025
@djordon djordon self-assigned this Feb 3, 2025
@djordon djordon added this to sBTC Feb 3, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in sBTC Feb 3, 2025
@djordon djordon moved this from Needs Triage to In Progress in sBTC Feb 3, 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: In Progress
Development

No branches or pull requests

1 participant