fiatjaf
94ea432818
delete PoolOptions entirely (it should have been deleted earlier) and expose AuthRequiredHandler field.
2026-04-19 20:14:00 -03:00
fiatjaf
029f4eb0d8
pool: AddToPenaltyBox() manually.
2026-04-11 22:26:23 -03:00
fiatjaf
d92a0cde16
get rid of PoolOptions, just set fields on Pool directly.
2026-04-11 20:31:05 -03:00
fiatjaf
8515153df2
Revert "pool: open new connections whenever a subscription limit is reached, reuse multiple simultaneous relay connections."
...
This reverts commit 9bf9816c15 .
2026-04-11 19:25:39 -03:00
fiatjaf
98fa53464e
pool: proper filter scope in subMany()
2026-04-11 19:24:08 -03:00
fiatjaf
12af4717d4
pool: penalty box as a xsync map because mutexes are too hard.
2026-04-11 01:55:18 -03:00
fiatjaf
9bf9816c15
pool: open new connections whenever a subscription limit is reached, reuse multiple simultaneous relay connections.
2026-04-07 18:13:05 -03:00
fiatjaf
8ba05114cd
remove relay from pool once it's closed or disconnected.
2026-02-28 14:26:32 -03:00
fiatjaf
4d1b6c1df0
potential fix on some concurrency pool issues.
2026-02-23 15:22:21 -03:00
fiatjaf
7aa127a8c3
use if ctx.Err() instead of select {}.
2026-02-22 17:45:36 -03:00
fiatjaf
3335c29389
relay: auth handler; pool: rename auth handler.
2026-01-08 18:54:19 -03:00
fiatjaf
099569ea4f
String() method for DirectedFilter.
2025-12-21 23:58:42 -03:00
fiatjaf
0706140491
add more *NotifyClosed variants.
2025-12-04 09:22:54 -03:00
fiatjaf
d5dc3abaf2
SubscribeManyNotifyClosed()
2025-12-04 08:51:34 -03:00
fiatjaf
00c153cf92
limit reconnect interval to 10min.
...
see https://github.com/nbd-wtf/go-nostr/issues/198
2025-11-12 10:15:50 -03:00
fiatjaf
dd097470d2
try to reconnect even if the first connection failed.
2025-10-22 07:52:08 -03:00
fiatjaf
c5d4b52a6f
fix a dangling pending in pool.subMany()
2025-09-08 11:22:35 -03:00
fiatjaf
80d0546ce6
we should be doing this since years ago: force an EOSE if the relay refuses to give us one.
2025-08-25 22:42:05 -03:00
fiatjaf
31a590ee4f
fix sending on close channel with yet another mutex.
2025-08-23 09:16:12 -03:00
fiatjaf
6d4ef9df85
fix pool.FetchManyReplaceable() inverted logic.
2025-08-22 19:08:25 -03:00
fiatjaf
960312bd74
eliminate duplicates in PublishMany()
2025-08-06 00:37:39 -03:00
fiatjaf
788225b902
fix emitting duplicate events in pool.SubMany()
2025-07-30 07:09:14 -03:00
fiatjaf
6592319774
stop exposing connection, more debugLog calls and properly fail subscriptions when a relay dies.
2025-07-13 14:21:15 -03:00
fiatjaf
9f8b810882
fix main relay context being canceled instead of just the dial context.
2025-07-11 13:01:04 -03:00
fiatjaf
6d44b5b0dc
pool.BatchedSubscribeMany()
2025-05-12 06:13:21 -03:00
fiatjaf
c0934e0639
since and until are not pointers anymore because that is too annoying.
2025-05-08 09:32:54 -03:00
fiatjaf
3f87ec329d
reduce pool.EnsureRelay() timeout to 7s.
2025-05-04 20:21:33 -03:00
fiatjaf
002dc1e84d
allow custom CheckDuplicate in pool subscriptions.
2025-05-02 15:19:16 -03:00
fiatjaf
15c6093c9b
define a nostr.Kind type for event kinds, make adjustments everywhere and fix some horrible bugs with mmm, lmdb and badger querying and deleting.
2025-04-20 11:15:41 -03:00
fiatjaf
2b5b646a62
a big bundle of conversions and other changes.
2025-04-15 17:13:57 -03:00
fiatjaf
b4268d649c
a bunch of [32]byte conversions. still more needed.
2025-04-14 17:47:53 -03:00
fiatjaf
05e2018d3a
exit BatchedSubManyEose() immediately as the context expires.
...
I'm not sure about this, but seems to work.
2025-04-06 09:40:54 -03:00
fiatjaf
bba332aea6
pool: pre-update seenAlready atomically so there is no risk of the same event being parsed and dispatched twice racily.
2025-04-06 09:40:32 -03:00
fiatjaf
1ccd9ba417
pool.PublishMany() runs in parallel.
2025-04-03 23:24:13 -03:00
fiatjaf
a60e225a5f
sdk/dataloader simplify and fix lock issues, now it will work.
2025-03-28 17:41:41 -03:00
fiatjaf
cc23d81e80
pool's .FetchManyReplaceable() and amends to previous commit.
2025-03-12 00:49:58 -03:00
fiatjaf
5bfaed2740
docstrings for many functions.
2025-03-04 11:42:44 -03:00
fiatjaf
00c22b0b77
maybe fix logic for closing waitgroup in subMany()
2025-02-16 18:45:09 -03:00
fiatjaf
7412a6fb40
use atomic eosed bool in subMany()
2025-02-16 17:36:05 -03:00
fiatjaf
c37ed1a309
pool: deprecate methods that take more than one filter.
2025-02-12 16:28:35 -03:00
fiatjaf
e0ed40613d
pool: bug that was causing a SubMany() to close if any of the relays failed to connect.
...
fixes https://github.com/nbd-wtf/go-nostr/issues/172
2025-02-12 14:32:33 -03:00
fiatjaf
0ea7fd95f3
QuerySingle() to take opts.
2025-02-07 18:02:19 -03:00
fiatjaf
f19efb4013
nip19: helper for building nevent from RelayEvent.
2025-02-07 18:02:05 -03:00
fiatjaf
8446557788
debug log relay reconnections.
2025-02-03 10:35:42 -03:00
fiatjaf
4ca8320e18
actually this is the real fix.
2025-01-29 22:12:42 -03:00
fiatjaf
181234d774
fix SubMany() global eosed tracking and SubManyNotifyEOSE() proper notification.
2025-01-29 21:36:08 -03:00
fiatjaf
edb2f782cf
pool.SubManyNotifyEOSE()
2025-01-28 16:12:53 -03:00
fiatjaf
3fd33ce281
fix locking on generic list and set fetching, decrease dataloader batch size, test.
2025-01-17 17:39:24 -03:00
fiatjaf
06a15fdaab
follow list fetching test and related changes and fixes.
...
- make BatchedSubManyEose() use a single duplicate id index and use it for replaceable loaders;
- fixes parsing follow entry from kind:3 events (and others);
- adds a "cause" to most cancelation errors in relay/pool;
- remove the inherent cache from dataloader (we have our own hopefully);
- increase max frame size we can read from any websocket to 2**18 (262k), which gives over 2000 item lists.
2025-01-17 13:44:51 -03:00
fiatjaf
febf022124
add some basic sdk tests, fix saving hints (normalize urls), checkduplicates arg order, kvdb stuff and other things.
2025-01-16 17:39:16 -03:00