Skip to content

fix: clear the ongoing block commit if txn fails#6976

Merged
federico-stacks merged 8 commits intostacks-network:developfrom
brady-stacks:fix/ongoing-block-clear-on-fail
Apr 1, 2026
Merged

fix: clear the ongoing block commit if txn fails#6976
federico-stacks merged 8 commits intostacks-network:developfrom
brady-stacks:fix/ongoing-block-clear-on-fail

Conversation

@brady-stacks
Copy link
Copy Markdown
Contributor

@brady-stacks brady-stacks commented Mar 10, 2026

If a transaction is not successfully submitted to the mempool, there's no way to differentiate between

  1. txn is in the mempool but unconfirmed (fine)
  2. txn doesn't exist in mempool and should be resubmitted

This clears ongoing block commits when a send_transaction call fails so they can be resubmitted

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.66%. Comparing base (995ebd0) to head (fe00d47).
⚠️ Report is 41 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6976      +/-   ##
===========================================
- Coverage    68.63%   60.66%   -7.98%     
===========================================
  Files          412      412              
  Lines       219013   219355     +342     
  Branches       338      338              
===========================================
- Hits        150330   133062   -17268     
- Misses       68683    86293   +17610     
Files with missing lines Coverage Δ
...-node/src/burnchains/bitcoin_regtest_controller.rs 66.87% <100.00%> (+3.12%) ⬆️

... and 292 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 995ebd0...fe00d47. 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.

brice-stacks
brice-stacks previously approved these changes Mar 23, 2026
Copy link
Copy Markdown
Contributor

@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.

Thanks Brady! This looks good to me. Can you just add a changelog "fragment" (see changelog.d/README.md for our new process).

brice-stacks
brice-stacks previously approved these changes Mar 23, 2026
@coveralls
Copy link
Copy Markdown

coveralls commented Mar 24, 2026

Pull Request Test Coverage Report for Build 23790701954

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 53 of 55 (96.36%) changed or added relevant lines in 1 file are covered.
  • 1266 unchanged lines in 42 files lost coverage.
  • Overall coverage increased (+0.006%) to 85.718%

Changes Missing Coverage Covered Lines Changed/Added Lines %
stacks-node/src/burnchains/bitcoin_regtest_controller.rs 53 55 96.36%
Files with Coverage Reduction New Missed Lines %
stackslib/src/chainstate/stacks/miner.rs 1 83.48%
stackslib/src/clarity_vm/clarity.rs 1 93.7%
stackslib/src/net/mod.rs 1 77.99%
stacks-node/src/event_dispatcher.rs 1 85.24%
stacks-signer/src/client/stacks_client.rs 1 86.56%
stacks-signer/src/v0/signer.rs 1 87.54%
clarity/src/vm/functions/define.rs 2 99.34%
libsigner/src/session.rs 2 64.78%
stacks-common/src/util/pipe.rs 2 89.52%
stackslib/src/chainstate/nakamoto/staging_blocks.rs 3 90.65%
Totals Coverage Status
Change from base Build 23400582460: 0.006%
Covered Lines: 186646
Relevant Lines: 217744

💛 - Coveralls

Comment thread stacks-node/src/burnchains/bitcoin_regtest_controller.rs Outdated
@federico-stacks federico-stacks added this pull request to the merge queue Apr 1, 2026
Merged via the queue into stacks-network:develop with commit 1a12db3 Apr 1, 2026
348 checks passed
@brady-stacks brady-stacks deleted the fix/ongoing-block-clear-on-fail branch April 1, 2026 14:46
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 9, 2026

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions Bot added the locked label Apr 9, 2026
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants