-
Notifications
You must be signed in to change notification settings - Fork 705
Added /v3/tenures/blocks/{consensus_hash} endpoint #6431
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
Merged
rdeioris
merged 21 commits into
stacks-network:develop
from
rdeioris:feat/tenureblocks_endpoint
Sep 9, 2025
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
5dee45a
added getenureblocks endpoint
rdeioris ae3db15
updated changelog
rdeioris 4d0d14e
added openapi stanza
rdeioris ffe92fc
use inline formatting
rdeioris f421f31
another round of inline formatting
rdeioris be80218
removed useless map_err
rdeioris dbe1e9c
more formatting fixes and use BurnchainHeaderHash instead of string
rdeioris 8e9b269
added streamed output for RPCTenure
rdeioris 162fb39
removed useless function as it is not fork-aware
rdeioris 4a0ec8d
added json streaming
rdeioris f303817
rename header_type to header_type_name
rdeioris c38d029
added docstrings
rdeioris 814d551
removed useless comment
rdeioris 5b1a8b0
improved parameter description
rdeioris d75ffc5
improved parameter description [2]
rdeioris a4de697
inline formatting
rdeioris 3283af8
added openapi schemas and example
rdeioris 608fe5e
added example
rdeioris c67e3e0
fixed typo and improved description of json output
rdeioris 13b7011
Merge branch 'develop' into feat/tenureblocks_endpoint
rdeioris 8d4218c
Merge branch 'develop' into feat/tenureblocks_endpoint
rdeioris File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ | ||
"burn_block_hash": "dff0aba3d65209225e365692ac46d26fa64ca9760bd7c244fc27e2022f7cb90d", | ||
"burn_block_height": 51, | ||
"consensus_hash": "90b360130732dd83a165a7fa34386ae547512300", | ||
"stacks_blocks": [ | ||
{ | ||
"block_hash": "a9f3d8bca7d766a2022528e27c52f39ba77192f0712ea5515cc9d06b97821a11", | ||
"block_id": "67c795896b4c2940b3eb759871661a72e78458ba591dc63979d689d23695891f", | ||
"header_type": "nakamoto", | ||
"height": 116, | ||
"parent_block_id": "fb7102c45bb2f07a6dd86b6672cb39133861fc7d38087e82cb04d4faccfcab82" | ||
}, | ||
{ | ||
"block_hash": "3e81505acaa3d386e15256921dd1193e479fd9d7f81d993b1c2b327b9bfb05cc", | ||
"block_id": "fb7102c45bb2f07a6dd86b6672cb39133861fc7d38087e82cb04d4faccfcab82", | ||
"header_type": "nakamoto", | ||
"height": 115, | ||
"parent_block_id": "5d51f815bc71508768b71258d8bc2adc68c129428101a418083f5b5ab30d525e" | ||
}, | ||
{ | ||
"block_hash": "c6f427503dcbe8bf187c7ce523c7a239328b2ab4ec87d6013895b2bd9ed23604", | ||
"block_id": "5d51f815bc71508768b71258d8bc2adc68c129428101a418083f5b5ab30d525e", | ||
"header_type": "nakamoto", | ||
"height": 114, | ||
"parent_block_id": "7d1c89f57a467f888fed171a5b3a2e51a7652f862189710df7db814ef84a29e2" | ||
}, | ||
{ | ||
"block_hash": "f0665d1dd419e949d68c4e85b7f79e078d6c36d929820b9cd9c794a60c0505b4", | ||
"block_id": "7d1c89f57a467f888fed171a5b3a2e51a7652f862189710df7db814ef84a29e2", | ||
"header_type": "nakamoto", | ||
"height": 113, | ||
"parent_block_id": "b65ab3b6d113285390c1d99c09a62d940f5b55c1cbc10bdc1b478c395fc435f9" | ||
}, | ||
{ | ||
"block_hash": "0486701e4eed06b74c3d93b82ffc0f3700b3cb2bea41aea1a30e00a5669ec0b7", | ||
"block_id": "b65ab3b6d113285390c1d99c09a62d940f5b55c1cbc10bdc1b478c395fc435f9", | ||
"header_type": "nakamoto", | ||
"height": 112, | ||
"parent_block_id": "c711415e6eedffcb6be16e33eb5c5cf62c3f51047f9528a51e21cbd83b25c185" | ||
}, | ||
{ | ||
"block_hash": "6724170340a2e507dbe7b21b691412e196c7c8900a597786aa991c1429ae6b58", | ||
"block_id": "c711415e6eedffcb6be16e33eb5c5cf62c3f51047f9528a51e21cbd83b25c185", | ||
"header_type": "nakamoto", | ||
"height": 111, | ||
"parent_block_id": "b11d631ef1b052942973cac88527a56f6e00c51fd57f9b7a710713f58ddc2393" | ||
}, | ||
{ | ||
"block_hash": "2114066e4446242e558847f552ca839f65ae769ab59000087677007e52b0dab7", | ||
"block_id": "b11d631ef1b052942973cac88527a56f6e00c51fd57f9b7a710713f58ddc2393", | ||
"header_type": "nakamoto", | ||
"height": 110, | ||
"parent_block_id": "2ef1973e95ba622479e59e87251d35c1eaaa9cb7f99f3dd3a8a79359624c38eb" | ||
}, | ||
{ | ||
"block_hash": "2345d34722cb07e908c5dab7f89ec0756f34d7fe34c86e40881c29c6aa202601", | ||
"block_id": "2ef1973e95ba622479e59e87251d35c1eaaa9cb7f99f3dd3a8a79359624c38eb", | ||
"header_type": "nakamoto", | ||
"height": 109, | ||
"parent_block_id": "9c1f844267819dc7349ff0aff6e6c6f60d8c41b531e304cd89df022ca4d147bf" | ||
}, | ||
{ | ||
"block_hash": "6b904297fdd045e2d18b93083f9d36592fa6915a53e8461fc3b4c59f6c91bc6d", | ||
"block_id": "9c1f844267819dc7349ff0aff6e6c6f60d8c41b531e304cd89df022ca4d147bf", | ||
"header_type": "nakamoto", | ||
"height": 108, | ||
"parent_block_id": "335596dd153bfc155863a2d439940816cd5095a3b36e2738fb89d715c28ac6c5" | ||
}, | ||
{ | ||
"block_hash": "cd748c67a9b7e685c52f388cc1d5e334b3dbe2509535caaf9f7ea7b6e5bbad77", | ||
"block_id": "335596dd153bfc155863a2d439940816cd5095a3b36e2738fb89d715c28ac6c5", | ||
"header_type": "nakamoto", | ||
"height": 107, | ||
"parent_block_id": "45cb658a80897117c2cfa6191a7623344ed1079117ad8bb30113019278bac028" | ||
} | ||
] | ||
} |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
type: object | ||
properties: | ||
consensus_hash: | ||
type: string | ||
description: Consensus hash of the tenure | ||
pattern: "^[0-9a-f]{40}$" | ||
burn_block_height: | ||
type: integer | ||
description: Height of the Bitcoin block | ||
format: uint64 | ||
burn_block_hash: | ||
type: string | ||
description: Hash of the Bitcoin block | ||
pattern: "^[0-9a-f]{64}$" | ||
stacks_blocks: | ||
type: array | ||
items: | ||
type: object | ||
properties: | ||
block_id: | ||
type: string | ||
description: Block ID (index block hash) | ||
pattern: "^[0-9a-f]{64}$" | ||
block_hash: | ||
type: string | ||
description: Hash of the block | ||
pattern: "^[0-9a-f]{64}$" | ||
header_type: | ||
type: string | ||
description: Type of block (currently "epoch2" or "nakamoto") | ||
height: | ||
type: integer | ||
description: Height of the block | ||
format: uint64 | ||
parent_block_id: | ||
type: string | ||
description: Block ID (index block hash) of the parent | ||
pattern: "^[0-9a-f]{64}$" | ||
|
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.