Code Monkey home page Code Monkey logo

nostr-watch's People

Contributors

dskvr avatar fiatjaf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nostr-watch's Issues

Relays never finish checking

Describe the bug
Relays get stuck and never finishing checking.

To Reproduce
Load the page and look at the top right.

Expected behavior
Any bad relays timeout automatically.

Abililty to add relays via nostr

Would be nice to be able to add relays via nostr, for a variety of reasons.

  1. Publish an event with a specific event format to the nostr.relay (when public)
  2. nostr.relay bot calls inspector to test the relay to prevent abuse (connect only)
  3. If passed, nostr.relay calls a workflow that appends the relay to relays.yaml

Permalinks are broken

Believe it has something to do with proxy_pass in serverside nginx config.

Calling any other URL but / will result in 404.

Component Based Queue

Is your feature request related to a problem? Please describe.
Identified an efficient pattern for running tasks that doesn't require webworkers or extraneous work in queue logic. Piggybacks off existing task management.

Describe the solution you'd like

  • Component conditionals ensure only one task is ran at a time.
  • Each task uses the tasks store for getting and setting task status
  • When a task completes by signaling tasks store the component will unload, and another task component will take over.

Describe alternatives you've considered

  • store driven queue
  • other existing queue solutions

Require SSL

You can access nostr.watch using both HTTP and HTTPS, but HTTP is not secure.
Images are being served using HTTP but should be served with HTTPS.
Please redirect users to HTTPS.

Relay added twice

After last PR, 2 new entries added

  • wss://nostr.hackerman.pro
  • wss://nostr.hackerman.pro.

The latter one accidentaly I guess.

Thank you in advance!

Add additional groupings

  • By connection status
  • By country
  • By continent
  • By nip support

Will require much needed refactor to what was a quick solution.

Remove events from info column

They are presently being overwritten anyways during processing due to an oversight. These messages should be displayed on the relay single component.

Extension support

Add ability to sign messages with nostr extensions

Signature providers (nos2x, alby, etc)

  • Add relay
  • Use nostr user data to check their personalized connection status
  • follow relay administrator
  • Add to relays

LN Extensions (Alby, etc)

  • Tip relay

Geo Data

Generated at build-time so that no license is required and IPs of visitors aren't unwillingly leaked.

  • Generate geo.yml (so that yaml-loader can be used, less dependencies) in pre-build
  • Parse geo.yml at buildtime
  • Populate GEO object and watch for matches to be state.complete on render.

[0.1.0] Mobile Compatibilty

Describe the bug
Mobile is presently forcing a desktop view.

To Reproduce
Visit on mobile

Expected behavior
Returns responsive pages

Screenshots

Smartphone (please complete the following information):
all

Additional context

Deploy workflow

Using GHA for now...

  • Check for package.json version change
  • yarn docker
  • SSH, docker pull and restart containers

Improve testing procedure

The testing procedure is based on the original testing procedure made by @fiatjaf, and it has some issues

  1. nostr relay will only write a event once (rightfully)
  2. nostr relay will return the expected event
  3. nostr relay will return true for write even if that's no longer true (for example on my relay, which is now whitelisted only, but the event was indeed published in the past, so it returns a false write)

Alternatively

  1. Send fresh events from nostr.watch account (updates, etc, not spam) to the nostr.watch private relay and a pool of relays determined by the contents of relays.yaml
  2. Have a nostr-bot on the private nostr.watch relay that triggers a workflow whenever nostr.watch relay (private) is updated by nostr.watch account, this workflow will populate events in a file and commit to source and push. (CD would be triggered on push)
  3. The client-side tests will then test the most recent event that was published, and if it exists on the relay, read is true.

The result will be a drastically improved, albeit delayed, write testing methodology that doesn't spam relays unnecessarily or send repeated publish attempts on every pageload.

When #93 is implemented, can use a users events to test their ability to read/write to each relay for more precise results.

Other areas of improvement

Considerations

  • There will need to be an info page that informs relays not to block nostr.watch events.
  • nostr.watch account will need to rate limit the updates as to avoid spamming relays with needless information
  • nostr.watch updates should be relevant, timely and semi-frequent (1-2 a week)

Dependencies

  1. Will require updates to nostr-relay-inspector to accept custom events for testing

Technical debt

  • remove redundant code
  • Clean up HTML (mixed code styles)
  • implement shared methods library
  • rescope css in main.sass

Nostr driven, read

Integrate nostr.watch events for runtime loader.

  • Publish nostr events from daemon that include connect, read, write and relay info (presently alpha, pushing to wss://nostr.sandwich.farm with event kind: 1001)
  • Ability to disable data manually from nostr when there are network issues.
  • Fallback to prebuild data when there are network issues.
  • check latency client-side with legacy fallback for accurate results.

Add link to nostr.json static api

Presently, a static API is available at nostr.watch/nostr.json to retrieve relays.

Identify how to describe it.

A better API that removes offline nodes would likely require a backend, which will not begin until stable. There are alternatives to a backend

  1. client-side dynamic api, send appropriate headers. Problem here is it is inefficient with a long timeout.
  2. build-time filtering of offline nodes. Problem here is that the data will be frequently out of date or incorrect (build-time is during a planned maintenance)

Multi-sorting for results

Purpose would be to sort relays without read/write but connection higher up on the list. Latency cannot be tested without read (connect takes ~1 ms). Presently only sorting with latency, so they are scattered throughout the list which is not readable or helpful.

Sort by latency and then the various checks.

Relay administrator suggestions

Detect common issues and display them on relay detailed page.

  • Detect Cors support and providing information on how to resolve (NIP-?? [don't remember rn])
  • Detect Default Configs and how to resolve
  • Detect invalid parameters (such as invalid public keys) and how to resolve

Fix various display bugs

  • Copy is broken
  • Do not show copy tooltip for offline relays
  • Misalignment of restricted type relay status indicators
  • Missing tooltips for location and identity columns
  • JSON modals are not z-indexed properly

[0.1.0] Crashes chrome in production build on Netlify

Describe the bug
The production build is crashing on netlify in Chrome. The same production build does not crash locally.

To Reproduce
Steps to reproduce the behavior:

  1. https://next.nostr.watch
  2. Crash

Expected behavior
Does not crash

Screenshots
Screen Shot 2023-01-08 at 1 38 27 PM
Desktop (please complete the following information):

  • MacOS Mojave
  • Chome:latest

Smartphone (please complete the following information):
n/a

Additional context

Remove nip-11 column

  • Move modal trigger to relay url
  • Add copy icon instead of click relay url to copy

Feature request: Relay uptime

Hi there,

thanks for this great project. Would be helpful to see the uptime of each relay next to the ping.

Keep up the good work!

Stuck on loop fetching nostr.json

Describe the bug
If NIP-05 nostr.json fails, nostr.watch get's stuck fetching it over and over again.
Nothing else works after that happens.

To Reproduce
See the console logs for:
https://nostrex.fly.dev/.well-known/nostr.json

Expected behavior
nostr.watch should retry the failed nostr.json with an exponential backoff and bail after 3 to 5 tries.

Screenshots
image

Desktop (please complete the following information):

  • OS: Mac OS
  • Browser: Chrome

Additional context
Add any other context about the problem here.

Feature Request: Average Read Latency

The instant read latency is affected by the current network conditions and is jittery.
An average read latency could be calculated perhaps using a sliding window (or just adding up previous reads), whenever we "check" with the relay again.

Relay Operator Feed

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
Show notes by relay operator

Describe alternatives you've considered
none

Depends on #166

Can't yarn build because nostr.watch is down

Nostr.watch was unstable so i tought i deploy my copy but hey... i got this error. ^^

$ yarn build
yarn run v1.22.15
$ yarn get:relays && yarn get:geo
$ node ./scripts/relays.js
FetchError: request to https://nostr.watch/relays.json failed, reason: connect ECONNREFUSED 46.101.217.80:443
at ClientRequest. (C:\user\nostr-watch\node_modules\cross-fetch\node_modules\node-fetch\lib\index.js:1491:11)
at ClientRequest.emit (events.js:375:28)
at TLSSocket.socketErrorListener (_http_client.js:475:9)
at TLSSocket.emit (events.js:375:28)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
type: 'system',
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED'
}

Responsive

Initial version was created with tables for convenience, however, it was known from the beginning this was not the best option. I was attempting to avoid committing into a specific datatable library early, which can often heavily influence the underlying logic and can add limitations to features (speaking from experience)

In addition to a tableless/responsive design, there is the need for the following:

  • #28
  • filters
  • grouping (achieved with tabs for now)
  • ordering

Possible Libraries

Nostr driven, write

Complete extensions integration

  • write relay to kind 3

Daemon (separate repo)

  • Write to new replaceable kind with basic status checks.

0.1.0 Preview

Welcome! The preview for nostr.watch 0.1.0 is live. It is being deployed from release/0.1

Please leave feedback in this issue, if you find a bug, please submit a new issue with "0.1.0" in the title.

Feedback at this stage is most helpful where related to:

  1. UX
  2. Performance
  3. Client-side bugs

Known Issues:

  • #155 A bit wonky on Mobile. Minor mistakes made while templating, nothing huge.
  • #156
  • #157

Information about changes in depth will be included in 0.1.0 release notes.

Screenshots:
Screen Shot 2023-01-08 at 11 23 59 AM

Screen Shot 2023-01-08 at 11 22 37 AM

Screen Shot 2023-01-08 at 11 26 09 AM

Implement Pinia

State management is presently a nightmare. Since nostr.watch is and will always be a single page, client-side app, I need to implement pinia (successor to vuex).

Benefits

  • Easier state management
  • Easier feature development
  • Predictable behaviors
  • Will close many existing issues and make the rest easier to complete.

Tip Relay Operators via LUD06

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
A clickable lighting icon in relay list, relay map pop up and relay single that prompts a lighting payment.

Describe alternatives you've considered
None

Depends on #166

Page jump on load

Page jump on load likely relates to the lifecycle management of vue3-leafleft, can possibly be mitigated with CSS only.

Website isn't showing my relay name and pubkey

I edited my .nostr/settings.json file to show my relay's name and pubkey a couple of days ago, but I'm not seeing the changes. Is there somewhere else in my server's directory this file should be? This is the top section of the settings.json file.

root@nymsrelay:~/.nostr# cat settings.json

{
"info": {
"relay_url": "wss://nostr.nymsrelay.com",
"name": "Nym's Relay",
"description": "A nostr relay written in Typescript.",
"pubkey": "bcea2b98506d1d5dd2cc0455a402701e342c76d70f46e38739aadde77ccef3c9",

Analysis page

  • Readable Network Summary paragraph
  • Continent Summary
    • Country Drill down
  • NIP Support

Page Flash

Describe the bug
Window flashes browsing between ages.

To Reproduce
Click on a relay

Expected behavior
Does not flash

Page alerts about relay but doesn't provide details

The page "warns" about my relay.nostr.info that it returned five events when asking for one but I don't know which query this was or what these extra replies were. I'd like to fix this but ... miss info.

Since Jack joined nostr, my relay is basically dead, so there probably is an issue but details would be great.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.