Default limits and fixed numbers

Test vectors: Default limits and fixed numbers. Shown here as it is in conformance/vectors/limits.json.

Generated at build time from conformance/vectors/limits.json.

Protocol 0.1. Covers: SPEC.md sections 3 to 13.

Download limits.json: the file itself, as the conformance suite reads it.

How to use it #

The complete error code list of SPEC section 6, and numeric limits the spec states.

Notes #

Only numbers the spec states. Lengths in characters are UTF-16 code units unless the key says code points.

Fixed values #

key value
pointerInitialCredit 512
pointerMaxPoints 2729
peerSendBufferBytes max(8 MiB, 4 x maxText)
canonicalMaxDepth 100
agentNameMaxCodePoints 64
withdrawnNoticeMs 1500
humanGiveUpMs 5000
defaultPort 7346
subprotocol reins.v1
maxResultBytes 32768
maxNameChars 120
maxValueChars 200
sealMacTextChars 43
sealMacBytes 32
defaultSessionsPerCredential 4
cursorLabelMaxChars 40
uiEventMinIntervalMs 100
heartbeatDropFactor 2.5
playbackNote section 11 says "in proportion to the lag and up to 4x"; section 15 fixes the curve: 1 up to 120 ms, linear to 4 at 600 ms
commandFrameBudgetMs 6

defaultLimits #

JSON
{
  "maxText": 262144,
  "maxBinary": 16384,
  "heartbeatMs": 15000,
  "reqTimeoutMs": 15000,
  "consentTimeoutMs": 60000
}

linkQueue #

JSON
{
  "maxMessages": 4096,
  "maxBytes": 16777216
}

preAuthQueue #

JSON
{
  "maxMessages": 16,
  "maxBytes": 65536
}

hubMethodBucket #

JSON
{
  "rate": 10,
  "burst": 20
}

admission #

JSON
{
  "surfaceRate": 2,
  "surfaceBurst": "2 x maxSurfaces",
  "allOriginsFactor": {
    "rate": 5,
    "burst": 2
  },
  "agentRate": 2,
  "agentBurst": 20
}

coolOff #

JSON
{
  "firstMs": 2000,
  "maxMs": 60000,
  "revokeAfterRefusals": 3
}

stickyPrivacy #

JSON
{
  "remembered": 32,
  "sameParentMs": 1000
}

versions #

JSON
[
  "0.1"
]

manifest #

JSON
{
  "maxBytes": 65536,
  "maxActions": 256,
  "maxViews": 64
}

handshake #

JSON
{
  "nonceBytes": 32,
  "secretBytes": 32,
  "minKeyChars": 32,
  "helloTimeoutMs": 5000,
  "failDelayMs": 200,
  "failDelayMaxMs": 3000,
  "failWindowMs": 60000,
  "maxPending": 16,
  "confirmTimeoutMs": 5000
}

sealKind #

JSON
{
  "text": 116,
  "binary": 98
}

attach #

JSON
{
  "burst": 3,
  "refillEveryMs": 2000
}

capacity #

JSON
{
  "surfaces": 64,
  "agents": 32,
  "sessionsPerCredential": 4,
  "streamsPerAgent": 8
}

read #

JSON
{
  "defaultMax": 2000,
  "capMax": 8000
}
JSON
{
  "maxEntries": 40,
  "maxDepth": 4,
  "maxCodePoints": 2000,
  "perAgent": 1,
  "total": 4,
  "armMs": 500
}

panel #

JSON
{
  "confirmArmMs": 500,
  "settleMs": 500,
  "activityEntries": 50,
  "maxSessions": 32
}

chat #

JSON
{
  "maxTextChars": 4000,
  "maxNoteChars": 80,
  "transcriptMessages": 200,
  "readDefault": 20,
  "readMax": 50,
  "readBytes": 131072,
  "statusTtlMs": 120000,
  "personPerSecondPerAgent": 5,
  "personBurstPerAgent": 10,
  "undeliveredNoticesPerSecond": 20,
  "mcpWaitDefaultMs": 90000,
  "mcpWaitMaxMs": 150000,
  "mcpKeepaliveMs": 45000
}

pointer #

JSON
{
  "dropBufferBytes": 262144,
  "stallBufferBytes": 1048576,
  "creditBatchFraction": 0.25
}

playback #

5 entries.

queuedMs rate
0 1
120 1
360 2.5
600 4
5000 4

glide #

JSON
{
  "formula": "clamp(120 + 110 * log2(1 + d / 40), 120, 900)",
  "cases": [
    {
      "d": 0,
      "ms": 120
    },
    {
      "d": 40,
      "ms": 230
    },
    {
      "d": 120,
      "ms": 340
    },
    {
      "d": 600,
      "ms": 560
    },
    {
      "d": 1000000,
      "ms": 900
    }
  ]
}

audit #

JSON
{
  "maxBacklog": 1000,
  "refusalsPerSecond": 20,
  "personRecordsPerSecond": 20,
  "personChangesPerSecond": 20,
  "droppedRelayRecordsPerSecond": 20
}

Generated by conformance/tools/make-vectors.mjs from the formulas in the specification, with node:crypto only.