getlantern / browsersunbounded

Interoperable browser-based P2P proxies for censorship circumvention
GNU General Public License v3.0
11 stars 0 forks source link

Introduce discovery patience #94

Closed noahlevenson closed 1 year ago

noahlevenson commented 1 year ago

This PR introduces changes to Freddie which are not backwards compatible with previous versions of Broflake.

Since clients are currently configured to use our GCP-deployed Freddie instance by default, merging this PR (and updating clients) will break the entire network until we deploy the new version of Freddie.

This PR introduces performance improvements for discovery. Previously, clients naively competed for the first genesis message they saw, and so several "rounds" of competition were often required for the liquidity in the marketplace to get consumed.

We introduce a tunable parameter called patience. Patience tells clients to collect a set of genesis messages over an interval of time, then select one at random. patience == 0 results in our "classic" discovery behavior -- that is, clients will always make an offer for the first genesis message they see.

Closes https://github.com/getlantern/broflake/issues/32, which was an inaccurate analysis.