Limits¶
A node holds every table a peer can fill to a fixed size, and gives up on a peer that stops answering after a fixed number of retries. This page lists those limits. Each row gives the value and the constant that holds it, the reference it comes from, what a peer sees when it reaches the limit, and whether a host can change it.
The rule for the last column comes from matter.js: where matter.js lets the
application configure a value, the host can set it here, either as a field
of node.Config.Limits (node.Limits) or as a field of node.Config.
Where matter.js keeps a constant, the value is a constant here too.
SupportedFabrics and MaxPathsPerInvoke were on node.Config before
node.Limits existed; they are node.Limits fields now, and the
node.Config fields are deprecated and still honoured (both set and
different fail Config.Validate). One node.Limits
field is a margin, not a bound, and has no row:
node.Limits.BDXAdditionalMrpDelay, which the node adds to a peer's MRP
base interval on the exchange of every inbound BDX transfer (none by
default; Configuration).
"Module's own" marks a limit matter.js does not have, with the reason the
module keeps it. The matter.js references were read at db021da0, the
snapshot's pin (parity/schema.json), which the parity tests and
make cite-check read as well; cite-check does not read this page.
Sessions and pairing¶
| Limit | Value | Reference | At the limit | Host sets |
|---|---|---|---|---|
| Sessions per peer | MaxSessionsPerPeer = 5 in secure/operational/manager.go |
matter.js MAX_SESSIONS_PER_PEER, packages/protocol/src/session/SessionManager.ts:201-205 at db021da0 |
A CASE session the peer establishes beyond the cap closes that peer's least recently active session. The cap counts per peer, so one noisy peer cannot evict another peer's sessions. | constant |
| PASE failures per commissioning window | paseMaxErrors = 20 in bridge/securechannel.go |
matter.js PASE_COMMISSIONING_MAX_ERRORS, packages/protocol/src/session/pase/PaseServer.ts:34, :106-110 |
The 20th failed PASE handshake (a malformed Pake1 of a handshake a PBKDFParamRequest began counts; a Pake1 or Pake3 no PBKDFParamRequest began is acknowledged and neither answered nor counted, as in matter.js and connectedhomeip) closes the open commissioning window, as the end of commissioning closes it (matter.js DeviceCommissioner.ts:78-82), and starts the lockout. A commissioning already past PASE keeps its fail-safe and its PASE session. Log event matter.rx.sc.pase_bruteforce, a pairing diagnostic event, the pase.lockouts counter. |
constant |
| PASE lockout | paseLockoutCooldown = 15 * time.Minute, doubling per lockout up to paseLockoutMaxCooldown = 4 * time.Hour, in bridge/securechannel.go |
Module's own. matter.js ends the refusal with the window (PaseServer.ts:106-110). This node also answers PASE from its configured passcode when no window is open (an uncommissioned node), so the refusal needs an expiry of its own. Without one, 20 failed handshakes from any host on the LAN would disable pairing until a restart. |
PASE messages are dropped until the lockout ends or a new commissioning window opens, which clears the lockout. Log event matter.rx.sc.pase_locked_out. |
constant |
| One PASE handshake at a time; pairing timeout | pasePairingTimeout = 60 * time.Second in bridge/securechannel.go |
matter.js PASE_PAIRING_TIMEOUT, PaseServer.ts:33 |
A second commissioner is ignored while a handshake runs, and so is every PASE message of another handshake (another exchange, or another initiator on the same exchange id): not counted toward the 20 failures. While an established PASE session exists that is not closing, no new PASE exchange is accepted. The 60 s run from the PBKDFParamRequest that took the slot and are not restarted; a further PBKDFParamRequest of the same handshake counts as one of the 20 failures and ends that pairing, as matter.js takes an unexpected message on the accepted exchange; it is answered with a StatusReport InvalidParameter once the pairing's last reply was acknowledged, and only acknowledged while that reply still waits (log event matter.rx.sc.pase_request_repeated). A handshake that has not finished within 60 s releases its slot and, when the slot is taken again, counts as one of the 20 failures (matter.rx.sc.pase_claim_expired), so twenty abandoned handshakes start the lockout as twenty failed ones do (review II, R2-P6-sec-0304). |
constant |
| Unsecured duplicate-detection windows | maxUnsecuredWindows = 256 in bridge/securechannel.go |
Module's own. The source node ID of unsecured traffic is unauthenticated. A window lives as long as the handshake it serves, as matter.js keeps it in the unsecured session; only sources that name the exchange of a live handshake can fill the table. | Past the cap, a new source is treated as fresh. The PASE handler's own replay guard still rejects a genuine replay. | constant |
| Exchanges one unsecured source's window is bound to | maxUnsecuredWindowExchanges = 4 in bridge/receive.go |
Module's own (review II, R2-P2-rr-dev-02), a number chosen without a source: a handshake runs on one exchange of its source, and 4 leaves room for one retried on a new exchange while the earlier reply still awaits its acknowledgement. The exchange ID of unsecured traffic is unauthenticated too, and while a message of the source is in dispatch its set is not pruned. matter.js leaves a session that is not secure out of its bound on a session's open exchanges (ExchangeManager.ts:579-582 at db021da0); connectedhomeip sizes one pool of 16 exchange contexts for the whole node (src/lib/core/CHIPConfig.h:303-305 at 6170af84). |
Past the cap, the message that names a new exchange is handled and its exchange is not bound: the window lives on only while an exchange bound before holds handshake state. A commissioner's handshake needs one exchange and sees nothing of the cap. A handshake on a fifth exchange of one source runs too; once the window has gone, a retransmission of it is no duplicate at the window, and the handshake handler's own replay guard still rejects a genuine replay. | constant |
| CASE handshakes the device holds state for | maxCaseHandshakes = maxUnsecuredWindows (256) in bridge/securechannel.go |
Module's own (review II, R2-P3-dr-dev-03): the router's record of each Sigma1 it answered and the adapters of a PerExchangeCaseProvider are keyed by the initiator's unauthenticated node ID and exchange ID; each handshake holds one duplicate-detection window as long as it holds its record, so the bound is the windows' own. A completed handshake keeps its record, under which a Sigma3 of it is acknowledged and reaches no handler (review II, phase 7, decision 284): through the singleton handler until its success report is acknowledged or given up, as matter.js closes the handshake's unsecured session then; through a provider until the adapter goes. Through the singleton handler a handshake in progress keeps its record until the responder's wait for Sigma3 ends, caseSigma3Wait, or until its Sigma2 is given up, and a resumed handshake until its Sigma2_Resume is acknowledged or given up. The wait is matter.js's (MRP.maxPeerResponseTimeOf, MRP.ts:79-120, as the CASE server's read of Sigma3 calls it, MessageExchange.ts:872-886): over UDP, from the Sigma2's acknowledgement, the node's own worst-case retransmission time on its session intervals plus caseExpectedCryptoProcessingTime = 35 * time.Second (EXPECTED_CRYPTO_PROCESSING_TIME, SecureChannelMessenger.ts:55) and casePeerResponseTimeBuffer = 5 * time.Second (PEER_RESPONSE_TIME_BUFFER, MRP.ts:61) — 44.2 s on the default intervals without a fixed backoff; over TCP, from the Sigma2, the longer of caseReliablePeerResponseTime = 30 * time.Second (MRP.ts:90-92) and the 35 s, plus the buffer: 40 s. Module's own: a Sigma2 that lost its place in the full retransmission table before it was acknowledged (the row below) holds the record until unsecuredEntryLifetime after it was sent, because eviction costs a reply its retransmissions and nothing else. A Sigma1 that leaves no handshake behind (refused, no handler, a failure report) leaves no record, takes no other handshake's place and ends neither a completed handshake's record nor one in progress; a record is made before its Sigma1 is judged, so the records may pass the cap by the Sigma1s being judged at that moment. A Sigma1's bytes are held once across keys: the same Sigma1 under another initiator node ID or exchange ID is acknowledged and not judged, so a captured Sigma1 sent again under other keys begins nothing (review II, R2-P6-sec-0301). |
Past the cap, the oldest record loses its place, and once a new Sigma1 began a handshake on a provider's adapter, the adapter whose handshake began least recently; an adapter whose Sigma1 is being judged takes no place; the evicted handshake ends as a reaped one does — its replies are no longer retransmitted and its staked session ID is released — and its Sigma3 is treated as one of a handshake no Sigma1 began: acknowledged, and not answered. | constant |
| Handshake messages awaiting an acknowledgement | unsecuredEntryLimit = 16, each for at most unsecuredEntryLifetime = 60 * time.Second, in bridge/outbound_reliable.go |
Module's own. The unsecured session's part of the retransmission table is the one a peer fills without having authenticated, paced by session intervals it states and neither reference clamps; 16 covers the handshakes of honest peers that wait for an acknowledgement at the same moment. matter.js has no table (MessageExchange.ts:285, :293 at db021da0); connectedhomeip's has the same default size for all sessions (src/lib/core/CHIPConfig.h:303-305 at 6170af84) and refuses the message that does not fit, where its pools are static. The lifetime's value is matter.js PASE_PAIRING_TIMEOUT (PaseServer.ts:33) |
The new message is sent and tracked; the entry tracked first loses its place — its retransmissions, nothing else — and a warning matter.tx.reliable.unsecured_evicted is logged. A flood of handshake openers therefore costs a legitimate handshake retransmissions only (it fails if its reply is also lost) and cannot keep a reply from being sent. A handshake that fails, times out or moves on drops its entries at once, except the StatusReport that ends it, which is retransmitted; an entry past its lifetime is dropped |
— |
| Messages of a secure session awaiting an acknowledgement | secureExchangeLimit = 30 exchanges per session, one message each, in bridge/outbound_reliable.go |
matter.js keeps at most 30 non-closed exchanges per secure session and closes the least recently active beyond it (ExchangeManager.ts:63, :578-595 at db021da0); the rule of the table — the entry that loses its place loses its retransmissions — is the unsecured session's (the row above). Review II, R2-P6-bound-0303. |
A further message of an exchange whose earlier message still waits is not tracked beside it: an interaction's reply or report is refused, a BDX message waits for that acknowledgement before it is sent (review II, phase 7, decision 276); a message of a 31st exchange takes the place of the exchange tracked least recently. The message that loses its place is not retransmitted any more, and a warning matter.tx.reliable.secure_evicted is logged. Another session's entries are untouched. |
constant |
| Exchanges of a secure session the bridge keeps a table of | maxExchangesPerSession = 30 in bridge/bdx_responder.go |
matter.js's 30 exchanges per secure session (ExchangeManager.ts:63, :578-595 at db021da0), across the BDX exchanges a peer opens and the exchanges this node opens for BDX and Invoke. Review II, R2-P6-bound-0307. |
Opening a 31st ends the least recently active one: its Receive and Send return ErrExchangeClosed (log event matter.exchange.evicted, debug). The exchanges of a session also end when the session closes, and an exchange never passes to a later session given the same id (R2-P6-sec-0302). |
constant |
| Session-miss burst table | sessionMissBurstThreshold = 8 misses within sessionMissBurstWindow = 15 * time.Second, one log line per sessionMissBurstCooldown = 5 * time.Minute, at most sessionMissBurstMaxEntries = 4096 session IDs, in bridge/session_miss_burst.go |
Module's own. It throttles a log line and does not change the protocol. The cap exists because any host that can reach the UDP port can spray session-ID misses. | The eighth miss for one session ID within the window logs matter.rx.session_miss.burst at INFO. Once the table is full, new session IDs are not tracked. |
constant |
The security page describes the PASE limits from the attacker's side.
Fabrics, access control, groups¶
| Limit | Value | Reference | At the limit | Host sets |
|---|---|---|---|---|
| Fabrics | defaultSupportedFabrics = 5, at most maxSupportedFabrics = 254, in node/config.go |
OperationalCredentials SupportedFabrics, Matter 1 to 254. matter.js defaults it to 254 (packages/node/src/behaviors/operational-credentials/OperationalCredentialsServer.ts:86-89). The facade keeps 5, its value from before the field was configurable. |
AddNOC answers NOCResponse TableFull (matter.js OperationalCredentialsServer.ts:255-258). |
node.Config.Limits.SupportedFabrics |
| ACL entries per fabric | accessControlEntriesPerFabricLimit = 4 in cluster/core/access_control.go |
matter.js state accessControlEntriesPerFabric, default 4 (packages/node/src/behaviors/access-control/AccessControlServer.ts:64-66); Matter 4 to 65534 |
An ACL write with more entries for the fabric fails with ResourceExhausted (AccessControlServer.ts:179-181). |
node.Limits.AccessControlEntriesPerFabric |
| Subjects and targets per ACL entry | accessControlSubjectsPerEntry = 4, accessControlTargetsPerEntry = 4 in cluster/core/access_control.go |
matter.js state subjectsPerAccessControlEntry, targetsPerAccessControlEntry, default 4 (AccessControlServer.ts:58-63); Matter 4 to 65534 and 3 to 65534 |
An entry with more subjects or targets fails the write with ResourceExhausted (AccessControlServer.ts:192-198). |
node.Limits.SubjectsPerAccessControlEntry, node.Limits.TargetsPerAccessControlEntry |
| Groups per fabric | defaultMaxGroupsPerFabric = 22 in cluster/core/group_key_management.go |
matter.js state maxGroupsPerFabric = 22 (packages/node/src/behaviors/group-key-management/GroupKeyManagementServer.ts:614 at db021da0) |
A group beyond the limit is refused with ResourceExhausted (GroupKeyManagementServer.ts:219-224, :482-490 at db021da0). |
node.Limits.MaxGroupsPerFabric |
| Group key sets per fabric | defaultMaxGroupKeysPerFabric = 20 in cluster/core/group_key_management.go |
matter.js state maxGroupKeysPerFabric = 20 (GroupKeyManagementServer.ts:613 at db021da0); Matter 1 to 65535 |
The IPK's key set 0 counts as one. KeySetWrite beyond the limit fails with ResourceExhausted (GroupKeyManagementServer.ts:373-380 at db021da0). |
node.Limits.MaxGroupKeysPerFabric |
| Binding entries per endpoint | bindingMaxEntries = 4 * 16 in cluster/core/binding.go |
connectedhomeip Binding::Table::kMaxBindingEntries, CHIP_CONFIG_MAX_BINDING_ENTRIES_PER_FABRIC (4) times CHIP_CONFIG_MAX_FABRICS (16) (src/app/clusters/bindings/binding-table.h:134-135 at 6170af84), a table of the node there and of each Binding server here; every fabric's entries count together. matter.js's model gives the list no maximum (constraint desc, packages/model/src/standard/elements/binding.element.ts:23 at db021da0). |
A write whose list would pass the bound — the accessing fabric's entries replaced by the written ones, a list ADD included — fails with ResourceExhausted (connectedhomeip BindingCluster.cpp:79-80) and changes nothing; a write that does not grow the list is taken. |
constant |
| Senders of group messages per operational key | maxGroupSendersPerKey = 256 in groups/decode.go |
Module's own (decision 133), chosen from memory: a sender's replay window is a counter and a 32-bit bitmap, so 256 cost tens of kilobytes per key at most. matter.js keeps one reception state per operational key and source node without a bound (packages/protocol/src/groups/MessagingState.ts:19, :80-90 at db021da0); connectedhomeip caches 15 data senders per fabric (CHIP_CONFIG_MAX_GROUP_DATA_PEERS, src/lib/core/CHIPConfig.h:832-834 at 6170af84) and replaces the least recently used one when full (src/transport/GroupPeerMessageCounter.cpp:59-98) — a cache, not the source of this cap. |
A group message of a sender the key holds no replay window for is dropped once the key holds 256; the first such refusal per key is logged at warn (groups.reception.full). No held sender is evicted, so every held sender keeps its replay protection; a sender that left keeps its place until the key goes. Only a message that authenticated under the key counts. The places come back when the key's last key set goes. |
constant |
Interaction Model¶
| Limit | Value | Reference | At the limit | Host sets |
|---|---|---|---|---|
| Commands per InvokeRequest | DefaultMaxPathsPerInvoke = 10 in im/invoke.go |
matter.js DEFAULT_MAX_PATHS_PER_INVOKE (packages/types/src/protocol/definitions/interaction.ts:13), the basicInformation.maxPathsPerInvoke state |
A larger batch is refused with InvalidAction (matter.js packages/node/src/node/server/InteractionServer.ts:1017-1021). BasicInformation and the PASE and CASE session parameters advertise the same value. |
node.Config.Limits.MaxPathsPerInvoke |
| Subscriptions per fabric | DefaultMaxSubscriptionsPerFabric = 16 in im/subscription/manager.go |
Module's own. matter.js has no per-fabric quota. The cap bounds the report engine's work per fabric; 16 is above the Matter floor of 3 that BasicInformation's CapabilityMinima advertises. | connectedhomeip's rule at the limit (src/app/InteractionModelEngine.cpp:861-875, :1341-1350 at 6170af84): a SubscribeRequest whose subject may read one of its paths is admitted and the fabric's oldest subscription ends (connectedhomeip picks a subscription over its per-fabric path capacity first and only then the oldest, :1211-1230; this module keeps no path pool, which leaves the oldest); one whose subject may read none is answered InvalidAction, as with room. A re-established subscription after a restart that finds no room is not restored. The bridge keeps at most as many persisted subscription rows per fabric (Manager.MaxSubscriptionsPerFabric): beyond it the least recently saved row whose subscription is not live goes first, and a live subscription's row is never dropped. A subscription whose subject may read none of its paths any more — after an ACL change — ends and gives its place back once two consecutive reports find it so under one unchanged ACL of its fabric and one set of the subscription's paths the node serves; never while a chunked write of that ACL is in progress, never on an ACL that cannot be read, and a path the node no longer serves is no refusal. The paths are walked only when the fabric's ACL or the served topology changed since the subject last passed. |
constant |
| Interactions of one session waiting for a chunk's answer | maxChunkWaitsPerSession = 4 in bridge/chunk_waits.go |
Module's own. A subscription's priming report, a read that spans several chunks and a batch invoke wait for the peer's StatusResponse to each chunk, for as long as the peer's MRP intervals say, as matter.js does; while it waits, the handler holds one of the receive path's bridge-wide dispatch slots. The bound keeps one peer from holding them all. A read's response and a priming report are generated chunk by chunk, as matter.js generates them: across a wait the interaction holds the chunk in flight and its place in the request — at most one endpoint's attributes — not the whole response, however many paths the request repeats. A wait also ends with the session's close, the bridge's Stop and, for a priming report, the subscription's close. |
The request beyond the bound is answered Busy: a SubscribeRequest before anything is registered or torn down, a batch InvokeRequest before any command runs, a ReadRequest instead of its first chunk. |
constant |
| Chunked writes one session has open | maxChunkedWritesPerSession = 4 in bridge/exchange_routing.go |
connectedhomeip CHIP_IM_MAX_NUM_WRITE_HANDLER (src/lib/core/CHIPConfig.h:991-992 at 6170af84), a node-wide pool there and per session here. A chunked write holds the attribute of its last chunk until its final chunk, its session's close or a minute without a chunk, taken once the access check grants the write — matter.js takes it before (InteractionServer.ts:533-543) — and, for an attribute whose write is fabric-scoped such as the ACL, for the writer's fabric only; the bound keeps one session from holding an attribute per exchange. |
The WriteRequest that would open one more chunked write is answered Busy before anything is held or written; the further chunks of an open write and a write in a single message are served. |
constant |
| A subscription's MaxInterval | DefaultMaxIntervalCeilingSeconds = 3600 in im/subscription/manager.go |
matter.js MAX_INTERVAL_PUBLISHER_LIMIT (one hour, packages/node/src/node/server/ServerSubscription.ts:71) and the configurable network.subscriptionOptions.maxInterval (packages/node/src/behavior/system/network/NetworkServer.ts:210 at db021da0, applied in ServerSubscription.ts:314-344). matter.js defaults the configurable value to three minutes (:72); this module defaults it to the hour, as chip does. |
A subscriber asking for a longer MaxInterval is granted the limit, never less than its own MinIntervalFloor. | node.Limits.SubscriptionMaxInterval (1 s to 1 h) |
| A subscription's shortest MaxInterval | minGrantedIntervalSeconds = 2 in im/subscription/subscription.go |
matter.js MIN_INTERVAL (two seconds, packages/node/src/node/server/ServerSubscription.ts:73), applied to the granted MaxInterval (:326-343) and the send interval (:285-290). |
A subscriber asking for a shorter MaxInterval, or a host limit below it, is granted 2 s; reports are sent no faster than every 2 s. A subscription of an ICD with long idle time support is granted its idle duration, as in matter.js. | — |
| Failed updates in a row a subscription survives | sendErrorRetryLimit = 2 in bridge/subscribe.go |
matter.js requeues what a failed update carried while its error count is at most 2, and at the third gives the subscription up and leaves the session alone when the failure is a communication one — no answer, retransmissions run out, the session closed, a network error (packages/node/src/node/server/ServerSubscription.ts:569, :590-603 at db021da0); for another kind it keeps the subscription and drops the update's data. Module's own: here the third failure of any kind ends the subscription, a local one (encoding, a message above the TCP limit, encryption) included. To tell a report whose retransmissions ran out before the reporter had stored its record from a delivered one, the bridge remembers a message it gave up on for as long again as the message was pending (bridge/outbound_reliable.go): a duration chosen without a source, which grows with the message's own retransmission schedule. |
A subscription has one report in flight: the next starts once the subscriber's StatusResponse to the last settles it, the keep-alive included, and what changed meanwhile leaves together in that next report, as matter.js sends no next update while one is in progress (ServerSubscription.ts:520-529). A report that fails to send, whose StatusResponse does not come within the exchange's response bound or cannot be decoded, or whose last message runs out of retransmissions is one failed update: what it carried is owed again and goes out with the next report. The third failed update in a row ends the subscription (matter.subscribe.peer_unreachable); the peer's sessions stay. A Success StatusResponse restarts the count; an error status ends the subscription at once (matter.subscribe.peer_rejected). |
constant |
| Reports of a quieter ("Q") attribute of the measurement projection | QuietMinimumInterval = time.Second in cluster/attribute_changes.go |
matter.js QuietObservable.defaults.minimumEmitInterval, one second (packages/general/src/util/Observable.ts:1386 at db021da0). |
A change within a second of the attribute's last report is held back and reported once, with the latest value, when the second has passed; a change to or from null is reported at once. A read sees every change at once, and the cluster's DataVersion advances at the change, as matter.js advances it at the commit; only the report waits. | constant |
| Reports of PowerSource's battery estimates, measurement projection | powerSourceBatteryQuietInterval = 10 * time.Second in bridge/subscribe.go |
matter.js sets ten seconds for BatPercentRemaining, BatTimeRemaining and BatTimeToFullCharge (packages/node/src/behaviors/power-source/PowerSourceServer.ts:25-34 at db021da0). |
The three attributes are reported at most once in ten seconds, by the rule of the row above. | constant |
| Wi-Fi scan results per ScanNetworksResponse | maxNetworksInScanResponse = 15 in cluster/core/network_commissioning_wifi.go |
connectedhomeip kMaxNetworksInScanResponse, src/app/clusters/network-commissioning/constants.h:26-28 at 6170af84 ("each item will cost ~60 bytes in TLV"); matter.js has no Wi-Fi server |
A scan that finds more access points answers with the 15 strongest, those without a known RSSI last, so the response fits its message. | constant |
A device's or the node's …Async callbacks waiting to run |
Bound = 1024 in internal/serialqueue/queue.go |
Module's own (review II, R2-P6-bound-0209): matter.js runs its observers on its one event loop. | Past 1024 callbacks that have not started, the oldest waiting one is dropped and counted; the first drop of an overflow is logged at warn (matter.callbacks.dropped), and when the queue runs empty again the overflow's count and the queue's total (matter.callbacks.overflow_ended). |
constant |
| Rejoin of the committed Wi-Fi network | wifiRejoinFirstDelay = 5 * time.Second, doubling up to wifiRejoinMaxDelay = 5 * time.Minute, in cluster/core/network_commissioning_wifi.go |
The first wait is connectedhomeip's CHIP_DEVICE_CONFIG_WIFI_STATION_RECONNECT_INTERVAL, 5000 ms (src/include/platform/CHIPDeviceConfig.h:406-414 at 6170af84). The doubling and its cap are the module's own, chosen without a source: connectedhomeip on Linux leaves the return to wpa_supplicant's saved configuration, which this module's driver does not write. matter.js has no Wi-Fi server. |
A node whose join of its committed network failed — at start, or after a fail-safe expiry or a CommissioningComplete left the link on no committed network — tries again after the wait, for its lifetime; an attempt is put off while a fail-safe is armed or a command runs, and an attempt that runs — the first at Start included — holds the radio until it ends, a fail-safe expiry notwithstanding, except that a NetworkCommissioning command cancels it, waits for it to end and runs; the next attempt follows after the current wait, at least 5 s. No attempt runs while InterfaceEnabled is false. |
constant |
Transport and reliability¶
| Limit | Value | Reference | At the limit | Host sets |
|---|---|---|---|---|
| TCP connections per peer address | MaxConnectionsPerPeerIP = 3 in transport/tcp/listener.go |
matter.js MAX_CONNECTIONS_PER_PEER_IP, packages/protocol/src/transport/tcp/TcpTransport.ts:28 |
A fourth inbound connection from the same IP address is closed. Log event matter.tcp.reject. |
constant |
| Inbound TCP connections in all, node | MaxInboundConnections = 4 in transport/tcp/listener.go, the default of TCPConfig.MaxInboundConnections (node.Config.Network.TCP, bridge.TCPConfig) |
connectedhomeip CHIP_CONFIG_MAX_ACTIVE_TCP_CONNECTIONS, src/transport/raw/TCPConfig.h:39-46 at 6170af84, and its reclaim of a connection no message claimed, src/transport/raw/TCP.cpp:133-163; matter.js caps per address only |
A new connection takes the place of the held one idle longest — no authenticated message of a secure session for the longest time (tcp.Conn.NoteSessionTraffic, which the bridge calls for every one), counted from its accept when it carried no session — among those whose sessions carried no message within idleGrace = 5 minutes, the secure session's idle timeout (secure/operational.SessionIdleTimeout), and, when they carried no session, are older than sessionlessGrace = 1 minute (the time a handshake may take) after carrying messages, or 2 s when silent (the row below) (log event matter.tcp.reclaim); when every held one is within those, the new one is closed (matter.tcp.reject). Frames that are no session's message earn no place, so a party without a session cannot hold places by sending one now and then (review II, N3-finnet-4). What this does not bound: a party that closes its connections and opens them again within the minute, with one frame on each, from two source addresses (three per address, four in all) still holds every place — the per-address cap and the one-minute grace are the whole bound against it. A peer whose connection was replaced loses the sessions on it and connects again for its next interaction. The node's listener (Network.TCP.Incoming). |
configurable, Network.TCP.MaxInboundConnections (zero is the default); a negative value is ErrInvalidConfig |
| Inbound TCP connections in all, controller | defaultMaxInboundTCPConnections = 256 in controller/tcp.go, the default of controller.TCPConfig.MaxInboundConnections |
Module's own (review II, owner decision 56): chosen equal to the controller's bound on inbound unsecured sessions (maxInboundUnsecuredSessions, below); the behaviour at the bound is the node's, above |
As on the node: a new connection takes the place of the held one idle longest past the 5-minute grace (matter.tcp.reclaim), or is closed (matter.tcp.reject). The controller's listener (TCP.Incoming). |
configurable, TCP.MaxInboundConnections (zero is the default); a negative value is ErrConfiguration |
| Retry of a failed TCP accept | acceptRetryFirst = 5 * time.Millisecond, doubling up to acceptRetryMax = time.Second, in transport/tcp/listener.go |
Go's net/http Server.Serve; connectedhomeip logs an accept error and keeps listening |
An accept that fails for any reason but the listener's close (the process out of descriptors, an aborted connection) is logged (matter.tcp.accept_error) and retried after the wait; the listener keeps serving. A Serve that ends with an error is logged at warn (matter.tcp.serve.exit). |
constant |
| Largest message to a TCP peer, node | The connection's largest message (DefaultMaxPayloadSize = 64_000 in transport/tcp/frame.go), bounded by the MaxTcpMessageSize the peer's session states — 64000 when it states none, never below 1232 (connMessageLimit in bridge/reply.go) |
matter.js MessageChannel.maxPayloadSize, packages/protocol/src/protocol/MessageChannel.ts:86-92, and Session.peerMaxTcpMessageSize, packages/protocol/src/session/Session.ts:237-239 at db021da0 |
Report chunks, invoke responses and BDX blocks are sized within it; a message above it is refused before the write with tcp.ErrMessageTooLarge (matter.js MessageChannel.ts:104-112). Over BLE the connection's own largest message applies. |
constant; the peer states its size per session |
| Messages in flight per TCP connection | maxInFlightPerConn = 64 in transport/tcp/conn.go |
Module's own. matter.js gets the same backpressure from async iteration over the socket (TcpChannel.ts:81-86 at db021da0). |
The reader stops reading, and the peer sees TCP backpressure. A stream never drops a message. | constant |
| A write to a TCP peer | defaultSendTimeout = 30 * time.Second in transport/tcp/conn.go |
Module's own (review II, R2-P6-bound-0202). matter.js awaits the socket's write callback with no timeout (packages/nodejs/src/net/NodeJsTcpConnection.ts:105-115 at db021da0) — it parks a promise where Go blocks a goroutine. |
A message not handed to the socket within the bound — an absolute deadline per send; the peer stopped reading — fails its send (os.ErrDeadlineExceeded) and closes the connection (log event matter.tcp.send_timeout); a send queued behind it gets tcp.ErrConnClosed. |
constant |
| A new TCP connection's place at the total bound | reclaimAgeFloor = NewConnectionIdleTimeout / 5 (2 s) in transport/tcp/listener.go |
Module's own (review II, R2-P6-bound-0203): connectedhomeip reclaims a connection no message claimed as soon as its table is full (src/transport/raw/TCP.cpp:133-163 at 6170af84). |
A connection that has carried no message yet cannot be reclaimed for 2 s after its accept, so silent connections from other addresses cannot take its place before its first message. Past the floor it is reclaimable as before; it is closed at NewConnectionIdleTimeout without a message anyway. The floor has a cost: a party that renews silent connections from two addresses inside the floor (four every 2 s) holds every place no session holds, and a new connection is then refused (matter.tcp.reject). |
constant |
| A BLE central without PASE | ConnRspTimeout = 15 * time.Second in transport/btp/consts.go, applied by the bridge (watchBLEPASE in bridge/ble.go) |
The bound the BTP accept gives its own handshake (matter.js BTP_CONN_RSP_TIMEOUT, packages/protocol/src/ble/BleConsts.ts:56 at db021da0), applied once more after it: module's own (review II) |
15 s after the BTP handshake, and every 15 s after, a central whose connection carries neither a secure session nor a PASE handshake in flight is disconnected (matter.ble.central_dropped), with or without an open window. A PASE handshake older than the pairing timeout (pasePairingTimeout, 60 s) is not in flight, so a central that abandoned its PASE gives the place up at the next step. |
constant |
| Messages in flight per BTP session | connReceiverMaxInFlight = 64 in bridge/ble.go |
Module's own, the bound of a TCP connection. What matter.js does with the same queue was not established. | The bridge takes no further message from the session until a handler returns or the session closes; the central's next write waits. No message is dropped. | constant |
| Messages waiting to be sent per BTP session | maxQueuedMessages = MaximumWindowSize (255) in transport/btp/session.go |
Module's own: the largest window a session may negotiate. Neither reference bounds the queue — matter.js BtpSessionHandler.ts:42, :390 at db021da0; connectedhomeip src/ble/BLEEndPoint.cpp:591-602 at 6170af84. |
A message sent while 255 wait for room in the peer's window is refused with a btp.FlowError; the queued ones stay. The ack-received timeout (15 s) bounds the wait in time only. |
constant |
| UDP datagrams waiting behind one session | maxOrderedBacklog = 256 in transport/udp/ordered.go |
Module's own (review II, R2-P6-bound-0211). The stream is keyed by the cleartext session id before any decryption; what matter.js does under the same flood is not established. | A source address alone may fill the backlog. When it is full, a datagram of an address holding fewer queued datagrams than the largest holder takes the place of that holder's newest; otherwise it is dropped. A party that floods forged datagrams of an active session — from any number of ports of one address — therefore cannot keep the genuine peer out; with a few addresses the peer keeps at least a 1/(addresses+1) share. Not held off: a party that forges the peer's address, and one that changes its source address per datagram (256 addresses leave the peer one place, more none); the shared in-flight budget is not per source. | constant |
| MRP retransmissions | MaxRetransmissions = 4 in transport/mrp/retransmit.go |
matter.js MRP.MAX_TRANSMISSIONS = 5, the first send included (packages/protocol/src/protocol/MRP.ts:33) |
A reliable message that is still unacknowledged after the fourth retransmission fails its exchange. | constant |
| MRP backoff | MRPBackoffThreshold = 1.6, MRPBackoffJitterFactor = 0.25, MRPBackoffMargin = 1.1 in transport/mrp/retransmit.go |
matter.js MRP.BACKOFF_BASE = 1.6, BACKOFF_JITTER = 0.25, BACKOFF_MARGIN = 1.1 (MRP.ts:36-42), Matter §4.12.2.1 |
Each retransmission waits longer by the growth factor, with jitter. | constant |
| MRP intervals when the peer announced none | SessionIdleIntervalDefault = 500 * time.Millisecond, SessionActiveIntervalDefault = 300 * time.Millisecond, SessionActiveThresholdDefault = 4 * time.Second, MRPBackoffBase = 300 * time.Millisecond, in transport/mrp/retransmit.go |
matter.js SessionIntervals.defaults (packages/protocol/src/session/SessionIntervals.ts:45-49). |
The retransmission timing toward a peer that sent no session parameters. | constant |
| The node's own MRP intervals | defaultSessionIdle = 500 * time.Millisecond, defaultSessionActive = 300 * time.Millisecond, defaultSessionActiveThreshold = 4000 * time.Millisecond, at most maxSessionActiveThreshold = 65535 * time.Millisecond, in node/sessions.go |
matter.js sessions.intervals (packages/node/src/behavior/system/sessions/SessionsBehavior.ts:115-120), handed to the session manager (ServerNetworkRuntime.ts:363-367 at db021da0) and the operational advertisement (DeviceAdvertiser.ts:361-364). A threshold above 65535 ms is refused (SessionManager.ts:58-67 at db021da0). |
The PASE and CASE session parameters and the operational record's SII, SAI and SAT carry them; an ICD's record carries its own threshold and, while LIT, no SII. Node.SessionParameters returns what the node reports. |
node.Config.Sessions (whole milliseconds; the threshold at most 65535 ms) |
| Duplicate-detection window | windowSize = 32 in transport/mrp/window.go |
matter.js MSG_COUNTER_WINDOW_SIZE, packages/protocol/src/protocol/MessageReceptionState.ts:14 |
A counter that falls behind the window is treated as a duplicate. | constant |
| OTA download over HTTPS | defaultOtaHTTPSMaxImageSize = 256 << 20, defaultOtaHTTPSIdleTimeout = 60 * time.Second in cluster/core/ota_software_update_requestor.go |
Module's own. matter.js's requestor downloads with fetch, without a size bound or a stall timeout (OtaSoftwareUpdateRequestorServer.ts:1008-1062); BD-Matter-OTARequestor-HTTPS. Applies only when the host announces HTTPS (TransferProtocols). |
The download fails: a DownloadError event, the requestor back to Idle, the partial file removed. A Content-Length over the cap fails before the body is read; the idle timeout counts from the last byte received (or the request), so a slow link that keeps delivering finishes. | OTARequestorConfig.HTTPSMaxImageSize, HTTPSIdleTimeout (node.OTAConfig too) |
| OTA download over BDX | otaBdxMaxImageSize = defaultOtaHTTPSMaxImageSize (256 MiB) in cluster/core/ota_software_update_requestor.go |
Module's own: the HTTPS path's default cap, so either path fetches an image of the same size. matter.js's requestor takes whatever its BDX transfer delivers (OtaSoftwareUpdateRequestorServer.ts:959-1006). |
The block that would pass the cap is refused: the provider gets a BDX StatusReport LengthTooLarge, the download fails with a DownloadError whose platform code is LengthTooLarge, without a second attempt, the requestor back to Idle, the partial file removed. | constant |
mDNS responder¶
| Limit | Value | Reference | At the limit | Host sets |
|---|---|---|---|---|
| The wait for a truncated query's continuation | truncatedWait = 400 * time.Millisecond plus up to truncatedWaitJitter = 100 ms in mdns/answer.go |
RFC 6762 §7.2, 400–500 ms. The wait is counted from the query's first packet; matter.js starts it again on every continuation that keeps the TC bit set (packages/protocol/src/mdns/MdnsServer.ts:540-545 at db021da0), so a sender that never clears the bit would keep its query waiting. |
The query is answered with the questions and known answers that have arrived; a later continuation is a query of its own. | constant |
| Packets and questions of one truncated query | maxTruncatedPackets = 32, maxTruncatedQuestions = 64 in mdns/answer.go |
Module's own. Any host on the link can send continuations, and matter.js bounds none (MdnsServer.ts:506-546 at db021da0). 32 packets of a 1500-byte MTU carry some 900 known answers for Matter instance names; continuations carry no questions (RFC 6762 §7.2). A held query keeps only the known answers that suppress a record of the interface, so their number is bounded by what the node publishes. |
The query is answered at once with everything that has arrived, the packet that reached the bound included. | constant |
| Truncated queries waiting at once | maxTruncatedQueries = 64 in mdns/answer.go |
Module's own. The source address and transaction ID that key a waiting query are unauthenticated; matter.js's cache of them has no size limit (MdnsServer.ts:61 at db021da0). |
A truncated query beyond the bound does not wait: it is answered at once with its first packet. | constant |
| Unicast answers to one source | one per service each unicastInterval = time.Second, for at most maxUnicastSources = maxTruncatedQueries sources at once, in mdns/answer.go |
Module's own: RFC 6762 §6's one-second rule applied to the destination of a unicast answer. matter.js answers every QU query by unicast while the quarter-TTL rule allows (InterfaceResponder.ts:352-354 at db021da0) |
A QU query beyond the budget is answered by multicast, which the one-second rule paces, so a query with a spoofed source is not reflected to it each time. | constant |
| Addresses an operational resolve keeps | maxResolvedAddressesPerHost = 16 in mdns/operational_resolver.go |
Module's own (review II, R2-P6-bound-0201). | A resolve keeps the A/AAAA records of its SRV target only, at most 16 of them; the records of every other host name a responder multicasts while it runs are ignored. | constant |
Controller side¶
| Limit | Value | Reference | At the limit | Host sets |
|---|---|---|---|---|
| Sessions a peer establishes with the controller | maxSessionsPerPeer = 5 in client/exchange/manager.go |
matter.js MAX_SESSIONS_PER_PEER, packages/protocol/src/session/SessionManager.ts:205 at db021da0, the device side's MaxSessionsPerPeer |
A CASE session a peer establishes with the controller's CASE responder beyond the cap closes that peer's least recently used such session, without a CloseSession on the wire. Sessions the controller opened do not count. Log event matter.controller.session_evicted. |
constant |
| Exchanges per session | MaxConcurrentExchangesPerSession = 30 in client/exchange/manager.go |
matter.js MAXIMUM_CONCURRENT_OUTGOING_EXCHANGES_PER_SESSION, packages/protocol/src/protocol/ExchangeManager.ts:63 at db021da0 |
Opening one more exchange closes the session's least recently active one. The unsecured session is exempt. | constant |
| A subscription's requested MaxInterval | SubscriptionMaxIntervalPublisherLimit = 60 * time.Minute in client/interaction/subscribe.go |
matter.js SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT, packages/protocol/src/action/client/ClientInteraction.ts:173 |
The MaxIntervalCeiling a subscription asks for when the caller gives none. | per request (SubscribeRequest.MaxIntervalCeiling) |
| An OTA image download | DefaultMaxImageSize = 256 << 20 in controller/dcl/ota.go |
Module's own (owner decision, R2-P0-bound-C01): the callers hold the image in memory; OTAVersions.Download's doc gives matter.js's download for comparison. |
A ledger record that announces more is refused before the request; an answer without an announced size is cut at the bound, one longer than its announcement at the announced size. Each is a *dcl.OTAError that names the bound and matches dcl.ErrOTAImageTooLarge. |
dcl.OTAVersions.MaxImageSize (0 is the default) |
| CRL downloads of one revocation lookup | maxConcurrentCRLDownloads = 4 open at once, the whole lookup within revocationLookupTimeout = 10 * time.Second, in controller/dcl/revocation.go |
Module's own. matter.js starts every distribution point's download at once (DclCertificateService.ts:1587-1593 at db021da0) |
Further points wait for a free slot; a lookup the bound cuts short is incomplete, not cached, and the CRLs that arrived still count. | constant |
| A GitHub request of the DCL client | DefaultTimeout = 5 * time.Second in controller/dcl/client.go |
Module's own for GitHub: matter.js gives a GitHub request a deadline only when a timeout is configured (packages/general/src/util/Github.ts:131-133 at db021da0). The value is the ledger client's bound on one request. |
A request that has not ended within the bound fails. | dcl.GitHubConfig.Timeout (0 is the default, a negative value is no deadline) |
| One paginated DCL listing | maxListingBytes = 64 << 20 bytes of its items on the wire and maxListingItems = 1 << 16 items, beside maxPages = 1000 pages of maxResponseBody = 16 << 20 bytes each, in controller/dcl/client.go |
Module's own (review II): the two listing bounds are chosen without a source. matter.js appends every page's items to one array for as long as the answer names a next key, with no bound (packages/protocol/src/dcl/DclClient.ts:70-86 at db021da0). The byte bound is four answers' worth of the bound on one answer; the item bound is there because the bytes bound the wire and not the memory — an item of three wire bytes decodes to a whole struct. |
A vendor or revocation-point listing that passes a bound fails with an error. Items are decoded one at a time, and the listing is refused before the item past the bound is decoded: decoded, a listing holds at most 65 536 structs and the strings of 64 MiB of wire bytes. | constant |
| Hinted addresses per connection; interfaces per reconnect probe | MaxHintedAddresses = 96 in client/peer/hint.go |
Module's own: hinted addresses are a device's own statement nothing verifies, and each becomes a CASE target (Peer.HintAddresses). 96 is what one GeneralDiagnostics NetworkInterfaces value holds: the commissioner's reconnect probe takes the first 8 operational interfaces of a report (maxProbedInterfaces in controller/commissioner/reconnect_probe.go, read from the generated definition's list bound), each with at most 8 IPv6 and 4 IPv4 addresses. |
HintAddresses passes over the addresses past the bound and logs it once per connection process (matter.controller.peer.address_hint_limit); the probe counts the interfaces past its 8 and logs them (matter.controller.commissioning.reconnect_probe_interfaces_dropped). |
constant |
| A camera session's signals not yet read | signalMailboxLimit = 1024 signals and signalMailboxBytes = 1 << 20 bytes of SDP, candidate and ICE server text in controller/camera/session.go |
Module's own: neither reference bounds the queue, which a camera fills while the host does not read Session.Signals. A legitimate session sends one Offer or Answer, one End and its candidates; the count is about four times the candidates a camera sends for the most ICE servers a start can hand it (10 servers of 10 URLs), the bytes hold one SDP of the largest TCP message (64000 bytes) many times over. |
The signal past either bound ends the session: Signals closes at once without the signals it held, the camera gets EndSession (UserHangup) and Observer.SessionEnded reports camera.EndSignalOverflow; log event camera.session.signals_overflow. An EndSession that fails ends the session on this side all the same and leaves the camera's copy to the leftover sweep. |
constant |
| The disarm after an abandoned commissioning | abortDisarmTimeout = FailSafeMaxSendTime, FailSafeMaxSendTime = 10 * time.Second in controller/commissioner/flow.go |
Module's own (abortDisarmTimeout's doc): the wait the flow counts for sending one command. |
When the caller's context ends with a fail-safe armed, the flow sends ArmFailSafe with expiry 0 on a context of its own and waits at most this long for it (flow.disarmAfterAbort). |
constant |
| Sessions peers open without authenticating | maxInboundUnsecuredSessions = 256 in client/exchange/manager.go |
Module's own (review II, owner decision 45): the controller takes the device side's policy against unauthenticated input; the number is the device side's maxUnsecuredWindows. Every Sigma1 or PBKDFParamRequest with a new source node ID opens one. connectedhomeip keeps a pool of 4 unauthenticated sessions and, where its pools are static, replaces the least recently used one (src/lib/core/CHIPConfig.h:768-777, src/transport/UnauthenticatedSessionTable.h:341-355 at 6170af84); matter.js ends the unsecured session of an inbound message that no protocol handler adopts (ExchangeManager.ts:244-256 at db021da0). |
The next one closes the oldest, with a warning matter.controller.unsecured_session_evicted. Secure sessions and the unsecured sessions of handshakes the controller opens are never evicted. A flood closes a legitimate device-opened handshake only if it fills the table within that handshake's round trips. |
constant |
| Messages to unauthenticated peers awaiting an acknowledgement | inboundUnsecuredAckWaitLimit = 16 in client/exchange/manager.go |
Module's own, the device side's unsecuredEntryLimit and its rule. |
The next one ends the oldest wait, with a warning matter.controller.unsecured_ack_wait_evicted: that message was sent and loses its retransmissions, nothing else; its send returns as if acknowledged. A flood of handshake openers therefore frees itself and costs a legitimate handshake a lost datagram's retransmission only. |
constant |
| How long a session a peer opened without authenticating lives | inboundUnsecuredLifetime = 60 * time.Second in client/exchange/manager.go |
Module's own, the device side's unsecuredEntryLifetime, whose value is matter.js PASE_PAIRING_TIMEOUT (PaseServer.ts:33). |
The session closes, its exchanges with it, whatever its handshake waits for. | constant |
| CASE handshakes on a session a peer opened without authenticating | maxInboundUnsecuredHandshakes = 1 in client/exchange/manager.go |
Module's own (review II, owner decision 45): a session carries one handshake — the CASE responder closes the session when its handshake ends, as matter.js's does (CaseServer.ts:95-99 at db021da0) — and the rule is the device side's for a second PASE handshake while one is in progress (matter.js PaseServer.ts:80-86). matter.js starts a handshake for every Sigma1 that opens an exchange (SecureChannelProtocol.ts:146-148, CaseServer.ts:61-64). |
A further Sigma1 that opens another exchange on the session while the first runs is acknowledged and dropped, with a warning matter.controller.unsecured_handshake_refused, so the bound on the sessions bounds the CASE handlers too. A device that starts over under the same source node ID sees the acknowledgement and no Sigma2; its retry is served once the earlier handshake has ended, which the session's 60 s lifetime bounds. An ICD Check-In and a refused PBKDFParamRequest are not counted. |
constant |
| Sigma1s the controller's CASE responder remembers | seenSigma1Limit = 256 initiator randoms, each for seenSigma1Lifetime = 60 * time.Second, in client/handshake/server.go |
Module's own (review II): neither matter.js's CaseServer nor connectedhomeip's CASESession remembers them; both initiators draw a fresh random for every Sigma1. The count is maxInboundUnsecuredSessions, the lifetime inboundUnsecuredLifetime: the longest a handshake holds its session. Only a Sigma1 that addressed one of the controller's fabrics is remembered. |
A Sigma1 whose initiator random started a handshake within the lifetime, or is being checked, is answered with nothing, under any source node ID: one Sigma1 sent again cannot hold more than one session or cost more than one Sigma2. Beyond the count the oldest random is forgotten. A Sigma1 whose Sigma2 or Sigma2_Resume the socket refused to send is forgotten at once: nothing reached the initiator, and its retransmission of that Sigma1 starts the handshake again. | constant |
| Session intervals stated by a peer that has not authenticated | MaxUnauthenticatedInterval = 3_600_000 (milliseconds) in secure/sessionparams/sessionparams.go |
Module's own (owner decision 45), the bound the module puts on the intervals it advertises itself (maxAdvertisedInterval in mdns/service.go). Both references take the intervals of a PASE or CASE message as stated (matter.js SessionIntervals.ts:52-53 at db021da0, connectedhomeip src/protocols/secure_channel/PairingSession.cpp:175-189 at 6170af84); a DNS-SD interval above one hour connectedhomeip reads as not stated (src/lib/dnssd/TxtFields.cpp:210-218, TxtFields.h:38), and matter.js keeps from a discovered record only an interval an advertisement can carry (SessionIntervals.ts:99-118, RemoteDescriptor.ts:223-227). |
The controller's unsecured session of a handshake is timed with at most one hour per interval — from the peer's DNS-SD record, its PBKDFParamResponse, Sigma1 or Sigma2 — and so are a device's handshake replies, from the initiator's PBKDFParamRequest or Sigma1; the secure session the handshake establishes takes the parameters as stated. | constant |
| Records in the controller's DNS-SD cache, with the addresses it stages for hosts no SRV has named yet | maxCachedRecords = 8192 in client/discovery/names.go |
Module's own (review II, owner decision 45): any host on the link can send records the cache admits, and matter.js bounds only the number of hosts it stages addresses for. | A staged address goes first, the one received longest ago of the host touched longest ago (matter.discovery.staged_addresses_evicted), so a staged address never displaces a cached record; then the record installed or refreshed longest ago is deleted as an expiry would delete it, with a warning matter.discovery.cache_records_evicted; its name goes once nothing keeps it. A responder refreshes its records whenever it answers, so a flood evicts them only if it brings more records between two of its answers; the browser asks again for a name it still needs. |
constant |
| Addresses staged for one host no SRV has named yet | maxStagedAddressesPerHost = 5 in client/discovery/names.go |
connectedhomeip keeps as many addresses per resolved node (kMaxIPAddresses, src/lib/dnssd/Types.h); matter.js has no per-host bound. |
The address received longest ago is replaced. A staged address is dropped at its TTL with the grace factor, as a cached record is. | constant |
| A PASE race's attempts | maxRaceAttempts = 16 running at once, each started at the latest raceStaggerCeiling = maxRaceAttempts * CrossDeviceStagger after its device was found, in client/discovery/session_kinds.go |
Module's own (review II, owner decision 55). matter.js starts each candidate's attempt its discovery index times CROSS_DEVICE_STAGGER_DELAY (one second) after the first and bounds neither the attempts running nor the wait (ParallelPaseDiscovery.ts:30, :102-103, :110-116 at db021da0), so every candidate found before a device — any host on the link or in radio range can offer them — delays its attempt by a second, past the end of the search. The count is the module's bound on the handshakes of honest peers awaiting an acknowledgement at one moment (unsecuredEntryLimit, inboundUnsecuredAckWaitLimit); the ceiling is the time the one-second stagger takes to fill every place. |
A candidate whose ceiling has come while 16 attempts run ends the oldest attempt whose device has not answered PASE yet (no PBKDFParamResponse) and starts in its place once that attempt has returned; log event matter.controller.discovery.attempt_replaced. An attempt whose device has answered is never ended for a later candidate; while all 16 have, the candidate waits for one to end. A device found after any number of candidates is attempted within 16 s of being found, and its attempt is ended for a later one only after every unanswered attempt started before it. |
constant |
| Addresses cached for one host an SRV has named | maxCachedAddressesPerHost = maxStagedAddressesPerHost with maxStagedAddressesPerHost = 5 in client/discovery/names.go |
Module's own (review II, owner decision 45), at the staging's number: every cached address of a peer's host becomes a connection target of the peer, and any host on the link that sees the host named in an SRV can announce addresses for it. matter.js bounds only the number of hosts it stages addresses for. | Before a new A or AAAA record is installed for a host that holds five, the one installed or refreshed longest ago is deleted, as an expiry would delete it. A responder refreshes its addresses whenever it answers. | constant |
| Records of the controller's BLE scanner | maxScannerRecords = 8192 in controller/ble/scanner.go |
Module's own, following the DNS-SD cache bound above: any party in radio range advertises from as many addresses as it likes, and while a discovery runs no record ages out. matter.js has no bound. | The record seen longest ago is forgotten. A continuous discovery that has reported more peripherals than the bound drops those whose record is forgotten (review II, R2-P6-bound-2029), so such a peripheral is reported again when it advertises again. | constant |
| Thread border-router instances the controller's registry watches | maxInstances = 512 in thread/brdiscovery/registry.go |
matter.js INSTANCE_OBSERVER_CAP, packages/thread-br-client/src/discovery/BorderRouterRegistry.ts:24-27 at db021da0, with its eviction order (:225-233, :241-267); the tombstones and their bound are the module's own (review II, R2-P6-bound-2026). Any host on the link can announce _meshcop._udp and _trel._udp instance names, also ones that never carry a valid xa and never become an entry. |
A new instance evicts the instance without a valid xa watched first, else the oldest entry with its instances; the instances of an evicted entry stay ignored until they go, and those tombstones are held to the same bound. |
constant |
| One answer of a Thread border router's REST API | maxResponseBody = 1 << 20 in thread/otbr/client.go |
Module's own (review II, R2-P6-bound-2023): the REST API's largest answers, the dataset and the diagnostics, are a few KiB, and a JSON body decodes into a tree many times its size. | The request fails with CodeUnreachable before anything is decoded. |
constant |
| How long the controller caches a DNS-SD record | maxRecordTTL = 4500 * time.Second in client/discovery/names.go |
Module's own: RFC 6762 §10's recommended TTL for records other than a host's addresses, the longest a reference stack announces (connectedhomeip's TXT records). | A longer TTL is cached as this one; a responder re-announces well inside it. | constant |
| Report chunks a session's interactions hold while the rest arrive | DefaultMaxReportBytesPerSession = 16 << 20 (bytes: each chunk's message payload, each entry's struct — 96 bytes an attribute report, 48 an invoke response entry — and 112 bytes, one spec.Node, for every decoded element of its values; the 64-bit figures, less on a 32-bit build) in client/interaction/report.go |
Module's own (review II, owner decision 45): the client merges a read's, a subscription report's or an invoke response's chunks before it hands them over, and a peer that keeps MoreChunkedMessages set would grow that without end. Reads, reports and invoke responses of one session count together, so the exchanges a session may have open do not multiply it. |
The chunk that would pass it is answered with a StatusResponse ResourceExhausted, the partial report is dropped and the call returns interaction.ErrReportTooLarge; the bytes are released when an interaction ends. The heap the kept entries hold stays within twice the charge for the shapes the module's test measures — values of one-byte elements, scalar values, attribute and command statuses — so a value of one-byte elements reaches the bound at its memory, not at a hundredth of it (review II, R2-P6-bound-2102). The charge follows the decode: while one chunk is decoded its nodes are held uncharged, bounded by the message — roughly 7 MiB for a 64 000-byte TCP message of one-byte elements (arithmetic, not measured), per exchange decoding at that moment. Only a peer's own interactions reach it; an attribute of a scalar value is charged at most 240 bytes, so a wildcard read of some 70 000 such attributes stays below it (16 MiB since the charge counts memory, owner decision 220; 2 MiB of payload before). |
controller.Config.MaxReportBytesPerSession (owner decision 48; 0 is the default, a negative bound is controller.ErrConfiguration) for every interaction with a paired node and for the commissioning steps; interaction.Config.MaxReportBytesPerSession and interaction.SubscriptionsConfig.MaxReportBytesPerSession below it |
| What one node's reports leave in the controller's image of it | DefaultMaxImageBytesPerNode = 32 << 20 (bytes the image is charged) in controller/client/image_bounds.go: each attribute value's stored TLV bytes, plus 112 bytes per TLV element of it (imageElementBytes, the size of one decoded element), 136 per attribute (imageAttributeBytes), 2048 per cluster (imageClusterBytes) and 512 per endpoint (imageEndpointBytes) |
Module's own (review II, owner decision 54): matter.js stores every path a report names and bounds neither one node's cache nor its store. The value is chosen, sixteen times the report bound above; the reviewer proposed it. The charges are what each entry holds in memory, so the quota bounds the image's heap within a factor of two (measured for one-byte values under fresh attribute, cluster and endpoint ids and for lists of one-byte elements) and the node's rows in the store: one per attribute, each charged at least 248 bytes, and one per cluster, each charged 2048 — the 32 MiB default holds at most some 135,000 attribute rows; a bridged plug of three clusters (Descriptor, Bridged Device Basic Information, On/Off with their global attributes) is charged about 15 KiB. A report is also charged the clusters its ServerList and the endpoints its PartsList would create, which the node does not have yet (review II, R2-P6-bound-2351). Below the quota, a report under a wildcard path keeps only the endpoints the node's own structure names (endpoint 0 and every endpoint reached from it through PartsLists), and a path the request names is kept as asked. | A path outside both is dropped before it reaches the image, with one warning matter.controller.client.report_path_dropped per node. A report whose kept values would raise the image above the quota is not applied, the image stays as it was, with one warning matter.controller.client.image_quota_reached per node. An image stored above the quota (by an earlier version) still loads: what the structure does not name is dropped from the image and the store (matter.controller.client.image_cut_at_load, logged when the cut drops something). |
controller.Config.MaxImageBytesPerNode (0 is the default, a negative bound is controller.ErrConfiguration); client.RegistryConfig.MaxImageBytesPerNode below it |
| Unknown clusters and events a node logs | maxUnknownWarned = 256 in controller/client/network.go |
Module's own (review II, R2-P6-bound-2357, owner decision 223): matter.js logs each unknown cluster and event once in a process-wide set without a bound (packages/node/src/node/client/ClientEventEmitter.ts:38 at db021da0), which a peer reporting events under ever new ids grows for good. |
The node logs no further unknown cluster or event; one matter.controller.client.unknown_not_logged line says so. The events themselves are handled as before. |
constant |
| A topology rebuild held off by changes | maxDebounceBursts = 5 (debounces) in controller/topology/service.go |
Module's own (review II, R2-P6-fsm-2314): every applied report is a change here, where matterjs-server schedules only on four diagnostics clusters and has no maximum wait (NetworkTopologyService.ts:260-267 at 0bd06f22). |
A burst of changes rebuilds at the latest five debounces after its first change, however often the changes come. | topology.Config.Debounce scales it |
How the values stay true¶
TestLimitsPage in
script/docscheck
reads every `Name = value` cell of this page. It finds Name in the
Go file the row links and compares the declared value with the cell. The
test fails when a constant changes its value, moves to another file or is
renamed, until the page follows.