Skip to content

Skip recently processed nodes in crawler#435

Open
abitofevrything wants to merge 2 commits into
bitmagnet-io:mainfrom
abitofevrything:feat/discovered-nodes-filter
Open

Skip recently processed nodes in crawler#435
abitofevrything wants to merge 2 commits into
bitmagnet-io:mainfrom
abitofevrything:feat/discovered-nodes-filter

Conversation

@abitofevrything

Copy link
Copy Markdown
Contributor

Swaps the mechanism used for filtering known nodes to a stable bloom filter, instead of relying on the DHT routing table.

@abitofevrything abitofevrything marked this pull request as ready for review June 29, 2025 19:13
},
ignoreNodes: &ignoreFilter{
bloom: boom.NewStableBloomFilter(200_000*uint(scalingFactor), 2, 0.001),
},

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't think the scaling factor should be used here...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Considering the scaling factor pretty directly affects the number of discovered torrents, having a fixed size filter would mean its effectiveness over time would decrease faster the higher the scaling factor. Having it grow dynamically like this ensures consistent false negative rates (over time, not per torrent count) no matter the scaling factor.

I can run some quick tests to see if this is actually the case, but I would expect it to be.

giorgiobrullo added a commit to giorgiobrullo/bitmagnet that referenced this pull request Mar 1, 2026
…nt discovery

Cherry-pick of PR bitmagnet-io#435. Replaces the ktable FilterKnownAddrs-based node
deduplication with a dedicated ignoreNodes bloom filter. This avoids
re-querying recently processed nodes, dramatically increasing the rate
of new torrent discovery.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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