Skip to content

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

@QuantumExplorer

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions