872 Commits

Author SHA1 Message Date
heyaim
95e2b55ae1
Merge 91b529eb7055d3e52b72a5f953abb1c9acd956ab into c127eb83ab94c069c32d37530d2faecd381cd2a8 2026-09-14 12:21:28 -05:00
GitHub Action
c127eb83ab Automated update of relay data - Sun Sep 13 06:20:34 UTC 2026 2026-09-13 06:20:34 +00:00
heyaim
91b529eb70 Check the entry count against a committed snapshot
fetch-georelays.yml rewrites the bundled asset every week; a test
asserting the asset's exact entry count would fail on the first data
update after this merges. The exact-count check moves to a committed
snapshot of online_relays_gps.csv, which never changes: a different
count there is a change in the validator, never a change in the data.

The bundled asset is still tested on every run: it must pass the same
validation a download must pass, including the minimum entry count. A
weekly update the validator refuses, or one that shrinks below that
minimum, fails the test suite. A bad file gets caught in the repo
instead of shipping inside the app.

The snapshot is a copy of online_relays_gps.csv as of Aug 30.
2026-09-07 20:56:21 -05:00
heyaim
46f84b61f0 Validate relay directories with iOS's rules
#914 aligned the file both platforms read and how rows are keyed and
ordered; the acceptance rules still differed. iOS rejects a whole
directory on one malformed or conflicting row, validates the header,
caps size and rows, and screens every host. This client skipped bad
rows and accepted almost any host. The bitchat repo validates the file
before it lands; this port bounds what the client accepts as well.

parseCsv and canonicalHost are replaced by a port of
GeoRelayDirectory.validatedEntries and validatedDirectoryAddress. A
rejected download keeps the current list; one that keeps less than
half of the known entries is rejected. Five details follow iOS's
compiled validator rather than a plain reading of the Swift, each with
a test. The cache refetches at startup when its source URL changed.

Cross-checked against the Swift validator on 84 fixture runs and
100,000 fuzzed inputs. Full suite, lint and build pass.
2026-09-07 20:56:21 -05:00
heyaim
369b047fc4 Fetch the weekly relay update from the file the app reads
fetch-georelays.yml downloads the relay list from the georelays repo
every week and pushes it straight to main. This branch moves the app's
fetch to online_relays_gps.csv, and a job still reading the old source
would keep the bundled asset on a different list from the one the app
downloads.

Pointed at online_relays_gps.csv, the job keeps the bundled asset on
the app's source. When the file has not changed, the job downloads the
same file and pushes nothing; when it changes, the asset follows. The
asset itself is not changed in this branch.
2026-09-07 19:01:10 -05:00
heyaim
54a0b4dd45 Record the source of the bundled and cached relay files
Review follow-up on the naming: the bundled asset and the download
cache kept their old file names when the fetch moved to
online_relays_gps.csv. A comment now records where both come from; the
names then do not send anyone looking for a georelays fetch that is
gone.
2026-09-07 19:01:10 -05:00
heyaim
43ce034bcd Use synthetic fixtures and record the selection contract
Review follow-up from the automated pass. The selection tests carried a
real relay hostname and real city coordinates; AGENTS.md requires
synthetic, non-identifying fixtures. Both are replaced with clearly
synthetic values that keep the same shapes: the port-variant pair, the
one-coordinate tie group, and the duplicated nearest relay that used to
displace the fifth server.

The selection rules are also now recorded in
docs/client-rewrite-contracts.md, since agreeing clients are the point
of the change: same source file, same host key, same tie order.
Behavior is unchanged; RelayDirectoryTest covers it.
2026-09-07 19:01:10 -05:00
heyaim
888b3df13a Select geohash relays the way iOS selects them
Both platforms use only the five relays nearest a geohash, and a
message crosses platforms only if the two selections share a relay.
Android and iOS read different relay files; measured Aug 11 over 6,013
points against iOS's own selection code, the two selections shared 2.3
of 5 relays on average, and about one in nine points shared none.

Fetch the file iOS reads. Key each row by the host string iOS builds,
which collapses the 115 hosts listed twice. Order distance ties by that
key. With all three, both platforms select the same five, in order, at
all 6,013 points. The bundled asset is left to the weekly job.
2026-09-07 19:01:10 -05:00
callebtc
945c9e025b
Merge pull request #866 from Chessing234/fix-dedup-total-checks-race
fix: synchronize totalChecks increment in NostrEventDeduplicator
2026-09-07 23:44:31 +03:00
callebtc
010789adde
Merge pull request #882: strengthen packet deduplication
Use full-payload packet IDs for duplicate detection and simplify the explanatory comment.
2026-09-07 23:33:41 +03:00
callebtc
9444acd33e
Merge pull request #869 from qutad/fix/nostr-ios-dm-lookback
fix(nostr): cap DM envelope backdating at 24 hours
2026-09-07 23:32:40 +03:00
callebtc
9e5a07b782
Merge pull request #907 from Chessing234/fix/relay-reconnect-recovery
fix(nostr): keep retrying relays instead of giving up on them forever
2026-09-07 23:31:15 +03:00
callebtc
fa1727de2f docs: simplify packet deduplication comment 2026-09-07 23:29:23 +03:00
callebtc
936a4cdf6d
Merge pull request #932 from permissionlesstech/codex/release-wear-0.1.3
Bump Wear OS version to 0.1.3
v2.0.2-wear.0.1.3
2026-09-07 15:08:23 +03:00
callebtc
0fce9faa1f Bump Wear OS version to 0.1.3 2026-09-07 14:55:50 +03:00
callebtc
f352a3e4bc
Merge pull request #931 from permissionlesstech/codex/wear-ui-shape-accessibility
Improve Wear round-screen layouts and chat scrolling
2026-09-07 14:43:41 +03:00
callebtc
eb9ce6555f Merge remote-tracking branch 'origin/main' into codex/wear-ui-shape-accessibility 2026-09-07 14:20:35 +03:00
callebtc
08974107dc Compact Wear chat headers and stabilize scroll controls 2026-09-07 14:20:35 +03:00
GitHub Action
9a399cc333 Automated update of relay data - Sun Sep 6 06:16:30 UTC 2026 2026-09-06 06:16:30 +00:00
callebtc
afad3c5513 Fix Wear layouts on small round displays 2026-09-05 19:42:43 +03:00
callebtc
81ba775063
Merge pull request #923 from permissionlesstech/codex/bump-version-2.0.2
Bump Android version to 2.0.2
v2.0.2
2026-08-31 00:04:04 +03:00
callebtc
06cdb0f2f6 Bump Android version to 2.0.2 2026-08-30 23:40:15 +03:00
GitHub Action
1c33df7407 Automated update of relay data - Sun Aug 30 06:16:55 UTC 2026 2026-08-30 06:16:56 +00:00
Taksh
e50cf9c8cc chore: retrigger ci 2026-08-30 09:49:50 +05:30
Taksh
5800583cd2 chore: retrigger ci 2026-08-30 09:39:09 +05:30
Taksh
e65039fe76 chore: retrigger ci 2026-08-30 09:38:30 +05:30
callebtc
4f828b5643
Merge pull request #916 from permissionlesstech/codex/fix-wear-shape-and-font-scaling
Improve Wear layouts for round screens
2026-08-26 18:19:15 +02:00
callebtc
7cf5286bfb Fix slow Wear scroll intent detection 2026-08-26 17:28:17 +02:00
callebtc
a125da48aa Polish Wear shape-aware layout implementation 2026-08-26 16:46:13 +02:00
callebtc
3ed46222ba Fade Wear chat at screen contour 2026-08-26 11:56:00 +02:00
callebtc
898cfde066 Restore Wear chat edge fading 2026-08-26 11:39:16 +02:00
callebtc
33c1ebfc60
Merge pull request #909 from Chessing234/fix/panic-wipe-destroy-db-on-failure
fix: destroy conversation database files when panic wipe throws
2026-08-25 14:37:58 +02:00
Taksh
1a9f6befd4 fix: destroy conversation database files when panic wipe throws
If SQLite clearAll fails mid-panic, in-memory state was already cleared
but a process restart could reload encrypted history from disk (#699).
Fall back to deleting the database files before reporting failure.
2026-08-25 07:40:04 +05:30
callebtc
ed617f0f1b Fix Wear chat autoscroll and focal scaling 2026-08-24 21:13:07 +02:00
callebtc
34f94882f5 Restore Wear chat content space 2026-08-24 20:57:24 +02:00
callebtc
45915fab8f Tune Wear header boundary by screen shape 2026-08-24 20:15:17 +02:00
callebtc
f744038318 Preserve width for Wear Material cards 2026-08-24 20:08:44 +02:00
callebtc
4a1de47ed6 Cover transformed Wear header boundary 2026-08-24 20:04:46 +02:00
callebtc
5d66b69129 Clip Wear messages below the chat header 2026-08-24 20:01:46 +02:00
callebtc
7788328917 Keep Wear chat rows clear of controls 2026-08-24 19:58:03 +02:00
callebtc
2e41dabd07 Add round-screen responsive Wear insets 2026-08-24 19:54:20 +02:00
callebtc
5852fca9b5 Fix Wear content clipping on watch shapes 2026-08-24 19:38:26 +02:00
callebtc
eab894ce78
Merge pull request #743 from aharshit123456/fix/geohash-signature-verification-733
fix: verify Schnorr signatures on incoming geohash Nostr events
2026-08-24 19:17:25 +02:00
Taksh
6bdcd46b33 fix(nostr): keep retrying relays instead of giving up on them forever
A relay that fails is retried on an exponential backoff, then abandoned
for the lifetime of the process. Nothing brings it back: the relay layer
registers no connectivity callback, the periodic subscription validator
only repairs subscriptions on sockets that are already open (and returns
immediately when connectedRelayCount is 0, which is exactly the state
after an outage), and connect() runs once from NostrClient.initialize().
The remaining paths that reset reconnectAttempts are a manual retry, a
Tor state change, and a successful open.

Two ways a relay died permanently:

- Any error whose message mentioned DNS returned before scheduling
  anything at all. "Unable to resolve host" is what this device reports
  when it simply has no network, so a moment in a tunnel killed every
  relay at once, with no retry ever.
- Otherwise the schedule stopped at MAX_RECONNECT_ATTEMPTS. With
  INITIAL=1s and MULTIPLIER=2 that is nine waits totalling about eight
  and a half minutes, after which the relay was dead. MAX_BACKOFF_INTERVAL
  was unreachable: attempt 9 asks for 256s and attempt 10 gave up, so the
  five-minute ceiling the constant defines never applied to anything.

Let the backoff saturate at MAX_BACKOFF_INTERVAL and keep retrying there.
A name-resolution failure now backs off like any other error. Steady state
costs one connection attempt per relay per five minutes; the previous
behaviour cost the user every internet DM, delivery receipt and geohash
channel until they noticed and restarted the app.

The schedule moves into RelayReconnectPolicy so it is unit-testable
without OkHttp or a Context.
2026-08-24 21:32:36 +05:30
GitHub Action
d55754d824 Automated update of relay data - Sun Aug 23 06:09:25 UTC 2026 2026-08-23 06:09:25 +00:00
callebtc
09b481f1ef
Merge pull request #876 from qutad/feat/announce-capability-bits
feat: Add announce capability bit assignments
2026-08-17 21:05:02 +02:00
callebtc
db97c60af1 Merge remote-tracking branch 'origin/main' into feat/announce-capability-bits 2026-08-17 20:40:43 +02:00
callebtc
2318b51630
Merge pull request #897 from permissionlesstech/codex/fix-command-processor-test-brace
Fix CommandProcessor test syntax
2026-08-17 20:38:39 +02:00
callebtc
03d1da5423 Fix CommandProcessor test syntax 2026-08-17 20:13:19 +02:00
callebtc
646044cd81 Clarify capability authentication scope 2026-08-17 19:14:05 +02:00