Review report

core: PR #36628

3 suggestions

Earlier concerns neither republished nor resolved: 1 major finding · 3 minor findings · 6 suggestions. See the Run archive for their assessments.

Optional improvements

Link

[suggestion] · Candidate assignment rules lack direct unit coverage

A regression in how Assign() spreads candidates across seeds and query sets would not make the existing tests fail.

Location: src/test/privbcast_plan_tests.cpp:17 (head).

Details and suggested fix

The privbcast_plan_tests test only checks the size of the mainnet seed list. Functional tests configure at most two DNS seeds, fewer than SLOTS, so they cannot exercise R5b’s seed spreading or R5c’s query-set preference. The fuzz target exercises Attempt, not assignment. Add small unit-test fixtures with a fixed answer_seed and synthetic answers to check unique endpoint assignment, first-attempt filling before backups, seed spreading, query-set preference, and independence from answer order. Include duplicate endpoints and cases with fewer candidates than opportunities.


Link

[suggestion] · The design overstates the bound on first attempts per exit

Tor may use the same exit for circuits from two query sets, allowing that exit to supply up to four of the six first attempts.

Location: doc/design/private-broadcast.md:465 (head).

Details and suggested fix

Each query set has separate credentials and an isolated circuit, but Tor does not guarantee that those circuits use different exits. Because Assign() credits endpoints to the query set they came through and slot j prefers set j mod 4, each set supplies at most two first attempts. An exit shared by sets 0 and 1 can therefore supply the first attempts for slots 0, 1, 4, and 5. The stated bound applies per query set, not per exit: an exit used by k sets can supply up to 2k first attempts. Update the rationale to state that bound, or identify a mechanism that ensures distinct exits. This affects how much delivery one exit can suppress, not sender privacy.


Link

[suggestion] · A valid IPv4-only configuration can be rejected despite having a Tor proxy

With -onlynet=ipv4 and a Tor proxy, startup refuses -privatebroadcast even though jobs use that proxy to connect to IPv4 candidates.

Location: src/init.cpp:2450 (head).

Details and suggested fix

Jobs need an onion proxy but do not require onion peer reachability. For example, with -onlynet=ipv4 -proxy=127.0.0.1:9050, the proxy is configured for onion traffic, but -onlynet removes NET_ONION from g_reachable_nets, and the startup check rejects the configuration. Jobs use the onion proxy to connect to IPv4 or IPv6 candidates, so this reachability check blocks a configuration the jobs can use. If the check is meant to require a Tor proxy, check for a configured onion proxy or for -listenonion without -onion=0, rather than onion reachability. If this restriction is intentional, document its reason in U2.


Coverage details

Earlier concerns

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