Skip to content

fix(chain): Handling of mempool timestamps when the system clock moves backward - #2337

Open
IjayAbby wants to merge 2 commits into
bitcoindevkit:masterfrom
IjayAbby:fix/issue-2280
Open

IjayAbby wants to merge 2 commits into
bitcoindevkit:masterfrom
IjayAbby:fix/issue-2280

Conversation

@IjayAbby

@IjayAbby IjayAbby commented Oct 1, 2026 •

Copy link
Copy Markdown

Description

Fix handling of mempool timestamps when the system clock moves backward. Incoming seen and evicted observations are normalized and applied chronologically so transaction state remains correct across graph updates and round-trips.

Notes to the reviewers

Changelog notice

Fixed transaction mempool ordering when system clock changes cause non-monotonic timestamps.

Checklists

All Submissions:

Bugfixes:

  • I've added tests to reproduce the issue which are now passing
  • I'm linking the issue being fixed by this PR

Use the current Canonical::balance argument types and settlement
predicate while preserving the clock-regression reproduction.

On branch fix/issue-2280
 Changes to be committed:
	modified:   crates/chain/tests/test_tx_graph.rs
A clock change can give a later eviction an older timestamp than
`last_seen`, or leave a later sighting behind a future-dated eviction.
Normalize incoming timestamps against the opposing observation, and
apply seen/evicted updates chronologically so stored timestamps preserve
the observed state across graph round-trips.

Stored observation timestamps may differ from caller's clock values.
@IjayAbby IjayAbby changed the title fix(chain): Clock changes can hide present transactions or keep dropped transactions pending fix(chain): Handling of mempool timestamps when the system clock moves backward. Oct 1, 2026
@IjayAbby IjayAbby changed the title fix(chain): Handling of mempool timestamps when the system clock moves backward. fix(chain): Handling of mempool timestamps when the system clock moves backward Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant