Skip to content

Conversation

@hstove-stacks
Copy link

When you call /v3/transaction/:txid, you get the block's index block hash, but there still isn't an easy way to know if that block is canonical or not. Because this RPC was added for the purpose of indexers who are using this to determine the validity of a given transaction, it seems like adding this field to the response is the best option.

There are two new fields:

  • block_height: Some(u64), if the tx is canonical, this is the height of the block it was in
  • is_canonical: equivalent to block_height.is_some()

@hstove-stacks hstove-stacks requested review from rob-stacks and removed request for rdeioris December 2, 2025 14:52
@codecov
Copy link

codecov bot commented Dec 2, 2025

Codecov Report

❌ Patch coverage is 35.00000% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.86%. Comparing base (7ff75a2) to head (fa330e7).
⚠️ Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
stacks-node/src/tests/signer/v0.rs 0.00% 24 Missing ⚠️
stackslib/src/net/api/gettransaction.rs 87.50% 2 Missing ⚠️

❌ Your project check has failed because the head coverage (75.86%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6733      +/-   ##
===========================================
+ Coverage    70.05%   75.86%   +5.80%     
===========================================
  Files          578      578              
  Lines       358373   358408      +35     
===========================================
+ Hits        251064   271892   +20828     
+ Misses      107309    86516   -20793     
Files with missing lines Coverage Δ
stackslib/src/net/api/gettransaction.rs 90.26% <87.50%> (+4.40%) ⬆️
stacks-node/src/tests/signer/v0.rs 36.36% <0.00%> (+6.49%) ⬆️

... and 363 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 7ff75a2...fa330e7. 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.

1 participant