Skip to content

Conversation

rdeioris
Copy link
Contributor

@rdeioris rdeioris commented Sep 9, 2025

Description

Applicable issues

This patch adds two new endpoints /v3/tenures/blocks/hash/{burnchain_block_hash} and /v3/tenures/blocks/height/{burnchain_block_height} that allows querying by bitcoin hash and height.

Note: only Nakamoto tenures can be queried.

Additional info (benefits, drawbacks, caveats)

Checklist

  • Test coverage for new or modified code paths
  • Changelog is updated
  • Required documentation changes (e.g., docs/rpc/openapi.yaml and rpc-endpoints.md for v2 endpoints, event-dispatcher.md for new events)
  • New clarity functions have corresponding PR in clarity-benchmarking repo
  • New integration test(s) added to bitcoin-tests.yml

@rdeioris rdeioris requested review from a team as code owners September 9, 2025 06:37
@rdeioris rdeioris changed the title Feat/tenureblocks byhash byheight endpoints Added /v3/tenures/blocks/hash/{burnchain_block_hash} and /v3/tenures/blocks/hash/{burnchain_block_height} endpoints Sep 9, 2025
@rdeioris rdeioris requested review from Jiloc and fdefelici September 9, 2025 07:20
Copy link
Contributor

@fdefelici fdefelici left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good!

Just added some remarks

Copy link
Contributor

@fdefelici fdefelici left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now there are CI issue that need to be addressed!

@rdeioris rdeioris requested review from fdefelici and Jiloc September 15, 2025 05:52
@rdeioris rdeioris added this pull request to the merge queue Sep 16, 2025
Merged via the queue into stacks-network:develop with commit bcf0f4b Sep 16, 2025
294 of 298 checks passed
@rdeioris rdeioris deleted the feat/tenureblocks_byhash_byheight_endpoints branch September 16, 2025 12:03
Copy link

codecov bot commented Sep 16, 2025

Codecov Report

❌ Patch coverage is 89.13043% with 55 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.15%. Comparing base (e864154) to head (6268d22).
⚠️ Report is 54 commits behind head on develop.

Files with missing lines Patch % Lines
stackslib/src/net/api/gettenureblocksbyhash.rs 83.78% 18 Missing ⚠️
stackslib/src/net/api/gettenureblocksbyheight.rs 83.92% 18 Missing ⚠️
...ackslib/src/net/api/tests/gettenureblocksbyhash.rs 92.94% 6 Missing ⚠️
...kslib/src/net/api/tests/gettenureblocksbyheight.rs 92.68% 6 Missing ⚠️
stackslib/src/net/httpcore.rs 71.42% 6 Missing ⚠️
stackslib/src/chainstate/nakamoto/mod.rs 98.90% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6447      +/-   ##
===========================================
+ Coverage    80.01%   80.15%   +0.14%     
===========================================
  Files          558      562       +4     
  Lines       343239   343736     +497     
===========================================
+ Hits        274634   275522     +888     
+ Misses       68605    68214     -391     
Files with missing lines Coverage Δ
stackslib/src/net/api/gettenureblocks.rs 86.01% <ø> (ø)
stackslib/src/net/api/mod.rs 92.95% <100.00%> (+0.42%) ⬆️
stackslib/src/net/api/tests/mod.rs 97.81% <ø> (ø)
stackslib/src/chainstate/nakamoto/mod.rs 82.42% <98.90%> (+0.47%) ⬆️
...ackslib/src/net/api/tests/gettenureblocksbyhash.rs 92.94% <92.94%> (ø)
...kslib/src/net/api/tests/gettenureblocksbyheight.rs 92.68% <92.68%> (ø)
stackslib/src/net/httpcore.rs 82.73% <71.42%> (-0.21%) ⬇️
stackslib/src/net/api/gettenureblocksbyhash.rs 83.78% <83.78%> (ø)
stackslib/src/net/api/gettenureblocksbyheight.rs 83.92% <83.92%> (ø)

... and 64 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e864154...6268d22. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants