Skip to content

PR for CHIA-4002 thanks roopd3v#20814

Open
wjblanke wants to merge 3 commits intomainfrom
backforkwjb
Open

PR for CHIA-4002 thanks roopd3v#20814
wjblanke wants to merge 3 commits intomainfrom
backforkwjb

Conversation

@wjblanke
Copy link
Copy Markdown
Contributor

@wjblanke wjblanke commented Apr 21, 2026

DO NOT MERGE

Purpose:

Off by one for wallet race cache

Current Behavior:

Does not include fork point

New Behavior:

Includes fork point

Testing Notes:


Note

Medium Risk
Touches untrusted wallet sync/reorg edge cases and changes when cached coin states are (re)applied, which could affect transaction/notification handling if the new filtering is incorrect.

Overview
Fixes an off-by-one in untrusted wallet short-sync race-cache application by including the exact fork height when replaying cached CoinState updates.

Adds PeerRequestCache.coin_state_validation_recorded() and uses it to skip already-recorded validations (including reorg markers), and prunes successfully-applied entries from _race_cache to prevent coin states from being replayed after clear_after_height() drops validation markers.

Reviewed by Cursor Bugbot for commit fe0cbc5. Bugbot is set up for automated code reviews on this repo. Configure here.

@wjblanke wjblanke requested a review from a team as a code owner April 21, 2026 16:25
@wjblanke wjblanke added the Fixed Required label for PR that categorizes merge commit message as "Fixed" for changelog label Apr 21, 2026
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit be2a1d2. Configure here.

Comment thread chia/wallet/wallet_node.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Fixed Required label for PR that categorizes merge commit message as "Fixed" for changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant