Skip to content

fix(relay): accept mesh signaling kinds (24620/24621) via POST /events#946

Merged
tlongwell-block merged 1 commit into
mainfrom
eva/mesh-http-bridge-fix
Jun 10, 2026
Merged

fix(relay): accept mesh signaling kinds (24620/24621) via POST /events#946
tlongwell-block merged 1 commit into
mainfrom
eva/mesh-http-bridge-fix

Conversation

@tlongwell-block

Copy link
Copy Markdown
Collaborator

Problem

Running current main with share-compute enabled fails:

sprout-mesh: status report after start failed: relay returned 400 Bad Request: restricted: unknown event kind
sprout-mesh: status report after periodic failed: relay returned 400 Bad Request: restricted: unknown event kind

PR #879 moved mesh status-report and connect-request publishing from the TS frontend (WebSocket) into the desktop's Rust coordinator, which submits via the HTTP bridge. The bridge routes everything through ingest_event, whose per-kind allowlist deliberately excludes ephemeral kinds — so every coordinator publish failed with 400. No status report ever became a kind:30621 discovery note, and connect requests never produced call-me-now pairs: share-compute was dead against a real relay.

Fix

Route 24620/24621 from the bridge to a new mesh_signaling HTTP seam (handle_mesh_event_http) that mirrors the WS door — signature check, strict pubkey-match (mesh kinds are never proxy-submittable), shared per-requester rate limit, then the existing handlers. The WS door's inline rate limit is factored into connect_request_rate_limited so both transports share one limiter.

Verification

  • Live: relay on :3100, NIP-98-signed POST /events with a 24620 → 200 + relay-signed 30621 projection readable via /query; 24621 → 200.
  • Full pre-push suite green: rust-tests, rust-clippy, desktop-test, desktop-tauri-test, desktop-tauri-clippy, mobile-test.

PR #879 moved mesh status-report and connect-request publishing from the
TS frontend (WebSocket) into the desktop's Rust coordinator, which submits
via the HTTP bridge. The bridge routes everything through ingest_event,
whose per-kind allowlist deliberately excludes ephemeral kinds — so every
coordinator publish failed with 400 'restricted: unknown event kind'. No
status report ever became a kind:30621 discovery note, and connect
requests never produced call-me-now pairs: share-compute was dead against
a real relay.

Fix: route 24620/24621 from the bridge to a new mesh_signaling HTTP seam
(handle_mesh_event_http) that mirrors the WS door — signature check,
strict pubkey-match (mesh kinds are never proxy-submittable), shared
per-requester rate limit, then the existing handlers. The WS door's inline
rate limit is factored into connect_request_rate_limited so both
transports share one limiter.

Verified live: relay on :3100, NIP-98-signed POST /events with a 24620 →
200 + relay-signed 30621 projection readable via /query; 24621 → 200.

Co-authored-by: npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@sprout-oss.stage.blox.sqprod.co>
Signed-off-by: npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@sprout-oss.stage.blox.sqprod.co>
@tlongwell-block tlongwell-block requested a review from a team as a code owner June 10, 2026 15:58
@tlongwell-block tlongwell-block merged commit dbe973d into main Jun 10, 2026
14 checks passed
@tlongwell-block tlongwell-block deleted the eva/mesh-http-bridge-fix branch June 10, 2026 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant