Tests NIP-77 negentropy synchronization between ORLY and strfry relays.
Uses strfry sync command to test:
Uses orly sync CLI with a temporary Badger DB as a bridge:
┌─────────────┐ NIP-77 ┌──────────────┐
│ strfry │◄─────────►│ orly-relay-1 │
│ (7777) │ │ (3334) │
└─────────────┘ └──────┬───────┘
│
orly sync CLI
(bridge DB in
test-runner)
│
┌──────┴───────┐
│ orly-relay-2 │
│ (3335) │
└──────────────┘
The orly sync CLI runs inside the test-runner container. It opens a
temporary Badger database and uses NIP-77 negentropy to sync with each
relay, effectively bridging events between the two ORLY instances.
cd tests/negentropy
# Build all images
docker compose build
# Start infrastructure
docker compose up -d
# Run comprehensive tests
./comprehensive-test.sh
# Or with verbose output
./comprehensive-test.sh --verbose
# Clean up
docker compose down -v
# Generate events
docker compose exec -T test-runner event-generator -count 500 -relay ws://strfry:7777
# strfry sync (strfry as client, ORLY as server)
docker compose exec -T strfry /app/strfry --config=/etc/strfry.conf sync ws://orly-relay-1:3334 --dir down
# orly sync (orly CLI as client, any relay as server)
docker compose exec -T test-runner orly sync ws://orly-relay-1:3334 --data-dir /tmp/sync-db
# Manual event inspection
echo '["REQ", "test", {"limit": 10}]' | websocat ws://localhost:7777
echo '["REQ", "test", {"limit": 10}]' | websocat ws://localhost:3334
echo '["REQ", "test", {"limit": 10}]' | websocat ws://localhost:3335
| Kind | Percentage | Description |
|---|---|---|
| 1 | 60% | Short text notes |
| 0 | 15% | Metadata |
| 3 | 10% | Contacts |
| 1984 | 5% | Reports |
| 10000 | 5% | Mute lists |
| 10001 | 3% | Pin lists |
| 30023 | 2% | Long-form articles |
docker compose ps
docker compose logs -f strfry
docker compose logs -f orly-relay-1
docker compose logs -f orly-relay-2
docker compose down -v
docker compose up -d
strfry sync CLIORLY_QUERY_RESULT_LIMIT=10000 set for testing (default is 256)