Skip to content

Epic 4#5

Merged
ALLiDoizCode merged 4 commits intomainfrom
epic-4
Feb 8, 2026
Merged

Epic 4#5
ALLiDoizCode merged 4 commits intomainfrom
epic-4

Conversation

@ALLiDoizCode
Copy link
Copy Markdown
Collaborator

No description provided.

ALLiDoizCode and others added 4 commits February 6, 2026 18:14
Remove insecure static SPSP (kind:10047) which published shared secrets
in plaintext to Nostr relays. SPSP now exclusively uses the encrypted
request/response flow (kind:23194/23195) with NIP-44 encryption.

Removed:
- SPSP_INFO_KIND constant (10047)
- buildSpspInfoEvent() and parseSpspInfo() functions
- NostrSpspClient.getSpspInfo() method
- NostrSpspServer.publishSpspInfo() method

The NIP-44 encrypted flow provides:
- End-to-end encryption of shared secrets
- Fresh credentials per request
- Secure key exchange via X25519 + ChaCha20

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add agent-society container that runs:
- Business Logic Server (BLS) for /handle-payment endpoint
- Nostr relay for event storage and peer discovery
- Bootstrap service for connecting to known peers

Components:
- docker/Dockerfile: Multi-stage build for container
- docker/src/entrypoint.ts: Container entrypoint with BLS, relay, bootstrap
- packages/core/src/bootstrap.ts: BootstrapService for peer discovery
- packages/core/src/bootstrap.test.ts: Tests for bootstrap service

The bootstrap flow:
1. Connect to known peer's relay
2. Query for kind:10032 (ILP Peer Info) event
3. Perform direct SPSP handshake (free, not ILP-routed)
4. Add peer to connector routing table via Admin API
5. Publish own kind:10032 to peer's relay

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix Dockerfile to use single-stage build for proper dependency resolution
- Fix docker/tsconfig.json to override noEmit=false for output generation
- Bootstrap node now stores ILP info directly in event store (self-write)
- Add publishToRelay() method to BootstrapService for manual publishing
- Add startup delay after relay starts for stability
- Add debug logging to bootstrap query process

All 5 agent-society containers now start successfully:
- BLS endpoints healthy on ports 3110-3114
- Nostr relays running on ports 7110-7114
- Peer1 successfully publishes kind:10032 to its local relay
- Events queryable from peer1's relay (verified via localhost)

Note: Relay-to-relay bootstrap (SimplePool cross-container queries) needs
further investigation - possible WebSocket connection timeout issue.

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
Extract BLS into standalone package with Docker support, environment
variable configuration, volume-based event storage, Docker Hub publishing
workflow, and docker-compose/kubernetes deployment examples. Also adds
Epic 6 planning docs and story/QA gate documentation for all epics.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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