* names: an available name carries its bona fide community terms
A bona fide community name can be registered only by someone who
accepts the community terms its name policy keeps. NRAvailable gains
bonaFideTerms_: the terms' text when it fits the answer, else the 0x
hex keccak256 of the text; Nothing for any other name. Nothing is
omitted from the JSON, so a plain name's answer is unchanged, and an
answer without the field decodes as a plain name.
Claude-Session: https://claude.ai/code/session_014JqabRiGc38JjH4KrE5LEU
* names: the bona fide terms travel as the zstd frame the name policy keeps
The name policy keeps the community terms' text compressed in one zstd
frame, and a buyer accepts the keccak256 of that frame. An available
bona fide name carries the frame when it fits the answer, else its hash.
ZstdTerms is base64url in JSON, as other bytes are.
Claude-Session: https://claude.ai/code/session_014JqabRiGc38JjH4KrE5LEU
* names: every available name carries the terms its buyer accepts
Every registration accepts terms, not only a bona fide name's. The name
policy keeps the general name terms and the community terms, each as a
zstd frame. NRAvailable's nameTerms is NTName with the general terms, or
NTBonaFide with a bona fide name's community terms, which include them;
either carries the frame when it fits the answer, else its hash. It is
absent only from a router before v24.
Claude-Session: https://claude.ai/code/session_014JqabRiGc38JjH4KrE5LEU
* names: NTBonaFide is NTCommunity
Claude-Session: https://claude.ai/code/session_014JqabRiGc38JjH4KrE5LEU
* names: terms are the policy's link to a file, and the file when it fits
* names: general and community terms, as the name policy now names them
---------
Co-authored-by: brenzi-agent <346870783+brenzi-agent@users.noreply.github.com>
* agent, ntf server: add lookupOrInsertIO, use it for locks and stats
* agent, server: use lookupOrInsertIO for map entries
* agent: use lookupOrInsertIO for server stats, keep GET lock in one transaction
* smp server: update getSubscription comment for lookupOrInsertIO result
* agent, server: keep original function names, reduce diff
* agent, server: simplify incServerStat and getMessage
* agent, ntf server: stat under whenPendingSub, lookupOrInsertIO in addPendingSubs
* smp server, session: use lookupOrInsertIO directly, drop the newSub alias
* agent, server: fromEither, remove unused incXFTPServerStat'
* util: hide UnliftIO fromEither where Util fromEither is used
* agent, server: use either id id, remove fromEither
* agent, server: keep isPendingSub, reword service delivery comment
* ci: one reduced build job on draft pull requests and manual runs
* ci: reject manual runs on tags
* ci: reduced job by job condition, tests only when selected
* ci: test selection and retries in scripts/ci/run-tests.sh
* ci: guide to reduced builds and test selection
## Agent
- Workers: a worker started by concurrent calls runs in one thread. `runWorkerAsync` put back a stale "not running" value after another call had taken the running one, and a worker restart wrote the same value, so a second thread executed the same commands (for example, a confirmation was sent twice and `CON` was emitted twice), or a caller blocked forever.
- Delivery receipts that fail with AUTH are deleted without an error event.
- Notification credentials are stored per receive queue rather than per connection.
- The protocol client fails pending requests when its connection ends.
- XFTP: a failure to remove a received file's temporary data is logged and no longer fails the worker; server test files have random names.
## Server
- An inactive SMP client session ends without its connection being closed by the expiration thread.
- An inactive HTTP2 session is ended by killing its thread rather than closing its TLS connection from another thread.
- Static files: the timeout handler kills the connection thread and leaves the socket close to that thread.
## Dependencies
- warp: simplex-chat/wai@63667cb5 (simplex-chat/wai#1). The timeout manager kills the connection thread without closing its socket.
## CI and tests
- Tests run on a RAM disk on Linux.
- Test HTTP2 clients are closed before their TLS connections; test temporary directories are cleared between suites.
* transport: IPv6 with IPv4 suffix, ntf server: decode servers per row
* keep domain name parser
* ntf server: decode servers as on master, tests: IPv6 hosts after restart
* agent: check connection when adding send queue
* simplify createSndConn
* agent: check confirmed send queue before adding to connection
* agent: report duplicate connection when joining a used one-time link
* smp-server: remove expired notification store keys
* smp-server: remove delivered notification keys
* tests: generate MsgId for ntf store test
* smp-server: keep ntf store comments in place
* smp-server: strict count of expired notifications
* ntf server: one db connection to find subscription
* pass connection to getNtfToken_
* getNtfToken_' with connection
* getNtfToken' with connection, inline
---------
Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
* ci: build cache
* update build job
* rename steps, cache all builds, patch timestamps for ghc 8.10.7
* refactor, save O0 caches in master and stable builds
* update build to include toolchain fingerprint
* do not save cache on exact match
* remove caching docker from prs
---------
Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
* smp server: delayed AUTH responses
* plan
* update
* simplify
* simplify
* stat when sent without delay
* update schema
* round up response time to the nearest delay multiple
---------
Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
* smp protocol: require fixed size corr ID when used as nonce, and min size msg ID to use as nonce
* simpler
* fixes
* randomMsgId
---------
Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
* consider IP address protected only if it is used for the chosen host
* simplify
* simplify
* simplify
---------
Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>