Commit Graph
92 Commits
Author SHA1 Message Date
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
brenzi 055bf721df drop resolver caching (#1866) 2026-09-11 10:07:07 +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 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 5ccbca9239 align resolver with contract changes for names v2 2026-09-09 09:07:26 +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 e4fab46eb9 protocol types refactoring 2026-09-07 16:17:22 +02:00
Alain Brenzikofer e6dc6c8846 eth_call guard and cache constants 2026-09-07 08:09:43 +02:00
Alain Brenzikofer 5c480277d6 adversarial review (against simplex-chat) fix 2026-09-06 18:35:02 +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
Alain Brenzikofer e3f00b46f6 extend SMP protocol to support name availability queries with accurate and meaningful replies 2026-09-05 16:53:42 +02:00
sh c47aeddb18 resolver: reduce comments, remove REVIEW.html 2026-09-04 15:05:14 +00:00
sh bcc9b36e8f merge ab/resolver-labelhash-query
# Conflicts:
#	scripts/resolver/README.md
#	scripts/resolver/service/snrc-resolve.py
#	scripts/resolver/service/test_snrc_resolve.py
2026-09-04 14:52:37 +00:00
sh ad4077bf14 resolver: reduce comments 2026-09-04 14:49:07 +00:00
Alain Brenzikofer 17451a6578 split error into a machine-readable code and a human message 2026-09-04 09:09:43 +02:00
Alain Brenzikofer e4e3d0dc7c simplify language 2026-09-04 08:51:12 +02:00
Alain Brenzikofer 2cfc6d3a76 simplify language 2026-09-04 08:46:10 +02:00
Alain Brenzikofer 41678c74bb compare block instead of wall clock 2026-09-04 08:42:54 +02:00
Alain Brenzikofer 9b2ff82cc7 report expiry and availability correctly 2026-09-04 08:42:48 +02:00
Alain Brenzikofer e670d9fa37 simplify language 2026-09-04 08:40:04 +02:00
Alain Brenzikofer bd4b07ab79 tiny test addition 2026-09-03 17:53:47 +02:00
Alain Brenzikofer a8cee354eb implement resolving 2LD names by labelhash 2026-09-03 17:23:47 +02:00
sh 2dff11a808 resolver: cleanup (#1817)
* resolver: cleanup

* resolver: update .testing registry address
2026-06-23 16:30:44 +01:00
Evgeny Poberezkin d32a25c988 Merge branch 'stable' 2026-06-21 13:28:16 +01:00
Paul Bottinelli 91cb297e9e fix: disable web in cloud scripts without certs (#1804) 2026-06-21 12:52:08 +01:00
brenziandsh 056314396d SNRC name resolver (#1795)
* add REST API to resolve SNRC

* fix unset fields

* support multi-TLD deployments

* update for mainnet tests

* haskell-friendly fieldnames

* add subname hint

* resolver: dockerize

* support multiple fallback links for splx contact and channels

* add test

* change url separator to semicolon

---------

Co-authored-by: sh <github.shum@liber.li>
2026-06-20 10:09:56 +01:00
shandPaul Bottinelli 24e464926e scripts: fix check in simplex-servers-update (#1797)
Co-authored-by: Paul Bottinelli <paul.bottinelli@trailofbits.com>
2026-06-06 09:05:24 +01:00
sh 53bc0fe663 scripts: add docker-compose resolver setup (#1793) 2026-06-02 10:24:56 +01:00
sh 1e1f897c79 core: use = as INI key-value separator (#1767)
* core: use = as INI key-value separator

* core: update docker entrypoints for = INI separator

* core: update INI separator in README and test scripts
2026-04-20 09:22:14 +01:00
sh 3a9381b966 ci/scripts: execute git version if chmod fails (#1643) 2025-09-23 09:08:56 +01:00
Evgenyandshum 1e29f7c811 ci: adjust output, retry tests on failure, include hashes in release notes (#1520)
* scripts/reproduce-builds: rename with prefix and adjust output

* ci: rerun tests and include hashes in release

* ci: fix variables and really skip 8.10.7

* ci: fix prepare step

* ci: setup swap for 8.10.7

* ci: fix upload and formatting

* ci: properly format hashes

* ci: simplify

---------

Co-authored-by: shum <shum@liber.li>
2025-04-21 17:05:31 +01:00
sh c3f57beafd scripts: fix script for reproducible builds (#1492)
* scripts: fix script for reproducible builds

* scripts: add automatic hash comparasion + compute file with checksums

* scripts: silence cleanup

* ci/scripts: enable parallel build (#1493)
2025-03-23 18:17:27 +00:00
sh 2e67ed9c4c ci/scripts: refactor reproducible builds (#1490)
* ci: build cache, remove 20.04, minor refactor

* scripts: update build reproducibility script

* script: add postgresql reproducibility

* script: no cache when building image

* scripts: force symlinks

* scripts: also download prebuilt postgresql binary

* scripts: add missing app var
2025-03-22 13:27:11 +00:00
sh 6e505f5c0b scripts: add script to reproduce binaries locally (#1477) 2025-03-08 20:51:20 +00:00
sh dad7e1b60c simplex-servers-update: download scripts from tag (#1457)
* simplex-servers-update: download scripts from tag

* set remote version when re-executing the update script

* safeguard variables

* additional checks
2025-02-20 09:26:03 +00:00
sh 560b257af7 scripts: simplex-servers-update menu to update only server binaries etc. (#1445)
* scripts/simplex-servers-update: refactor

* simplex-servers-update: don't check empty variable

* simplex-servers-update: minor decoration change

* simplex-servers-update: add new line when reexecuting script

* simplex-servers-update: refactor menus

* simplex-servers-update: fix re-executing

* simplex-servers-update: fix menus

* simplex-servers-update: do not rerended menu every time

* simplex-servers-update: update menus logic

* simplex-servers-update: ask permission to update only if versions differ

* simplex-servers-update: skip empty variable

* simplex-servers-update: include while loop

* simplex-servers-update: update re-executing skip logic

* simplex-servers-update: ignore empty

* simplex-servers-update: s/while/if

* simplex-servers-update: ignore empty variable

* simplex-servers-update: update skipping scripts

* simplex-servers-update: minor fixes

* simplex-servers-update: add spaces

* simplex-servers-update: safeguard files and add cleanup logic

* simplex-servers-update: update menus

* simplex-servers-update: fix binary check

* simplex-servers-update: adjust erasing lines

* simplex-servers-update: simplify bin update logic

* simplex-servers-update: fix binary path

* simplex-servers-update: format errors

* scripts/main/simplex-servers-update: initial refactor2

* simplex-servers-update: incr update

* simplex-servers-update: initial dynamic menu

* simplex-servers-update: misc fixes

* simplex-servers-update: fix VER

* simplex-servers-update: add VER check

* simplex-servers-update: abort early if there's no options available

* simplex-servers-update: add new helper function and update_misc

* simplex-servers-update: pass selection

* simplex-servers-update: non-interactive usage

* simplex-servers-update: add help menu

* simplex-servers-update: misc fixes and new binary update logic

* simplex-servers-update: local path check

* simplex-servers-update: fix change check

* simplex-servers-update: OLF -> OLD

* simplex-servers-update: always return code from functions

* simplex-servers-update: new menu flow

* simplex-servers-update: fixes

* simplex-servers-update: download function + fixes

* simplex-servers-update: s/bins/binaries

* simplex-servers-update: download message

* simplex-servers-update: cleanup
2025-02-15 10:31:19 +00:00
sh efe71cd598 docker: refactor (#1438)
* docker: refactor

* github/docker: bump actions and adjust smp ports
2025-01-30 09:22:13 +00:00