-
Notifications
You must be signed in to change notification settings - Fork 201
Dynamic Configs #199
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
Draft
antonleviathan
wants to merge
7
commits into
main
Choose a base branch
from
197-request-dynamic-config-store-based-for-settings
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Dynamic Configs #199
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c6e90f4
feat: draft dynamic configs
antonleviathan da963fe
fix: don't pulverize all events in the db
antonleviathan e5c070b
refactor configs to be loaded using callback in a singleton
antonleviathan 34f4c93
refactor: linting and pr feedback
antonleviathan 93e561f
fix: ids issue
antonleviathan 874d7a4
commit latest changes
antonleviathan 76a4e79
fix: seed script and settings config constructor
antonleviathan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,368 @@ | ||
| [ | ||
| { | ||
| "id": "b3b5fb49-4e95-567b-ab64-2d92b7957b13", | ||
| "key": "relay_url", | ||
| "value": "wss://nostream.your-domain.com", | ||
| "category": "info" | ||
| }, | ||
| { | ||
| "id": "b3b5fb49-4e95-567b-ab64-2d92b7957b13", | ||
| "key": "name", | ||
| "value": "nostream.your-domain.com", | ||
| "category": "info" | ||
| }, | ||
| { | ||
| "id": "b3b5fb49-4e95-567b-ab64-2d92b7957b13", | ||
| "key": "description", | ||
| "value": "A nostr relay written in Typescript.", | ||
| "category": "info" | ||
| }, | ||
| { | ||
| "id": "b3b5fb49-4e95-567b-ab64-2d92b7957b13", | ||
| "key": "pubkey", | ||
| "value": "replace-with-your-pubkey-in-hex", | ||
| "category": "info" | ||
| }, | ||
| { | ||
| "id": "b3b5fb49-4e95-567b-ab64-2d92b7957b13", | ||
| "key": "contact", | ||
| "value": "operator@your-domain.com", | ||
| "category": "info" | ||
| }, | ||
| { | ||
| "id": "b3b5fb49-4e95-567b-ab64-2d92b7957b13", | ||
| "key": "enabled", | ||
| "value": false, | ||
| "category": "authentication" | ||
| }, | ||
| { | ||
| "id": "b3b5fb49-4e95-567b-ab64-2d92b7957b13", | ||
| "key": "enabled", | ||
| "value": false, | ||
| "category": "payments" | ||
| }, | ||
| { | ||
| "id": "b3b5fb49-4e95-567b-ab64-2d92b7957b13", | ||
| "key": "processor", | ||
| "value": "zebedee", | ||
| "category": "payments" | ||
| }, | ||
| { | ||
| "id": "b3b5fb49-4e95-567b-ab64-2d92b7957b13", | ||
| "key": "feeSchedules", | ||
| "value": { | ||
| "admission": [ | ||
| { | ||
| "enabled": false, | ||
| "description": "Admission fee charged per public key in msats (1000 msats = 1 satoshi)", | ||
| "amount": 1000000, | ||
| "whitelists": { | ||
| "pubkeys": [ | ||
| "replace-with-your-pubkey-in-hex" | ||
| ] | ||
| } | ||
| } | ||
| ], | ||
| "publication": [ | ||
| { | ||
| "enabled": false, | ||
| "description": "Publication fee charged per event in msats (1000 msats = 1 satoshi)", | ||
| "amount": 10, | ||
| "whitelists": { | ||
| "pubkeys": [ | ||
| "replace-with-your-pubkey-in-hex" | ||
| ] | ||
| } | ||
| } | ||
| ] | ||
| }, | ||
| "category": "payments" | ||
| }, | ||
| { | ||
| "id": "b3b5fb49-4e95-567b-ab64-2d92b7957b13", | ||
| "key": "zebedee", | ||
| "value": { | ||
| "baseURL": "https://api.zebedee.io/", | ||
| "callbackBaseURL": "https://nostream.your-domain.com/callbacks/zebedee", | ||
| "ipWhitelist": [ | ||
| "3.225.112.64", | ||
| "::ffff:3.225.112.64" | ||
| ] | ||
| }, | ||
| "category": "paymentsProcessors" | ||
| }, | ||
| { | ||
| "id": "b3b5fb49-4e95-567b-ab64-2d92b7957b13", | ||
| "key": "maxPayloadSize", | ||
| "value": 131072, | ||
| "category": "network" | ||
| }, | ||
| { | ||
| "id": "b3b5fb49-4e95-567b-ab64-2d92b7957b13", | ||
| "key": "remoteIpHeader", | ||
| "value": "x-forwarded-for", | ||
| "category": "network" | ||
| }, | ||
| { | ||
| "id": "b3b5fb49-4e95-567b-ab64-2d92b7957b13", | ||
| "key": "idleTimeout", | ||
| "value": 60, | ||
| "category": "network" | ||
| }, | ||
| { | ||
| "id": "b3b5fb49-4e95-567b-ab64-2d92b7957b13", | ||
| "key": "count", | ||
| "value": 0, | ||
| "category": "workers" | ||
| }, | ||
| { | ||
| "id": "b3b5fb49-4e95-567b-ab64-2d92b7957b13", | ||
| "key": "static", | ||
| "value": [], | ||
| "category": "mirroring" | ||
| }, | ||
| { | ||
| "id": "b3b5fb49-4e95-567b-ab64-2d92b7957b13", | ||
| "key": "invoice", | ||
| "value": { | ||
| "rateLimits": [ | ||
| { | ||
| "period": 60000, | ||
| "rate": 3 | ||
| }, | ||
| { | ||
| "period": 3600000, | ||
| "rate": 10 | ||
| }, | ||
| { | ||
| "period": 86400000, | ||
| "rate": 20 | ||
| } | ||
| ], | ||
| "ipWhitelist": [ | ||
| "::1", | ||
| "10.10.10.1", | ||
| "::ffff:10.10.10.1" | ||
| ] | ||
| }, | ||
| "category": "limits" | ||
| }, | ||
| { | ||
| "id": "b3b5fb49-4e95-567b-ab64-2d92b7957b13", | ||
| "key": "connection", | ||
| "value": { | ||
| "rateLimits": [ | ||
| { | ||
| "period": 1000, | ||
| "rate": 6 | ||
| }, | ||
| { | ||
| "period": 60000, | ||
| "rate": 30 | ||
| }, | ||
| { | ||
| "period": 3600000, | ||
| "rate": 300 | ||
| }, | ||
| { | ||
| "period": 86400000, | ||
| "rate": 1440 | ||
| } | ||
| ], | ||
| "ipWhitelist": [ | ||
| "::1", | ||
| "10.10.10.1", | ||
| "::ffff:10.10.10.1" | ||
| ] | ||
| }, | ||
| "category": "limits" | ||
| }, | ||
| { | ||
| "id": "b3b5fb49-4e95-567b-ab64-2d92b7957b13", | ||
| "key": "event", | ||
| "value": { | ||
| "eventId": { | ||
| "minLeadingZeroBits": 0 | ||
| }, | ||
| "kind": { | ||
| "whitelist": [], | ||
| "blacklist": [] | ||
| }, | ||
| "pubkey": { | ||
| "minBalance": 0, | ||
| "minLeadingZeroBits": 0, | ||
| "whitelist": [], | ||
| "blacklist": [] | ||
| }, | ||
| "createdAt": { | ||
| "maxPositiveDelta": 900, | ||
| "maxNegativeDelta": 0 | ||
| }, | ||
| "content": [ | ||
| { | ||
| "description": "64 KB for event kind ranges 0-10 and 40-49", | ||
| "kinds": [ | ||
| [ | ||
| 0, | ||
| 10 | ||
| ], | ||
| [ | ||
| 40, | ||
| 49 | ||
| ] | ||
| ], | ||
| "maxLength": 65536 | ||
| }, | ||
| { | ||
| "description": "96 KB for event kind ranges 11-39 and 50-max", | ||
| "kinds": [ | ||
| [ | ||
| 11, | ||
| 39 | ||
| ], | ||
| [ | ||
| 50, | ||
| 9007199254740991 | ||
| ] | ||
| ], | ||
| "maxLength": 98304 | ||
| } | ||
| ], | ||
| "rateLimits": [ | ||
| { | ||
| "description": "6 events/min for event kinds 0, 3, 40 and 41", | ||
| "kinds": [ | ||
| 0, | ||
| 3, | ||
| 40, | ||
| 41 | ||
| ], | ||
| "period": 60000, | ||
| "rate": 6 | ||
| }, | ||
| { | ||
| "description": "12 events/min for event kinds 1, 2, 4 and 42", | ||
| "kinds": [ | ||
| 1, | ||
| 2, | ||
| 4, | ||
| 42 | ||
| ], | ||
| "period": 60000, | ||
| "rate": 12 | ||
| }, | ||
| { | ||
| "description": "360 events/hour for event kinds 1, 2, 4 and 42", | ||
| "kinds": [ | ||
| 1, | ||
| 2, | ||
| 4, | ||
| 42 | ||
| ], | ||
| "period": 3600000, | ||
| "rate": 360 | ||
| }, | ||
| { | ||
| "description": "30 events/min for event kind ranges 5-7 and 43-49", | ||
| "kinds": [ | ||
| [ | ||
| 5, | ||
| 7 | ||
| ], | ||
| [ | ||
| 43, | ||
| 49 | ||
| ] | ||
| ], | ||
| "period": 60000, | ||
| "rate": 30 | ||
| }, | ||
| { | ||
| "description": "24 events/min for replaceable events and parameterized replaceable events", | ||
| "kinds": [ | ||
| [ | ||
| 10000, | ||
| 19999 | ||
| ], | ||
| [ | ||
| 30000, | ||
| 39999 | ||
| ] | ||
| ], | ||
| "period": 60000, | ||
| "rate": 24 | ||
| }, | ||
| { | ||
| "description": "60 events/min for ephemeral events", | ||
| "kinds": [ | ||
| [ | ||
| 20000, | ||
| 29999 | ||
| ] | ||
| ], | ||
| "period": 60000, | ||
| "rate": 60 | ||
| }, | ||
| { | ||
| "description": "720 events/hour for all events", | ||
| "period": 3600000, | ||
| "rate": 720 | ||
| }, | ||
| { | ||
| "description": "2880 events/day for all events", | ||
| "period": 86400000, | ||
| "rate": 2880 | ||
| } | ||
| ], | ||
| "whitelists": { | ||
| "pubkeys": [], | ||
| "ipAddresses": [ | ||
| "::1", | ||
| "10.10.10.1", | ||
| "::ffff:10.10.10.1" | ||
| ] | ||
| } | ||
| }, | ||
| "category": "limits" | ||
| }, | ||
| { | ||
| "id": "b3b5fb49-4e95-567b-ab64-2d92b7957b13", | ||
| "key": "client", | ||
| "value": { | ||
| "subscription": { | ||
| "maxSubscriptions": 10, | ||
| "maxFilters": 10 | ||
| } | ||
| }, | ||
| "category": "limits" | ||
| }, | ||
| { | ||
| "id": "b3b5fb49-4e95-567b-ab64-2d92b7957b13", | ||
| "key": "message", | ||
| "value": { | ||
| "rateLimits": [ | ||
| { | ||
| "description": "120 raw messages/min", | ||
| "period": 60000, | ||
| "rate": 120 | ||
| }, | ||
| { | ||
| "description": "3600 raw messages/hour", | ||
| "period": 3600000, | ||
| "rate": 3600 | ||
| }, | ||
| { | ||
| "description": "86400 raw messages/day", | ||
| "period": 86400000, | ||
| "rate": 86400 | ||
| } | ||
| ], | ||
| "ipWhitelist": [ | ||
| "::1", | ||
| "10.10.10.1", | ||
| "::ffff:10.10.10.1" | ||
| ] | ||
| }, | ||
| "category": "limits" | ||
| } | ||
| ] | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.