mirror of
https://github.com/scsibug/nostr-rs-relay.git
synced 2024-12-22 08:25:52 -05:00
chore: typos
This commit is contained in:
parent
087b68128f
commit
06fcaad9a1
|
@ -10,7 +10,7 @@ and reduce spam and abuse.
|
|||
|
||||
This will likely evolve substantially, the first goal is to get a
|
||||
basic one-way service that lets an externalized program decide on
|
||||
event persistance. This does not represent the final state of gRPC
|
||||
event persistence. This does not represent the final state of gRPC
|
||||
extensibility in `nostr-rs-relay`.
|
||||
|
||||
## Considerations
|
||||
|
|
|
@ -33,7 +33,7 @@ The LNBits instance must have a signed HTTPS a self signed certificate will not
|
|||
|
||||
### Concepts
|
||||
|
||||
All authors are initially not admitted to write to the relay. There are two ways to gain access write to the relay. The first is by attempting to post the the relay, upon receiving an event from an author that is not admitted, the relay will send a direct message including the terms of service of the relay and a lighting invoice for the admission cost. Once this invoice is payed the author can write to the relay. For this method to work the author must be reading from the relay. An author can also pay and accept the terms of service via a webpage `https://<relay-url>/join`.
|
||||
All authors are initially not admitted to write to the relay. There are two ways to gain access write to the relay. The first is by attempting to post the the relay, upon receiving an event from an author that is not admitted, the relay will send a direct message including the terms of service of the relay and a lighting invoice for the admission cost. Once this invoice is paid the author can write to the relay. For this method to work the author must be reading from the relay. An author can also pay and accept the terms of service via a webpage `https://<relay-url>/join`.
|
||||
|
||||
## Design Details
|
||||
|
||||
|
|
|
@ -117,9 +117,9 @@ Assumptions:
|
|||
|
||||
* `Traefik` version is `2.9` (other versions not tested).
|
||||
* `Traefik` is used for provisioning of Let's Encrypt certificates.
|
||||
* `Traefik` is running in `Docker`, using `docker compose` and labels for the static configuration. An equivalent setup useing a Traefik config file is possible too (but not covered here).
|
||||
* `Traefik` is running in `Docker`, using `docker compose` and labels for the static configuration. An equivalent setup using a Traefik config file is possible too (but not covered here).
|
||||
* Strict Transport Security is enabled.
|
||||
* Hostname for the relay is `relay.example.com`, email adres for ACME certificates provider is `name@example.com`.
|
||||
* Hostname for the relay is `relay.example.com`, email address for ACME certificates provider is `name@example.com`.
|
||||
* ipv6 is enabled, a viable private ipv6 subnet is specified in the example below.
|
||||
* Relay is running on port `8080`.
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ Start by building the application from source. Here is how to do that:
|
|||
3. `cargo build --release`
|
||||
|
||||
### Place the files where they belong
|
||||
We want to palce the nostr-rs-relay binary and the config.toml file where they belong. While still in the root level of the nostr-rs-relay folder you cloned in last step, run the following commands:
|
||||
We want to place the nostr-rs-relay binary and the config.toml file where they belong. While still in the root level of the nostr-rs-relay folder you cloned in last step, run the following commands:
|
||||
1. `sudo cp target/release/nostr-rs-relay /usr/local/bin/`
|
||||
2. `sudo mkdir /etc/nostr-rs-relay`
|
||||
2. `sudo cp config.toml /etc/nostr-rs-relay`
|
||||
|
|
|
@ -179,7 +179,7 @@ attempts to persist them to disk. Once validated and persisted, these
|
|||
events are broadcast to all subscribers.
|
||||
|
||||
When verification is enabled, the writer must check to ensure a valid,
|
||||
unexpired verification record exists for the auther. All metadata
|
||||
unexpired verification record exists for the author. All metadata
|
||||
events (regardless of verification status) are forwarded to a verifier
|
||||
module. If the verifier determines a new verification record is
|
||||
needed, it is also responsible for persisting and broadcasting the
|
||||
|
|
|
@ -14,6 +14,6 @@ pub mod notice;
|
|||
pub mod repo;
|
||||
pub mod subscription;
|
||||
pub mod utils;
|
||||
// Public API for creating relays programatically
|
||||
// Public API for creating relays programmatically
|
||||
pub mod payment;
|
||||
pub mod server;
|
||||
|
|
|
@ -130,7 +130,7 @@ impl Payment {
|
|||
}
|
||||
}
|
||||
|
||||
/// Internal select loop for preforming payment operatons
|
||||
/// Internal select loop for preforming payment operations
|
||||
async fn run_internal(&mut self) -> Result<()> {
|
||||
tokio::select! {
|
||||
m = self.payment_rx.recv() => {
|
||||
|
|
|
@ -123,7 +123,7 @@ CREATE TABLE "tag" (
|
|||
CREATE INDEX tag_event_id_idx ON tag USING btree (event_id, name);
|
||||
CREATE INDEX tag_value_idx ON tag USING btree (value);
|
||||
|
||||
-- NIP-05 Verfication table
|
||||
-- NIP-05 Verification table
|
||||
CREATE TABLE "user_verification" (
|
||||
id int8 NOT NULL GENERATED BY DEFAULT AS IDENTITY,
|
||||
event_id bytea NOT NULL,
|
||||
|
|
|
@ -978,7 +978,7 @@ fn query_from_filter(f: &ReqFilter) -> (String, Vec<Box<dyn ToSql>>, Option<Stri
|
|||
return (empty_query, empty_params, None);
|
||||
}
|
||||
|
||||
// check if the index needs to be overriden
|
||||
// check if the index needs to be overridden
|
||||
let idx_name = override_index(f);
|
||||
let idx_stmt = idx_name
|
||||
.as_ref()
|
||||
|
|
|
@ -827,7 +827,7 @@ pub fn start_server(settings: &Settings, shutdown_rx: MpscReceiver<()>) -> Resul
|
|||
info!("listening on: {}", socket_addr);
|
||||
// all client-submitted valid events are broadcast to every
|
||||
// other client on this channel. This should be large enough
|
||||
// to accomodate slower readers (messages are dropped if
|
||||
// to accommodate slower readers (messages are dropped if
|
||||
// clients can not keep up).
|
||||
let (bcast_tx, _) = broadcast::channel::<Event>(broadcast_buffer_limit);
|
||||
// validated events that need to be persisted are sent to the
|
||||
|
|
|
@ -188,7 +188,7 @@ impl<'de> Deserialize<'de> for Subscription {
|
|||
D: Deserializer<'de>,
|
||||
{
|
||||
let mut v: Value = Deserialize::deserialize(deserializer)?;
|
||||
// this shoud be a 3-or-more element array.
|
||||
// this should be a 3-or-more element array.
|
||||
// verify the first element is a String, REQ
|
||||
// get the subscription from the second element.
|
||||
// convert each of the remaining objects into filters
|
||||
|
|
Loading…
Reference in New Issue
Block a user