Greg Heartsfield
e894a86566
docs: NIP-15, NIP-16 feature notes in README
2022-07-04 13:10:48 -05:00
Greg Heartsfield
bedc378624
improvement: upgrade multiple dependencies
...
Updating async-trait v0.1.53 -> v0.1.56
Updating bumpalo v3.9.1 -> v3.10.0
Updating crossbeam-utils v0.8.8 -> v0.8.10
Updating crypto-common v0.1.3 -> v0.1.4
Updating getrandom v0.2.6 -> v0.2.7
Updating http v0.2.7 -> v0.2.8
Updating indexmap v1.8.2 -> v1.9.1
Updating js-sys v0.3.57 -> v0.3.58
Updating linked-hash-map v0.5.4 -> v0.5.6
Updating mio v0.8.3 -> v0.8.4
Updating once_cell v1.12.0 -> v1.12.1
Updating openssl-sys v0.9.73 -> v0.9.74
Removing parking_lot v0.11.2
Removing parking_lot_core v0.8.5
Updating proc-macro2 v1.0.39 -> v1.0.40
Updating quote v1.0.18 -> v1.0.20
Updating r2d2 v0.8.9 -> v0.8.10
Updating ron v0.7.0 -> v0.7.1
Updating serde v1.0.137 -> v1.0.138
Updating serde_derive v1.0.137 -> v1.0.138
Updating serde_json v1.0.81 -> v1.0.82
Updating smallvec v1.8.0 -> v1.9.0
Updating syn v1.0.95 -> v1.0.98
Updating tokio v1.18.2 -> v1.19.2
Updating tokio-macros v1.7.0 -> v1.8.0
Updating tokio-util v0.7.2 -> v0.7.3
Updating tower-service v0.3.1 -> v0.3.2
Updating tracing v0.1.34 -> v0.1.35
Removing tracing-attributes v0.1.21
Updating tracing-core v0.1.26 -> v0.1.28
Updating unicode-ident v1.0.0 -> v1.0.1
Updating unicode-normalization v0.1.19 -> v0.1.21
Updating wasm-bindgen v0.2.80 -> v0.2.81
Updating wasm-bindgen-backend v0.2.80 -> v0.2.81
Updating wasm-bindgen-macro v0.2.80 -> v0.2.81
Updating wasm-bindgen-macro-support v0.2.80 -> v0.2.81
Updating wasm-bindgen-shared v0.2.80 -> v0.2.81
Updating web-sys v0.3.57 -> v0.3.58
2022-07-04 12:56:10 -05:00
Greg Heartsfield
e1c2a6b758
improvement: upgrade docker base image
2022-05-30 21:53:46 -05:00
Greg Heartsfield
990bb656e8
improvement: upgrade multiple dependencies
...
Cargo updated the following dependencies:
Updating dashmap v5.3.3 -> v5.3.4
Updating http-body v0.4.4 -> v0.4.5
Updating hyper v0.14.18 -> v0.14.19
Updating indexmap v1.8.1 -> v1.8.2
Updating itoa v1.0.1 -> v1.0.2
Updating libc v0.2.125 -> v0.2.126
Updating once_cell v1.10.0 -> v1.12.0
Updating parking_lot v0.12.0 -> v0.12.1
Updating proc-macro2 v1.0.38 -> v1.0.39
Updating regex v1.5.5 -> v1.5.6
Updating regex-syntax v0.6.25 -> v0.6.26
Updating ryu v1.0.9 -> v1.0.10
Updating schannel v0.1.19 -> v0.1.20
Updating scheduled-thread-pool v0.2.5 -> v0.2.6
Updating syn v1.0.93 -> v1.0.95
Updating tokio-util v0.7.1 -> v0.7.2
Adding unicode-ident v1.0.0
Removing unicode-xid v0.2.3
2022-05-30 21:47:24 -05:00
Greg Heartsfield
538d139ebf
improvement: upgrade docker base image
2022-05-10 21:24:22 -05:00
Greg Heartsfield
23f7730fea
build: bump version to 0.6.0
2022-05-10 21:19:21 -05:00
Greg Heartsfield
8aa1256254
improvement: upgrade multiple dependencies
2022-05-10 17:07:18 -05:00
Greg Heartsfield
9ed3391b46
fix(NIP-09): correct WHERE clause for event deletion
2022-05-10 16:50:52 -05:00
Greg Heartsfield
9b351aab9b
docs: update devel discussion link
2022-02-28 17:19:24 -06:00
Greg Heartsfield
597749890e
improvement: remove unnecessary event logging
2022-02-27 19:30:48 -06:00
Greg Heartsfield
1d499cf12b
feat: handle NIP-09 for deletion events
2022-02-27 11:35:23 -06:00
Greg Heartsfield
ed3a6b9692
refactor: simplify NOTICE messages
2022-02-26 17:34:58 -06:00
Greg Heartsfield
048199e30b
build: bump version to 0.5.2
2022-02-26 11:22:16 -06:00
Greg Heartsfield
414e83f696
refactor: import cleanup for config
2022-02-26 11:16:12 -06:00
Greg Heartsfield
225c8f762e
improvement: upgrade dependencies; config, tungstenite, tokio
2022-02-26 09:55:12 -06:00
Greg Heartsfield
887fc28ab2
fix: until filters in subscriptions now used
2022-02-26 09:15:45 -06:00
Greg Heartsfield
294d3b99c3
fix: correct imports for test cases
2022-02-26 09:07:07 -06:00
Greg Heartsfield
53990672ae
improvement: move db pool operations closer to query, do not panic on failure
2022-02-23 16:38:16 -06:00
Greg Heartsfield
9c1b21cbfe
improvement: more granular perf logging for SQL queries
2022-02-21 09:03:05 -06:00
Greg Heartsfield
2f63417646
improvement: better logging for connection resets
2022-02-21 08:57:07 -06:00
Greg Heartsfield
3b25160852
fix: abort on connection IO errors
2022-02-21 08:50:46 -06:00
Greg Heartsfield
34ad549cde
fix: update event buffer size comment in config
2022-02-20 11:46:24 -06:00
Greg Heartsfield
f8b1fe5035
docs: line up comments with code
2022-02-17 16:18:05 -06:00
Greg Heartsfield
f2001dc34a
build: bump version to 0.5.1
2022-02-13 09:38:45 -06:00
Greg Heartsfield
b593001229
fix: remove setting from example config
2022-02-13 09:37:05 -06:00
Greg Heartsfield
5913b9f87a
feat: send notices when authorization checks fail
2022-02-13 09:35:54 -06:00
Greg Heartsfield
77f35f9f43
feat: server-side pings and disconnects
2022-02-12 16:57:26 -06:00
Greg Heartsfield
9e06cc9482
improvement: better error messages on parse failures
2022-02-12 16:33:29 -06:00
Greg Heartsfield
e66fa4ac42
refactor: remove unnecessary Option wrapping
2022-02-12 16:29:27 -06:00
Greg Heartsfield
99e117f620
improvement: better handling of out-of-protocol messages
2022-02-12 16:26:55 -06:00
Greg Heartsfield
8250e00f05
fix: remove protostream module, and missing NOTICE
2022-02-12 16:22:12 -06:00
Greg Heartsfield
c9f87ec563
docs: NIP-05 feature note in README
2022-02-12 16:19:46 -06:00
Greg Heartsfield
ceaa01e8b4
fix: removed manual nostr stream, so websocket pings work
2022-02-12 16:19:10 -06:00
Greg Heartsfield
bc68cd0c74
build: bump version to 0.5.0
2022-02-12 14:10:44 -06:00
Greg Heartsfield
97589006fa
improvement: upgrade dependencies
2022-02-12 14:10:03 -06:00
Greg Heartsfield
e31d0729f2
chore: comment cleanup
2022-02-12 13:49:52 -06:00
Greg Heartsfield
89d96e7ccd
improvement: upgraded database schema to drop legacy tables
...
Database schema is upgraded to version 5. Legacy event and pubkey
tables are dropped, and indexes are added for NIP-05 verification.
2022-02-12 13:47:03 -06:00
Greg Heartsfield
7056aae227
refactor: create schema module
2022-02-12 09:58:42 -06:00
Greg Heartsfield
753df47443
refactor: create utils/hexrange utility modules
2022-02-12 09:29:38 -06:00
Greg Heartsfield
26a0ce2b32
docs: function/struct comments
2022-02-12 09:29:35 -06:00
Greg Heartsfield
fa66a0265e
docs: module headers
2022-02-12 09:29:31 -06:00
Greg Heartsfield
234a8ba0ac
feat: limit event publishing to NIP-05 verified users
...
This adds a new configurable feature to restrict event publishing to
only users with NIP-05 verified metadata. Domains can be whitelisted
or blacklisted. Verification expiration and schedules are
configurable.
This upgrades the database to add a table for tracking verification
records.
2022-02-12 09:29:25 -06:00
Greg Heartsfield
f679fa0893
build: bump version to 0.4.2
2022-01-30 15:19:41 -06:00
Greg Heartsfield
4cc313fa2d
fix: cleanup database connections with same name
...
When a large number of subscriptions is created with identical names,
we do not send a signal over the abandon-read channel. This
eventually leads to resource exhaustion.
2022-01-30 15:14:02 -06:00
Greg Heartsfield
6502f7dcd7
fix: do not panic when validating events with malformed pubkeys
2022-01-29 13:19:34 -06:00
Greg Heartsfield
6ca3e3ffea
build: bump version to 0.4.1
2022-01-26 21:48:44 -06:00
Greg Heartsfield
49c668a07c
improvement: upgrade dependency (h2)
2022-01-26 21:48:11 -06:00
Greg Heartsfield
98c6fa6f39
feat: allow whitelisting of pubkeys for new events
...
This adds a configuration option, `authorization.pubkey_whitelist`
which is an array of pubkeys that are allowed to publish events on
this relay.
2022-01-26 21:39:03 -06:00
Greg Heartsfield
452bbbb0e5
docs: update feature list (NIP-12, prefix search)
2022-01-26 07:24:04 -06:00
Greg Heartsfield
ee0de6f875
improvement: clearer and less verbose database logging
2022-01-25 21:42:43 -06:00
Greg Heartsfield
699489ebaf
build: bump version to 0.4.0
2022-01-25 20:56:00 -06:00
Greg Heartsfield
af9da65f71
improvement: upgrade dependencies
2022-01-25 20:55:29 -06:00
Greg Heartsfield
a72eaec3b8
fix: never display hidden events
2022-01-25 20:48:46 -06:00
Greg Heartsfield
f1206e76f2
feat: database reader connection pooling
...
Added connection pooling for queries, as well as basic configuration
options for min/max connections.
2022-01-25 20:39:24 -06:00
Greg Heartsfield
af453548ee
feat: allow author and event id prefix search
...
This is an experimental non-NIP feature that allows a subscription
filter to include a prefix for authors and events.
2022-01-25 18:23:08 -06:00
Greg Heartsfield
df251c821c
docs: updated discord invite link
2022-01-25 07:43:15 -06:00
Greg Heartsfield
2d28a95ff7
feat: allow arbitrary tag queries
...
This is an experimental feature, outside of any NIP, that demonstrates
generic tag queries.
Instead of limiting subscription filters to just querying only "e" or
"p" tags (via `#e` or `#p` attributes), any tag can be queried.
As an example, consider an event which uses a tag "url". With this
modification, a subscription filter could add a top-level field
"#url", with an array of strings as the key. Exact matches would be
returned.
A NIP is forthcoming to formalize this.
2022-01-22 21:29:15 -06:00
Greg Heartsfield
8c93ef5bc2
docs: provide public docker hub link
2022-01-20 22:02:42 -06:00
Greg Heartsfield
1c0fc1326d
docs: add timeout for reverse-proxy example
2022-01-19 21:19:12 -06:00
Greg Heartsfield
81e4e2b892
feat: add supported NIPs (2, 11) to relay info
2022-01-16 08:37:21 -06:00
Greg Heartsfield
6f166433b5
fix: test failures
2022-01-16 08:36:52 -06:00
Greg Heartsfield
030b64de62
feat: replace email with contact field in relay info.
...
This finalizes the NIP-11 spec implementation.
Fixes https://todo.sr.ht/~gheartsfield/nostr-rs-relay/21 .
2022-01-16 08:34:19 -06:00
Greg Heartsfield
c7eadb1154
Add feature list to README
2022-01-16 08:16:42 -06:00
Greg Heartsfield
62dc77369d
docs: rename example relay server
2022-01-15 11:43:12 -06:00
Greg Heartsfield
24587435ca
docs: reverse proxy example
2022-01-15 11:41:31 -06:00
Greg Heartsfield
a3124ccea4
improvement: better sql error handling
2022-01-15 09:42:53 -06:00
Greg Heartsfield
4e51e61d16
improvement: display rate limit messages max once per sec
2022-01-15 09:42:17 -06:00
Greg Heartsfield
da7968efef
fix: restore working websocket message size configuration options
2022-01-05 17:41:12 -05:00
Greg Heartsfield
7037555516
improvement: add indexed tag queries
2022-01-05 17:33:53 -05:00
Greg Heartsfield
19ed990c57
refactor: fix clippy errors for relay info response
2022-01-05 10:10:44 -05:00
Greg Heartsfield
d78bbfc290
build: bump version to 0.3.3
2022-01-03 22:07:15 -05:00
Greg Heartsfield
2924da88bc
feat: incorporated improvements from NIP-11 discussion
...
Change descr to description. Add `id` for websocket URL. Use
integers for supported NIPs instead of strings. Top-level is object,
instead of the array before.
2022-01-03 22:03:30 -05:00
Greg Heartsfield
3024e9fba4
build: bump version to 0.3.2
2022-01-03 18:43:17 -05:00
Greg Heartsfield
d3da4eb009
feat: implementation of proposed NIP-11 (server metadata)
2022-01-03 18:42:24 -05:00
Greg Heartsfield
19637d612e
build: bump version to 0.3.1
2022-01-01 19:26:15 -06:00
Greg Heartsfield
afc9a0096a
improvement: logging failed queries and timing
2022-01-01 19:25:09 -06:00
Greg Heartsfield
3d56262386
build: bump version to 0.3.0
2022-01-01 18:40:57 -06:00
Greg Heartsfield
6673fcfd11
feat: implement multi-valued filter searching
...
NIP-01 now uses arrays instead of scalars.
Fixes https://todo.sr.ht/~gheartsfield/nostr-rs-relay/17
2022-01-01 18:38:52 -06:00
Greg Heartsfield
b5da3fa2b0
docs: link to docker hub
2022-01-01 12:27:09 -06:00
Greg Heartsfield
850957213e
build: bump version to 0.2.3
2022-01-01 09:13:13 -06:00
Greg Heartsfield
1aa5a5458d
improvement: event signature validation is 100x faster
...
Switched to latest (git) release of secp256k1, which has more
efficient verification-only context for Schnorr. Switched to single
pre-instantiated instance of the verifier.
2022-01-01 09:08:19 -06:00
Greg Heartsfield
620e227699
fix: connection issues with Firefox
...
This adds Hyper, and a 200 response code. Prior to this, Firefox
would fail to connect. There is also a text document displayed at the
root URL to indicate this is a Nostr relay.
Fixes https://todo.sr.ht/~gheartsfield/nostr-rs-relay/15
2022-01-01 08:11:20 -06:00
Greg Heartsfield
14e59ed278
build: bump version to 0.2.2
2021-12-31 16:34:52 -06:00
Greg Heartsfield
5ad383f257
fix: incorrect logic on empty filters for hidden events
2021-12-31 16:34:10 -06:00
Greg Heartsfield
9710ea27aa
build: bump version to 0.2.1
2021-12-31 15:38:58 -06:00
Greg Heartsfield
783a6e1042
docs: fix docker examples
2021-12-31 15:28:26 -06:00
Greg Heartsfield
4171a8870e
feat: reject events that are too large
...
A new configuration setting controls the maximum size of event
messages, and sends a notice to the client if they exceed it.
Fixes https://todo.sr.ht/~gheartsfield/nostr-rs-relay/14
2021-12-31 15:19:35 -06:00
Greg Heartsfield
8f3891c781
docs: docker and config updates
2021-12-31 14:08:04 -06:00
Greg Heartsfield
415d32299b
fix: docker run references the correct database file
2021-12-31 14:05:11 -06:00
Greg Heartsfield
5a19a8876f
feat: allow database directory configuration
...
Adds configuration options for database directory, either on command
line through (--db dir-name) or the config.toml file.
Fixes: https://todo.sr.ht/~gheartsfield/nostr-rs-relay/13
2021-12-31 11:51:57 -06:00
Greg Heartsfield
f7f12a7984
build: bump version to 0.2.0
2021-12-30 21:27:48 -06:00
Greg Heartsfield
20ee5a054c
feat: rate limit event creation
...
A configuration option, `messages_per_sec`, imposes a global limit on
the rate for which new events can be stored.
Fixes https://todo.sr.ht/~gheartsfield/nostr-rs-relay/6
2021-12-30 21:07:21 -06:00
Greg Heartsfield
c60519de23
feat: hide older contact update events
...
Type 3 (NIP-02) contact lists are hidden when newer ones are submitted
for the same author.
Fixes https://todo.sr.ht/~gheartsfield/nostr-rs-relay/4
2021-12-30 15:45:03 -06:00
Greg Heartsfield
d72e7a57b6
feat: hide older metadata update events
...
This updates the database schema to support hiding events. In this
case, we are hiding older metadata updates when an author provides an
updated event.
Fixes https://todo.sr.ht/~gheartsfield/nostr-rs-relay/11
2021-12-30 13:55:05 -06:00
Greg Heartsfield
6447ddd974
fix: compile error with missing import
2021-12-30 10:00:34 -06:00
Greg Heartsfield
079722ddd9
improvement: reduce logging level for rejected events
2021-12-30 06:35:36 -06:00
Greg Heartsfield
3302fb2e81
refactor: clippy suggestions
2021-12-29 22:49:46 -06:00
Greg Heartsfield
f415295184
feat: reject future-dated events
...
If configured, reject events than are more than N seconds in the
future.
Fixes https://todo.sr.ht/~gheartsfield/nostr-rs-relay/5
2021-12-29 22:47:31 -06:00
Greg Heartsfield
d730bf0c59
feat: add configuration through file
...
A file named `config.toml` can now be used to load the address, port,
and some websocket configuration settings.
Fixes https://todo.sr.ht/~gheartsfield/nostr-rs-relay/3
2021-12-29 22:13:02 -06:00
Greg Heartsfield
2e2e01203b
build: bump version to 0.1.6
2021-12-23 21:44:12 -06:00