2024-07-20 01:09:42 +00:00
|
|
|
mongodb:
|
2024-07-25 13:06:48 +00:00
|
|
|
uri: "mongodb://localhost:27017/" # MongoDB connection URI
|
|
|
|
database: "grain" # Database name
|
|
|
|
|
2024-07-25 02:09:54 +00:00
|
|
|
server:
|
2024-07-25 13:06:48 +00:00
|
|
|
port: ":8080" # Port for the server to listen on
|
2024-08-08 12:40:27 +00:00
|
|
|
read_timeout: 10 # Read timeout in seconds
|
|
|
|
write_timeout: 10 # Write timeout in seconds
|
|
|
|
idle_timeout: 120 # Idle timeout in seconds
|
2024-08-09 12:38:18 +00:00
|
|
|
max_connections: 100 # Maximum number of concurrent connections
|
|
|
|
max_subscriptions_per_client: 10 # Maximum number of concurrent subscriptions per client
|
|
|
|
|
2024-08-03 20:18:34 +00:00
|
|
|
pubkey_whitelist:
|
2024-08-03 18:27:58 +00:00
|
|
|
enabled: false
|
|
|
|
pubkeys: #["3fe0ab6cbdb7ee27148202249e3fb3b89423c6f6cda6ef43ea5057c3d93088e4",
|
|
|
|
#"cac0e43235806da094f0787a5b04e29ad04cb1a3c7ea5cf61edc1c338734082b"]
|
2024-08-03 19:11:22 +00:00
|
|
|
npubs: #["npub18ls2km9aklhzw9yzqgjfu0anhz2z83hkeknw7sl22ptu8kfs3rjq54am44"]
|
2024-08-03 20:18:34 +00:00
|
|
|
kind_whitelist:
|
|
|
|
enabled: false
|
|
|
|
kinds: #[0, 1]
|
2024-08-04 18:02:53 +00:00
|
|
|
#If pubkey_whitelist not enabled, domain_whitelist will be ignored
|
|
|
|
domain_whitelist:
|
|
|
|
enabled: false
|
|
|
|
domains: #["happytavern.co", "nostrplebs.com"]
|
2024-07-25 03:04:26 +00:00
|
|
|
rate_limit:
|
2024-07-26 20:46:01 +00:00
|
|
|
ws_limit: 100 # Global rate limit for WebSocket messages (50 messages per second)
|
|
|
|
ws_burst: 200 # Global burst limit for WebSocket messages (allows a burst of 100 messages)
|
2024-07-26 14:40:31 +00:00
|
|
|
|
2024-07-26 20:46:01 +00:00
|
|
|
event_limit: 50 # Global rate limit for events (25 events per second)
|
|
|
|
event_burst: 100 # Global burst limit for events (allows a burst of 50 events)
|
2024-07-26 14:02:34 +00:00
|
|
|
req_limit: 50 # Added limit for REQ messages
|
|
|
|
req_burst: 100 # Added burst limit for REQ messages
|
2024-07-25 13:06:48 +00:00
|
|
|
|
2024-07-26 20:46:01 +00:00
|
|
|
max_event_size: 51200 # Global maximum event size in bytes (50Kb)
|
|
|
|
kind_size_limits:
|
|
|
|
- kind: 0
|
|
|
|
max_size: 10240 # Maximum event size for kind 0 in bytes (10Kb)
|
|
|
|
- kind: 1
|
|
|
|
max_size: 25600 # Maximum event size for kind 1 in bytes (25Kb)
|
|
|
|
|
2024-07-25 13:06:48 +00:00
|
|
|
category_limits: # Rate limits based on event categories
|
|
|
|
regular:
|
2024-07-26 20:46:01 +00:00
|
|
|
limit: 25 # Rate limit for regular events (50 events per second)
|
|
|
|
burst: 50 # Burst limit for regular events (allows a burst of 100 events)
|
2024-07-25 13:06:48 +00:00
|
|
|
replaceable:
|
|
|
|
limit: 10 # Rate limit for replaceable events (10 events per second)
|
|
|
|
burst: 20 # Burst limit for replaceable events (allows a burst of 20 events)
|
|
|
|
parameterized_replaceable:
|
|
|
|
limit: 5 # Rate limit for parameterized replaceable events (5 events per second)
|
|
|
|
burst: 10 # Burst limit for parameterized replaceable events (allows a burst of 10 events)
|
|
|
|
ephemeral:
|
|
|
|
limit: 100 # Rate limit for ephemeral events (100 events per second)
|
|
|
|
burst: 200 # Burst limit for ephemeral events (allows a burst of 200 events)
|
2024-07-25 20:43:46 +00:00
|
|
|
|
2024-07-26 01:26:47 +00:00
|
|
|
kind_limits: # Specific rate limits for different kinds of events
|
|
|
|
- kind: 0
|
|
|
|
limit: 1 # Rate limit for events of kind 0 (1 event per second)
|
|
|
|
burst: 5 # Burst limit for events of kind 0 (allows a burst of 5 events)
|
|
|
|
- kind: 1
|
2024-07-26 20:46:01 +00:00
|
|
|
limit: 25 # Rate limit for events of kind 1 (100 events per second)
|
|
|
|
burst: 50 # Burst limit for events of kind 1 (allows a burst of 200 events)
|
2024-07-26 01:26:47 +00:00
|
|
|
- kind: 3
|
2024-07-26 14:40:31 +00:00
|
|
|
limit: 25 # Rate limit for events of kind 3 (25 events per second)
|
|
|
|
burst: 50 # Burst limit for events of kind 3 (allows a burst of 50 events)
|