diff options
| author | Your Name <you@example.com> | 2026-05-19 04:10:12 +0530 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-05-19 04:10:12 +0530 |
| commit | 2d78aadfd603fab9a9342b1281ad1d46ad82cf1d (patch) | |
| tree | 3e8875b7e0301ac6634548e186542e2d67a68f34 /Makefile | |
| parent | abee221b0f0e5a4513ab126afbdfddc2728df6be (diff) | |
feat: relay hardening — restore build, add tests, negentropy adapter
Restores build broken by eeb9d2d (cvm-relay-stability removed deps):
- CMakeLists.txt: restore display.c, font.c, local_relay.c, relay_selector.c, sync_manager.c, axs15231b, qrcode, wisp_relay
- tollgate_main.c: restore display.h, local_relay.h, relay_selector.h, sync_manager.h includes and display calls
- cvm_server.c: kept master's keepalive/timeout/ping-pong fixes
New test infrastructure:
- test-local-relay, test-relay-nip11, test-cvm-roundtrip, test-cvm-mcp, test-cross-board make targets
- test-cvm-roundtrip.mjs: MCP get_config + get_balance via public relay
- test-cross-board.mjs: cross-board payment test
- test-cvm-mcp-relay.mjs: kept from master
New unit tests (35 tests):
- test_display.c: 22 tests for escape_wifi_field
- test_negentropy_adapter.c: 13 tests for negentropy adapter
New modules:
- negentropy_adapter.c/h: NIP-77 adapter skeleton
Docs:
- AGENTS.md: display module docs, new test commands
- RELAY_HARDENING_PLAN.md: hardening checklist
- RELAY_HARDENING_MERGE.md: merge plan and checklist
Cleanup:
- Removed CHECKLIST-CVM-RELAY.md, PLAN-SQUASH-MERGE.md (stale planning docs)
- Removed components/esp-miner submodule
Host unit tests: 63/63 pass
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 26 |
1 files changed, 26 insertions, 0 deletions
| @@ -80,6 +80,7 @@ endef | |||
| 80 | .PHONY: test test-unit test-integration test-e2e test-all | 80 | .PHONY: test test-unit test-integration test-e2e test-all |
| 81 | .PHONY: test-smoke test-api test-network test-portal test-payment | 81 | .PHONY: test-smoke test-api test-network test-portal test-payment |
| 82 | .PHONY: test-reset-auth test-session-expiry test-dns-firewall test-cvm | 82 | .PHONY: test-reset-auth test-session-expiry test-dns-firewall test-cvm |
| 83 | .PHONY: test-local-relay test-relay-nip11 test-cvm-roundtrip test-cross-board test-cvm-mcp | ||
| 83 | .PHONY: tokens wallet-setup wallet-info wallet-balance mint-token send-token | 84 | .PHONY: tokens wallet-setup wallet-info wallet-balance mint-token send-token |
| 84 | .PHONY: clean erase-nvs reset serial-log bootstrap-config | 85 | .PHONY: clean erase-nvs reset serial-log bootstrap-config |
| 85 | .PHONY: cvm-pubkey cvm-test-tool cvm-announce | 86 | .PHONY: cvm-pubkey cvm-test-tool cvm-announce |
| @@ -109,6 +110,11 @@ help: | |||
| 109 | @echo " test-dns-firewall DNS hijack + NAT filter test" | 110 | @echo " test-dns-firewall DNS hijack + NAT filter test" |
| 110 | @echo " test-session-expiry Session lifecycle with 65s expiry wait" | 111 | @echo " test-session-expiry Session lifecycle with 65s expiry wait" |
| 111 | @echo " test-cvm ContextVM protocol integration test" | 112 | @echo " test-cvm ContextVM protocol integration test" |
| 113 | @echo " test-local-relay Local relay pub/sub WebSocket test" | ||
| 114 | @echo " test-relay-nip11 Local relay NIP-11 info document test" | ||
| 115 | @echo " test-cvm-roundtrip CVM MCP request/response via public relay" | ||
| 116 | @echo " test-cvm-mcp CVM MCP relay integration test" | ||
| 117 | @echo " test-cross-board Cross-board payment test" | ||
| 112 | @echo "" | 118 | @echo "" |
| 113 | @echo "ContextVM:" | 119 | @echo "ContextVM:" |
| 114 | @echo " cvm-pubkey Print board's ContextVM npub" | 120 | @echo " cvm-pubkey Print board's ContextVM npub" |
| @@ -285,6 +291,26 @@ test-cvm-mcp: | |||
| 285 | @echo "=== Running CVM MCP relay integration test ===" | 291 | @echo "=== Running CVM MCP relay integration test ===" |
| 286 | TOLLGATE_IP=$(TOLLGATE_IP) $(NODE) tests/integration/test-cvm-mcp-relay.mjs | 292 | TOLLGATE_IP=$(TOLLGATE_IP) $(NODE) tests/integration/test-cvm-mcp-relay.mjs |
| 287 | 293 | ||
| 294 | test-local-relay: | ||
| 295 | $(call _require_board_lock) | ||
| 296 | @echo "=== Running local relay pub/sub test ===" | ||
| 297 | TOLLGATE_IP=$(TOLLGATE_IP) $(NODE) tests/integration/test-local-relay.mjs | ||
| 298 | |||
| 299 | test-relay-nip11: | ||
| 300 | $(call _require_board_lock) | ||
| 301 | @echo "=== Running relay NIP-11 test ===" | ||
| 302 | TOLLGATE_IP=$(TOLLGATE_IP) $(NODE) tests/integration/test-relay-nip11.mjs | ||
| 303 | |||
| 304 | test-cvm-roundtrip: | ||
| 305 | $(call _require_board_lock) | ||
| 306 | @echo "=== Running CVM MCP roundtrip test ===" | ||
| 307 | TOLLGATE_IP=$(TOLLGATE_IP) $(NODE) tests/integration/test-cvm-roundtrip.mjs | ||
| 308 | |||
| 309 | test-cross-board: | ||
| 310 | $(call _require_board_lock) | ||
| 311 | @echo "=== Running cross-board payment test ===" | ||
| 312 | TOLLGATE_IP=$(TOLLGATE_IP) $(NODE) tests/integration/test-cross-board.mjs | ||
| 313 | |||
| 288 | # ────────────────────────────────────────────── | 314 | # ────────────────────────────────────────────── |
| 289 | # Wallet | 315 | # Wallet |
| 290 | # ────────────────────────────────────────────── | 316 | # ────────────────────────────────────────────── |