Skip to content

feat: include PC abort reason in tx receipt #6018

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
merged 8 commits into from
May 6, 2025

Conversation

obycode
Copy link
Contributor

@obycode obycode commented Apr 16, 2025

Including this message (which currently only shows in the logs) should be very helpful for users to understand what went wrong in their transaction. I think another change is needed to pass this vm_error from the transaction receipt to event listeners, which would then enable the API to consume this information and show it in places like the Explorer. cc @zone117x

@obycode obycode requested a review from a team as a code owner April 16, 2025 16:45
@obycode obycode requested review from hstove and kantai and removed request for a team April 16, 2025 16:45
Copy link
Contributor

@kantai kantai left a comment

Choose a reason for hiding this comment

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

This LGTM, just a comment on a refactor that should improve readability.

@obycode obycode requested a review from kantai April 16, 2025 21:04
@obycode obycode added this to the 3.1.0.0.9 milestone Apr 17, 2025
@obycode obycode moved this to Status: In Review in Stacks Core Eng Apr 17, 2025
Copy link
Contributor

@hstove hstove left a comment

Choose a reason for hiding this comment

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

Overall LGTM, just requesting the comment to be updated

@github-project-automation github-project-automation bot moved this from Status: In Review to Status: 💻 In Progress in Stacks Core Eng Apr 17, 2025
Previously, this callback returned a boolean indicating whether the
transaction should be rolled back. Now it returns an optional string,
where the string indicates a reason for the abort.
hstove
hstove previously approved these changes Apr 17, 2025
Copy link
Contributor

@hstove hstove left a comment

Choose a reason for hiding this comment

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

LGTM! I can't actually resolve my comments, but feel free to do so.

Copy link
Contributor

@kantai kantai 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 a rustdocs request.

@obycode obycode requested a review from kantai April 18, 2025 17:39
@obycode
Copy link
Contributor Author

obycode commented Apr 30, 2025

Merge conflict resolved and ready for re-review.

@obycode obycode requested a review from hstove April 30, 2025 14:56
hstove
hstove previously approved these changes Apr 30, 2025
@obycode obycode requested a review from a team as a code owner May 5, 2025 18:42
@obycode obycode requested a review from hstove May 5, 2025 19:16
@obycode
Copy link
Contributor Author

obycode commented May 5, 2025

@hstove @kantai I had to fix another merge conflict, so requesting reviews again. 🙏

@aldur aldur modified the milestones: 3.1.0.0.9, 3.1.0.0.10 May 6, 2025
@hstove hstove added this pull request to the merge queue May 6, 2025
Merged via the queue into stacks-network:develop with commit 16f50a8 May 6, 2025
205 of 208 checks passed
@github-project-automation github-project-automation bot moved this from Status: 💻 In Progress to Status: ✅ Done in Stacks Core Eng May 6, 2025
Copy link

codecov bot commented May 6, 2025

Codecov Report

Attention: Patch coverage is 87.70492% with 30 lines in your changes missing coverage. Please review.

Project coverage is 79.37%. Comparing base (0ee0c72) to head (e0875ed).
Report is 14 commits behind head on develop.

Files with missing lines Patch % Lines
stackslib/src/chainstate/stacks/miner.rs 0.00% 10 Missing ⚠️
stackslib/src/clarity_vm/clarity.rs 72.97% 10 Missing ⚠️
stackslib/src/chainstate/stacks/db/transactions.rs 94.31% 5 Missing ⚠️
clarity/src/vm/clarity.rs 84.61% 4 Missing ⚠️
stackslib/src/clarity_vm/tests/contracts.rs 97.61% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6018      +/-   ##
===========================================
+ Coverage    73.50%   79.37%   +5.87%     
===========================================
  Files          538      538              
  Lines       388222   387782     -440     
  Branches       323      323              
===========================================
+ Hits        285360   307812   +22452     
+ Misses      102854    79962   -22892     
  Partials         8        8              
Files with missing lines Coverage Δ
stackslib/src/chainstate/coordinator/tests.rs 76.93% <100.00%> (+12.46%) ⬆️
stackslib/src/chainstate/nakamoto/mod.rs 83.53% <100.00%> (+0.58%) ⬆️
stackslib/src/chainstate/nakamoto/signer_set.rs 81.90% <100.00%> (ø)
...kslib/src/chainstate/stacks/boot/contract_tests.rs 78.20% <100.00%> (+5.56%) ⬆️
stackslib/src/chainstate/stacks/boot/mod.rs 81.16% <100.00%> (+12.46%) ⬆️
stackslib/src/chainstate/stacks/db/blocks.rs 85.19% <100.00%> (+3.33%) ⬆️
stackslib/src/chainstate/stacks/db/mod.rs 84.86% <100.00%> (+0.85%) ⬆️
stackslib/src/clarity_vm/tests/analysis_costs.rs 99.20% <100.00%> (ø)
stackslib/src/clarity_vm/tests/costs.rs 97.52% <100.00%> (+25.72%) ⬆️
stackslib/src/clarity_vm/tests/large_contract.rs 98.16% <100.00%> (ø)
... and 9 more

... and 197 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 a1e0b25...e0875ed. 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
Status: Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

4 participants