Skip to content

key-wallet: bump monitor_revision in all pool-mutating helpers on ManagedCoreFundsAccount #713

Closed

Description

@QuantumExplorer

Context

Surfaced by CodeRabbit during review of #711. The behavior described here pre-dates that PR — #711 is a structural-only split of ManagedCoreAccount into ManagedCoreFundsAccount + ManagedCoreKeysAccount and explicitly does not change runtime behavior.

Problem

On ManagedCoreFundsAccount, only next_receive_address and next_change_address bump monitor_revision after extending the watched address pool. The following pool-mutating paths do not:

  • next_receive_addresses / next_change_addresses (batch helpers)
  • next_address / next_address_with_info (non-Standard single-pool accounts)
  • next_bls_operator_key / next_eddsa_platform_key
  • next_private_key / peek_next_path / mark_first_pool_index_used / next_path
  • mark_address_used

When any of these extend the monitored address set, mempool / bloom-filter consumers can keep watching the old set until some unrelated mutation later happens to bump the counter.

Suggested fix

Each helper that grows or otherwise mutates a pool should call bump_monitor_revision() (or equivalent) on the success path before returning. The existing next_receive_address / next_change_address increments are the reference pattern.

Files

  • key-wallet/src/managed_account/managed_core_funds_account.rs

Original review thread: #711 (review comment 3178371384)

Activity

  1. added
    enhancement
    on May 3, 2026
  2. self-assigned this
    on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions