-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: implement the stacks client #228
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
netrome
approved these changes
Jun 5, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful! I have a few comments and questions, but nothing that can't be tackled as a follow-up.
… LABEL instruction
17550a0
to
3f5214c
Compare
netrome
approved these changes
Jun 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Closes #176.
One of the things that we need is to fetch all stacks blocks that have been anchored to a specific bitcoin block id/hash. The core of this PR adds the code to do that. Specifically, we:
Note that the code here uses the new
/v3/blocks/[block ID]
endpoint to get the raw block data from the stacks node. This endpoint only fetches Nakamoto blocks, so we cannot test this code path without running a Nakamoto stacks node.Changes
This PR has the following changes:
chmod +x devenv/local/docker-compose/tests/devnet-liveness.sh
docker-compose.local.yml
to test out running a stacks node post-Nakamoto. These changes are intended to be removed/merged with our docker-compose devnet setup when we have Nakamoto running.Dockerfile
s to use theLABEL
command instead of the deprecatedMAINTAINER
command.config.yaml
file, which right now issigner/src/config/default.toml
.Follow-up Changes
There are some caveats that need to be addressed in follow-up PRs. The big ones are:
/v3/blocks/[block ID]
endpoint! Getting Nakamoto to work locally has been challenging, so this PR doesn't have a working integration test. @jferrant pointed me to the docker-compose file in the stacks-regtest-env repo, which has what I need to get this over the finish line ([Feature]: Add integration tests for the Stacks Client #227).config.toml
([Feature]: Support multiple Stacks node URLs #225).Testing information
I tested one of the
StacksClient
functions using a locally running stacks setup. This function hits the stacks API for stacks block IDs. I was unable to test the function that fetches the nakamoto block given the stacks block ID.