fiatjaf
765f16f86a
update sonic so it works with go1.24
v0.50.4
2025-03-07 16:31:10 -03:00
fiatjaf
7c57ad860a
add more ParseMessage tests.
2025-03-07 15:50:55 -03:00
fiatjaf
8d7e854779
some fixes to sonic and make it faster by reusing arrays.
...
BenchmarkParseMessage/relay/jsonstdlib-4 216 5651451 ns/op
BenchmarkParseMessage/relay/easyjson-4 313 3703457 ns/op
BenchmarkParseMessage/relay/simdjson-4 469 2606309 ns/op
BenchmarkParseMessage/relay/sonic-4 966 1268594 ns/op
BenchmarkParseMessage/client/jsonstdlib-4 216 5524239 ns/op
BenchmarkParseMessage/client/easyjson-4 422 2756370 ns/op
BenchmarkParseMessage/client/simdjson-4 519 2298477 ns/op
BenchmarkParseMessage/client/sonic-4 644 1860583 ns/op
2025-03-07 15:38:22 -03:00
fiatjaf
39bde22639
sonic ast visitor approach. now we're getting faster.
...
BenchmarkParseMessage/relay/jsonstdlib-4 206 8630635 ns/op
BenchmarkParseMessage/relay/easyjson-4 278 4311793 ns/op
BenchmarkParseMessage/relay/simdjson-4 422 2943387 ns/op
BenchmarkParseMessage/relay/sonic-4 849 1576884 ns/op
BenchmarkParseMessage/client/jsonstdlib-4 196 6140585 ns/op
BenchmarkParseMessage/client/easyjson-4 385 2826706 ns/op
BenchmarkParseMessage/client/simdjson-4 405 2628675 ns/op
BenchmarkParseMessage/client/sonic-4 552 2413731 ns/op
2025-03-07 11:03:09 -03:00
fiatjaf
cb74908f5d
use base64x everywhere instead of encoding/base64.
2025-03-07 10:06:46 -03:00
Daniel D’Aquino
8140857879
nipb0: Add authorization headers to Blossom downloads
v0.50.3
2025-03-06 22:28:24 -03:00
fiatjaf
c9411a3c5b
depressing sonic json decoder implementation, breakingly force COUNT to use a single filter, reorganize envelope tests.
2025-03-06 19:34:36 -03:00
fiatjaf
ec55b1fac8
nip19: decode to pointer.
2025-03-06 11:49:10 -03:00
fiatjaf
4fb6fcd9a2
make simdjson great again.
...
now it is generally a little faster than the easyjson approach.
goos: linux
goarch: amd64
pkg: github.com/nbd-wtf/go-nostr
cpu: AMD Ryzen 3 3200G with Radeon Vega Graphics
BenchmarkParseMessage/stdlib-4 90 15616341 ns/op
BenchmarkParseMessage/easyjson-4 110 11306466 ns/op
BenchmarkParseMessage/simdjson-4 162 7779856 ns/op
PASS
ok github.com/nbd-wtf/go-nostr 5.547s
2025-03-05 23:56:15 -03:00
fiatjaf
de358e641c
use bytes.Equal() instead of slices.Equal() on simdjson readers.
2025-03-05 22:37:39 -03:00
fiatjaf
535f62cec9
nip90: list all available jobs, update dvm definitions a little bit.
2025-03-05 19:44:40 -03:00
fiatjaf
eaec35c156
nip90: improve autogeneration, replace ag and awk with rg.
v0.50.2
2025-03-05 11:40:52 -03:00
fiatjaf
1090fbb0b6
nip90: autogenerated dvm kinds from https://github.com/nostr-protocol/data-vending-machines
2025-03-05 11:13:08 -03:00
fiatjaf
b3b8d5804d
nipb0: fixes to blossom.
v0.50.1
2025-03-04 19:20:11 -03:00
fiatjaf
2865cccc46
keyer: add ReadOnlySigner.
2025-03-04 18:06:18 -03:00
fiatjaf
5bafd1c778
add nipb0/blossom helpers.
2025-03-04 12:42:24 -03:00
fiatjaf
5bfaed2740
docstrings for many functions.
2025-03-04 11:42:44 -03:00
fiatjaf
a82780e82e
fix these simdjson benchmarks so others can run them.
2025-02-26 17:12:49 -03:00
fiatjaf
be2fe4a019
do not make the simd stuff a requirement for Envelope.
2025-02-25 18:23:38 -03:00
fiatjaf
201abf231b
fix nip11 tests again because jellyfish.land is gone.
2025-02-25 18:23:19 -03:00
fiatjaf
c82b0831e2
depressing simdjson-go benchmarks.
2025-02-25 18:18:31 -03:00
fiatjaf
56e9a5a709
implement envelope, event and filter parsing with simdjson-go.
2025-02-25 17:57:15 -03:00
fiatjaf
6d8cd55784
fix and use a supposedly much faster library on NormalizeURL(), it's slightly less tolerant with stupidly-formed URLs.
2025-02-25 09:55:19 -03:00
fiatjaf
7e06354b6f
nip11: catch invalid/small urls.
2025-02-25 08:26:59 -03:00
fiatjaf
c98b2ea67e
nip23: support tables.
2025-02-23 06:51:15 -03:00
fiatjaf
6be0541653
nip19: EncodePointer()
v0.50.0
2025-02-17 16:00:08 -03:00
fiatjaf
fec4524324
sdk: FetchSpecificEvent() takes options.
2025-02-16 18:45:29 -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
b437cc6a1f
remove useless noswhere.com from list of id-only relays.
2025-02-16 11:53:41 -03:00
fiatjaf
1685a3ae09
Pointer.AsFilter()
2025-02-16 11:53:26 -03:00
fiatjaf
6f5737a763
pointers from tags helpers.
2025-02-13 23:05:39 -03:00
fiatjaf
c37ed1a309
pool: deprecate methods that take more than one filter.
2025-02-12 16:28:35 -03:00
fiatjaf
332a1642f0
nip77: FetchIDsOnly()
v0.49.7
2025-02-12 15:45:52 -03:00
fiatjaf
1f36d7a9f1
increase websocket message limit to an absurd of 33MB.
2025-02-12 15:42:00 -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
v0.49.6
2025-02-12 14:32:33 -03:00
fiatjaf
3de002aca1
sdk: only instantiate caches by default when they are necessary.
2025-02-11 14:23:31 -03:00
Kay
7189cd7e02
add banner to nip-11.
2025-02-10 09:28:23 -03:00
fiatjaf
a8d6e1f37f
sdk: adjust test expected relay.
2025-02-09 18:12:27 -03:00
fiatjaf
d07cccdd45
nip27 parsing improved (and with nip08 support removed) in its own package.
2025-02-09 18:01:45 -03:00
Kay
7df4cdcb4f
nip-86: stat.
2025-02-08 09:51:17 -03:00
Kay
fcc231e9d7
nip-86: update methods.
2025-02-08 09:51:17 -03:00
fiatjaf
fcf01fcbf6
pool's PaginatorWithTimeout() helper.
v0.49.5
2025-02-07 18:02:34 -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
1b31dd892e
nip61: verify dleq and sum tokens from nutzaps.
2025-02-06 15:03:09 -03:00
fiatjaf
bce95327d4
nip60: expose ParseKeysetKeys()
2025-02-06 15:02:49 -03:00
fiatjaf
41b7261735
nip60: upon receive do not swap into mints unless explicitly asked for.
2025-02-05 16:33:10 -03:00
fiatjaf
0330c198fb
nip60: expose GetSatoshisAmountFromBolt11() helper.
v0.49.4
2025-02-05 13:20:41 -03:00
fiatjaf
26da7967dc
sdk: decrease interval between replaceable lists and sets refetch attempts conditionally.
2025-02-04 19:27:57 -03:00