Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: save event from mirrors #376

Merged
merged 5 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,7 @@ dist
*.env

# Nostr data folder
.nostr
.nostr

# Docker Compose overrides
docker-compose.overrides.yml
2 changes: 2 additions & 0 deletions CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ Running `nostream` for the first time creates the settings file in `<project_roo
| paymentProcessors.lnurl.invoiceURL | [LUD-06 Pay Request](https://github.com/lnurl/luds/blob/luds/06.md) provider URL. (e.g. https://getalby.com/lnurlp/your-username) |
| mirroring.static[].address | Address of mirrored relay. (e.g. ws://100.100.100.100:8008) |
| mirroring.static[].filters | Subscription filters used to mirror. |
| mirroring.static[].limits.event | Event limit overrides for this mirror. See configurations under limits.event. |
| mirroring.static[].skipAdmissionCheck | Disable the admission fee check for events coming from this mirror. |
| mirroring.static[].secret | Secret to pass to relays. Nostream relays only. Optional. |
| workers.count | Number of workers to spin up to handle incoming connections. |
| | Spin workers as many CPUs are available when set to zero. Defaults to zero. |
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18-alpine3.16 as build
FROM node:18-alpine3.16 AS build

WORKDIR /build

Expand Down
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ services:
restart: on-failure
networks:
default:

nostream-db:
image: postgres
container_name: nostream-db
Expand All @@ -96,6 +97,7 @@ services:
timeout: 5s
retries: 5
start_period: 360s

nostream-cache:
image: redis:7.0.5-alpine3.16
container_name: nostream-cache
Expand All @@ -110,6 +112,7 @@ services:
interval: 1s
timeout: 5s
retries: 5

nostream-migrate:
image: node:18-alpine3.16
container_name: nostream-migrate
Expand All @@ -131,7 +134,6 @@ services:
condition: service_healthy
networks:
default:
ipv4_address: 10.10.10.254

networks:
default:
Expand Down
62 changes: 31 additions & 31 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nostream",
"version": "2.0.0",
"version": "2.0.1",
"description": "A Nostr relay written in Typescript.",
"supportedNips": [
1,
Expand Down Expand Up @@ -90,7 +90,7 @@
"@types/ramda": "^0.28.13",
"@types/sinon": "^10.0.11",
"@types/sinon-chai": "^3.2.8",
"@types/ws": "^8.5.3",
"@types/ws": "^8.5.12",
"@typescript-eslint/eslint-plugin": "^5.19.0",
"@typescript-eslint/parser": "^5.19.0",
"chai": "^4.3.6",
Expand All @@ -115,7 +115,7 @@
},
"dependencies": {
"@noble/secp256k1": "1.7.1",
"axios": "1.6.5",
"axios": "^1.7.7",
"bech32": "2.0.0",
"body-parser": "1.20.1",
"debug": "4.3.4",
Expand All @@ -132,7 +132,7 @@
"redis": "4.5.1",
"rxjs": "7.8.0",
"tor-control-ts": "^1.0.0",
"ws": "8.12.0"
"ws": "^8.18.0"
},
"config": {
"commitizen": {
Expand Down
4 changes: 4 additions & 0 deletions src/@types/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ export interface Mirror {
address: string
filters?: SubscriptionFilter[]
secret?: Secret
limits?: {
event?: EventLimits
}
skipAdmissionCheck?: boolean
}

export interface Mirroring {
Expand Down
Loading
Loading