damus-io / damus

iOS nostr client
GNU General Public License v3.0
1.95k stars 290 forks source link

Bug: stale feed. Large contact list. #2194

Open alltheseas opened 1 week ago

alltheseas commented 1 week ago

Tracking Issus

These are steps needed to fix this issue

What happens Feed seems stuck. Only hours long posts show. Universe view is showing new posts. DMs work. Notifications work.

What I expect to happen I dont expect to see a stale feed.

Link to noteID, npub

reported by elsat npub1zafcms4xya5ap9zr7xxr0jlrtrattwlesytn2s42030lzu0dwlzqpd26k5

Screenshots/video recording https://github.com/damus-io/damus/assets/64376233/95ae8255-4cfb-4be0-8cf0-b56124ebe0d4

a b
image image

Versions Damus version: 1.9 (1) 90c68fed Operating system version: iOS 17.4.1] Device: e.g. iPhone 13 mini

Steps To Reproduce Steps to reproduce the behavior:

Unclear.

alltheseas commented 1 week ago

For brief moments feed becomes real time - for instance after not having used the app for an hour.

After app close, and open feed is stale oncemore.

alltheseas commented 1 week ago

Stale feed problem persists

image

universe view is real time

image

jb55 commented 6 days ago

On Tue, Apr 30, 2024 at 02:08:53PM GMT, alltheseas wrote:

Stale feed problem persists

image

universe view is real time

image

can you try reducing your number of relays and see if that fixes anything. I've heard reports of this and I'm not sure why more relays breaks things.

alltheseas commented 6 days ago

reduced relays - does not change stale feed

alltheseas commented 3 days ago

Turned on damus on old phone - same issue present

alltheseas commented 3 days ago

If yall log in with my npub are you able to recreate?

jb55 commented 3 days ago

(this was sent via email but also sent to the github issue as a comment)

Re: [damus-io/damus] Bug: stale feed (Issue #2194) Link: https://github.com/damus-io/damus/issues/2194

On Sat, May 04, 2024 at 07:09:46PM GMT, alltheseas wrote:

reduced relays - does not change stale feed [..] Turned on damus on old phone - same issue present

Your contact list is large and contains lots of hashtags and pubkeys. This may have something to do with it.

We should use these to build some test cases for this to dig down and see what is going on.

I have some suspicions:

Potential problems

Options

Workarounds

Since your contact list is so large, you may need to either:

or

This is a huge problem with the protocol at the moment with not many obvious solutions. I try to keep my contact list under 1000 for this reason.

We should definitely run some simulations on how much data the outbox model will save us here, with real world data from real relay and contact lists such as yours.

Next steps

Ideal solution

I have a feeling a lot more users are going to be running into this issue so we should starting thinking of solutions soon.

Cheers,

Will

[1] https://github.com/damus-io/damus/issues/2041 [2] https://github.com/damus-io/notedeck/

alltheseas commented 2 days ago

Potential additional test case:

note1v2uzw8f488y29mhuafwjrkn45ss79sx2fydn3sedtxkca46rnjcq6u3g74

npub1vwymuey3u7mf860ndrkw3r7dz30s0srg6tqmhtjzg7umtm6rn5eq2qzugd

alltheseas commented 2 days ago
Screenshot 2024-05-06 at 11 49 05 AM