Skip to content

feat: Call user events endpoint when indexing 3rd party HSs#726

Draft
ok300 wants to merge 16 commits intomainfrom
feat/dx-events-by-user
Draft

feat: Call user events endpoint when indexing 3rd party HSs#726
ok300 wants to merge 16 commits intomainfrom
feat/dx-events-by-user

Conversation

@ok300
Copy link
Contributor

@ok300 ok300 commented Feb 15, 2026

This PR updates HS indexing logic to rely on the new user events endpoint on the HS.

This PR acts as an "umbrella PR" for this DX feature. It is meant to contain all relevant changes and sub-PRs. It will remain a draft until the full feature is ready for final review.

Steps:

  • Bump pubky to relevant feature branch (done in 6a06e9c)
  • Bump pubky to relevant released version (pending SDK release)
  • Restructure NexusWatcher::start to start 3 threads, each with own tick: index default HS, index other HSs, resolve user-to-HS mappings
  • Implement "index default HS" logic
    • Only process events of an user if that user's HS is explicitly set to the default HS (e.g. do not blindly ingest all events)
  • Implement "index other HSs" logic
    • Switch to using new HS SDK user events endpoint
  • Implement "resolve user-to-HS mappings"
    • Add backoff mechanism to periodically skip event ingestion for HSs found to be offline

ok300 and others added 3 commits February 15, 2026 12:58
…HS from run_all

- NexusWatcher::start now spawns 3 parallel tokio tasks:
  1. Default homeserver processing (run_default_homeserver)
  2. Other homeservers processing (run_all, excluding default HS)
  3. Reserved for future use (TODO placeholder)
- Added run_default_homeserver to TEventProcessorRunner trait
- Modified homeservers_by_priority to exclude the default homeserver
- Added Send + Sync bounds to TEventProcessorRunner trait
- Updated all tests and rustdocs

Co-authored-by: ok300 <106775972+ok300@users.noreply.github.com>
@ok300 ok300 added this to the 2026-Q1 milestone Feb 15, 2026
@ok300 ok300 added the 🕸️ decentralization Distributed events from homeservers label Feb 15, 2026
@ok300 ok300 self-assigned this Feb 19, 2026
@ok300 ok300 mentioned this pull request Feb 27, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🕸️ decentralization Distributed events from homeservers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants