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

Track the user's relay list using polling #438

Merged
merged 3 commits into from
Dec 3, 2024

Conversation

ksedgwic
Copy link
Contributor

This is the third attempt, the previous were #346 and #380

This version uses polling instead of async operations

@ksedgwic ksedgwic force-pushed the 2024-11-user-relay-list-take-three branch from d093725 to ded4752 Compare November 15, 2024 16:57
@ksedgwic ksedgwic marked this pull request as ready for review November 15, 2024 17:01
@ksedgwic ksedgwic requested review from jb55 and kernelkind November 15, 2024 17:02
@ksedgwic ksedgwic force-pushed the 2024-11-user-relay-list-take-three branch 8 times, most recently from a4de7bf to 082407f Compare November 22, 2024 00:34
@jb55
Copy link
Contributor

jb55 commented Nov 22, 2024

seeing concerning warnings on this branch:

2024-11-22T20:37:47.056689Z  WARN notedeck::app: got unknown eose[..] ... 97 tracked subscriptions

97 unhandled eose's seems large

also:

2024-11-22T20:37:50.812563Z ERROR notedeck::app: wss://nostr.africa/: IO error: failed to lookup address information: nodename nor servname provided, or not known
2024-11-22T20:37:50.812570Z ERROR notedeck::app: wss://relay.current.fyi/: IO error: failed to lookup address information: nodename nor servname provided, or not known
2024-11-22T20:37:50.812575Z ERROR notedeck::app: wss://relayer.fiatjaf.com/: IO error: failed to lookup address information: nodename nor servname provided, or not known
2024-11-22T20:37:50.812581Z ERROR notedeck::app: wss://rsslay.fiatjaf.com/: IO error: failed to lookup address information: nodename nor servname provided, or not known
2024-11-22T20:37:50.958067Z ERROR notedeck::app: wss://nostr.zebedee.cloud/: IO error: invalid peer certificate contents: invalid peer certificate: CertNotValidForName
2024-11-22T20:37:51.124584Z ERROR notedeck::app: wss://relay.plebstr.com/: IO error: invalid peer certificate contents: invalid peer certificate: CertExpired
2024-11-22T20:37:51.141660Z ERROR notedeck::app: wss://nostr.onsats.org/: IO error: invalid peer certificate contents: invalid peer certificate: CertNotValidForName

which seems to be trying to fetch from a bunch of relays I don't recognize, is this trying to do the outbox model?

@jb55
Copy link
Contributor

jb55 commented Nov 22, 2024

there also seems to be log entries that are creating newlines which we should try to avoid (Muted, desired_relays)

@ksedgwic
Copy link
Contributor Author

outbox model?

Nope, just k:10002

Can you try with RUST_LOG=error,notedeck::accounts=debug,notedeck::muted=debug

@ksedgwic
Copy link
Contributor Author

Which npub are you using? I'll see if I can reproduce ...

@ksedgwic
Copy link
Contributor Author

creating newlines
fixed

@ksedgwic ksedgwic force-pushed the 2024-11-user-relay-list-take-three branch from 800de7a to 0813c26 Compare December 2, 2024 19:25
@ksedgwic
Copy link
Contributor Author

ksedgwic commented Dec 2, 2024

I'm not able to reproduce the "unrecognized relays" or "unhandled eose's" issues mentioned above, seems to be working rationally for me w/ Will's npub.

@jb55 any chance I can get you to capture a log of it doing this?

Copy link
Contributor

@jb55 jb55 left a comment

Choose a reason for hiding this comment

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

just a few things then we're good to go!

src/account_manager.rs Outdated Show resolved Hide resolved
src/accounts/mod.rs Outdated Show resolved Hide resolved
src/muted.rs Outdated Show resolved Hide resolved
src/muted.rs Show resolved Hide resolved
src/muted.rs Outdated
let content = note.content().to_lowercase();
for word in &self.words {
if content.contains(&word.to_lowercase()) {
debug!("{}: MUTED word: {}", hex::encode(note.id()), word);
Copy link
Contributor

Choose a reason for hiding this comment

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

this too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

also only encoded when it matches (and it's commented out for now)

src/accounts/mod.rs Show resolved Hide resolved
@ksedgwic ksedgwic force-pushed the 2024-11-user-relay-list-take-three branch from 0813c26 to f9a2c39 Compare December 2, 2024 21:05
@ksedgwic ksedgwic force-pushed the 2024-11-user-relay-list-take-three branch from f9a2c39 to 8483847 Compare December 2, 2024 21:15
@jb55 jb55 merged commit 8483847 into damus-io:master Dec 3, 2024
8 checks passed
@jb55
Copy link
Contributor

jb55 commented Dec 3, 2024

sorry for the delay! thanks!

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.

2 participants