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]: Revisit fetch_unknown_ancestors in stacks api.rs #637

Closed
3 tasks
cylewitruk opened this issue Oct 9, 2024 · 3 comments
Closed
3 tasks

[Feature]: Revisit fetch_unknown_ancestors in stacks api.rs #637

cylewitruk opened this issue Oct 9, 2024 · 3 comments
Labels
sbtc signer binary The sBTC Bootstrap Signer.

Comments

@cylewitruk
Copy link
Member

Feature - Revisit fetch_unknown_ancestors in stacks api.rs

1. Description

The assumptions in this method are wrong, it uses the Stacks block height but the Nakamoto start height is defined as a bitcoin block height.

1.1 Context & Purpose

More context in issue #633 (comment) from #643.

2. Technical Details:

We should find a way to get the burnchain block height for the stacks block, or we could potentially keep looping until we get a 404 (not found) from the Stacks RPC endpoint, which is what it returns for /v3 endpoints when requesting data for non-nakamoto blocks.

2.1 Acceptance Criteria:

  • Criterion 1
  • Criterion 2
  • Criterion 3

3. Related Issues and Pull Requests (optional):

@cylewitruk cylewitruk added this to the sBTC MVP Code Complete milestone Oct 9, 2024
@cylewitruk cylewitruk added the sbtc signer binary The sBTC Bootstrap Signer. label Oct 9, 2024
@cylewitruk cylewitruk added this to sBTC Oct 9, 2024
@github-project-automation github-project-automation bot moved this to Needs Triage in sBTC Oct 9, 2024
@djordon
Copy link
Collaborator

djordon commented Oct 20, 2024

The assumptions in this method are wrong, it uses the Stacks block height but the Nakamoto start height is defined as a bitcoin block height.

Sorry, forgot to comment here and in the PR where we changed fetch_unknown_ancestors. I think what we should do is tie Stacks blocks with their anchored bitcoin block height and provide a final backstop that way. We set a bitcoin start height for which all signers need to have block headers for and use that to define a stopping point for fetch_unknown_ancestors when we are just starting out. So once we solve #559, we can revisit that function and use bitcoin blocks as a backstop.

@djordon
Copy link
Collaborator

djordon commented Oct 20, 2024

I opened #685 which proposes us backfilling stacks blocks up until their bitcoin anchor block height equals some bitcoin start height. If we adopt the proposal in #685, then some of the work on the stacks side would likely relate to this issue.

@djordon
Copy link
Collaborator

djordon commented Dec 4, 2024

I fixed this in #781. fetch_unknown_ancestors now fetches block ancestors until we get to nakamoto.

@djordon djordon closed this as completed Dec 4, 2024
@github-project-automation github-project-automation bot moved this from Needs Triage to Done in sBTC Dec 4, 2024
@djordon djordon assigned djordon and unassigned djordon Dec 4, 2024
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: Done
Development

No branches or pull requests

3 participants