Skip to content

Conversation

jferrant
Copy link
Contributor

@jferrant jferrant commented Oct 2, 2025

Make TestPeer use TestChainstate underneath the hood and remove some duplication. I think a lot of tests could be updated to just use TestChainstate (a lot odn't seem to actually need a full TestPeer) but leaving for another PR.

@jferrant jferrant requested review from kantai, Jiloc and fdefelici October 2, 2025 19:32
@jferrant jferrant requested review from a team as code owners October 2, 2025 19:32
kantai
kantai previously approved these changes Oct 7, 2025
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!

rdeioris
rdeioris previously approved these changes Oct 7, 2025
@jferrant jferrant dismissed stale reviews from rdeioris and kantai via 6c08f27 October 7, 2025 13:19
@jferrant jferrant force-pushed the chore/extract-test-chainstate-from-peer branch from 4baba84 to 6c08f27 Compare October 7, 2025 13:19
@jferrant jferrant requested review from kantai and rdeioris October 7, 2025 13:19
rdeioris
rdeioris previously approved these changes Oct 7, 2025
kantai
kantai previously approved these changes Oct 7, 2025
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!

@jferrant jferrant enabled auto-merge October 7, 2025 13:21
Jiloc
Jiloc previously approved these changes Oct 7, 2025
@jferrant jferrant dismissed stale reviews from Jiloc, kantai, and rdeioris via 3612582 October 7, 2025 14:22
@jferrant jferrant force-pushed the chore/extract-test-chainstate-from-peer branch from 6c08f27 to 3612582 Compare October 7, 2025 14:22
@jferrant jferrant requested review from kantai, Jiloc and rdeioris October 7, 2025 14:22
@jferrant jferrant added this pull request to the merge queue Oct 7, 2025
Merged via the queue into stacks-network:develop with commit cb09a19 Oct 7, 2025
298 of 300 checks passed
@jferrant jferrant deleted the chore/extract-test-chainstate-from-peer branch October 7, 2025 15:31
Copy link

codecov bot commented Oct 7, 2025

Codecov Report

❌ Patch coverage is 58.54943% with 1023 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.88%. Comparing base (33d7113) to head (3612582).
⚠️ Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
stackslib/src/chainstate/tests/mod.rs 35.86% 245 Missing ⚠️
stackslib/src/net/tests/relay/epoch2x.rs 17.61% 145 Missing ⚠️
.../src/chainstate/stacks/tests/block_construction.rs 41.91% 115 Missing ⚠️
...tackslib/src/chainstate/stacks/boot/pox_3_tests.rs 41.50% 62 Missing ⚠️
stackslib/src/net/tests/download/epoch2x.rs 0.00% 60 Missing ⚠️
stackslib/src/chainstate/stacks/db/blocks.rs 47.11% 55 Missing ⚠️
stackslib/src/net/mod.rs 82.47% 41 Missing ⚠️
stackslib/src/net/tests/inv/epoch2x.rs 38.59% 35 Missing ⚠️
...tackslib/src/chainstate/stacks/boot/pox_4_tests.rs 85.71% 34 Missing ⚠️
stackslib/src/net/tests/download/nakamoto.rs 51.51% 32 Missing ⚠️
... and 16 more

❌ Your project status has failed because the head coverage (58.88%) 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 (33d7113) and HEAD (3612582). Click for more details.

HEAD has 10 uploads less than BASE
Flag BASE (33d7113) HEAD (3612582)
85 75
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6557      +/-   ##
===========================================
- Coverage    63.97%   58.88%   -5.10%     
===========================================
  Files          568      568              
  Lines       347131   347332     +201     
===========================================
- Hits        222090   204535   -17555     
- Misses      125041   142797   +17756     
Files with missing lines Coverage Δ
stackslib/src/chainstate/nakamoto/mod.rs 79.40% <100.00%> (+0.50%) ⬆️
stackslib/src/clarity_vm/tests/ephemeral.rs 71.82% <100.00%> (+42.43%) ⬆️
stackslib/src/net/api/tests/getblock_v3.rs 73.62% <100.00%> (+50.54%) ⬆️
stackslib/src/net/api/tests/gettransaction.rs 86.04% <100.00%> (+72.09%) ⬆️
stackslib/src/net/api/tests/mod.rs 94.24% <100.00%> (+8.78%) ⬆️
stackslib/src/net/server.rs 74.44% <100.00%> (-1.62%) ⬇️
stackslib/src/net/tests/convergence.rs 70.94% <100.00%> (-7.68%) ⬇️
stackslib/src/net/api/tests/blockreplay.rs 23.91% <0.00%> (-16.31%) ⬇️
...ckslib/src/chainstate/stacks/boot/signers_tests.rs 73.58% <50.00%> (+10.00%) ⬆️
stackslib/src/net/api/tests/gettenure.rs 22.11% <0.00%> (-75.00%) ⬇️
... and 23 more

... and 395 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 33d7113...3612582. 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.

5 participants