Skip to content
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

Better relay management #124

Open
TonyGiorgio opened this issue Nov 29, 2023 · 14 comments
Open

Better relay management #124

TonyGiorgio opened this issue Nov 29, 2023 · 14 comments

Comments

@TonyGiorgio
Copy link

Please pull from the user's nostr relay list. I selected the outbox model but it's not pulling in all of my relays, some that I pay for so I want this reflected. The first load time of my feed was quite poor for 5 or so minutes.

Also, when I go through the relay page to start adding the ones I already have, it cleared the existing list that was already there. I think having to manage my relays when trying out a new nostr client is a bad experience.

@reyamir
Copy link
Collaborator

reyamir commented Nov 30, 2023

Hi Tony, thank for your valuable feedback, it is main issue still struggle me, I'm working to improve it

@reyamir
Copy link
Collaborator

reyamir commented Nov 30, 2023

Thank @TonyGiorgio, I've realise a lot of dumb mistake in my code, I actively working to improve it in the next branch. I'm happy invite you trying preview version when it done (expect at this weekend)

@TonyGiorgio
Copy link
Author

Thank you!

@reyamir reyamir mentioned this issue Dec 3, 2023
@reyamir
Copy link
Collaborator

reyamir commented Dec 3, 2023

Hi @TonyGiorgio
I've published v2.2.0 as pre-release version, I will do some more testing and will release it on tomorrow
If you have free this the weekend, you can download and test it https://github.com/luminous-devs/lume/releases/tag/v2.2.0

@TonyGiorgio
Copy link
Author

Just tried it out. The home page loaded up really fast, nice one!

However, the relay list doesnt show up. I was going to try deleting the data and trying again with a fresh account but noticed there was no delete data button in the app. So not sure why nothing is showing up.

Screenshot 2023-12-03 at 1 37 49 AM

@TonyGiorgio
Copy link
Author

TonyGiorgio commented Dec 3, 2023

Could not another issue, not sure if it has to do with this release. But I just tried to give a random event a clap emoji like and I got a blank screen right after.
Screenshot 2023-12-03 at 1 40 44 AM

@reyamir
Copy link
Collaborator

reyamir commented Dec 3, 2023

Just tried it out. The home page loaded up really fast, nice one!

However, the relay list doesnt show up. I was going to try deleting the data and trying again with a fresh account but noticed there was no delete data button in the app. So not sure why nothing is showing up.

Screenshot 2023-12-03 at 1 37 49 AM

oh, seem strange bug, it just fetch event kind 10002, I will check it and also add a reload button for this part
if you want to clear data, you can go to settings screen -> advanced. Lume local db is mostly use for NDK cache

image

@TonyGiorgio
Copy link
Author

TonyGiorgio commented Dec 3, 2023

Ohh, I saw it said "boost up NDK" and thought it was just something related to that.

Uhm, okay, maybe I have to investigate this then. I'm seeing relay lists different on each client I use and tbh idk if it got wiped at some point or not. I see I have 0 relays on Lume, 0 relays on another client, 1 relay on a different client, and amethyst & primal show me the ~12 I expect. Honestly not sure what's going on.

@reyamir
Copy link
Collaborator

reyamir commented Dec 3, 2023

oh, I just try to query your relay list, and it not return anything
image

my code

const event = await ndk.fetchEvent(
        {
          kinds: [NDKKind.RelayList],
          authors: [db.account.pubkey],
        },
        { cacheUsage: NDKSubscriptionCacheUsage.ONLY_RELAY }
);

I will update this code for fetch all events with more limit instead of 1

@reyamir
Copy link
Collaborator

reyamir commented Dec 3, 2023

same with limit 100, I'm querying your relay list on relay.damus.io and relay.nostr.band. I',m not sure why they not return your relay list

I've tested with my account and I also create some account for test. It still work fine

image

@TonyGiorgio
Copy link
Author

Weird, okay thank you. Then maybe it's working as intended and something is wrong with my profile. I'll double check tomorrow. Thanks!

@reyamir
Copy link
Collaborator

reyamir commented Dec 3, 2023

oh thank you for testing new build today, I'm also updating UI for this part, it need to show "Your relay list is empty, please add some" instead of blank space

@TonyGiorgio
Copy link
Author

Screenshot 2023-12-03 at 12 53 38 PM

Great! Working well now. I did clear cache and then restart and my relays started showing up after using https://metadata.nostr.com/ and then https://nostrit.com/push to make sure it was broadcasted everywhere. Appreciate the help here and coding this up!

@reyamir
Copy link
Collaborator

reyamir commented Dec 4, 2023

Yo, I'm happy it working well on your side now

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

No branches or pull requests

2 participants