Commit graph

6 commits

Author SHA1 Message Date
Claude
364aa9bf0e
fix(lns): sidechain is DNS source of truth, alias comment is fallback
- HSD sidechain checked first (zone data authority)
- Alias comment dns= only used for names not yet on sidechain
- Main chain = ownership (like ARPA root), sidechain = zone records

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 03:40:20 +01:00
Claude
255c7195d1
fix(lns): pipe separator for dns= records, backwards-compatible with comma
- splitPipe() for new format (pipe-separated records)
- Falls back to splitComma() for legacy comma-separated records
- Prevents comma-in-TXT-value parsing bug

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 03:17:10 +01:00
Claude
5b4d199442
feat(lns): parse dns= records from alias comments as fallback
- When HSD sidechain returns null for a name, fall back to parsing
  dns= field from the main chain alias comment
- Format: dns=A:@:1.2.3.4,CNAME:www:lthn.io,TXT:@:value
- ParseDNSFromComment extracts records and adds to cache
- Names registered via Blesta now resolve through LNS
- Always sync (removed tree root skip) to catch new alias comments

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 02:37:13 +01:00
Claude
f917d3e994
test(lns): add unit tests for discovery and DNS resolution
28 tests covering:
- parseAliasComment: Good/Bad/Ugly (v=lthn1 parsing, edge cases)
- splitSemicolon: delimiter splitting
- indexOf: character search
- parseLTHNName: .lthn zone parsing, apex, rejection
- arpaToIP: reverse DNS conversion
- splitDot: IP octet splitting

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 05:09:27 +01:00
Claude
e107d6b3a7
fix(dns): change default DNS port from 5353 to 5354
Port 5353 conflicts with system mDNS (avahi). Port 5354 avoids the
conflict while remaining in the same range. Dockerfile updated to match.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 05:08:27 +01:00
Claude
6825b8b43e
feat(lns): Lethean Name Server v0.1.0
Go binary serving .lthn DNS from ITNS sidechain.
- DNS over UDP+TCP (A, AAAA, TXT, NS, SOA, PTR)
- Chain-based discovery via get_all_alias_details
- Tree-root invalidation (getblockchaininfo)
- hns= alias comment override
- Health endpoint (/health)
- 672 lines, core/go@v0.8.0-alpha.1

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 22:28:46 +01:00