-
Notifications
You must be signed in to change notification settings - Fork 39
Add methods for nostr first calls #600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| { | ||
| var projects = await projectService.LatestAsync(); | ||
| // var projects = await projectService.LatestAsync(); | ||
| var projects = await projectService.LatestFromNostrAsync(); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this 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
LatestFromNostrAsyncmethod 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.
src/Angor/Avalonia/Angor.Sdk/Funding/Services/DocumentProjectService.cs
Outdated
Show resolved
Hide resolved
src/Angor/Avalonia/Angor.Sdk/Funding/Projects/Operations/LatestProjects.cs
Show resolved
Hide resolved
src/Angor/Avalonia/Angor.Sdk/Funding/Services/DocumentProjectService.cs
Outdated
Show resolved
Hide resolved
src/Angor/Avalonia/Angor.Sdk/Funding/Services/DocumentProjectService.cs
Outdated
Show resolved
Hide resolved
src/Angor/Avalonia/Angor.Sdk/Funding/Services/DocumentProjectService.cs
Outdated
Show resolved
Hide resolved
src/Angor/Avalonia/Angor.Sdk/Funding/Services/DocumentProjectService.cs
Outdated
Show resolved
Hide resolved
src/Angor/Avalonia/Angor.Sdk/Funding/Services/DocumentProjectService.cs
Outdated
Show resolved
Hide resolved
DavidGershony
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need more validations
|
Regarding perf, when testing the nostr first I see no apparent difference in perf vs indexer first |
DavidGershony
left a comment
There was a problem hiding this 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?
I don't think because we want to move away form custom indexers anyway. |
No description provided.