Skip to content

refactor: regtest controller cleanup #6243

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

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from

Conversation

fdefelici
Copy link
Contributor

@fdefelici fdefelici commented Jul 2, 2025

Description

This PR does some housekeeping around the bitcoin_regetest_controller module, removing some unused code (found while working on #6219):

  • attempt args in BitcoinRegtestController::submit_operation(..) (and descendant method in tha call stacks)
  • allow_rbf member in BitcoinRegtestController that is always initialized to true (simplify some internal branch logic)

NOTE: The PR is currenly built on top of #6219, which introduces some testing facilities. It will be rebased once that PR is merged.

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

@fdefelici fdefelici self-assigned this Jul 2, 2025
@fdefelici fdefelici added this to the 3.1.0.0.14 milestone Jul 4, 2025
@fdefelici fdefelici moved this to Status: 💻 In Progress in Stacks Core Eng Jul 4, 2025
@fdefelici fdefelici force-pushed the refactor/regtest-controller-cleanup branch from 4b7b52c to 69bf666 Compare July 8, 2025 09:29
@fdefelici fdefelici marked this pull request as ready for review July 8, 2025 12:54
@fdefelici fdefelici requested review from a team as code owners July 8, 2025 12:54
@aldur aldur requested review from Jiloc and obycode July 8, 2025 14:49
@aldur aldur moved this from Status: 💻 In Progress to Status: In Review in Stacks Core Eng Jul 10, 2025
Jiloc
Jiloc previously approved these changes Jul 11, 2025
Copy link
Contributor

@Jiloc Jiloc 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 comment about the modularization of the tests. I like it and I believe we can keep it. But the extra indentetion made the diff difficult to review :( ! If we are going to refactor other tests into their own modules in the future, I'd suggest to split the indentation change to its own commit. It will be easier to review the single commits intead of the final diff!

Copy link

codecov bot commented Jul 11, 2025

Codecov Report

Attention: Patch coverage is 28.70370% with 385 lines in your changes missing coverage. Please review.

Project coverage is 70.60%. Comparing base (381ee9b) to head (c1b02c2).

Files with missing lines Patch % Lines
...-node/src/burnchains/bitcoin_regtest_controller.rs 28.43% 380 Missing ⚠️
stacks-node/src/tests/epoch_205.rs 0.00% 2 Missing ⚠️
stacks-node/src/nakamoto_node/relayer.rs 0.00% 1 Missing ⚠️
stacks-node/src/tests/epoch_21.rs 0.00% 1 Missing ⚠️
stacks-node/src/tests/signer/v0.rs 0.00% 1 Missing ⚠️

❌ Your project check has failed because the head coverage (70.60%) 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    #6243      +/-   ##
===========================================
- Coverage    71.20%   70.60%   -0.60%     
===========================================
  Files          546      546              
  Lines       347235   347511     +276     
  Branches       323      323              
===========================================
- Hits        247236   245358    -1878     
- Misses       99991   102145    +2154     
  Partials         8        8              
Files with missing lines Coverage Δ
stacks-node/src/burnchains/mocknet_controller.rs 68.98% <ø> (-0.15%) ⬇️
stacks-node/src/burnchains/mod.rs 62.50% <ø> (ø)
stacks-node/src/neon_node.rs 60.48% <100.00%> (-17.10%) ⬇️
stacks-node/src/node.rs 86.68% <100.00%> (ø)
stacks-node/src/tests/nakamoto_integrations.rs 10.11% <ø> (-56.19%) ⬇️
stacks-node/src/tests/neon_integrations.rs 3.14% <ø> (-54.32%) ⬇️
stacks-node/src/nakamoto_node/relayer.rs 55.84% <0.00%> (-22.43%) ⬇️
stacks-node/src/tests/epoch_21.rs 0.00% <0.00%> (ø)
stacks-node/src/tests/signer/v0.rs 0.00% <0.00%> (-33.07%) ⬇️
stacks-node/src/tests/epoch_205.rs 0.00% <0.00%> (ø)
... and 1 more

... and 372 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 381ee9b...c1b02c2. 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: In Review
Development

Successfully merging this pull request may close these issues.

2 participants