Skip to content

Conversation

hstove
Copy link
Contributor

@hstove hstove commented Aug 5, 2025

This PR adds the ability for the global state machine evaluator to use a longest common prefix algorithm to determine the global transaction replay set after a fork.

For example, if one replay set is [A,B,C] with 50% weight, and another is [A,B] with 30% weight, then we will use [A,B] as the global replay set.

There is code for ensuring we end up with a deterministic global replay set by doing a comparison of signer weight, and then length, and then via txid comparisons.

jferrant
jferrant previously approved these changes Aug 7, 2025
Copy link
Contributor

@jferrant jferrant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM: only some minor nits.

@hstove hstove added this pull request to the merge queue Aug 21, 2025
Merged via the queue into stacks-network:develop with commit 10f96e0 Aug 21, 2025
278 of 284 checks passed
@hstove hstove deleted the feat/tx-replay-lcp branch August 21, 2025 18:16
Copy link

codecov bot commented Aug 21, 2025

Codecov Report

❌ Patch coverage is 88.39286% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.94%. Comparing base (0752841) to head (3361418).
⚠️ Report is 44 commits behind head on develop.

Files with missing lines Patch % Lines
libsigner/src/tests/signer_state.rs 88.02% 20 Missing ⚠️
libsigner/src/v0/signer_state.rs 89.47% 6 Missing ⚠️

❌ Your project status has failed because the head coverage (75.94%) 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    #6353      +/-   ##
===========================================
+ Coverage    75.33%   75.94%   +0.60%     
===========================================
  Files          555      555              
  Lines       350915   351135     +220     
===========================================
+ Hits        264358   266665    +2307     
+ Misses       86557    84470    -2087     
Files with missing lines Coverage Δ
libsigner/src/v0/signer_state.rs 85.52% <89.47%> (+1.59%) ⬆️
libsigner/src/tests/signer_state.rs 73.30% <88.02%> (-10.70%) ⬇️

... and 308 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 0752841...3361418. 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.

Copy link

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 locked as resolved and limited conversation to collaborators Aug 29, 2025
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.

Tx Replay: when agreeing on transaction replay set, use the biggest subset of transactions
3 participants