Skip to content

Conversation

@dangershony
Copy link
Member

No description provided.

@dangershony dangershony marked this pull request as ready for review December 15, 2025 14:52
@dangershony dangershony changed the title Add methods for to nostr first calls (not used yet) Add methods for nostr first calls (not used yet) Dec 16, 2025
{
var projects = await projectService.LatestAsync();
// var projects = await projectService.LatestAsync();
var projects = await projectService.LatestFromNostrAsync();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this bit means we will use the nostr first approach

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have a feature toggle from the UI here?

@dangershony dangershony changed the title Add methods for nostr first calls (not used yet) Add methods for nostr first calls Jan 7, 2026
@vernorvinge vernorvinge requested a review from Copilot January 8, 2026 12:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for querying the latest projects from Nostr relays first, rather than from the indexer. The implementation introduces a new LookupLatestProjects method in the relay service and updates the project retrieval workflow to validate Nostr events against on-chain data.

Key changes:

  • New LookupLatestProjects<T> method in RelayService for querying kind 3030 events from Nostr relays
  • New LatestFromNostrAsync method in DocumentProjectService that queries Nostr first, then validates projects on-chain
  • Updates LatestProjects operation handler to use the new Nostr-first approach

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/Angor/Shared/Services/RelayService.cs Adds new LookupLatestProjects method to query latest kind 3030 events from Nostr relays, plus whitespace/formatting cleanup
src/Angor/Shared/Services/IRelayService.cs Adds interface method signature for LookupLatestProjects
src/Angor/Avalonia/Angor.Sdk/Funding/Services/DocumentProjectService.cs Implements LatestFromNostrAsync with two-step validation (Nostr query → on-chain validation) and helper method QueryLatestNostrProjectEventsAsync
src/Angor/Avalonia/Angor.Sdk/Funding/Services/ProjectService.cs Adds stub implementation that throws NotSupportedException for obsolete class
src/Angor/Avalonia/Angor.Sdk/Funding/Services/IProjectService.cs Adds interface method and documentation for LatestFromNostrAsync
src/Angor/Avalonia/Angor.Sdk/Funding/Projects/Operations/LatestProjects.cs Switches handler from LatestAsync to LatestFromNostrAsync

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@DavidGershony DavidGershony self-requested a review January 8, 2026 13:42
Copy link
Collaborator

@DavidGershony DavidGershony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need more validations

@dangershony
Copy link
Member Author

Regarding perf, when testing the nostr first I see no apparent difference in perf vs indexer first

Copy link
Collaborator

@DavidGershony DavidGershony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have the ability to change between nostr first and blockchain first?

@dangershony
Copy link
Member Author

Regarding perf, when testing the nostr first I see no apparent difference in perf vs indexer first

I don't think because we want to move away form custom indexers anyway.
Having both options means maintaining the indexers

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.

3 participants