Skip to content

Conversation

Jiloc
Copy link
Contributor

@Jiloc Jiloc commented Oct 15, 2025

Description

This PR refactors the consensus testing framework to support block-by-block execution.
Previously, tests required defining the success or failure of an entire batch of transactions in advance, making it impossible to test scenarios with mixed outcomes.

This new architecture processes each transaction in its own block sequentially, automatically managing the sender's nonce based on whether the previous transaction succeeded or failed.

Applicable issues

  • fixes #

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

@Jiloc Jiloc self-assigned this Oct 15, 2025
@Jiloc Jiloc added aac Avoiding Accidental Consensus aac-testing Avoiding Accidental Consensus Testing Specific Task labels Oct 15, 2025
@Jiloc Jiloc moved this to Status: In Review in Stacks Core Eng Oct 15, 2025
@Jiloc Jiloc added this to the 3.3.0.0.0 milestone Oct 15, 2025
@Jiloc Jiloc marked this pull request as ready for review October 15, 2025 17:04
@Jiloc Jiloc requested review from a team as code owners October 15, 2025 17:04
@github-project-automation github-project-automation bot moved this from Status: In Review to Status: 💻 In Progress in Stacks Core Eng Oct 17, 2025
@Jiloc Jiloc added this pull request to the merge queue Oct 17, 2025
Merged via the queue into stacks-network:develop with commit a7d73af Oct 17, 2025
304 of 307 checks passed
@Jiloc Jiloc deleted the feat/dynamic-nonce-contract-consensus-test branch October 17, 2025 09:39
@github-project-automation github-project-automation bot moved this from Status: 💻 In Progress to Status: ✅ Done in Stacks Core Eng Oct 17, 2025
Copy link

codecov bot commented Oct 17, 2025

Codecov Report

❌ Patch coverage is 93.15068% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.89%. Comparing base (67e6805) to head (ace1656).
⚠️ Report is 10 commits behind head on develop.

Files with missing lines Patch % Lines
stackslib/src/chainstate/tests/consensus.rs 93.15% 10 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #6605       +/-   ##
============================================
+ Coverage    69.71%   79.89%   +10.17%     
============================================
  Files          571      571               
  Lines       351613   351601       -12     
============================================
+ Hits        245143   280917    +35774     
+ Misses      106470    70684    -35786     
Files with missing lines Coverage Δ
stackslib/src/chainstate/tests/consensus.rs 94.84% <93.15%> (+24.98%) ⬆️

... and 302 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 67e6805...ace1656. 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

aac Avoiding Accidental Consensus aac-testing Avoiding Accidental Consensus Testing Specific Task

Projects

Status: Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants