upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2025-12-10refactor: remove redundant RelayAction enum (SIMPLIFY-1)DanConwayDev
2025-12-10feat: add automatic reconnection with exponential backoff (IMPROVE-2)DanConwayDev
2025-12-10fix: don't add 30617 announcement IDs to root_events (BUG-2)DanConwayDev
2025-12-10fix: add Layer 1 re-subscription on quick reconnect (BUG-1)DanConwayDev
2025-12-10sync: implement graceful shutdown for all tasks and connectionsDanConwayDev
2025-12-10sync: enhance SelfSubscriber with reconnect and root event trackingDanConwayDev
2025-12-10sync: implement relay removal for empty non-bootstrap relaysDanConwayDev
2025-12-10sync: implement daily timer for periodic fresh syncDanConwayDev
2025-12-10sync: implement filter consolidation systemDanConwayDev
2025-12-10sync: complete AddFilters handler with auto-spawningDanConwayDev
2025-12-10sync: implement unified connect/reconnect with since filtersDanConwayDev
2025-12-10sync: implement PendingBatch EOSE confirmation flowDanConwayDev
2025-12-10sync: implement disconnect handler with state cleanupDanConwayDev
2025-12-10sync: integrate health tracking and connection storageDanConwayDev
2025-12-10sync v4 mvpDanConwayDev
2025-12-10stub of sync v4DanConwayDev
2025-12-10improve sync designDanConwayDev
2025-12-09sync initalize from dbDanConwayDev
2025-12-09basic sync stubDanConwayDev
2025-12-08proposed sync change to use self subscribe to trigger everythingDanConwayDev
2025-12-05remove stupid tests and methodsDanConwayDev
2025-12-05rename sunc_bootstrap_relay_urlDanConwayDev
2025-12-05fix basic sync testsDanConwayDev
2025-12-05sync fixesDanConwayDev
2025-12-04feat(sync): Phase 6 - observability and production readinessDanConwayDev
- Add SyncMetrics with full Prometheus integration - Track sync gaps via catchup events - Update Grafana dashboard with sync panels - Document all sync configuration options - Update design doc with implementation notes
2025-12-04feat(sync): Phase 5 - negentropy catchup (NIP-77)DanConwayDev
- Add NegentropyService for set reconciliation - Implement startup catchup with warm-up delay - Implement reconnect catchup (last 3 days) - Add daily catchup schedule with stagger
2025-12-04feat(sync): Phase 4 - dynamic subscriptionsDanConwayDev
- Add SubscriptionManager for per-connection tracking - Trigger subscription updates on new repo/PR events - Implement consolidation when filter count > 150
2025-12-04feat(sync): Phase 3 - resilience and health trackingDanConwayDev
- Add RelayHealthTracker with DashMap - Implement exponential backoff (5s -> 1h max) - Handle dead relays (24h failures -> daily retry) - Add startup jitter to prevent thundering herd - Add NGIT_SYNC_MAX_BACKOFF_SECS config
2025-12-04feat(sync): Phase 2 - multi-relay and complete filtersDanConwayDev
- Add relay discovery from stored announcements - Implement FilterService with three-layer strategy - Support multiple simultaneous relay connections - Filter batching for large tag sets
2025-12-04feat(sync): Phase 1 MVP - single relay proactive syncDanConwayDev
- Add src/sync/ module with SyncManager - Add NGIT_SYNC_RELAY_URL config option - Subscribe to kind 30617 on configured relay - Validate synced events through Nip34WritePolicy - Integration test with two TestRelay instances
2025-12-04refactor: split Nip34WritePolicy into focused sub-policiesDanConwayDev
Split the ~900 line Nip34WritePolicy into focused sub-policies for improved testability and maintainability: - AnnouncementPolicy - Repository announcement validation - StatePolicy - State event validation + ref alignment - PrEventPolicy - PR/PR Update validation - RelatedEventPolicy - Forward/backward reference checking The main Nip34WritePolicy now delegates to these sub-policies via a shared PolicyContext that provides domain, database, and git_data_path. Also updates: - README.md: Accurate project structure reflecting actual implementation - docs/learnings: Marks this technical debt item as complete
2025-12-04add prometheus metricsDanConwayDev
2025-12-03feat: accept maintainer announcements without service listingDanConwayDev
2025-12-03landing page: display relay inforamtion documentDanConwayDev
2025-12-03landing page: pull supported nips and grasps from nip11 documentDanConwayDev
2025-12-03flag NIP-77 negentropy supportDanConwayDev
2025-12-03improved settings cli flags > env vars > defaultsDanConwayDev
2025-12-03feat: implement LMDB database backendDanConwayDev
- Add nostr-lmdb dependency (v0.44) for persistent storage - Create SharedDatabase type alias for database abstraction - Update all database-related functions to use trait object - Support runtime selection via NGIT_DATABASE_BACKEND env var Database backends: - memory: In-memory (default, fastest, no persistence) - lmdb: LMDB backend (persistent, general purpose) All 34 tests pass with the new implementation.
2025-12-02nip11 add iconDanConwayDev
2025-12-02landing added light modeDanConwayDev
2025-12-02landing page add commit hash to version and add curationDanConwayDev
2025-12-02repo landing page - simplifyDanConwayDev
2025-12-02repo landing page - include powered byDanConwayDev
2025-12-02refactor: fix fmt and clippyDanConwayDev
2025-12-02improve repository landing pageDanConwayDev
2025-12-02landing page - use correct gitworkshop linkDanConwayDev
2025-12-02improve landing page copy and stylesDanConwayDev
2025-12-01add repo land page and 404 page per GRASP-01DanConwayDev
2025-12-01try and add / update / delete refs on state updateDanConwayDev
if we have the OIDs
2025-12-01fix cargo clippy and fmt warningsDanConwayDev
2025-12-01reject push when refs/nostr/<event-id> doesnt match known event and delete ↵DanConwayDev
incorrect ref on event receive
2025-11-28allow push to ref/nostr/<event-id>DanConwayDev
2025-11-28fix maintainer recursionDanConwayDev
2025-11-28sync HEAD on state event and git data pushDanConwayDev
2025-11-28add git http advertisment allow-reachable-sha1-in-want and ↵DanConwayDev
allow-tip-sha1-in-want
2025-11-27refactor(auth): simplify state auth with single-query approachDanConwayDev
2025-11-27fix(auth): accept state announcements from maintainersDanConwayDev
Updated get_maintainers_recursive() to properly handle maintainers listed in accepted repository announcements: 1. Separated 'visited' set (cycle prevention) from 'maintainers' set (result) 2. Maintainers listed in an announcement's 'maintainers' tag are now added to the maintainer set immediately, even without their own announcement 3. Recursively traverse maintainer chains to handle multi-level delegation Also fixed RecursiveMaintainerRepoAndState fixture to publish the maintainer's announcement (which lists the recursive maintainer) before publishing the recursive maintainer's announcement, establishing the proper trust chain: Owner -> Maintainer -> RecursiveMaintainer Test results: 7/7 push authorization tests passing
2025-11-26fix: parsing maintainers from announcement eventDanConwayDev
2025-11-26feat: push authorization from state eventDanConwayDev
2025-11-26add cors supportDanConwayDev
2025-11-21remove initial blank commit on bare repo creationDanConwayDev
we dont need it
2025-11-21fixed http cloneDanConwayDev
but do we really nedd to create a blank commit? I dont think ngit-relay does that. Do we need to se the default branch or is this automatic?
2025-11-21log git data pathDanConwayDev
2025-11-21add git http handlingDanConwayDev
2025-11-21add repository creationDanConwayDev
2025-11-21add nip11DanConwayDev
2025-11-21feat: add database backend configuration optionsDanConwayDev
Add environment variable configuration for database backend selection: - Added DatabaseBackend enum (memory, nostrdb, lmdb) in src/config.rs - Updated relay builder to use configured backend in src/nostr/builder.rs - Added NGIT_DATABASE_BACKEND to .env.example with documentation - Updated docs/reference/configuration.md with backend comparison table NostrDB and LMDB backends prepared for future implementation when nostr-relay-builder adds support. Currently defaults to in-memory database with warning logs when persistent backends are selected.
2025-11-21fix: correct addressable event format for regular replaceable eventsDanConwayDev
- Fixed bug where regular replaceable events (10000-19999) were using wrong address format (3 colons instead of 2) - Regular replaceable now use kind:pubkey format (1 colon) - Parameterized replaceable (30000-39999) correctly use kind:pubkey:d-identifier (2 colons) - Refactored to eliminate code duplication between both replaceable event types - Updated documentation to reflect correct addressing for both types
2025-11-21refactor: optimize is_referenced_by_accepted for addressable eventsDanConwayDev
- Remove uppercase 'Q' tag (not in Nostr spec) - Add support for addressable references in 'q' tags - Optimize queries based on event type: - Addressable events (kind >= 30000): only check a, A, q with coordinates - Regular events: only check e, E, q with event IDs - Handle addressable events without 'd' tag (empty identifier) - Reduce query count from up to 6 to maximum 3 per event type
2025-11-21Optimize database queries in admit_event filterDanConwayDev
- Replace individual queries with batched operations - Group addressable references by kind to reduce queries - Query all event IDs in single batch operation - Reduces N+M queries to ~K+1 queries (75% reduction typical case) - All 37 tests passing, functionality preserved
2025-11-21Implement GRASP-01 stateful write policy with database queriesDanConwayDev
- Add Nip34WritePolicy with Arc<MemoryDatabase> for stateful event validation - Implement full GRASP-01 event acceptance policy: * Accept events referencing accepted repositories (via a, A, q tags) * Accept events referencing accepted events (transitive, via e, E, q tags) * Support forward references (events referenced by accepted events) * Reject orphan events with no valid references - Extract and validate all reference tag types (a, A, q, e, E) - Query database for repository and event existence checks - Implement fail-secure error handling for database query failures Test improvements: - Fix send_and_verify_rejected to handle relay rejection errors properly - Fix RepoWithIssue fixture usage in forward reference tests - Add database synchronization polling for race condition mitigation - Achieve 94% test pass rate (16/17 integration tests passing)
2025-11-20replace actix with hyperDanConwayDev
2025-11-19fix some clippy fmt warningsDanConwayDev
2025-11-19add landing page and nostr-relay-builder relay on same portDanConwayDev
2025-11-04add announcement testsDanConwayDev
2025-11-04feat: add library target for unit testingDanConwayDev
- Create src/lib.rs with module exports - Update Cargo.toml with [lib] section - All 5 unit tests passing
2025-11-04feat: implement NIP-01 compliant Nostr relayDanConwayDev
- WebSocket-based relay using tokio-tungstenite - Full NIP-01 protocol support (EVENT, REQ, CLOSE) - Event validation (signature and ID) - In-memory event storage - Filter support (IDs, authors, kinds, since/until) - Configuration via environment variables - Nix flake for reproducible builds - Test automation script All 6 NIP-01 smoke tests passing (100%)