You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mleku
73ea4c803f
Implement NIP-33 addressable event query optimization ( #30 )
...
## Summary
- Add O(1) direct lookup for parameterized replaceable events (kinds 30000-39999)
- Reduces query time from 10+ seconds to <1ms for kind+author+d-tag queries
- Optimizes WouldReplaceEvent() for faster event replacement checks
Fixes #29
## Changes
- `pkg/database/query-addressable.go` - New file with fast path lookup logic
- `pkg/database/query-addressable_test.go` - Tests for the optimization
- `pkg/database/save-event.go` - Writes AddressableEvent index, optimizes WouldReplaceEvent
- `pkg/database/query-events.go` - Integrates fast path at start of QueryEventsWithOptions
- `pkg/database/get-indexes-for-event.go` - Minor refactor (variable rename)
## Test plan
- [x] All existing database tests pass
- [x] New tests added for addressable event queries
- [x] Tests cover: valid/invalid query patterns, not found case, event replacement
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-authored-by: woikos <woikos@users.noreply.github.com>
Reviewed-on: https://git.nostrdev.com/mleku/next.orly.dev/pulls/30
4 months ago
.aiassistant/ rules
Refactor export functionality in App.svelte to support both GET and POST methods for event exports, enhancing flexibility in user permissions. Update server-side handling to accommodate pubkey filtering and improve response handling for file downloads. Adjust UI components to reflect these changes, ensuring a seamless user experience.
7 months ago
.claude
Improve release command VPS deployment docs (v0.48.14)
4 months ago
.gitea
Use Gitea API directly for release creation (v0.36.14)
5 months ago
.github/ workflows
Add issue templates, CI workflows, and decentralization plan
5 months ago
.plan
initial draft of hot reload policy
6 months ago
app
Fix EVENT envelope format in negentropy sync (v0.55.8)
4 months ago
cmd
Add DataDir config to orly-db-neo4j
4 months ago
contrib/ stella
Add serve mode, fix binary tags, document CLI tools, improve Docker
6 months ago
docs
Add optimization plan for NIP-33 query performance (issue #29 )
4 months ago
pkg
Implement NIP-33 addressable event query optimization ( #30 )
4 months ago
proto
Fix NIP-77 negentropy server-side event pushing (v0.55.7)
4 months ago
relay-tester
Refactor for interface clarity and dependency isolation.
6 months ago
scripts
Add IPC sync services and NIP-77 negentropy synchronization (v0.55.0)
4 months ago
tests/ negentropy
Fix Docker test setup for negentropy interop testing
4 months ago
.dockerignore
Add serve mode, fix binary tags, document CLI tools, improve Docker
6 months ago
.gitignore
Decompose handle-event.go into DDD domain services (v0.36.15)
5 months ago
BUG_REPORTS_AND_FEATURE_REQUEST_PROTOCOL.md
Add ORLY_POLICY_PATH for custom policy file location
5 months ago
CLAUDE.md
Add database IPC split mode and blob storage abstraction (v0.53.0)
4 months ago
CONTRIBUTING.md
Add issue templates, CI workflows, and decentralization plan
5 months ago
DDD_ANALYSIS.md
Decompose handle-event.go into DDD domain services (v0.36.15)
5 months ago
Dockerfile
Add serve mode, fix binary tags, document CLI tools, improve Docker
6 months ago
Dockerfile.relay-tester
Add serve mode, fix binary tags, document CLI tools, improve Docker
6 months ago
INDEX.md
Add comprehensive documentation for CLAUDE and Nostr WebSocket skills
6 months ago
LICENSE
Add initial project structure with README, LICENSE, and .gitignore config
9 months ago
Makefile
Add unified binary architecture with database health check (v0.55.4)
4 months ago
POLICY_BUG_FIX_SUMMARY.md
feat(ui): add standalone dashboard mode and relay switching (v0.52.2)
4 months ago
README.md
Add negentropy sync configuration guide
4 months ago
conversation.md
fix policy to ignore all req/events without auth
6 months ago
docker-compose.yml
Interim release: documentation updates and rate limiting improvements
5 months ago
enable-policy.sh
fix silent fail of loading policy with panic, and bogus fallback logic
6 months ago
go.mod
Add IPC sync services and NIP-77 negentropy synchronization (v0.55.0)
4 months ago
go.sum
Add IPC sync services and NIP-77 negentropy synchronization (v0.55.0)
4 months ago
libsecp256k1.so
fully test and verify policy script functionality
6 months ago
main.go
Add IPC sync services and NIP-77 negentropy synchronization (v0.55.0)
4 months ago
orly.service
Rename relay binary from next.orly.dev to orly-relay in systemd service
4 months ago
policyfixes.md
fix policy to ignore all req/events without auth
6 months ago
wasm_exec.js
Add NRC (Nostr Relay Connect) protocol and web UI (v0.48.9)
4 months ago