lib

Core libraries for Radroots
git clone https://radroots.dev/git/lib.git
Log | Files | Refs | README

nostr_fetch_bounds.v1.json (3868B)


      1 {
      2   "schema": "radroots.nostr-fetch-bounds.v1",
      3   "owner": "radroots_transport_nostr",
      4   "status": "implemented",
      5   "request_scope": "One EventSource::fetch call across every selected relay, including queued batches.",
      6   "max_relays": 64,
      7   "default_max_connections": 8,
      8   "max_filters_per_relay": 1,
      9   "max_wire_message_bytes": 524288,
     10   "max_wire_frame_bytes": 524288,
     11   "max_event_json_bytes": 262144,
     12   "max_events_per_relay": 1000,
     13   "max_events_per_fetch": 4096,
     14   "max_event_json_bytes_per_fetch": 8388608,
     15   "max_notifications_per_fetch": 8192,
     16   "max_raw_incoming_bytes_per_fetch": 8388608,
     17   "max_raw_frames_per_fetch": 8192,
     18   "max_raw_data_message_attempts_per_fetch": 4096,
     19   "max_http_upgrade_bytes": 16384,
     20   "max_active_fetch_registrations_per_transport": 64,
     21   "predecode_scratch_bytes": 4096,
     22   "physical_read_reserve": "The meter admits at most 8 MiB to WebSocket framing and Nostr decoding. One fixed 4096-byte plaintext scratch read may observe bytes beyond the remaining allowance and discard the entire chunk before forwarding. Kernel and TLS implementation buffers remain outside this plaintext admission claim.",
     23   "max_returned_events": 1000,
     24   "deadline": "The minimum of the caller absolute deadline and configured request timeout is frozen once before relay scheduling. Connect, REQ, collection and queued starts consume its remaining duration; no later relay receives a fresh request timeout.",
     25   "collection": "Charge event inventory and JSON bytes across all relays before retaining raw events; duplicates and malformed events consume work. Defensively enforce the same limits before shared event decoding and candidate collection.",
     26   "parse_boundary": "Meter decrypted incoming bytes before WebSocket assembly and Nostr decoding, including bounded HTTP upgrade bytes and every frame header and payload. Count every frame start, including control and zero-length continuation frames; conservatively count every text/binary message start as a data attempt without parsing JSON. Share one monotonic byte/frame/attempt budget across all selected relays, queued batches and connection generations. Malformed, discarded, duplicate and unsolicited inputs consume this budget. Retain independent SDK notification and canonical event-JSON limits.",
     27   "completion": "EOSE confirms only the selected relay subscription within the request budget. Exhausted resources remain Partial, elapsed deadlines remain Cancelled, and neither implies global-history completeness.",
     28   "partial_finalization": "After bounded network collection, bounded local normalization retains previously collected admissible events and each relay outcome. One slow relay must not discard another relay's earlier evidence. No further network request is started during finalization.",
     29   "cancellation": "Unpolled futures perform no I/O. Cancellation, deadline or resource failure invalidates selected receive generations and signals SDK disconnect with reconnect disabled, including previously completed batches. SDK task teardown remains asynchronous; no task-join claim is made. Normal completion removes the registration and preserves shared authenticated sockets. Overlapping subscription, delivery and authentication operations may truthfully observe disconnection. Fresh explicit operations may establish new generations, while old generations remain closed. No durable admission or publication rollback is claimed.",
     30   "compatibility": "No new public Rust type, feature, transport or product policy is introduced. The private connector directly uses already-locked rustls, tokio-rustls and WebPKI roots to meter decrypted data while preserving destination pinning, original-host SNI and certificate verification. Callers retain bounded FetchRequest and existing typed outcomes; resource exhaustion is sticky Partial evidence and cannot become Complete after EOSE."
     31 }