Expand description
A batched node request between peers that both answer it (engine 0.2.1, bsv-overlay-cloudflare #58).
POST /requestForeignGASPNodes takes up to NODE_BATCH_MAX_OUTPOINTS
outpoints and answers their nodes in one body of at most
NODE_BATCH_MAX_BYTES. Each entry names its outpoint and carries either
the node, as /requestForeignGASPNode answers it, or a refusal word. The
route is ours: a reference peer answers it 404 and is asked one node at a
time, as before (overlay-services@480d77a src/GASP/OverlayGASPRemote.ts
has the single request only).
What the sync does with an answer is in GASPSync::prefetched_root:
every entry feeds the same code a single answer feeds.
Modules§
- refusal
- The words of a per-entry refusal.
Structs§
- Batch
Outpoint - One outpoint of a batch request.
- Node
Batch - What a remote received for one batch request: the answer and the bytes
of its body, which the sync holds to
NODE_BATCH_MAX_BYTES. - Node
Batch Answer - The answer of
POST /requestForeignGASPNodes. An outpoint the byte budget left out has no entry; the asker names it again in its next body. - Node
Batch Entry - One entry of a batch answer: the node, or a refusal word.
- Node
Batch Request - The body of
POST /requestForeignGASPNodes.
Constants§
- NODE_
BATCH_ MAX_ BYTES - The most bytes one batch answer may carry, its JSON envelope included.
- NODE_
BATCH_ MAX_ OUTPOINTS - The most outpoints one batch request may name; a request over it is answered 400 with this number in the body.