Skip to content

refactor: move stacks-node crate to workspace root #6254

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

Conversation

fdefelici
Copy link
Contributor

@fdefelici fdefelici commented Jul 4, 2025

Description

This patch moves the stacks-node crate from testnet/stacks-node to the root of the workspace, aligning it with the structure of other crates.

Additionally, this PR includes a small cleanup of the .gitignore file, other than the one required for testnet/ refactor.

NOTE: stacks-networks/actions need to be updated (about nextest cache preparation). Here the related patch PR #78 with a "fallback compatibility mode" that has been merged

Applicable issues

Additional info (benefits, drawbacks, caveats)

After the move, references to the testnet/ path remain in the following locations:

  • CONTRIBUTING.md
  • migration-verification tool

> CONTRIBUTING.md
In the coding guidelines section, the following example links still reference the previous path:

https://github.com/stacks-network/stacks-core/blob/4852d6439b473e24705f14b8af637aded33cb422/testnet/stacks-node/src/neon_node.rs#L17

https://github.com/stacks-network/stacks-core/blob/4852d6439b473e24705f14b8af637aded33cb422/testnet/stacks-node/src/neon_node.rs#L1148-L1216

Proposal: Leave these links as-is for now, since they serve as point-in-time examples, OR we can update them in a follow-up PR after this one is merged, once we have a new commit to reference

> MIGRATION VERIFICATION TOOL
This tool was used during the transition from Stacks 1.0 to Stacks 2.0

Proposal: If the tool is no longer needed, we should consider removing it.

UPDATE: As shared during the nakasync we opted for:

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 4, 2025
@fdefelici fdefelici moved this to Status: 💻 In Progress in Stacks Core Eng Jul 4, 2025
@fdefelici fdefelici added this to the 3.1.0.0.14 milestone Jul 4, 2025
@fdefelici fdefelici force-pushed the refactor/stacks-node-root-6252 branch from 08e20ba to fb6e5f6 Compare July 8, 2025 07:46
@fdefelici fdefelici marked this pull request as ready for review July 8, 2025 09:13
@fdefelici fdefelici requested review from a team as code owners July 8, 2025 09:13
Copy link

codecov bot commented Jul 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.65%. Comparing base (ddcff25) to head (d85ae0f).
Report is 5 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6254      +/-   ##
===========================================
- Coverage    81.95%   80.65%   -1.30%     
===========================================
  Files          546      546              
  Lines       347235   347235              
  Branches       323      323              
===========================================
- Hits        284576   280065    -4511     
- Misses       62651    67162    +4511     
  Partials         8        8              
Files with missing lines Coverage Δ
...-node/src/burnchains/bitcoin_regtest_controller.rs 76.88% <ø> (ø)
stacks-node/src/burnchains/mocknet_controller.rs 69.12% <ø> (ø)
stacks-node/src/burnchains/mod.rs 62.50% <ø> (ø)
stacks-node/src/event_dispatcher.rs 87.68% <ø> (ø)
stacks-node/src/globals.rs 72.29% <ø> (ø)
stacks-node/src/keychain.rs 81.23% <ø> (ø)
stacks-node/src/main.rs 0.00% <ø> (ø)
stacks-node/src/monitoring/mod.rs 100.00% <ø> (ø)
stacks-node/src/monitoring/prometheus.rs 80.43% <ø> (ø)
stacks-node/src/nakamoto_node.rs 90.81% <ø> (ø)
... and 44 more

... and 47 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 ddcff25...d85ae0f. 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.

@aldur aldur requested review from wileyj and Jiloc July 8, 2025 14:46
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.

good job! I believe we are almost there, I also grepped for all testnet in the code, I believe you missed only

that needs to be changed to "stacks-node" now. I'll give a second look at the results

@fdefelici
Copy link
Contributor Author

fdefelici commented Jul 9, 2025

good job! I believe we are almost there, I also grepped for all testnet in the code, I believe you missed only

that needs to be changed to "stacks-node" now. I'll give a second look at the results

Maybe the mutation testing script and related documentation can be removed in a dedicated PR.
What do you think @wileyj? Is this related to #6137 and stacks-actions issue stacks-network/actions#80 ?

@wileyj
Copy link
Collaborator

wileyj commented Jul 9, 2025

good job! I believe we are almost there, I also grepped for all testnet in the code, I believe you missed only

that needs to be changed to "stacks-node" now. I'll give a second look at the results

Maybe the mutation testing script and related documentation can be removed in a dedicated PR. What do you think @wileyj? Is this related to #6137 and stacks-actions issue stacks-network/actions#80 ?

Correct - i thought i had commented on these files in another PR, but i can't find it so i'll assume it didn't happen.

I would say we can remove those files in this PR, or ack that the changes missed are OK since they will be removed later.

@fdefelici
Copy link
Contributor Author

Maybe the mutation testing script and related documentation can be removed in a dedicated PR. What do you think @wileyj? Is this related to #6137 and stacks-actions issue stacks-network/actions#80 ?

Correct - i thought i had commented on these files in another PR, but i can't find it so i'll assume it didn't happen.

I would say we can remove those files in this PR, or ack that the changes missed are OK since they will be removed later.

Ok. I opened a specific issue for this #6275 to keep this PR scoped

@fdefelici fdefelici force-pushed the refactor/stacks-node-root-6252 branch from fb6e5f6 to 26c61f2 Compare July 10, 2025 08:24
@aldur aldur requested a review from Jiloc July 10, 2025 14:42
@aldur aldur moved this from Status: 💻 In Progress to Status: In Review in Stacks Core Eng Jul 10, 2025
@fdefelici fdefelici force-pushed the refactor/stacks-node-root-6252 branch from 26c61f2 to d85ae0f Compare July 11, 2025 07:43
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!

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!

@github-project-automation github-project-automation bot moved this from Status: In Review to Status: 💻 In Progress in Stacks Core Eng Jul 11, 2025
@fdefelici fdefelici added this pull request to the merge queue Jul 11, 2025
Merged via the queue into stacks-network:develop with commit 381ee9b Jul 11, 2025
239 of 240 checks passed
@fdefelici fdefelici deleted the refactor/stacks-node-root-6252 branch July 11, 2025 13:37
@github-project-automation github-project-automation bot moved this from Status: 💻 In Progress to Status: ✅ Done in Stacks Core Eng Jul 11, 2025
@kantai
Copy link
Contributor

kantai commented Jul 11, 2025

🎉

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.

5 participants