Closed jnmclarty closed 1 year ago
Clarifies limits advertised systematically in the relayInformationDocument accessible from a GET to the relay over HTTP.
relayInformationDocument
GET
max_message_length
max_payload_size
max_limit
max_content_length
I hit the following command on my local.
curl -X GET http://localhost:8008 -H 'accept: application/nostr+json' | jq
{ "name": "nostream.your-domain.com", "description": "A nostr relay written in Typescript.", "pubkey": "replace-with-your-pubkey-in-hex", "contact": "operator@your-domain.com", "supported_nips": [ 1, 2, 4, 9, 11, 12, 15, 16, 20, 22, 26, 28, 33, 40, 111 ], "software": "git+https://github.com/Cameri/nostream.git", "version": "1.22.2", "limitation": { "max_payload_size": 524288, "max_subscriptions": 10, "max_filters": 10, "max_subid_length": 256, "min_prefix": 4, "max_event_tags": 2500, "max_content_length": [ { "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 } ], "min_pow_difficulty": 0, "auth_required": false, "payment_required": false }, "payments_url": "https://nostream.your-domain.com/invoices", "fees": { "admission": [] } }
...I think this matches docs now. If for some reason this PR is rejected, then I'd say docs need updating.
I didn't try to run the tests. LMK if I really need to figure it out for this.
Clarifies limits advertised systematically in the
relayInformationDocument
accessible from aGET
to the relay over HTTP.Description
max_message_length
tomax_payload_size
max_limit
max_content_length
from an (irrelevant?) constant to an object describing the content limits by event type.Motivation and Context
How Has This Been Tested?
I hit the following command on my local.
curl -X GET http://localhost:8008 -H 'accept: application/nostr+json' | jq
Screenshots (if appropriate):
Types of changes
Checklist:
...I think this matches docs now. If for some reason this PR is rejected, then I'd say docs need updating.
I didn't try to run the tests. LMK if I really need to figure it out for this.