Unfortunately yes. I'll try to add support for negentropy in nostr-rs-relay soon.
Stats obtained from 766072 NIP-65 lists, downloaded from the following relays: Damus, Primal, purplepag and 0xtr. After extracting and deduplicating the data from the lists, the total unique relays are 5735, of which 1341 reachable. Of these, only 219 supports negentropy.
=== Relay Statistics ===
Total known relays: 5735
Reachable relays: 1341/5735 (23.4%)
=== Negentropy Support (NIP77) ===
Total relays: 219/1341 (16.3%)
=== Top 20 implementations ===
1. https://git.sr.ht/~gheartsfield/nostr-rs-relay: 426 (34.8%)
2. git+https://github.com/hoytech/strfry.git: 283 (23.1%)
3. https://github.com/bitvora/haven: 137 (11.2%)
4. https://relay.nostr.band: 52 (4.2%)
5. git+https://github.com/Cameri/nostream.git: 49 (4.0%)
6. https://github.com/bitvora/wot-relay: 35 (2.9%)
7. https://github.com/fiatjaf/khatru: 34 (2.8%)
8. git+https://github.com/cameri/nostream.git: 34 (2.8%)
9. chorus: 12 (1.0%)
10. https://github.com/bitvora/sw2: 9 (0.7%)
11. unknown: 9 (0.7%)
12. https://github.com/rnostr/rnostr: 7 (0.6%)
13. https://github.com/CodyTseng/nostr-relay-tray: 7 (0.6%)
14. NFDB: 6 (0.5%)
15. https://github.com/github-tijlxyz/khatru-pyramid: 6 (0.5%)
16. https://github.com/Spl0itable/nosflare: 6 (0.5%)
17. https://github.com/haorendashu/cfrelay: 6 (0.5%)
18. https://gitlab.com/soapbox-pub/ditto: 6 (0.5%)
19. https://github.com/quentintaranpino/nostrcheck-server: 5 (0.4%)
20. LNbits: 5 (0.4%)
... and 60 more implementations
Source code (experimental): https://github.com/rust-nostr/nostr-stats
Stats obtained from 766072 NIP-65 lists, downloaded from the following relays: Damus, Primal, purplepag and 0xtr. After extracting and deduplicating the data from the lists, the total unique relays are 5735, of which 1341 reachable. Of these, only 219 supports negentropy.
=== Relay Statistics ===
Total known relays: 5735
Reachable relays: 1341/5735 (23.4%)
=== Negentropy Support (NIP77) ===
Total relays: 219/1341 (16.3%)
=== Top 20 implementations ===
1. https://git.sr.ht/~gheartsfield/nostr-rs-relay: 426 (34.8%)
2. git+https://github.com/hoytech/strfry.git: 283 (23.1%)
3. https://github.com/bitvora/haven: 137 (11.2%)
4. https://relay.nostr.band: 52 (4.2%)
5. git+https://github.com/Cameri/nostream.git: 49 (4.0%)
6. https://github.com/bitvora/wot-relay: 35 (2.9%)
7. https://github.com/fiatjaf/khatru: 34 (2.8%)
8. git+https://github.com/cameri/nostream.git: 34 (2.8%)
9. chorus: 12 (1.0%)
10. https://github.com/bitvora/sw2: 9 (0.7%)
11. unknown: 9 (0.7%)
12. https://github.com/rnostr/rnostr: 7 (0.6%)
13. https://github.com/CodyTseng/nostr-relay-tray: 7 (0.6%)
14. NFDB: 6 (0.5%)
15. https://github.com/github-tijlxyz/khatru-pyramid: 6 (0.5%)
16. https://github.com/Spl0itable/nosflare: 6 (0.5%)
17. https://github.com/haorendashu/cfrelay: 6 (0.5%)
18. https://gitlab.com/soapbox-pub/ditto: 6 (0.5%)
19. https://github.com/quentintaranpino/nostrcheck-server: 5 (0.4%)
20. LNbits: 5 (0.4%)
... and 60 more implementations
Source code (experimental): https://github.com/rust-nostr/nostr-stats
Strfry and chorus. I've implemented it also in the nostr-relay-builder.
Use `to_vec` to convert them to an array, so you can iterate them.
As it is written pretty much everywhere, the project is in alpha state, so obviously the documentation is not complete. PRs are welcome to improve it.
To parse a public key (hex, bech32 or nostr URI): `PublicKey.parse`.
I've reworked the NostrParser at https://github.com/rust-nostr/nostr/pull/899
This improves the performance of ~2x and reduces the final binary size.
I'm merge this soon, if anyone is interested in testing or reviewing the PR, please share a feedback!
#rust-nostr #rustnostr
## rust-nostr v0.42 is out! ๐ฆ
### Summary
Blossom, NostrMLS, Relay Monitor, NIP-70 support for relay-builder, NIP-46 reworks, some bug fixes and more!
Note for who is interested in NostrMLS: it's not currently available on https://crates.io as it depends on an unreleased version of openmls. However, you can use it directly from git. The bindings will be available in the upcoming releases.
Full changelog: https://rust-nostr.org/changelog
### Bindings specific changes
Added support for event streaming and extended supported OS and architectures.
New supported platforms for Python, C# and JVM bindings:
- Windows x86 and aarch64
- Linux (GLIBC) x86, armv7 and riscv64
- Linux (MUSL) x86, x86_64, armv7, aarch64 and riscv64
Check all supported OS and architectures at https://rust-nostr.org/sdk/install
### Contributors
Thanks to all contributors!
### Links
#rustnostr #nostr #rustlang #programming #rust #python #csharp #dotnet #javascript #kotlin #swift #flutter
Release v0.42.1 is out, which includes a couple of bug fixes related to NIP-47.
#rustnostr #rust-nostr #rust #rustlang #python #csharp #dotnet #javascript #typescript #kotlin #swift #flutter
## rust-nostr v0.42 is out! ๐ฆ
### Summary
Blossom, NostrMLS, Relay Monitor, NIP-70 support for relay-builder, NIP-46 reworks, some bug fixes and more!
Note for who is interested in NostrMLS: it's not currently available on https://crates.io as it depends on an unreleased version of openmls. However, you can use it directly from git. The bindings will be available in the upcoming releases.
Full changelog: https://rust-nostr.org/changelog
### Bindings specific changes
Added support for event streaming and extended supported OS and architectures.
New supported platforms for Python, C# and JVM bindings:
- Windows x86 and aarch64
- Linux (GLIBC) x86, armv7 and riscv64
- Linux (MUSL) x86, x86_64, armv7, aarch64 and riscv64
Check all supported OS and architectures at https://rust-nostr.org/sdk/install
### Contributors
Thanks to all contributors!
### Links
#rustnostr #nostr #rustlang #programming #rust #python #csharp #dotnet #javascript #kotlin #swift #flutter
Here you can find an example, but it may not be updated to the last version: https://github.com/rust-nostr/nostr-sdk-ffi/blob/ac4d6a8fb8f61b5f3ce3148a99e9f117bcbc0afc/python/examples/bot.py
I'll try add an example in the book soon.
Glad to hear that ๐งก
I'll see what I can do. Currently you can know which relay sent the event by monitoring the notifications (RelayPoolNotification).
I've just published a pre-release for the python nostr-sdk (version `0.42.0a2`), using the ABI3. I've also extended the support to Linux x86, windows x86 and aarch64.
If anyone is interested in trying it, please share a feedback if something doesn't work.
https://pypi.org/project/nostr-sdk/0.42.0a2/
#rust-nostr #rustnostr #python
I wonder if I should write a guide on "Advice for writing Large Rust Programs" in coordination with nostr:npub1xtscya34g58tk0z605fvr788k263gsu6cy9x0mhnm87echrgufzsevkk5s and nostr:npub1drvpzev3syqt0kjrls50050uzf25gehpz9vgdw08hvex7e0vgfeq0eseet and maybe others...
Use 'interior mutability' as often as you can. It will help prevent you from accidentally locking far too much, and it will make the struct Send and Sync so it works nicely with async code.
Nice idea!
Wow it is already part of rust-nostr. Any plans when it will be be available in the python bindings?
When it'll be ready, I'll expose it in nostr-sdk bindings, or more likely in a dedicated library (depending on the impact on the binaries size).
## rust-nostr v0.41 is out! ๐ฆ
### Summary
Added NIP-C0 support and NIP-98 helpers, fixed NIP-32 and NIP-47 implementations, added nostr-keyring crate, extended admission policies for granular control over which relays can connect and which cannot (useful when gossip mode is enabled), enabled POSIX semaphores for LMDB on iOS & macOS to fix issues with App Sandbox, extended arch support for C# and JVM bindings (linux-x86, windows-x86 and windows-arm64) and more!
For those who missed it, from v0.40.0 are available the C# bindings for nostr-sdk: nostr:nevent1qvzqqqqqqypzq6xcz9jerqgqkldy8lpg7lglcyj4g3nwzy2cs6u70wejdaj7csnjqyghwumn8ghj7mn0wd68ytnhd9hx2tcpz9mhxue69uhkummnw3ezuamfdejj7qpq60a39dpp64mhu422q0wd9ztqper0hxhkl4p3qv2mjnrzpvzpf2eq2js3yy
Full changelog: https://rust-nostr.org/changelog
### Contributors
Thanks to all contributors!
* nostr:npub1kuemsj7xryp0uje36dr53scn9mxxh8ema90hw9snu46633n9n2hqp3drjt
### Links
#rustnostr #nostr #rustlang #programming #rust #python #javascript #kotlin #swift #flutter #csharp #dotnet
Nostr.Sdk package for C# is out!
https://www.nuget.org/packages/Nostr.Sdk
Some basic examples are available at https://rust-nostr.org/
#rust-nostr #rustnostr #csharp #dotnet #nostr #devstr #rustlang
According to NIP32, both should be valid
Because I was using SQLite only for persistence. When it was opened, all the data was loaded into RAM, in the DatabaseHelper. It was basically an in-memory database with SQLite as persistence.
Using the NostrDatabase traits, you can implement your own database, and use it in rust-nostr. But if anyone is interested to open a PR to implement a "pure" SQLite backend, I'll merge it.