Commit Graph

  • 20d65d4a76 fix race condition in Close Yasuhiro Matsumoto 2023-11-06 00:36:24 +09:00
  • 29646d8bec fix ok envelope test. fiatjaf 2023-11-05 13:35:40 -03:00
  • f8fb9e8c26 fix OKEnvelope always requiring the 4th field. fiatjaf 2023-11-04 17:30:19 -03:00
  • 0ecffe686d binary decoding performance gains are negligible. fiatjaf 2023-11-04 10:06:34 -03:00
  • 2fd7c221ff use trunk ristretto for our hashing magic instead of modded fork. fiatjaf 2023-11-02 16:05:08 -03:00
  • 9e593c44c2 nson and binary on justfile. fiatjaf 2023-11-02 15:29:27 -03:00
  • 4c72e16f3e binary encoding and some changes to nson benchmarks. fiatjaf 2023-11-02 15:28:01 -03:00
  • 1789d43d51 move sdk out to its own module. fiatjaf 2023-10-31 17:48:06 -03:00
  • 5847335506 sdk: return store event along with ProfileMetadata. fiatjaf 2023-10-31 15:22:55 -03:00
  • 711b0844b1 expose System properties. fiatjaf 2023-10-31 12:16:08 -03:00
  • 374dbbe1a0 sdk: fetch and cache profiles. fiatjaf 2023-10-31 11:00:46 -03:00
  • aaaf608c2b I thought I had removed this. fiatjaf 2023-10-30 19:24:30 -03:00
  • c506cc0f8b sdk taking shape. fiatjaf 2023-10-30 19:23:58 -03:00
  • 234d825e43 remove deprecated nip44 version. fiatjaf 2023-10-09 07:39:42 -03:00
  • 15b3aebc86 fix an accidental API breaking change. fiatjaf 2023-10-08 14:46:16 -03:00
  • edefc57b28 clear context differentiation on submany/unique. fiatjaf 2023-10-03 15:43:18 -03:00
  • 7d1091b66b fix a stupid bool. fiatjaf 2023-10-02 14:46:19 -03:00
  • e45921c11a pool.SubMany(Eose)NonUnique() fiatjaf 2023-10-02 14:16:16 -03:00
  • c68e876b05 RemoveExtra() fiatjaf 2023-10-02 12:26:34 -03:00
  • 1c4a64d2a1 improve warning on readme. fiatjaf 2023-10-02 09:16:27 -03:00
  • bc5c0aa4a1 just scripts for checking if all is ok. fiatjaf 2023-10-02 09:14:09 -03:00
  • 553c7f245a remove nip26 test. fiatjaf 2023-10-02 09:13:49 -03:00
  • a0f6dec451 fix sdk. fiatjaf 2023-10-02 09:13:36 -03:00
  • 978d7825b5 return IncomingEvent struct from SimplePool methods containing the relay. fiatjaf 2023-09-30 19:16:30 -03:00
  • 18cee7421a fix xsync counter initialization. fiatjaf 2023-09-16 07:51:22 -03:00
  • e55f5492ab fix typos Yasuhiro Matsumoto 2023-09-11 23:23:46 +09:00
  • 0f66883dc7 feat(kind): using constants Isaque Veras 2023-09-06 21:00:05 -03:00
  • eef7c40dc7 migrate to xsync v2. fiatjaf 2023-09-04 16:44:36 -03:00
  • 1f605f3629 remove intermediary .events channel and hacky ms sleep. fiatjaf 2023-09-04 08:57:51 -03:00
  • 6d1875de46 ensure eose channel closes after events have been emitted. fiatjaf 2023-09-04 08:33:31 -03:00
  • 4c50cce79c add the same warnings in Subscribe and PrepareSubscription help comments. fiatjaf 2023-08-31 09:27:20 -03:00
  • b8eeb658cc add size validation to nip19 decoder. fiatjaf 2023-08-31 09:25:09 -03:00
  • 63614bb152 add goroutine leak warning. fiatjaf 2023-08-31 09:18:48 -03:00
  • 446b104990 simplify subscription closing. fiatjaf 2023-08-22 10:41:58 -03:00
  • cd86ee2514 fixes on nip-44 and test vectors. fiatjaf 2023-08-21 16:21:39 -03:00
  • c5bf5892c3 release sub.Events lock when subscription is canceled. fiatjaf 2023-08-21 15:53:27 -03:00
  • 61cd3130fd remove unnecessary json tags from cc5979c. fiatjaf 2023-08-21 15:53:03 -03:00
  • 6155cf4059 remove nip-26. fiatjaf 2023-08-21 15:51:16 -03:00
  • 1d67a8ed87 nip44 initial implementation. fiatjaf 2023-08-18 13:27:55 -03:00
  • ac2350c722 style: using effective go and refactoring Kay 2023-08-21 20:17:25 +08:00
  • abb66db97e fix filter tests. fiatjaf 2023-08-06 20:03:05 -03:00
  • 5a51f84433 pool.QuerySingle() fiatjaf 2023-08-06 19:57:08 -03:00
  • b522d24c30 use a named lock instead of a single per-pool mutex. fiatjaf 2023-08-06 19:54:30 -03:00
  • 2e9cdc8255 dependencies from unsafe conversion stuff. fiatjaf 2023-08-06 19:54:17 -03:00
  • 017816e3dc stop supporting prefix matches. fiatjaf 2023-08-05 10:12:57 -03:00
  • 35faff858a reuse buffer when reading messages from websocket. fiatjaf 2023-07-30 17:12:30 -03:00
  • cfcd19568b unsafe string/bytes conversion on nson. fiatjaf 2023-07-30 17:03:25 -03:00
  • 8bdbcc93eb remove useless util. fiatjaf 2023-07-28 20:53:59 -03:00
  • 53b9dde6e0 relay.Count() fiatjaf 2023-07-18 16:17:00 -03:00
  • 6cee628149 rename debugLog->debugLogf fiatjaf 2023-07-11 15:25:02 -03:00
  • c03c028142 fix: don't stop reading the websocket for no reason! fiatjaf 2023-07-11 15:23:48 -03:00
  • 6e79f72174 prevent halting in some other places. fiatjaf 2023-07-11 11:04:48 -03:00
  • f6dddfd770 CountEnvelope. fiatjaf 2023-07-10 20:52:49 -03:00
  • c0c20b8401 validate and normalize relay urls received from kind 3 and 10002. fiatjaf 2023-07-08 08:16:30 -03:00
  • 82a51f149a prevent halting on SubManyEose. fiatjaf 2023-07-08 08:15:34 -03:00
  • 9b2b3b9039 inbox-outbox relay barebones helpers on sdk package. fiatjaf 2023-07-08 07:50:54 -03:00
  • 62e0068373 add readme. fiatjaf 2023-07-05 13:50:41 -03:00
  • cfdfba3bdd add benchmarks. fiatjaf 2023-07-05 13:48:14 -03:00
  • 7ba3844a6f nson: test encoder with events from the wild. fiatjaf 2023-07-05 08:42:36 -03:00
  • 6f03e6b82c nson: more test events. fiatjaf 2023-07-05 08:27:00 -03:00
  • db22f132f4 nson: assign constants and fix bugs so tests pass. fiatjaf 2023-07-04 20:32:06 -03:00
  • f55bb2f07b porting nson from nostr-benchmarks codebase. fiatjaf 2023-07-04 18:17:31 -03:00
  • 16580f3e84 InsertEventIntoDescendingList() helper. fiatjaf 2023-07-04 17:57:21 -03:00
  • 6b625f7896 handle OK callbacks properly when there is not a "reason" (which is the expected behavior). fiatjaf 2023-06-26 21:00:33 -03:00
  • 1f38213b3f update auth example on readme to v0.19 fiatjaf 2023-06-25 18:01:25 -03:00
  • 71f4594033 wait when CLOSEing. fiatjaf 2023-06-25 12:56:17 -03:00
  • 3b44ab9381 refactor these tests to ensure nested subscriptions are not blocking each other. fiatjaf 2023-06-25 00:17:57 -03:00
  • 54d3de4908 refactor some things, add back one mutex for each subscription for dispatching events, but in a cleaner way. fiatjaf 2023-06-25 00:17:39 -03:00
  • a7964ae675 nested subscription test. fiatjaf 2023-06-24 21:02:12 -03:00
  • ac0c0769fe disentangle things a little more. fiatjaf 2023-06-23 16:22:57 -03:00
  • f0a35d7ab2 Write returns an error in a channel (why? I think it makes no difference.) fiatjaf 2023-06-22 10:46:31 -03:00
  • f78270765d prevent halting when a relay gets disconnected. fiatjaf 2023-06-22 10:45:45 -03:00
  • fd409f6c35 add closure queue channel that was missing. fiatjaf 2023-06-22 09:32:12 -03:00
  • 68648a16b9 remove conn field from subscription. fiatjaf 2023-06-22 09:12:35 -03:00
  • 030c1d1898 get rid of mutexes and use a single loop to prevent races. fiatjaf 2023-06-21 19:55:40 -03:00
  • af4fc98fc2 stop decoding strings unsafely. fiatjaf 2023-06-21 13:03:43 -03:00
  • b984a598cb Fix panic in ParseMessage boreq 2023-06-20 14:05:57 +02:00
  • f4102ea8d2 add icon to RelayInformationDocument Yasuhiro Matsumoto 2023-06-20 23:55:23 +09:00
  • 5bbb6ba05b add empty tags field if nil before signing. fiatjaf 2023-06-13 09:36:38 -03:00
  • 58d56abe05 fix: removing redundancy Isaque Veras 2023-06-11 10:48:46 -03:00
  • ee8f58360f print all filters when doesn't match. fiatjaf 2023-06-09 16:11:16 -03:00
  • f37eb96f28 rename KindBoost to KindRepost. fiatjaf 2023-06-09 13:54:07 -03:00
  • a80965425b comment out info log for when we get an event outside of a subscription. fiatjaf 2023-06-09 13:49:27 -03:00
  • bc783a3a24 fix atomicity of subscription ids. fiatjaf 2023-06-09 11:01:42 -03:00
  • b7ec430166 Fix GetImmediateReply Daniele Tonon 2023-05-31 00:10:37 +02:00
  • 9cafea7e2a ensure relay context and subscriptions are closed when we lose connectivity. fiatjaf 2023-05-30 17:44:25 -03:00
  • 19d96e3566 close SubMany channel when all underlying subscriptions die. fiatjaf 2023-05-30 16:11:33 -03:00
  • a2941876e3 expose subscriptions from relay and keep that updated. fiatjaf 2023-05-30 14:55:44 -03:00
  • 0f7a3f01f2 use an atomic counter. fiatjaf 2023-05-30 14:01:07 -03:00
  • 39f09e6bb9 replace generic-sync-map with xsync. fiatjaf 2023-05-30 13:52:14 -03:00
  • ad0f73fa9c ensure subscription dies if the relay connection dies. fiatjaf 2023-05-30 13:47:47 -03:00
  • 5cead32fbe remove extra subscription after publishing an event to check if it is there. fiatjaf 2023-05-30 13:45:05 -03:00
  • 1cd2c0293d add a bunch more of event kinds. fiatjaf 2023-05-28 15:44:17 -03:00
  • b269dd9ce9 sdk: return start and end on references for replacement. fiatjaf 2023-05-26 18:04:36 -03:00
  • 5c0f8bff83 Add fields to ProfileMetadata Daniele Tonon 2023-05-25 13:00:17 +02:00
  • 123d3a6a9a Add error capture to authentication status in relay.Auth starcorn2020 2023-05-14 21:02:18 +08:00
  • fa00133825 websocket to send text, not binary. fiatjaf 2023-05-11 10:09:43 -03:00
  • 0c06788672 oops: stop replacing connectionContext with Connect(ctx). fiatjaf 2023-05-10 09:07:51 -03:00
  • 9dc674bc02 use different contexts for the relay connection lifetime and the Connect() call. fiatjaf 2023-05-09 17:08:04 -03:00
  • ccbb44989f get rid of WriteJSON() and replace calls with manually marshaled envelopes. fiatjaf 2023-05-09 17:02:22 -03:00