<feed xmlns='http://www.w3.org/2005/Atom'>
<title>npub12m5exm2uk3xa674cc5r0hlyvccs5xxn7qv83ezuteefv5972nquq4j4szl/esp32-tollgate, branch feature/mining-payment</title>
<subtitle>[no description]</subtitle>
<id>https://upleb.uk/npub12m5exm2uk3xa674cc5r0hlyvccs5xxn7qv83ezuteefv5972nquq4j4szl/esp32-tollgate/atom?h=feature%2Fmining-payment</id>
<link rel='self' href='https://upleb.uk/npub12m5exm2uk3xa674cc5r0hlyvccs5xxn7qv83ezuteefv5972nquq4j4szl/esp32-tollgate/atom?h=feature%2Fmining-payment'/>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub12m5exm2uk3xa674cc5r0hlyvccs5xxn7qv83ezuteefv5972nquq4j4szl/esp32-tollgate/'/>
<updated>2026-05-19T07:40:54+00:00</updated>
<entry>
<title>test: add 4 new unit test suites for mining modules</title>
<updated>2026-05-19T07:40:54+00:00</updated>
<author>
<name>Your Name</name>
<email>you@example.com</email>
</author>
<published>2026-05-19T07:40:54+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub12m5exm2uk3xa674cc5r0hlyvccs5xxn7qv83ezuteefv5972nquq4j4szl/esp32-tollgate/commit/?id=ef9ae982e42cd8c719a8ba5a0b87f25a5a5f91ba'/>
<id>urn:sha1:ef9ae982e42cd8c719a8ba5a0b87f25a5a5f91ba</id>
<content type='text'>
- test_stratum_proxy: job set/get, stats, init (21 tests)
- test_session_payment_method: PAYMENT_METHOD enum, bytes/cashu methods (12 tests)
- test_tollgate_client_mining: mining tag parsing, discovery struct (20 tests)
- test_firewall_sandbox: client management, grant/revoke, max clients (16 tests)
- Enhanced stubs: BaseType_t/pdPASS in task.h, lwip sockets/etharp/prot headers,
  dns_server.h, esp_wifi_ap_get_sta_list.h
- All 15 test suites pass (344+ total assertions)
</content>
</entry>
<entry>
<title>fix: build errors in cvm_server, stratum_proxy, sw_miner + nucula visibility</title>
<updated>2026-05-19T07:25:28+00:00</updated>
<author>
<name>Your Name</name>
<email>you@example.com</email>
</author>
<published>2026-05-19T07:25:28+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub12m5exm2uk3xa674cc5r0hlyvccs5xxn7qv83ezuteefv5972nquq4j4szl/esp32-tollgate/commit/?id=473b4d1108d8dc9264c44de587121e6886b08a5d'/>
<id>urn:sha1:473b4d1108d8dc9264c44de587121e6886b08a5d</id>
<content type='text'>
- cvm_server: replace esp_timer_get_time() with xTaskGetTickCount(), fix
  process_relay_message() call signature (3 args -&gt; 2)
- stratum_proxy: widen task_name buffer from 16 to 20 chars
- sw_miner: add missing #include esp_random.h
- nucula_src: save_proofs() moved to public in wallet.hpp
- CMakeLists: ensure tcp_transport in REQUIRES
- tollgate_main: add display.h, local_relay.h, relay_selector.h, sync_manager.h includes
- Build now succeeds: 1.2MB binary, 70% partition free
</content>
</entry>
<entry>
<title>feat(mining): integrate mining subsystem into existing modules</title>
<updated>2026-05-18T22:43:11+00:00</updated>
<author>
<name>Your Name</name>
<email>you@example.com</email>
</author>
<published>2026-05-18T22:43:11+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub12m5exm2uk3xa674cc5r0hlyvccs5xxn7qv83ezuteefv5972nquq4j4szl/esp32-tollgate/commit/?id=beb73a2eeacf7dbe5e292ce6e26a95a933808267'/>
<id>urn:sha1:beb73a2eeacf7dbe5e292ce6e26a95a933808267</id>
<content type='text'>
- CMakeLists.txt: add 6 mining sources + tcp_transport dependency
- config.h/c: mining_payout_mode_t enum, mining config fields, JSON parsing
- tollgate_main.c: mining init in start_services(), stratum_client_tick in main loop
- tollgate_api.c: GET /mining/job, POST /mining/share, GET /mining/stats endpoints
- session.h/c: payment_method_t enum (CASHU/MINING/BYTES)
- firewall.h/c: sandbox allowlist for mining port + mint URLs
- tollgate_client.h/c: TG_CLIENT_MINING state, mining discovery tag parsing
- captive_portal.c: tabbed UI with Cashu/Mine tabs, live hashrate polling
</content>
</entry>
<entry>
<title>feat(mining): add new mining source files and unit tests</title>
<updated>2026-05-18T22:37:16+00:00</updated>
<author>
<name>Your Name</name>
<email>you@example.com</email>
</author>
<published>2026-05-18T22:37:16+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub12m5exm2uk3xa674cc5r0hlyvccs5xxn7qv83ezuteefv5972nquq4j4szl/esp32-tollgate/commit/?id=c75230e551a778408b2e370b208aff76b74c6560'/>
<id>urn:sha1:c75230e551a778408b2e370b208aff76b74c6560</id>
<content type='text'>
- mining_payment.c/h: hashprice calc, share validation, per-client hashrate
- stratum_client.c/h: SV1 upstream pool connection
- stratum_proxy.c/h: local SV1 TCP server for downstream miners
- sw_miner.c/h: software SHA256d miner using mbedtls
- asic_miner.c/h: ASIC detection stub (software fallback)
- test_mining_payment.c: 23 unit tests for mining payment module
</content>
</entry>
<entry>
<title>docs: squash-merge plan complete — all items done</title>
<updated>2026-05-18T21:49:41+00:00</updated>
<author>
<name>Your Name</name>
<email>you@example.com</email>
</author>
<published>2026-05-18T21:49:41+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub12m5exm2uk3xa674cc5r0hlyvccs5xxn7qv83ezuteefv5972nquq4j4szl/esp32-tollgate/commit/?id=abee221b0f0e5a4513ab126afbdfddc2728df6be'/>
<id>urn:sha1:abee221b0f0e5a4513ab126afbdfddc2728df6be</id>
<content type='text'>
</content>
</entry>
<entry>
<title>feat: CVM relay stability fix + MCP relay integration tests</title>
<updated>2026-05-18T21:48:04+00:00</updated>
<author>
<name>Your Name</name>
<email>you@example.com</email>
</author>
<published>2026-05-18T21:48:04+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub12m5exm2uk3xa674cc5r0hlyvccs5xxn7qv83ezuteefv5972nquq4j4szl/esp32-tollgate/commit/?id=eeb9d2d1dfd38dd19fa641e6f733c917a3d1d005'/>
<id>urn:sha1:eeb9d2d1dfd38dd19fa641e6f733c917a3d1d005</id>
<content type='text'>
Relay disconnect fix (cvm_server.c):
- TLS read timeout reduced from 15s to 1s (short poll loop)
- Ping timer fires every 30s independently of read activity
- Consecutive timeout counter (65s) detects real disconnects
- Handle relay close frames (opcode 0x08) explicitly
- Result: 120s+ stable connection (previously ~37s disconnect cycle)

MCP relay integration tests (17/17 pass via make test-cvm-mcp):
- MCP initialize roundtrip via relay.primal.net
- get_sessions returns session array
- get_usage returns metric/price/step fields
- Non-owner auth rejection (board silently drops)
- Owner control request passes after rejection test

Build fixes:
- Remove display/font/axs15231b/qrcode deps (from display branch, not here)
- Remove local_relay/relay_selector/sync_manager deps (from relay branch)
- Add esp_timer to CMakeLists REQUIRES

Host unit tests: 61/61 pass
</content>
</entry>
<entry>
<title>feat: local Nostr relay with relay selection, sync, and integration tests</title>
<updated>2026-05-18T21:02:41+00:00</updated>
<author>
<name>Your Name</name>
<email>you@example.com</email>
</author>
<published>2026-05-18T21:01:19+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub12m5exm2uk3xa674cc5r0hlyvccs5xxn7qv83ezuteefv5972nquq4j4szl/esp32-tollgate/commit/?id=81f2dc52dc42d01c89dff45a5407ec40b8863052'/>
<id>urn:sha1:81f2dc52dc42d01c89dff45a5407ec40b8863052</id>
<content type='text'>
Local Nostr relay (NIP-01) on port 4869 with LittleFS 4MB storage.
All events published locally first, then synced to public relays via REQ-diff.
Relay selection via NIP-11 HTTP probing with NIP-77 scoring and auto-failover.

Components:
- wisp_relay: 16-file local relay (ws_server, storage_engine, sub_manager,
  broadcaster, relay_validator, router, handlers, rate_limiter, nip11,
  deletion, flash_monitor, relay_types)
- esp_littlefs: LittleFS VFS integration (git submodule)
- negentropy: for future NIP-77 binary sync (git submodule)

New source files:
- local_relay.c/h: thin wrapper for relay init/start/publish
- relay_selector.c/h: NIP-11 probe + scoring + auto-failover
- sync_manager.c/h: REQ-diff sync (primary 30min, fallback 6h)

Bug fixes:
- config.c: use-after-free (cJSON_Delete before seed_relays/sync parsing)
- local_relay: moved init to app_main for boot-time start (not gated on STA IP)

Flash layout: 4MB LittleFS partition at 0x500000 for relay_store

Test results (Board B, live hardware):
- Smoke: ping + HTTP 4869 + NIP-11: PASS
- NIP-11 info document: 10/11 PASS
- WS pub/sub (connect, REQ/EOSE, EVENT/OK, CLOSE, concurrent): 6/6 PASS
- Unit tests (relay_validator + relay_selector): 13/13 PASS

Hardware test make targets in physical-router-test-automation/:
- make relay-build, relay-flash-b, relay-test-smoke/nip11/pubsub/sync/full
</content>
</entry>
<entry>
<title>build: add ws dependency for relay integration tests</title>
<updated>2026-05-18T20:38:37+00:00</updated>
<author>
<name>Your Name</name>
<email>you@example.com</email>
</author>
<published>2026-05-18T20:38:37+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub12m5exm2uk3xa674cc5r0hlyvccs5xxn7qv83ezuteefv5972nquq4j4szl/esp32-tollgate/commit/?id=75688d55b3c8d13c8c9a50da9668ec408f684cb3'/>
<id>urn:sha1:75688d55b3c8d13c8c9a50da9668ec408f684cb3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>test: add local relay integration tests (WS pub/sub + NIP-11)</title>
<updated>2026-05-18T20:19:46+00:00</updated>
<author>
<name>Your Name</name>
<email>you@example.com</email>
</author>
<published>2026-05-18T20:19:46+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub12m5exm2uk3xa674cc5r0hlyvccs5xxn7qv83ezuteefv5972nquq4j4szl/esp32-tollgate/commit/?id=7f70b568972e875d5d9cc52631b663a50ecbaa0a'/>
<id>urn:sha1:7f70b568972e875d5d9cc52631b663a50ecbaa0a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>test: add unit tests for relay_validator and relay_selector</title>
<updated>2026-05-18T20:01:47+00:00</updated>
<author>
<name>Your Name</name>
<email>you@example.com</email>
</author>
<published>2026-05-18T20:01:47+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub12m5exm2uk3xa674cc5r0hlyvccs5xxn7qv83ezuteefv5972nquq4j4szl/esp32-tollgate/commit/?id=3b25d826df2b69496fcc560a8ca26089484230c7'/>
<id>urn:sha1:3b25d826df2b69496fcc560a8ca26089484230c7</id>
<content type='text'>
- test_relay_validator: Schnorr verify + SHA-256 event ID, tamper detection
  (ID, sig, content), invalid JSON, missing fields, result_string
- test_relay_selector: relay scoring (NIP-77 bonus, latency tiebreak,
  failure penalty, dead relay handling)
- Updated Makefile with new test targets
- Added configTICK_RATE_HZ to FreeRTOS stubs
</content>
</entry>
</feed>
