Skip to content

fix(floodsub): remove rand 0.7 dependency#6524

Open
pengqima wants to merge 1 commit into
libp2p:masterfrom
pengqima:fix-floodsub-rand-advisory
Open

fix(floodsub): remove rand 0.7 dependency#6524
pengqima wants to merge 1 commit into
libp2p:masterfrom
pengqima:fix-floodsub-rand-advisory

Conversation

@pengqima

@pengqima pengqima commented Jul 16, 2026

Copy link
Copy Markdown

Description

Replace floodsub's cuckoo filter with a bounded cache of 64-bit message hashes.

The new cache preserves the previous approximate limit of 2^20 entries, refreshes the eviction order when a duplicate is observed, and evicts the least recently seen hash when full. This keeps duplicate suppression bounded without retaining complete messages.

Removing cuckoofilter also removes its transitive dependency on rand 0.7.3, which is flagged by RUSTSEC-2026-0097. There are no public API changes.

Fixes #6419.

AI Assistance Disclosure

Tools used (required — write none if no AI was used): none

Attestation (required):

  • I have read every line of this diff, understand what it does, and can explain it in review.

Notes & open questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

Signed-off-by: pengqima <pengqima@outlook.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.

Remove rand 0.7.3 from libp2p-floodsub

1 participant