From 2d78aadfd603fab9a9342b1281ad1d46ad82cf1d Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 19 May 2026 04:10:12 +0530 Subject: feat: relay hardening — restore build, add tests, negentropy adapter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- Makefile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index fba9c64..7443e26 100644 --- a/Makefile +++ b/Makefile @@ -80,6 +80,7 @@ endef .PHONY: test test-unit test-integration test-e2e test-all .PHONY: test-smoke test-api test-network test-portal test-payment .PHONY: test-reset-auth test-session-expiry test-dns-firewall test-cvm +.PHONY: test-local-relay test-relay-nip11 test-cvm-roundtrip test-cross-board test-cvm-mcp .PHONY: tokens wallet-setup wallet-info wallet-balance mint-token send-token .PHONY: clean erase-nvs reset serial-log bootstrap-config .PHONY: cvm-pubkey cvm-test-tool cvm-announce @@ -109,6 +110,11 @@ help: @echo " test-dns-firewall DNS hijack + NAT filter test" @echo " test-session-expiry Session lifecycle with 65s expiry wait" @echo " test-cvm ContextVM protocol integration test" + @echo " test-local-relay Local relay pub/sub WebSocket test" + @echo " test-relay-nip11 Local relay NIP-11 info document test" + @echo " test-cvm-roundtrip CVM MCP request/response via public relay" + @echo " test-cvm-mcp CVM MCP relay integration test" + @echo " test-cross-board Cross-board payment test" @echo "" @echo "ContextVM:" @echo " cvm-pubkey Print board's ContextVM npub" @@ -285,6 +291,26 @@ test-cvm-mcp: @echo "=== Running CVM MCP relay integration test ===" TOLLGATE_IP=$(TOLLGATE_IP) $(NODE) tests/integration/test-cvm-mcp-relay.mjs +test-local-relay: + $(call _require_board_lock) + @echo "=== Running local relay pub/sub test ===" + TOLLGATE_IP=$(TOLLGATE_IP) $(NODE) tests/integration/test-local-relay.mjs + +test-relay-nip11: + $(call _require_board_lock) + @echo "=== Running relay NIP-11 test ===" + TOLLGATE_IP=$(TOLLGATE_IP) $(NODE) tests/integration/test-relay-nip11.mjs + +test-cvm-roundtrip: + $(call _require_board_lock) + @echo "=== Running CVM MCP roundtrip test ===" + TOLLGATE_IP=$(TOLLGATE_IP) $(NODE) tests/integration/test-cvm-roundtrip.mjs + +test-cross-board: + $(call _require_board_lock) + @echo "=== Running cross-board payment test ===" + TOLLGATE_IP=$(TOLLGATE_IP) $(NODE) tests/integration/test-cross-board.mjs + # ────────────────────────────────────────────── # Wallet # ────────────────────────────────────────────── -- cgit v1.2.3