Commit Graph
2169 Commits
Author SHA1 Message Date
Alain Brenzikofer ad9fc367dc renaming 2026-09-11 19:04:51 +02:00
Alain Brenzikofer 2a15b8c983 Merge remote-tracking branch 'origin/ab/snrc-resolver-SMP-NAVL' into ab/snrc-resolver-freshness 2026-09-11 18:07:36 +02:00
Alain Brenzikofer 908c6c7728 fix review findings 2026-09-11 18:00:46 +02:00
Alain Brenzikofer a921d7cc23 first shot at reporting freshness 2026-09-11 17:36:48 +02:00
brenzi 85901ea33d fix resolver v2 for subnames (#1867)
* fix resolver v2 for subnames

* simplify doc
2026-09-11 17:26:45 +02:00
Alain Brenzikofer 1cb814654b remove trailing_ filter 2026-09-11 11:24:35 +02:00
Evgeny Poberezkin a5e98be3fc rename 2026-09-11 10:15:12 +01:00
brenzi 055bf721df drop resolver caching (#1866) 2026-09-11 10:07:07 +01:00
Evgeny Poberezkin c2bd7293db simplify encoding 2026-09-11 10:06:33 +01:00
Alain Brenzikofer ac442e4064 docs sweep 2026-09-10 16:28:38 +02:00
Alain Brenzikofer 2b2d2d4e0c fix regressions found reviewing the last two commits
resolveNameMsg read the version off thParams', which on the PFWD path is
  the proxy's session, not the client's. It takes the version as an argument
  now, so each call site passes its own — the forwarded one uses fwdVersion.

  reservedReasonOf matched the reason words before capping, so "internal
  review" became NRRUnknown "internal", which encodes back as NRRInternal.
  Capping precedes the match, so what is kept encodes to what it decoded.

  Four agent tests still pinned NAME NOT_FOUND from a 404 stub, and two spec
  statements still described the old mapping. A registrar that does not
  record labels cannot answer a hashed query, which the resolver README now
  says.
2026-09-10 15:33:16 +02:00
Alain Brenzikofer ef97b86ea6 resolver errors say what went wrong, not "no such name"
/v2/resolve answers 200, 400 or 502, and an unregistered name is
  NRAvailable, so no status means "not registered". Mapping 400/404/410 to
  NOT_FOUND made a misconfigured relay deny every name, and hid a relay
  upgraded ahead of its resolver. All three now surface as RESOLVER.

  rslvNotFound would have gone dead, so it counts what its name says: an
  availability answer the encoder downgrades for a session below v22. The
  wire is unchanged.

  A hashed query the registrar cannot name is refused with 502 rather than
  answered with a record named "unknown", which the client rejects anyway.
  NRRUnknown is capped to 32 printable characters again, as the spec says.
  A registered name that is also reserved no longer offers a date it will
  never free up on. rentPrices is registrationPrices throughout, and
  yearPriceUSD is USDCents rather than a bare Int64.
2026-09-10 15:16:11 +02:00
Alain Brenzikofer a3fb63ff06 fix review findings 2026-09-10 14:42:19 +02:00
Alain Brenzikofer ccdb4c88f4 fix resolver boundary: status before body, cover /v2, drop dead field
httpGet read the response body before checking the status, so an oversized
  error page surfaced as a transient "response too large" instead of the
  authoritative status. Reverting it to its previous shape restores that and
  removes the status test both callers had been re-deriving.

  registration() had no tests at all, though it is the endpoint SMP v22
  consumes. RegistrationV2Tests covers the three answer shapes, the error
  paths and the exact key set of each, which is the wire contract.

  auctionUntil was always None with no consumer. The spec claimed a reason
  word travels unchanged; a resolver can only send a word it has, and SNRC's
  registry records a number.
2026-09-10 14:16:59 +02:00
Alain Brenzikofer 288978a181 derive NameRegistration JSON the same way on every build
sumTypeJSON switches to the _owsf form on swift builds, but this JSON is
  the RNAME payload and the resolver's HTTP contract, so a swift client and
  a Linux relay would disagree on every field. taggedObjectJSON is what it
  already resolves to everywhere else.

  The label modifier keeps the reservedReason_ collision escape out of the
  API, as AgentWorkersDetails does: both arms now say reservedReason.
2026-09-10 14:05:09 +02:00
Alain Brenzikofer 50fc0466e0 fix stale docs 2026-09-10 13:14:13 +02:00
Alain Brenzikofer 4645a7e587 implement full type change and introduce resolver endpoint versioning 2026-09-10 12:22:07 +02:00
Alain Brenzikofer f171ff2fbf revert drive-by refactoring 2026-09-10 11:25:28 +02:00
Alain Brenzikofer 5da77572c9 NameQuery simplification 2026-09-10 09:51:20 +02:00
Alain Brenzikofer 9db84e1f28 fix more robustly 2026-09-09 12:19:09 +02:00
Alain Brenzikofer be35dbc9cb fix reverse compatibility with .testing mainnet 2026-09-09 11:50:21 +02:00
Alain Brenzikofer e03e4bd8f2 Merge branch 'ab/snrc-resolver-expiry-and-availability' into ab/snrc-resolver-SMP-NAVL 2026-09-09 09:22:06 +02:00
Alain Brenzikofer dc2c918aa1 Merge branch 'ab/resolver-labelhash-query' into ab/snrc-resolver-expiry-and-availability 2026-09-09 09:21:43 +02:00
Alain Brenzikofer 993cc3df5e Merge remote-tracking branch 'origin/master' into ab/snrc-resolver-expiry-and-availability 2026-09-09 09:16:04 +02:00
Alain Brenzikofer aaed545fed Merge remote-tracking branch 'origin/master' into ab/resolver-labelhash-query 2026-09-09 09:15:11 +02:00
Alain Brenzikofer 5ccbca9239 align resolver with contract changes for names v2 2026-09-09 09:07:26 +02:00
Alain Brenzikofer 7636c8ec20 Merge remote-tracking branch 'origin/master' into ab/snrc-resolver-SMP-NAVL 2026-09-09 08:38:40 +02:00
Alain Brenzikofer f229e61585 trim diff 2026-09-08 17:51:10 +02:00
Alain Brenzikofer 8b706331e2 fix adversarial review findings 2026-09-08 17:04:20 +02:00
Alain Brenzikofer c0bf6203e2 align implementation with latest type changes to test against client 2026-09-08 09:36:00 +02:00
Alain Brenzikofer 1a74598231 separate labelhash and plaintext names cleanly 2026-09-08 09:16:14 +02:00
Alain Brenzikofer 82ca4af382 claude answering ep review. to be continued... 2026-09-08 08:44:35 +02:00
Alain Brenzikofer 1dabe1dc52 rentPrices map 2026-09-08 08:28:33 +02:00
Alain Brenzikofer 1e3d6fa09b next iteration on types only 2026-09-07 18:19:34 +02:00
Alain Brenzikofer e4fab46eb9 protocol types refactoring 2026-09-07 16:17:22 +02:00
brenziandEvgeny 20ba720224 Update src/Simplex/Messaging/Protocol.hs
Co-authored-by: Evgeny <evgeny@poberezkin.com>
2026-09-07 14:21:17 +02:00
brenziandEvgeny 13f8cce682 Update src/Simplex/Messaging/Protocol.hs
Co-authored-by: Evgeny <evgeny@poberezkin.com>
2026-09-07 14:21:07 +02:00
brenziandEvgeny 1e5ddca661 Update src/Simplex/Messaging/Protocol.hs
Co-authored-by: Evgeny <evgeny@poberezkin.com>
2026-09-07 14:20:57 +02:00
brenziandEvgeny 80765045b2 Update src/Simplex/Messaging/Protocol.hs
Co-authored-by: Evgeny <evgeny@poberezkin.com>
2026-09-07 14:20:46 +02:00
brenziandEvgeny b8cc0196ca Update src/Simplex/Messaging/Server/Names.hs
Co-authored-by: Evgeny <evgeny@poberezkin.com>
2026-09-07 14:20:26 +02:00
Alain Brenzikofer 08432383cd doc fixes 2026-09-07 11:11:11 +02:00
Alain Brenzikofer c2c3bbc578 revert NAVL command and wrap it all into RSLV 2026-09-07 11:01:07 +02:00
Alain Brenzikofer e6dc6c8846 eth_call guard and cache constants 2026-09-07 08:09:43 +02:00
Alain Brenzikofer 99adfe9af0 adapt house style 2026-09-06 19:00:44 +02:00
Alain Brenzikofer 3b4a7f2295 next iteration fixes 2026-09-06 18:47:23 +02:00
Alain Brenzikofer 5c480277d6 adversarial review (against simplex-chat) fix 2026-09-06 18:35:02 +02:00
Alain Brenzikofer c99cc61b69 add catch all for furture variants 2026-09-06 12:43:30 +02:00
Alain Brenzikofer 45d314cfe2 docs shortening and other review fixes 2026-09-05 22:52:42 +02:00
Alain Brenzikofer 783f0aa4be more review fixes 2026-09-05 19:51:01 +02:00
Alain Brenzikofer 69cce33675 review fixes 2026-09-05 18:37:55 +02:00