addrman: remove 1h update rule, apply time penalty in nTime check

bitcoin/bitcoin: PR #36208

2 suggestions

Earlier concerns neither republished nor resolved: 1 minor finding. See the Run archive for their assessments.

Optional improvements

Link

[suggestion] · The privacy rationale overstates what the GETADDR cache covers

No privacy regression is established, but caching alone does not justify the claim: trusted addr-permission peers bypass the cache, and refreshed GETADDR snapshots disclose current timestamps.

Location: src/addrman.cpp:550 (base).

Details and suggested fix

Commit 9d3fd4c argues that fingerprinting is not an issue because GETADDR responses are cached for about a day. Existing cached responses do hide intervening updates, but GetAddresses() samples live addrman on cache creation or expiry without timestamp coarsening. Inbound peers explicitly granted addr permission already receive uncached samples through GetAddressesUnsafe(), once per connection. Removing the 1h/24h gate changes which announcement times these samples can contain, not their timestamp resolution. Please scope the rationale to hiding intervening updates through an existing ordinary P2P cache and name the trusted exception, rather than infer general fingerprinting safety. The privacy effect remains uncertain: increased timestamp churn could also reduce exact matches between snapshots, and Connected_() already refreshes stored times at 20-minute granularity.


Link

[suggestion] · The tests miss multiplicity growth for newer penalized announcements

The new tests reject duplicate penalized announcements but do not check that newer penalized announcements can still increase multiplicity, leaving the positive gossip path unprotected.

Location: src/test/addrman_tests.cpp:406 (head).

Details and suggested fix

In addrman_new_multiplicity, the address added with a 2h penalty keeps a constant timestamp, while the loop that reaches multiplicity 8 uses the default 0s penalty. addrman_update_time sends a newer penalized announcement but checks only its stored nTime. Since ProcessAddrs() passes a 2h penalty, a regression that updates the timestamp and then exits before further bucket insertion for penalized entries would escape these assertions. Add a deterministic growth loop with increasing timestamps, a 2h penalty and distinct source groups, and assert that multiplicity grows. Keep the existing constant-timestamp assertion.


Coverage details

Earlier concerns

Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.

Background

Ralph's summary of historical context for the behaviour affected by this change. The historical record reviewed here is incomplete.

Documented decisions

Caching is not a general guarantee against address-based fingerprinting. The original caching discussion recognized that identical cached responses could help link multiple listening identities; a later research report described cross-network identification using overlapping address/timestamp pairs despite daily caches.

The cache supports the narrower claim that individual internal updates are not exposed immediately through an existing cached response. It does not establish that more precise stored timestamps are never externally useful once snapshots are disclosed.

Source 1 · Source 2 · Source 3