You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
key-wallet: update_utxos over-bumps monitor_revision for pure UTXO changes #731
Surfaced by CodeRabbit during review of #711. Pre-existing behavior — moved from ManagedCoreAccount::update_utxos to ManagedCoreFundsAccount::update_utxos by the structural split, no semantic change.
Distinct from #713 (which is about pool-mutating helpers failing to bump monitor_revision); this issue is the opposite direction — bumping it when it shouldn't.
Problem
monitor_revision is documented as tracking changes to the monitored address set (so consumers of bloom_filter / wallet rescan know when their watch list is stale). ManagedCoreFundsAccount::update_utxos currently bumps it whenever any UTXO is inserted or removed:
if utxos_changed {self.keys.bump_monitor_revision();}
A normal receive or spend on already-monitored addresses changes the UTXO set without changing the monitored-address set, so this triggers spurious bloom-filter staleness signals.
Suggested fix
Track only address-set membership changes, not UTXO-set changes. UTXO bookkeeping should not bump monitor_revision. The right places to bump it are still the address-pool-mutating helpers covered by #713.
Worth coordinating with the fix for #713 — together they should converge on a single rule: "bump monitor_revision iff the watched address set actually changed."
Original review thread: #711 (review comment 3187368648)
This is not an issue its intentionally bumped because the bloom filter contains utxos for spent transaction detection so we need to bump the revision if the utxo set changes to update the filter.
The bump in update_utxos is needed. The mempool bloom filter also carries the wallet's outpoints (watched_outpoints), so a UTXO change changes the filter even when the address set stays the same. Without the bump, a payment to an already used address adds an outpoint that never reaches the filter, and a spend of it is missed in the mempool.
test_monitor_revision_bumps_and_stability (key-wallet-manager/src/process_block.rs) fails without the bump for exactly that case.
Activity
xdustinface commentedon May 5, 2026
This is not an issue its intentionally bumped because the bloom filter contains utxos for spent transaction detection so we need to bump the revision if the utxo set changes to update the filter.
ZocoLini commentedon Nov 5, 2026
The bump in
update_utxosis needed. The mempool bloom filter also carries the wallet's outpoints (watched_outpoints), so a UTXO change changes the filter even when the address set stays the same. Without the bump, a payment to an already used address adds an outpoint that never reaches the filter, and a spend of it is missed in the mempool.test_monitor_revision_bumps_and_stability(key-wallet-manager/src/process_block.rs) fails without the bump for exactly that case.