Eight routes, not four - #208
Merged
Merged
Conversation
Four routed connections was the number picked before there was anything to measure it against. On a real account of 257 follows, four reach 193 of them and leave 64 riding the reader's own relays; eight reach 202 and leave 55, with 156 covered by two relays rather than 134. Sixteen sockets in all, matching the pool, and the greedy still stops on its own: it takes a relay only while one reaches somebody not yet covered twice. Three tests had the budget written into them and would have gone quiet rather than failing. The residual test used seven one-author relays, which at eight slots leaves nobody over; the eviction test filled three of four slots, which at eight slots leaves a spare and never reaches contention; and the coverage-against-popularity test had fewer candidate relays than slots, so the two orderings could not disagree. All three now count off the budget, and the last one asserts that its construction still outnumbers the budget so a smaller one fails loudly instead of passing hollow.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Last of four on read-side outbox routing. Everything else was mechanism; this is the number.
The number
Four was picked before there was anything to measure it against. Measured now, reading only, on my own account of 257 follows (215 with a usable relay list, 191 distinct relays named between them):
"Covered" means reachable through the relays I chose myself or a routed one, which is what the coverage counter measures; the last column is everyone neither reaches, who ride every relay in the pool as before.
Nine more people become directly reachable and nine fewer depend on that fallback. The bigger move is the middle column: twenty-two more people are now carried by two relays rather than one, which is what stops a single relay being down from hiding somebody.
Sixteen sockets in all, matching the pool. Cost measured at 41 threads and 263 MB with all eight connected.
This is not a blank cheque for eight connections. The greedy takes a relay only while one reaches somebody not yet covered twice, so it stops on its own: an account with a tidy follow list opens fewer, and nothing is spent on a socket that would reach nobody new.
Three tests that would have gone quiet
Raising the budget silently turned three tests into tests of nothing, which is the failure mode I keep meeting. All three now count off the budget:
budget + 3and asserts the residual is exactly 3, rather than "more than nothing".budget - 1slots.outbox_relays_per_authorand outnumbers the budget, and the test also asserts the thing the coverage numbers cannot show: that the popularity-ranked suggestions never mention the relay the routing dials.That last one asserts its own construction still outnumbers the budget, so lowering the budget fails loudly instead of passing hollow.
Re-probed the three guards from the previous PR at the new budget: removing per-slot generations, slot-stable placement, or the eviction margin each still fails a test named after it.