Skip to content

refactor!: detect bloom filter staleness with a hash of what the filter watches - #1359

Merged
xdustinface merged 5 commits into
devfrom
fix/bump-monitor-revision-on-pool-growth
Nov 13, 2026
Merged

xdustinface merged 5 commits into
devfrom
fix/bump-monitor-revision-on-pool-growth

Conversation

@ZocoLini

@ZocoLini ZocoLini commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

monitor_revision was a counter bumped by hand wherever the monitored set might change. That is easy to get wrong in both directions:

This replaces the counter with WalletInterface::monitor_hash(), a hash of monitored_addresses() and watched_outpoints(), the two lists the bloom filter is built from. The mempool manager compares it on each tick as before. It changes exactly when the filter contents change, so there is nothing to bump. monitor_revision, bump_monitor_revision, structural_revision and every manual bump are gone.

Cost (release, per tick, every 100 ms): ~15 µs with 355 addresses (default wallet), ~90 µs with 2,295.

Hasher: it uses std's DefaultHasher (SipHash). Hash-only timings for 355 / 2,295 addresses:

SipHash fnv ahash xxh3
10 / 64 µs 15 / 96 µs 4 / 26 µs 10 / 64 µs

If this ever needs to be faster, ahash with fixed seeds is the one to use, but it would add a dependency to the normal tree that is not worth it at this cost.

Breaking changes for Platform

monitor_revision is removed from WalletInterface, ManagedAccountTrait, ManagedAccountRef/Mut and WalletInfoInterface. Platform only shows it in diagnostics, so nothing users see changes when it bumps this crate:

  • rs-platform-wallet/src/wallet/platform_wallet_traits.rs: drop the monitor_revision override in impl WalletInfoInterface for PlatformWalletInfo.
  • rs-platform-wallet/src/manager/accessors.rs: drop monitor_revision from CoreWalletStateSnapshot and AccountMetadataSnapshot (or report the wallet's monitor_hash() in the first), together with the matching FFI fields in CoreWalletStateFFI/AccountMetadataFFI and the Swift diagnostics view.

The mempool bloom filter keeps rebuilding as before: WalletManager<PlatformWalletInfo> gets monitor_hash() from the trait default.

Closes #713
Closes #715
Part of #764

PR Hygiene · 36266e9

  • Bots — coderabbitai skipped after its own rate limit
  • Self-review — post /self-reviewed
  • Build green
  • Approvals
    • dash-spv (dash-spv/src/client/lifecycle.rs, dash-spv/src/sync/mempool/manager.rs, dash-spv/src/sync/mempool/sync_manager.rs) — QuantumExplorer or xdustinface
    • key-wallet-manager (key-wallet-manager/src/accessors.rs, key-wallet-manager/src/lib.rs, key-wallet-manager/src/process_block.rs and 3 more) — QuantumExplorer or xdustinface
    • key-wallet (key-wallet/src/managed_account/managed_account_ref.rs, key-wallet/src/managed_account/managed_account_trait.rs, key-wallet/src/managed_account/managed_core_funds_account.rs and 6 more) — QuantumExplorer or xdustinface

When every merge requirement is met, the PR Hygiene check passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.

Summary by CodeRabbit

  • Bug Fixes
    • Wallet transaction monitoring filters now refresh when watched addresses or outpoints change, helping keep transaction detection aligned with the wallet’s current monitoring set.
    • Unrelated wallet changes no longer trigger unnecessary filter rebuilds, reducing avoidable updates while preserving monitoring behavior when watched addresses and outpoints remain unchanged.

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 50 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 1c96695 and 36266e9.

Files selected for processing: 2

  • dash-spv/src/sync/mempool/manager.rs
  • dash-spv/src/sync/mempool/sync_manager.rs

No actionable comments were generated in the recent review.

Walkthrough

Wallet monitoring now uses a hash of monitored addresses and watched outpoints. Wallet and account revision counters and their update hooks are removed. The mempool manager compares the hash during ticks and rebuilds its Bloom filter when the monitored set changes.

Changes: Wallet monitoring and filter refresh

Layer / File(s) Summary
Define the wallet monitor hash
key-wallet-manager/src/wallet_interface.rs, key-wallet-manager/src/process_block.rs, key-wallet-manager/src/test_utils/mock_wallet.rs
WalletInterface::monitor_hash() hashes monitored addresses and watched outpoints. Wallet-manager tests check which changes affect the hash.
Remove revision counters and update hooks
key-wallet/src/managed_account/*, key-wallet/src/transaction_checking/wallet_checker.rs, key-wallet/src/wallet/managed_wallet_info/*, key-wallet-manager/src/{accessors.rs,lib.rs,process_block.rs}, key-wallet-manager/tests/integration_test.rs, key-wallet/src/tests/*
Account and wallet-manager revision counters, accessors, and update hooks are removed. Tests retain checks for address reservations, UTXO behavior, wallet creation, and account creation without revision assertions.
Refresh the mempool filter on hash changes
dash-spv/src/client/lifecycle.rs, dash-spv/src/sync/mempool/{manager.rs,sync_manager.rs}
MempoolManager stores the initial monitor hash and checks it on synced ticks. A changed hash triggers a BloomFilter rebuild. FetchAll skips the refresh check. Tests cover address and outpoint changes, unchanged hashes, and FetchAll behavior.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Possibly related issues

Possibly related PRs

Merge Risk: Low · previous review 1c966

Bloom-filter refresh now relies on a hash of the monitored set instead of a counter. In a very unlikely sequence, where the monitored set changes and reverts within a single tick, the mempool filter could stay stale and miss some mempool transactions until the next change. This is a narrow edge case that owners should be aware of, and it does not block merging.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: the bloom filter staleness check moves from a manually bumped monitor_revision counter to a hash of the monitored addresses and watched outpoints (monitor_hash). The d…
Linked Issues check Passed [#713, #715] Both issues ask that pool growth or mutation cause bloom-filter consumers to see the current monitored set. The issues name bump_monitor_revision() as the mechanism. This PR removes the…
Out of Scope Changes check Passed [#713, #715] The changes remove monitor_revision, bump_monitor_revision, and structural_revision across key-wallet, key-wallet-manager, and dash-spv. They add monitor_hash() and switch t…
Full details: Title check

Explanation

The title names the main change: the bloom filter staleness check moves from a manually bumped monitor_revision counter to a hash of the monitored addresses and watched outpoints (monitor_hash). The diff matches this: the revision counter and its bumps are removed, and the mempool sync manager compares monitor_hash() on each tick to decide when to rebuild the filter. The refactor! prefix matches the breaking API removals (monitor_revision, bump_monitor_revision, structural_revision). The title is specific and accurate, so it passes.

Full details: Linked Issues check

Explanation

[#713, #715] Both issues ask that pool growth or mutation cause bloom-filter consumers to see the current monitored set. The issues name bump_monitor_revision() as the mechanism. This PR removes the counter and its bumps. It adds WalletInterface::monitor_hash() in key-wallet-manager/src/wallet_interface.rs. The default hashes monitored_addresses() and watched_outpoints(). The mempool sync manager compares this hash on each tick and rebuilds the filter when it differs. Pool growth in ManagedCoreFundsAccount therefore changes the monitored set and the hash without a manual bump. The reviewed head removes the monitor_revision field and methods from ManagedCoreKeysAccount (key-wallet/src/managed_account/managed_core_keys_account.rs). The keys-only account is not in ManagedAccountCollection, so it does not affect the monitored set today. The #715 requirement for that account depends on future wiring, which the issue itself defers to PR 2. Scope limit: I did not read the implementation of monitored_addresses() for each wallet type. The PASS relies on the PR description and the previous review for the claim that pool addresses appear in that list.

Full details: Out of Scope Changes check

Explanation

[#713, #715] The changes remove monitor_revision, bump_monitor_revision, and structural_revision across key-wallet, key-wallet-manager, and dash-spv. They add monitor_hash() and switch the mempool manager to compare that hash. These changes implement the replacement mechanism. Supporting edits include constructor and field renames in dash-spv/src/sync/mempool/manager.rs, the bloom-filter tick check in dash-spv/src/sync/mempool/sync_manager.rs, and test updates that remove revision assertions and add hash assertions. The dash-spv/src/client/lifecycle.rs change passes the hash to the mempool manager. The summary shows no unrelated functional change. The Platform crate changes are described in the PR text and are not part of this repository's reviewed diff.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 6418972 and 1c96695.

Files selected for processing: 11

  • dash-spv/src/client/lifecycle.rs
  • dash-spv/src/sync/mempool/manager.rs
  • dash-spv/src/sync/mempool/sync_manager.rs
  • key-wallet-manager/src/lib.rs
  • key-wallet-manager/src/process_block.rs
  • key-wallet-manager/src/test_utils/mock_wallet.rs
  • key-wallet-manager/src/wallet_interface.rs
  • key-wallet/src/managed_account/managed_core_funds_account.rs
  • key-wallet/src/transaction_checking/wallet_checker.rs
  • key-wallet/src/wallet/managed_wallet_info/mod.rs
  • key-wallet/src/wallet/managed_wallet_info/wallet_info_interface.rs
Files with no reviewable changes: 3

  • key-wallet/src/wallet/managed_wallet_info/wallet_info_interface.rs
  • key-wallet-manager/src/test_utils/mock_wallet.rs
  • key-wallet-manager/src/lib.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added the waiting-bots Waiting for the review bots to report on this head label Nov 6, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Nov 6, 2026
@ZocoLini
ZocoLini requested a review from xdustinface November 6, 2026 13:58
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Bots are done — your move: post /self-reviewed.
Full checklist in the description.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed and removed waiting-bots Waiting for the review bots to report on this head labels Nov 6, 2026
@codecov

codecov Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.86%. Comparing base (042a5a1) to head (36266e9).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1359      +/-   ##
==========================================
+ Coverage   85.80%   85.86%   +0.05%     
==========================================
  Files         269      269              
  Lines       70764    70645     -119     
==========================================
- Hits        60722    60662      -60     
+ Misses      10042     9983      -59     
Flag Coverage Δ
core 82.81% <ø> (ø)
rpc 52.10% <ø> (ø)
spv 94.46% <100.00%> (+0.03%) ⬆️
wallet 83.96% <100.00%> (+0.12%) ⬆️
Files with missing lines Coverage Δ
dash-spv/src/client/lifecycle.rs 93.60% <100.00%> (ø)
dash-spv/src/sync/mempool/manager.rs 98.11% <100.00%> (-0.06%) ⬇️
dash-spv/src/sync/mempool/sync_manager.rs 99.53% <100.00%> (+<0.01%) ⬆️
key-wallet-manager/src/accessors.rs 62.57% <ø> (+2.22%) ⬆️
key-wallet-manager/src/lib.rs 73.76% <ø> (-0.27%) ⬇️
key-wallet-manager/src/process_block.rs 94.87% <100.00%> (+1.29%) ⬆️
key-wallet-manager/src/wallet_interface.rs 21.95% <100.00%> (+14.05%) ⬆️
...-wallet/src/managed_account/managed_account_ref.rs 67.09% <ø> (+0.02%) ⬆️
...allet/src/managed_account/managed_account_trait.rs 50.00% <ø> (+5.71%) ⬆️
.../src/managed_account/managed_core_funds_account.rs 89.00% <100.00%> (+0.11%) ⬆️
... and 4 more

... and 6 files with indirect coverage changes

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added waiting-bots Waiting for the review bots to report on this head merge-conflict The PR conflicts with the target branch. and removed waiting-self-review Waiting for the author to post /self-reviewed labels Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

This PR has merge conflicts with the base branch. Please rebase or merge the base branch into your branch to resolve them.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Bots are done — your move: post /self-reviewed.
Full checklist in the description.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. and removed waiting-bots Waiting for the review bots to report on this head labels Nov 9, 2026
…ion-on-pool-growth

# Conflicts:
#	key-wallet-manager/src/process_block.rs
@github-actions github-actions Bot removed the merge-conflict The PR conflicts with the target branch. label Nov 12, 2026
@manki-review

manki-review Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

✅ Review complete in 3m 35s

Planner (6s)
    refactor · 416 lines · 2 agents
    judge effort: high

Review (security · pair): 2 findings
    ✅ Claude Sonnet 5.5 · high: 0 findings (35s)
    ✅ Claude Opus 5.5 · high: 2 findings (57s)

Judge: 2 kept · 0 dropped (1m 34s)
    kept: 2 suggestion

Review metadata

Config:

  • Models: reviewer=claude-sonnet-5-5, judge=claude-opus-5-5
  • Triage: trivial=false, subtle=true, paired=true (planner, security-sensitive paths)
  • Team: Claude Sonnet 5.5 · high, Claude Opus 5.5 · high
  • Memory: enabled (central)

Account limits:

  • Claude subscription: weekly 54% (resets 2026-11-17 05:00 UTC)

Judge decisions:

  • Kept: "Monitor hash is computed every 100 ms even under FetchAll, where no bloom filter exists" (suggestion, medium confidence): "suggestion. tick at dash-spv/src/sync/mempool/sync_manager.rs:163 now calls monitor_hash() whatever the strategy. That call builds and hashes the full address and outpoint lists under the wallet read lock. Under FetchAll there is no filter to rebuild: the existing test asserts that FetchAll sends no filter messages when the set changes. Results stay correct. The cost the PR measures (about 15 to 90 µs per 100 ms tick) is under 0.1% of the tick budget, so the degradation is marginal. Gating the check on MempoolStrategy::BloomFilter is a cheap improvement, not a needed fix."
  • Kept: "No regression test covers the address-pool paths that issues key-wallet: bump monitor_revision in all pool-mutating helpers on ManagedCoreFundsAccount #713 and key-wallet: bump monitor_revision in pool-mutating helpers on ManagedCoreKeysAccount #715 report" (suggestion, high confidence): "suggestion. Missing test coverage is never a warning or blocker. The new test at key-wallet-manager/src/process_block.rs:1255 grows the pool only through set_gap_limit. Nothing in the diff calls next_address, next_bls_operator_key or next_receive_addresses and then checks monitor_hash(). The AGENTS.md rule asks for a regression test with each fix, so a test for one of the reported helpers would pin the behaviour the PR claims to fix. A defect is unlikely, because the hash is computed from monitored_addresses() directly."

Timing:

  • Parse: 9.1s
  • Review agents: 111.7s
  • Judge: 93.9s
  • Total: 214.7s

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added waiting-bots Waiting for the review bots to report on this head and removed waiting-self-review Waiting for the author to post /self-reviewed bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. labels Nov 12, 2026
manki-review[bot]
manki-review Bot previously approved these changes Nov 12, 2026

@manki-review manki-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Approved. 2 suggestions, none of which block.

What this does: The mempool bloom filter was rebuilt when a manual revision counter changed. Some code paths bumped it and others did not.


Related work: open PRs and issues that may cover the same change. None of them blocks.


What to test

The review model wrote these steps. Check what a step runs before you follow it.

Setup: Run the SPV client with mempool tracking enabled and MempoolStrategy::BloomFilter, with a wallet loaded and synced to the tip.

  1. Generate a new receive address. Expect one log line 'Wallet monitored set changed, rebuilding bloom filter' and a new filterload sent to each activated peer.
  2. Leave the client idle for a minute. Expect no repeated rebuild log lines and no extra filterload messages.
  3. Receive a payment to a wallet address. Expect a rebuild after the transaction is processed, because a new UTXO is now watched.
  4. Receive an InstantSend lock for a transaction the wallet already holds. Expect no rebuild.
  5. Remove a wallet from the manager. Expect a rebuild with a filter that no longer covers its addresses.
  6. Switch to MempoolStrategy::FetchAll and generate addresses. Expect no filterclear or filterload messages.
About this review
  • Reviewed 70b14b1, round 1
  • 416 changed lines read in 3m 35s
  • Found by claude-sonnet-5-5 and claude-opus-5-5, judged by claude-opus-5-5
  • Tokens: 3.2M in (2.4M from cache) · 21k out · about $4.34 at API prices
  • How Manki reviews

Comment thread key-wallet-manager/src/process_block.rs Resolved
@manki-review

manki-review Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

✅ Review complete in 2m 43s

Planner (5s)
    refactor · 424 lines · 2 agents
    judge effort: high

Review (security · pair): 2 findings
    ✅ Claude Sonnet 5.5 · high: 0 findings (32s)
    ✅ Claude Opus 5.5 · high: 2 findings (1m 12s)

Judge: 2 kept · 0 dropped (53s)
    kept: 2 suggestion

Review metadata

Config:

  • Models: reviewer=claude-sonnet-5-5, judge=claude-opus-5-5
  • Triage: trivial=false, subtle=true, paired=true (planner, security-sensitive paths)
  • Team: Claude Sonnet 5.5 · high, Claude Opus 5.5 · high
  • Memory: enabled (central)

Account limits:

  • Claude subscription: weekly 56% (resets 2026-11-17 05:00 UTC)

Judge decisions:

  • Kept: "Activating peers does not record the monitor hash, so the first tick after sync rebuilds every filter again" (suggestion, medium confidence): "suggestion. If activation does not snapshot the hash, a wallet whose monitored set changed during sync gets one redundant FilterClear/FilterLoad/MemPool round per peer. That happens once per sync, and every filter stays correct. The finding says the revision counter behaved the same way, and the old counter changed more often, so this PR neither causes nor worsens the defect. The part this PR does own is the rewritten test comment at dash-spv/src/sync/mempool/sync_manager.rs:829 ('this snapshots the monitor hash'). That comment would then state behaviour the code does not have, which is a suggestion. The activation code is not shown, so whether it skips the snapshot stays unverified."
  • Kept: "No regression test covers the address paths the PR says it fixes" (suggestion, high confidence): "suggestion, same as last time. The test still grows the pool only through set_gap_limit at key-wallet-manager/src/process_block.rs:1259. The inter-round diff does not touch this test. A missing test is a suggestion even under the repository's regression-test rule."

Timing:

  • Parse: 7.9s
  • Review agents: 101.5s
  • Judge: 53.5s
  • Total: 162.9s

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

manki-review[bot]
manki-review Bot previously approved these changes Nov 12, 2026

@manki-review manki-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Approved. 1 suggestion, which doesn't block.

What this does: The bloom filter for mempool monitoring was rebuilt only when wallet code remembered to bump a revision counter. The wallet now exposes a hash of the watched addresses and coins, and the mempool manager rebuilds the filter whenever that hash changes, so no change can be missed.


Related work: open PRs and issues that may cover the same change. None of them blocks.


What to test

The review model wrote these steps. Check what a step runs before you follow it.

Setup: Run the SPV client on testnet or regtest with mempool tracking enabled and mempool_strategy set to BloomFilter, with a funded wallet.

  1. Let initial sync finish. Expect one filterload and one mempool message sent to each connected peer.
  2. Wait several seconds without wallet activity. Expect no further filterload messages and no "Wallet monitored set changed" log line.
  3. Generate a new receive address beyond the current gap window. Expect "Wallet monitored set changed, rebuilding bloom filter" within about 100 ms, followed by filterclear, filterload and mempool per activated peer.
  4. Send funds to a wallet address from another wallet. Expect the incoming mempool transaction to be detected and the filter to be rebuilt once, because a new UTXO is watched.
  5. Receive an InstantSend lock for that transaction. Expect no filter rebuild, since the watched sets do not change.
  6. Switch to mempool_strategy FetchAll and repeat the address generation. Expect no filterload or filterclear messages.
  7. Remove a wallet from the manager while running. Expect one filter rebuild, then none on later ticks.
About this review
  • Reviewed 1c96695, round 2
  • 424 changed lines read in 2m 43s
  • Found by claude-sonnet-5-5 and claude-opus-5-5, judged by claude-opus-5-5
  • Tokens: 3.3M in (2.7M from cache) · 19k out · about $3.60 at API prices
  • How Manki reviews

coderabbitai[bot]
coderabbitai Bot previously approved these changes Nov 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Bots are done — your move: post /self-reviewed.
Full checklist in the description.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed and removed waiting-bots Waiting for the review bots to report on this head labels Nov 12, 2026
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added waiting-bots Waiting for the review bots to report on this head and removed waiting-self-review Waiting for the author to post /self-reviewed labels Nov 12, 2026
@manki-review

manki-review Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

✅ Review complete in 2m 3s

Planner (5s)
    refactor · 438 lines · 2 agents
    judge effort: high

Review (security · pair): 0 findings
    ✅ Claude Sonnet 5.5 · high: 0 findings (44s)
    ✅ Claude Opus 5.5 · high: 0 findings (43s)

Judge: 0 kept · 0 dropped (38s)

Review metadata

Config:

  • Models: reviewer=claude-sonnet-5-5, judge=claude-opus-5-5
  • Triage: trivial=false, subtle=true, paired=true (planner, security-sensitive paths)
  • Team: Claude Sonnet 5.5 · high, Claude Opus 5.5 · high
  • Memory: enabled (central)

Account limits:

  • Claude subscription: weekly 57% (resets 2026-11-17 05:00 UTC)

Timing:

  • Parse: 8.0s
  • Review agents: 76.2s
  • Judge: 38.5s
  • Total: 122.6s

Last reviewed 36266e9 · head 36266e9 · up to date

  • Pause automatic reviews
  • Review again
  • Deeper review

@manki-review manki-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Approved.

What this does: The bloom filter used to be rebuilt only when wallet code remembered to bump a counter, and some changes were missed. The client now hashes the watched addresses and coins and rebuilds the filter whenever that hash changes.


Related work: open PRs and issues that may cover the same change. None of them blocks.


What to test

The review model wrote these steps. Check what a step runs before you follow it.

Setup: Run the SPV client against regtest or testnet with mempool tracking enabled and MempoolStrategy::BloomFilter.

  1. Complete initial sync. Expect one FilterLoad per peer at activation and no second FilterLoad on the following ticks.
  2. Generate a new receive address in the wallet. Expect a log line saying the monitored set changed, followed by FilterClear, FilterLoad and MemPool to each activated peer.
  3. Receive a payment into the wallet. Expect a filter rebuild, because the set of watched outpoints changed.
  4. Leave the client idle for a minute. Expect no repeated filter rebuilds while nothing in the wallet changes.
  5. Switch to MempoolStrategy::FetchAll and change the wallet's addresses. Expect no FilterLoad or FilterClear messages.
  6. Remove the only wallet from the manager. Expect a single rebuild, and the monitor hash to equal its empty-manager value again.
About this review
  • Reviewed 36266e9, round 3
  • 438 changed lines read in 2m 3s
  • Found by claude-sonnet-5-5 and claude-opus-5-5, judged by claude-opus-5-5
  • Tokens: 3.8M in (3.1M from cache) · 14k out · about $3.52 at API prices
  • How Manki reviews

@github-actions

Copy link
Copy Markdown
Contributor

Bots are done — your move: post /self-reviewed.
Full checklist in the description.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. and removed waiting-bots Waiting for the review bots to report on this head labels Nov 12, 2026
@xdustinface
xdustinface merged commit 9fcf8d2 into dev Nov 13, 2026
45 of 47 checks passed
@xdustinface
xdustinface deleted the fix/bump-monitor-revision-on-pool-growth branch November 13, 2026 16:53
manki-review Bot added a commit to manki-review/review-memory that referenced this pull request Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. waiting-self-review Waiting for the author to post /self-reviewed

Projects

None yet

2 participants