Skip to content

Commit

Permalink
minor improvements in relay test script
Browse files Browse the repository at this point in the history
and added reference/output file for test_servers.sh script

Added some more relays in config file
  • Loading branch information
vishalxl committed Apr 29, 2023
1 parent 7341609 commit 00173b7
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 22 deletions.
50 changes: 35 additions & 15 deletions scripts/configfile.cfg
Original file line number Diff line number Diff line change
@@ -1,40 +1,57 @@

nostr_servers=(
"wss://offchain.pub"
nostr_relays=(

# some popular relays
"wss://relay.damus.io"

"wss://nostr-2.zebedee.cloud"
"wss://nostr.zebedee.cloud"
"wss://nostr.coinos.io"
"wss://nostr-01.bolt.observer"
"wss://nostr.openchain.fr"

"wss://nostr-relay.wlvs.space"
"wss://nostr-pub.wellorder.net"
"wss://nos.lol"
"wss://nostr-relay-dev.wlvs.space"
"wss://nostr.shawnyeager.net"
"wss://relay.nostr.info"
"wss://nostr.semisol.dev"
"wss://relay.nostr.info"

# snort default relays
"wss://relay.snort.social"
"wss://nostr.wine"

# iris default relays
"wss://eden.nostr.land"
"wss://relay.current.fyi"
"wss://relay.nostr.band"
"wss://offchain.pub"
"wss://nostr.relayer.se"

# nostr chat relays
"wss://relay1.nostrchat.io"
"wss://relay2.nostrchat.io"

"wss://nostr.radixrat.com"
"wss://relay.nostr.ch"
"wss://nostr.rdfriedl.com"
"wss://nostr-pub.wellorder.net"
"wss://relay.nostr.scot"
"wss://nos.lol"
"wss://knostr.neutrine.com"

"wss://relay.snort.social"
"wss://nostr.mom"
"wss://relay.nostr.info"

"wss://nostr.openchain.fr"
"wss://nostr.drss.io"
"wss://nostr.delo.software"
"wss://nostr.zaprite.io"
"wss://sg.qemura.xyz"

"wss://nostr-relay-dev.wlvs.space"
"wss://nostr-01.bolt.observer"
"wss://nostr.shawnyeager.net"
"wss://nostr.zerofeerouting.com"
"wss://nostr.satsophone.tk"
"wss://relay.oldcity-bitcoiners.info"

"wss://nostr.swiss-enigma.ch"
"wss://relay.nostr.info"
"wss://nostr-2.zebedee.cloud"
"wss://nostr.zebedee.cloud"
"wss://nostr.semisol.dev"
"wss://nostr.onsats.org"
"wss://nostr-relay.digitalmob.ro"

Expand All @@ -55,6 +72,9 @@ nostr_servers=(
"wss://nostr.sandwich.farm"

"wss://brb.io"

"wss://dummyurl.example.com"

)


Expand Down
59 changes: 59 additions & 0 deletions scripts/output_test_servers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
Requesting all events in last 1 hours with a limit of 300 by executing the following command for each:
Getting all events, with limit 300, from servers in last 1 hours by running command:
echo ["REQ","l",{"since":1682760788,"limit":300}] | websocat <relay url> 2> /dev/null | wc -l


Testing wss://relay.damus.io : 0
Testing wss://nostr-2.zebedee.cloud : 0
Testing wss://nostr.zebedee.cloud : 0
Testing wss://nostr.coinos.io : 0
Testing wss://nostr-01.bolt.observer : 301
Testing wss://nostr.openchain.fr : 0
Testing wss://nostr-relay.wlvs.space : 0
Testing wss://nostr-pub.wellorder.net : 301
Testing wss://nos.lol : 0
Testing wss://nostr-relay-dev.wlvs.space : 0
Testing wss://nostr.shawnyeager.net : 1
Testing wss://relay.nostr.info : 0
Testing wss://nostr.semisol.dev : 301
Testing wss://relay.nostr.info : 0
Testing wss://relay.snort.social : 74
Testing wss://nostr.wine : 301
Testing wss://eden.nostr.land : 0
Testing wss://relay.current.fyi : 301
Testing wss://relay.nostr.band : 3
Testing wss://offchain.pub : 301
Testing wss://nostr.relayer.se : 0
Testing wss://relay1.nostrchat.io : 15
Testing wss://relay2.nostrchat.io : 11
Testing wss://nostr.radixrat.com : 0
Testing wss://relay.nostr.ch : 0
Testing wss://nostr.rdfriedl.com : 0
Testing wss://relay.nostr.scot : 301
Testing wss://knostr.neutrine.com : 301
Testing wss://nostr.mom : 0
Testing wss://nostr.drss.io : 0
Testing wss://nostr.delo.software : 0
Testing wss://nostr.zaprite.io : 1
Testing wss://sg.qemura.xyz : 301
Testing wss://nostr.zerofeerouting.com : 0
Testing wss://nostr.satsophone.tk : 0
Testing wss://relay.oldcity-bitcoiners.info : 0
Testing wss://nostr.swiss-enigma.ch : 0
Testing wss://nostr.onsats.org : 0
Testing wss://nostr-relay.digitalmob.ro : 0
Testing wss://offchain.pub : 301
Testing wss://relay.valireum.net : 0
Testing wss://nostr-relay.trustbtc.org : 0
Testing wss://relay.stoner.com : 0
Testing wss://nostr.w3ird.tech : 1
Testing wss://nostr.bongbong.com : 301
Testing wss://nostr.hugo.md : 1
Testing wss://nostr.slothy.win : 4
Testing wss://nostr.robotechy.com : 0
Testing wss://nostr.nodeofsven.com : 301
Testing wss://nostrrelay.com : 0
Testing wss://nostr.mwmdev.com : 0
Testing wss://nostr.sandwich.farm : 0
Testing wss://brb.io : 0
Testing wss://dummyurl.example.com : 0
8 changes: 4 additions & 4 deletions scripts/send_request.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ source ./configfile.cfg

# ./send_request.sh '["REQ","name",{"ids":["b10180"]}]'

for server in ${nostr_servers[@]};
for relay in ${nostr_relays[@]};
do
>&2 echo -e "\n\n------------Sending $1 to $server---------------------------\n"
>&2 echo "echo $1 | websocat $server " ;
echo "$1" | websocat -B 300000 $server
>&2 echo -e "\n\n------------Sending $1 to $relay---------------------------\n"
>&2 echo "echo $1 | websocat $relay " ;
echo "$1" | websocat -B 300000 $relay

done
7 changes: 4 additions & 3 deletions scripts/test_servers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ sinceSeconds=`date -d "-$numHours hour" +%s` ;
#jack
N=2
inLastNDays=`date -d "$N days" +%s`

#echo "Events in last $N days"
#req="[\"REQ\",\"id_mention_#p_nostr.coinos.io\",{\"#p\":[\"82341f882b6eabcd2ba7f1ef90aad961cf074af15b9ef44a09f9d2a8fbfbe6a2\"],\"limit\":20000,\"since\":$inLastNDays},{\"authors\":[\"82341f882b6eabcd2ba7f1ef90aad961cf074af15b9ef44a09f9d2a8fbfbe6a2\"]}]"

Expand All @@ -22,10 +23,10 @@ req="[\"REQ\",\"l\",{\"since\":$sinceSeconds,\"limit\":$limit}]";
echo -e "Getting all events, with limit $limit, from servers in last $numHours hours by running command: "
echo -e " echo $req | websocat <relay url> 2> /dev/null | wc -l \n\n";

for server in ${nostr_servers[@]};
for relay in ${nostr_relays[@]};
do
printf "Testing %-40s: " "$server"
echo "$req" | websocat -B 300000 $server 2> /dev/null | wc -l
printf "Testing %-40s: " "$relay"
echo "$req" | websocat -B 300000 $relay 2> /dev/null | wc -l

done

0 comments on commit 00173b7

Please sign in to comment.