Solve the sign-up puzzle when a relay asks for one #38

Merged
paulhitt merged 1 commits from feat/signup-proof-of-work into main 2026-09-02 19:47:36 +00:00
paulhitt commented 2026-09-02 02:40:17 +00:00 (Migrated from gitlab.com)

The relay can charge a few seconds of arithmetic before an account
exists — cheap for one person, expensive for a farm, and unlike a
CAPTCHA it hands nothing to a third party. This is the Android half,
matching the iPhone app.

Asked for only when the relay refuses without one, so a relay with the
feature off — every relay running today — still sees exactly one
request. Rethrown rather than swallowed when this app cannot answer: a
difficulty above the cap leaves it genuinely unable to sign up here, and
"update the app" is then the true sentence.

Two refusals get their own sentences. challenge_required means the app
is behind its server; challenge_failed is nearly always a challenge that
expired while somebody was typing. Sharing one message would send half
these people to the Play Store for nothing. Decided by the relay's code,
never the status, because a 400 is also a bad email.

The bit counting is pinned to exact vectors. A byte-counting
implementation still SATISFIES a 9-bit difficulty — it overshoots to 16
and does 230x the work — so an assertion about "at least 9 leading
zeros" cannot see the bug.

Refs flamenet-relay#39

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

The relay can charge a few seconds of arithmetic before an account exists — cheap for one person, expensive for a farm, and unlike a CAPTCHA it hands nothing to a third party. This is the Android half, matching the iPhone app. Asked for only when the relay refuses without one, so a relay with the feature off — every relay running today — still sees exactly one request. Rethrown rather than swallowed when this app cannot answer: a difficulty above the cap leaves it genuinely unable to sign up here, and "update the app" is then the true sentence. Two refusals get their own sentences. challenge_required means the app is behind its server; challenge_failed is nearly always a challenge that expired while somebody was typing. Sharing one message would send half these people to the Play Store for nothing. Decided by the relay's code, never the status, because a 400 is also a bad email. The bit counting is pinned to exact vectors. A byte-counting implementation still SATISFIES a 9-bit difficulty — it overshoots to 16 and does 230x the work — so an assertion about "at least 9 leading zeros" cannot see the bug. Refs flamenet-relay#39 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
paulhitt commented 2026-09-02 02:40:17 +00:00 (Migrated from gitlab.com)

assigned to @paulhitt

assigned to @paulhitt
paulhitt commented 2026-09-02 19:47:24 +00:00 (Migrated from gitlab.com)

added 5 commits

  • 580d176e...0271c15a - 4 commits from branch main
  • df818007 - Solve the sign-up puzzle when a relay asks for one

Compare with previous version

added 5 commits <ul><li>580d176e...0271c15a - 4 commits from branch <code>main</code></li><li>df818007 - Solve the sign-up puzzle when a relay asks for one</li></ul> [Compare with previous version](/paulhitt/flamenet-messenger-android/-/merge_requests/11/diffs?diff_id=2000733131&start_sha=580d176ebf4430f6899dcf01bdd0d4ede451f716)
paulhitt commented 2026-09-02 19:47:37 +00:00 (Migrated from gitlab.com)

mentioned in commit d1a438cdd2

mentioned in commit d1a438cdd2357fef46c88fb1aa863b83e7c8ec90
paulhitt (Migrated from gitlab.com) merged commit d1a438cdd2 into main 2026-09-02 19:47:37 +00:00
paulhitt commented 2026-09-09 19:01:56 +00:00 (Migrated from gitlab.com)

mentioned in merge request !9

mentioned in merge request !9
Sign in to join this conversation.