Skip to content

chore: remove unused bloom module - #280

Merged
xdustinface merged 1 commit into
v0.42-devfrom
remove-bloom-module
Jan 14, 2026
Merged

xdustinface merged 1 commit into
v0.42-devfrom
remove-bloom-module

Conversation

@ZocoLini

@ZocoLini ZocoLini commented Dec 17, 2025 •

Copy link
Copy Markdown
Collaborator

This PR removed the bloom module since it is not being used in the codebase. The only reference to BloomFitlers in the crate is the following:

/// Strategy for handling mempool (unconfirmed) transactions.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum MempoolStrategy {
    /// Fetch all announced transactions (high bandwidth, sees all transactions).
    FetchAll,
    /// Use BIP37 bloom filters (moderate privacy, good efficiency).
    BloomFilter,
}

That is being use here:

    /// Check if we should fetch a transaction based on its txid.
    pub async fn should_fetch_transaction(&self, _txid: &Txid) -> bool {
        match self.strategy {
            MempoolStrategy::FetchAll => {
                // Check if we're at capacity
                let state = self.mempool_state.read().await;
                state.transactions.len() < self.max_transactions
            }
            MempoolStrategy::BloomFilter => {
                // For bloom filter strategy, we would check the bloom filter
                // This is handled by the network layer
                true
            }
        }
    }

Would like confirmation if this can be removed or if we need to implement it.

Summary by CodeRabbit

  • Chores
    • Removed bloom filter functionality including filter creation, lifecycle management, statistics tracking, and utility APIs.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Dec 17, 2025 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

The entire bloom filter module is removed from the dash-spv crate, including the builder, manager, statistics tracking, utility functions, and all associated tests. No bloom filter functionality remains publicly exported.

Changes

Cohort / File(s) Change Summary
Core bloom module infrastructure
dash-spv/src/bloom/builder.rs, dash-spv/src/bloom/manager.rs, dash-spv/src/bloom/utils.rs
Removed BloomFilterBuilder struct and fluent builder API; removed BloomFilterManager, BloomFilterConfig, and BloomFilterStats structures with associated async methods (create_filter, add_address, add_outpoint, add_data, contains, process_transaction, needs_recreation, get_stats, clear); removed utility functions extract_pubkey_hash and outpoint_to_bytes.
Statistics and tracking
dash-spv/src/bloom/stats.rs
Removed BloomStatsTracker struct and all statistics tracking infrastructure including DetailedBloomStats, QueryPerformance, FilterHealth, and NetworkImpact structures with associated lifecycle methods (record_query, record_addition, record_recreation, record_transaction, summary_report).
Module declarations
dash-spv/src/bloom/mod.rs, dash-spv/src/lib.rs
Removed all submodule declarations (builder, manager, stats, utils, tests) and public re-exports (BloomFilterBuilder, BloomFilterConfig, BloomFilterManager, BloomFilterStats, BloomStatsTracker, DetailedBloomStats) from mod.rs; removed pub mod bloom from lib.rs.
Tests
dash-spv/src/bloom/tests.rs
Removed comprehensive test suite covering BloomFilterBuilder, BloomFilterManager, BloomStatsTracker, utility functions, and transaction processing.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–30 minutes

  • Dependency verification: Confirm no remaining codebase references or imports from the removed bloom module exist elsewhere in the project
  • Breaking changes: Verify that external consumers (if any) are aware of the removal, or that this is an internal-only module with no public API surface
  • Module completeness: Ensure all bloom-related files have been identified and removed, with no orphaned references or imports

Poem

A rabbit hops through forests dense,
But blooms no longer make defense—
We've swept the filter clean away,
The burrow's lighter every day! 🐰✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: removing the unused bloom module from the codebase, which aligns with all file deletions in the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@ZocoLini
ZocoLini changed the base branch from v0.41-dev to v0.42-dev December 30, 2025 22:25
@xdustinface

Copy link
Copy Markdown
Collaborator

Reopen to trigger CI.

@xdustinface xdustinface reopened this Jan 14, 2026
@xdustinface xdustinface changed the title removed bloom module chore: remove unused bloom module Jan 14, 2026
@xdustinface
xdustinface merged commit 89fed4b into v0.42-dev Jan 14, 2026
@xdustinface
xdustinface deleted the remove-bloom-module branch January 14, 2026 19:46
xdustinface pushed a commit that referenced this pull request Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants