Skip to content

Conversation

@rdeioris
Copy link
Contributor

@rdeioris rdeioris commented Oct 8, 2025

Description

This patch improves the Block Replay endpoint by allowing it to returns the specific vm_error of a failed transaction.

A new test has been added and the TestRPC framework has been improved for allowing the addition of custom transactions in the tip block.

Applicable issues

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 marked this pull request as ready for review October 8, 2025 12:10
@rdeioris rdeioris requested review from a team as code owners October 8, 2025 12:10
@rdeioris rdeioris requested review from jcnelson and obycode October 8, 2025 13:16
@janniks
Copy link
Contributor

janniks commented Oct 8, 2025

Awesome! So we can assume any time there is a non-null vm-error string something went wrong, in my case we don't really care what went wrong, but can use the presence as a general failed indicator?

@rdeioris
Copy link
Contributor Author

rdeioris commented Oct 8, 2025

Awesome! So we can assume any time there is a non-null vm-error string something went wrong, in my case we don't really care what went wrong, but can use the presence as a general failed indicator?

Correct, the presence of vm_error signals a runtime error

obycode
obycode previously approved these changes Oct 10, 2025
Copy link
Contributor

@obycode obycode left a comment

Choose a reason for hiding this comment

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

LGTM!

@rdeioris rdeioris requested a review from Jiloc October 13, 2025 13:56
Copy link
Member

@jcnelson jcnelson left a comment

Choose a reason for hiding this comment

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

I agree with @Jiloc that some documentation is needed. Once it's added then I'll approve. Thanks!

obycode
obycode previously approved these changes Oct 20, 2025
Copy link
Contributor

@obycode obycode left a comment

Choose a reason for hiding this comment

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

lgtm, just caught one typo

@CLAassistant
Copy link

CLAassistant commented Oct 23, 2025

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ rdeioris
❌ rob-stacks
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link

@brice-stacks brice-stacks left a comment

Choose a reason for hiding this comment

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

lgtm

@wileyj wileyj disabled auto-merge October 29, 2025 21:30
@wileyj wileyj added this pull request to the merge queue Oct 29, 2025
Merged via the queue into stacks-network:develop with commit f8d02cd Oct 29, 2025
300 of 309 checks passed
@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

❌ Patch coverage is 86.20690% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.90%. Comparing base (060b56e) to head (24911bc).
⚠️ Report is 23 commits behind head on develop.

Files with missing lines Patch % Lines
stackslib/src/net/tests/inv/nakamoto.rs 50.00% 8 Missing ⚠️
stackslib/src/net/api/tests/blockreplay.rs 96.22% 2 Missing ⚠️
stackslib/src/net/tests/mod.rs 88.23% 2 Missing ⚠️

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

❗ There is a different number of reports uploaded between BASE (060b56e) and HEAD (24911bc). Click for more details.

HEAD has 27 uploads less than BASE
Flag BASE (060b56e) HEAD (24911bc)
137 110
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6575      +/-   ##
===========================================
- Coverage    66.23%   59.90%   -6.34%     
===========================================
  Files          574      574              
  Lines       354916   354999      +83     
===========================================
- Hits        235085   212668   -22417     
- Misses      119831   142331   +22500     
Files with missing lines Coverage Δ
stackslib/src/net/api/blockreplay.rs 84.09% <100.00%> (+0.06%) ⬆️
stackslib/src/net/api/tests/blockreplay.rs 79.31% <96.22%> (+9.74%) ⬆️
stackslib/src/net/tests/mod.rs 42.85% <88.23%> (-52.77%) ⬇️
stackslib/src/net/tests/inv/nakamoto.rs 83.89% <50.00%> (+6.82%) ⬆️

... and 407 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 060b56e...24911bc. 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.

10 participants