Limits
Every figure here comes from a named constant; when the code and this page disagree, the code wins.
Execution limits
Section titled “Execution limits”One run of a calimero:app component is bounded by the host core
(crates/app-host) and the engine (crates/app-engine-wasmtime). A limit
that stops the run traps it, which leaves an empty diff; a soft limit is an
error the guest’s host call returns.
| Limit | Value | Constant |
|---|---|---|
| Fuel per call or view | 200 000 000 | DEFAULT_FUEL |
| Memory | 1024 pages = 64 MiB, one memory | DEFAULT_MEMORY_PAGES, MAX_MEMORIES |
| Wall clock | 2 s for a call, view, timer or delivery; 10 s for an action, or what it declares up to 300 s | CALL_WALL_CLOCK, DEFAULT_ACTION_WALL_SECS, MAX_ACTION_WALL_SECS |
| Stack | 200 KiB | MAX_WASM_STACK |
| Table elements, instances, tables, resources | 100 000, 20, 2, 4096 | MAX_TABLE_ELEMENTS, MAX_INSTANCES, MAX_TABLES, MAX_RESOURCES |
| Storage key | 1 KiB | MAX_KEY_BYTES |
| Bytes one run writes (keys, values, event names and data; every overwrite counts) | 1 MiB (soft: the SDK’s typed RunLimit error with the bytes the run would reach, WIT storage.put-checked 0.5.7; a component built before traps HostDenied("entry too large")) |
MAX_RUN_BYTES |
| Writes per run | 10 000 (soft: RunLimit with the write’s number; before 0.5.7 a trap) |
MAX_WRITES |
| Range reads | 1000 entries and 4 MiB (past the first entry) per batch; 1024 open cursors | MAX_RANGE_BATCH, MAX_RANGE_BATCH_BYTES, MAX_OPEN_CURSORS |
| Events | 1000 per run; name 100 bytes; data 16 KiB; 1000 accounts in an audience | MAX_EVENTS, MAX_EVENT_NAME_BYTES, MAX_EVENT_DATA_BYTES, MAX_AUDIENCE_ACCOUNTS |
| App log | 64 KiB per run; later lines dropped; never kept by the node | MAX_LOG_BYTES |
| Xcalls (outbox) | 100 per run; app id or method 128 bytes | MAX_XCALLS, MAX_XCALL_NAME_BYTES |
| Xcall chains | 128 deliveries from one message a run no xcall delivered sent, its fanout included (Chain budget) | MAX_XCALL_CHAIN |
| Synchronous xcalls | 16 per run; arguments 512 KiB; result 1 MiB | MAX_SYNC_XCALLS, MAX_SYNC_XCALL_ARGS_BYTES, MAX_SYNC_XCALL_RESULT_BYTES |
| Actions | 100 started per call, timer or delivery; 1000 ctx.view and ctx.call per action run; 8 running on a node, at most 2 of one owner’s apps and 4 long ones (over 10 s); an owner’s long actions run 1800 s per rolling hour on a node, then fail with QuotaExceeded |
MAX_STARTED_ACTIONS, MAX_ACTION_SUBCALLS, MAX_ACTION_WORKERS, MAX_RUNNING_PER_OWNER, MAX_RUNNING_LONG, MAX_ACTION_SECS_PER_OWNER_HOUR |
| Outbound HTTP | 8 requests per run (an action, call, timer or delivery); bodies 1 MiB; 64 KiB of each body recorded in a logged run’s entry; 100 headers; 1.5 s wait for a logged run’s response (CALL_FETCH_TIMEOUT) |
MAX_HTTP_REQUESTS, MAX_HTTP_BODY_BYTES, MAX_RECORDED_BODY_BYTES, MAX_HEADERS |
| Outbound secrets and their redaction | 32 distinct secret values per request (more is refused); each redacted from the response as sent and in 19 common encodings (hex, base64, percent, JSON), 20 patterns a secret, 640 a request; encodings only for a secret of 8 to 4096 bytes, as sent otherwise | MAX_SECRETS_PER_REQUEST, PATTERNS_PER_SECRET, MAX_REDACTION_PATTERNS, MIN_ENCODED_SECRET_BYTES, MAX_ENCODED_SECRET_BYTES |
| Declared secrets (credential bindings) | 16 per release; name 64 bytes; description 256 bytes; one host, 1 to 8 path prefixes of 256 bytes each, and one place each (a header, or a body field); header name or body field 64 bytes; header format 64 bytes with {} once; no two on one host’s same place on a shared path |
MAX_SECRETS, MAX_SECRET_NAME_BYTES, MAX_SECRET_DESCRIPTION_BYTES, MAX_SECRET_PATHS, MAX_SECRET_PATH_BYTES, MAX_SECRET_FIELD_BYTES, MAX_SECRET_FORMAT_BYTES |
| Search | 100 hits at most; query 256 bytes; 32 searches per request, its sync xcall views included ("too many searches in one run") |
MAX_SEARCH_LIMIT, MAX_SEARCH_QUERY_BYTES, MAX_SEARCHES_PER_RUN |
| Files | 16 open; 2 GiB each; 64 MiB written per run (2 GiB in a compute run); 1,000 new files per run; 1 MiB per read | MAX_OPEN_FILES, MAX_FILE_BYTES, MAX_RUN_FILE_BYTES, MAX_COMPUTE_FILE_BYTES, MAX_NEW_FILES, MAX_READ_CHUNK |
| Blob download grant | 1 day at most | MAX_GRANT_TTL_SECS |
| Compute runs started | 16 per run; 64 active per app; 64 inputs, 64 KiB of arguments | MAX_STARTS_PER_RUN, MAX_ACTIVE_RUNS, MAX_RUN_INPUTS, MAX_COMPUTE_ARGS_BYTES |
| Call and view arguments | 512 KiB (413 ARGS_TOO_LARGE, before anything runs) |
MAX_ARGS_BYTES |
A soft limit answers a fixed string, which depends only on the run’s own calls,
so every node gives the same answer. events.emit answers too many events,
event name too long, event data too large, too many audience accounts,
malformed audience (an empty account list, account, team or org id),
unknown team, or audience names another org; xcall.send answers
too many xcalls or malformed xcall target; emit, xcall.send and
start-action past the run’s bytes answer
entry too large: the run would write <n> bytes, over 1048576. A refused
call records nothing. The caps on keys, events, cursors and logs sit low on
purpose: raising one later breaks no app, lowering one does.
What host work costs
Section titled “What host work costs”A run’s fuel pays for the guest’s own instructions and for the work its host
calls make the node do (crates/app-host/src/fuel.rs), on every call, view,
timer, delivery, action and compute run. One fuel is about one nanosecond of
host time; the search figures are the least-squares fit of a query’s host time
in crates/search/bench.
| Host call | Fuel | Constants |
|---|---|---|
Every calimero:app call, wasi:random, a stream write or read, wasi:http’s handle, and dropping a cursor, file reader or writer |
1000 | FUEL_HOST_CALL |
| The bytes a call is handed (keys, values, query text, event name, data and audience, xcall and action targets and arguments, HTTP URL, headers and body, compute run arguments and inputs, file and blob ids), paid before any check | 1 per byte | FUEL_PER_BYTE |
| The bytes a call hands back or moves (values read, range batches, xcall, action and HTTP answers, file reads and writes, random bytes, a published file, stream writes and reads, also to stdout once the log is full) | 1 per byte | FUEL_PER_BYTE |
storage.get, put, delete, add, opening a range, each range.next batch |
1000 more; a batch also 200 per entry | FUEL_STATE_ACCESS, FUEL_PER_RANGE_ENTRY |
A search.query that runs |
4000 more, plus 14 per matched document, 10 500 per hit and 70 per byte of the hits | FUEL_SEARCH_QUERY, FUEL_PER_SEARCH_MATCH, FUEL_PER_SEARCH_HIT, FUEL_PER_SEARCH_BYTE |
The engine takes the base out of the run’s fuel as a call starts and the rest
as it returns, so the guest never runs on fuel its host calls already owe, and
a refused or denied call still pays for what it was handed. A run whose fuel
cannot pay ends out of fuel (422 TRAP, kind OutOfFuel) at that call, as if
the guest had run out; a denied call that could pay is HostDenied. A
synchronous xcall’s target runs on its own fuel budget, but shares its caller’s
search budget: one request makes at most MAX_SEARCHES_PER_RUN (32) searches
across its run and every view its xcalls reach (a view forwarded to another
node takes the request’s remaining searches with it).
A run’s result also has to fit the log: its whole entry — arguments, diff,
events — must stay under 1 MiB (calimero_log::MAX_ENTRY_BYTES); a run
past it is logged trapped (HostDenied, entry too large). The test harness
measures the same entry (calimero_app_host::entry_bytes) and refuses the run
the same way. Compute runs on job nodes have their own caps
(MAX_COMPUTE_FUEL 10^12, MAX_COMPUTE_MEMORY_MIB 4096,
MAX_COMPUTE_WALL_SECS 900; Compute actions).
Node limits
Section titled “Node limits”| Limit | Value | Constant |
|---|---|---|
| One log entry | 1 MiB | calimero_log::MAX_ENTRY_BYTES |
| Heartbeats in one batch to a peer | 1024 (413 TOO_MANY_HEARTBEATS past it); only empty appends |
calimero_log::MAX_HEARTBEATS_PER_BATCH |
| Wait for a tick’s other heartbeats before a batch goes | 5 ms (a heartbeat has heartbeat_ms, 200 ms, to be answered) |
calimero_log::HEARTBEAT_BATCH_WINDOW |
| One sealed request, one HTTP body | 64 MiB | MAX_SEALED_BYTES, DefaultBodyLimit |
| A raw development bundle | 16 MiB | bundle_put |
One blob (an uploaded file, a package .mpk, uploaded or fetched from a registry) |
47 MiB: it reaches the other nodes base64-encoded in one sealed request | MAX_BLOB_BYTES, MAX_MPK_BYTES |
| Plain blobs one component app holds | 100 000 blobs, 10 GiB; 429 QUOTA_EXCEEDED past either |
MAX_COMPONENT_BLOBS, MAX_APP_BLOB_BYTES |
| Metadata (organization, member, team, app) | 16 KiB of JSON | MAX_METADATA_BYTES |
| Passkeys per account | 10 | AddPasskey |
| Registered web origins | 8 per package, 4 per instance, 64 per organization’s instances, 4096 packages’ and 4096 instances’ per cluster, 255 bytes each | MAX_ORIGINS_PER_PACKAGE, MAX_ORIGINS_PER_APP, MAX_APP_ORIGINS_PER_ORG, MAX_PACKAGE_ORIGINS, MAX_APP_ORIGINS, MAX_ORIGIN_BYTES |
| Aliases per account | 1000, each 1–64 characters | MAX_ALIASES |
| Passkey label | 64 characters | MAX_LABEL_CHARS |
| Upgrade runs kept per organization | 20 | UPGRADE_RUNS_KEPT |
| Events kept per app | 10 000 | EVENT_RING |
Outbound audit (GET /apps/{app}/outbound-log), in memory per node |
100 entries per instance, each 7 days at most, 1024 instances (the one whose last request is oldest goes first); a path cut at 128 bytes, 16 secret names an entry | MAX_AUDIT_ENTRIES, AUDIT_RETENTION_MS, MAX_AUDIT_INSTANCES, MAX_AUDIT_PATH_BYTES, MAX_AUDIT_SECRET_NAMES |
| Entries whose touched entities search remembers | 4096 | TOUCHED_RING |
| Presence | 512 authors per app, 4 KiB state, 7 s TTL | MAX_AUTHORS_PER_APP, MAX_STATE_BYTES, PRESENCE_TTL_MS |
| Event and presence streams per node | 4096; of those, 64 per account (its sessions and API keys together) and 1024 per app; a caller without an account counts toward its app’s and the node’s only; each refused 429 RATE_LIMITED, the message naming the limit |
MAX_EVENT_STREAMS, MAX_EVENT_STREAMS_PER_ACCOUNT, MAX_EVENT_STREAMS_PER_APP |
| Open passkey ceremonies per node | 10 000 sign-ins and sign-ups; apart from those, 8 per account and 10 000 across accounts, a new one displacing the oldest of the biggest holder; each 5 minutes | MAX_PENDING_CHALLENGES, MAX_CHALLENGES_PER_ACCOUNT, MAX_ACCOUNT_CHALLENGES |
| New client sessions (anonymous sealed handshakes) per node | 100 a second, 200 at once by default (merod’s --sealed-handshakes-per-second; the burst is twice the rate); past it 503 busy with Retry-After, which calimero-client waits out up to five times (each pause the longer of Retry-After and a backoff doubling from 1 s to 4 s, plus up to half again at random). Peers’ identified handshakes draw on a bucket of their own |
HANDSHAKES_PER_SECOND, HANDSHAKE_BURST |
| Client requests a node serves at once | 512 by default (merod’s --max-inflight-requests, 0 for no bound); past it 503 UNAVAILABLE at once, which clients retry with jittered backoff, rather than a queue whose latency grows without end. internal/*, /ops, /health and /attestation are never refused; calimero_http_requests_shed_total counts what was |
MAX_INFLIGHT_REQUESTS, api::admit |
| Sign-ups (accounts created) per node | 30 a minute by default (merod’s --sign-ups-per-minute), a minute’s worth at once, invited or not; an empty bucket refuses register/begin and register/finish 429 RATE_LIMITED with Retry-After (the seconds until the next) before a challenge is made or spent, and the confirming retry spends one before the log is asked to create the account. Node-local, nothing logged: account creation is a replicated system write that grows every node’s state |
SIGN_UPS_PER_MINUTE |
| A sign-up’s account name | 64 characters, 400 NAME_TOO_LONG at register/begin and at the finish |
MAX_ACCOUNT_NAME_CHARS |
A passkey ceremony’s request body (/auth/passkey/*) |
64 KiB, 413 TOO_LARGE |
MAX_PASSKEY_CEREMONY_BYTES |
| A new passkey’s credential id | 1023 bytes (WebAuthn’s bound), 400 BAD_REGISTRATION |
MAX_CREDENTIAL_ID_BYTES (calimero-identity) |
| Sealed sessions per node | 16 384 anonymous, 4096 identified (peers), each evicting its own; 1 h lifetime, 10 min idle | MAX_SESSIONS, MAX_IDENTIFIED_SESSIONS, SESSION_LIFETIME |
| Sealed handshakes per node | anonymous 100/s (burst 200); identified 50/s (burst 100), apart | HANDSHAKES_PER_SECOND, IDENTIFIED_HANDSHAKES_PER_SECOND |
| Release frontends | 32 open, 4096 releases remembered as shipping none; 4 .mpk loads at once, one per release |
CACHED_FRONTENDS, CACHED_ABSENT_FRONTENDS, FRONTEND_LOADS |
| Forward to an app’s leader | 5 s, then retry | FORWARD_TIMEOUT |
| A system write | 10 s, then 503 UNAVAILABLE |
SYSTEM_WRITE_TIMEOUT |
| Idempotency records per app | 100 000 (both kinds), at most 4096 dropped per entry | IDEMPOTENCY_MAX_RECORDS, EXPIRY_STEP |
| Cluster-key requests handled at once | 4 | MAX_CONCURRENT_KEY_RELEASES |
| One component of a package release (a service’s WASM or compute component, unpacked) | 47 MiB, as a blob: 413 TOO_LARGE at install |
MAX_COMPONENT_BYTES |
| Compiles at install and raw bundle upload | 1 at a time, off the async workers; 4 more wait, each at most 10 s, past that 503 BUSY with Retry-After: 1; one running or waiting per account, its next 429 TOO_MANY_COMPILES with Retry-After: 1, so the accounts take the slot in turn; one compile past 60 s is 422 COMPILE_TIMEOUT |
MAX_CONCURRENT_COMPILES, MAX_QUEUED_COMPILES, MAX_COMPILES_PER_ACCOUNT, COMPILE_WAIT, COMPILE_TIMEOUT |
Quotes (GET /attestation, a job node’s and a waiting node’s, merod attest --serve) |
1 made at a time, off the async workers; 8 more wait, each at most 3 s; past that 503 BUSY with Retry-After: 1 |
MAX_CONCURRENT_QUOTES, MAX_QUEUED_QUOTES, QUOTE_WAIT |
Quotes for the cluster’s own nodes (GET /attestation with a valid x-calimero-peer-attest) |
8 places of their own, each waiting at most 10 s, ahead of every anonymous request but the one already waiting; past that 503 BUSY |
MAX_QUEUED_PEER_QUOTES, PEER_QUOTE_WAIT |
Interval quotes (GET /attestation?form=interval) |
no quote per request: one quote per minute over the node’s interval key, served while at most 2 minutes old (else the per-request quote above); a verifier takes one at most 5 minutes old, dated at most 1 minute ahead of its clock | INTERVAL_QUOTE_EVERY, INTERVAL_QUOTE_SERVED_FOR, INTERVAL_QUOTE_MAX_AGE_SECS, INTERVAL_QUOTE_MAX_SKEW_SECS |
| Sealed-file exports | 30 a minute per account per node, a pipeline run’s export counting as one | MAX_EXPORTS_PER_MINUTE |
Sessions listed (GET /auth/sessions) |
256 | MAX_SESSIONS_LISTED |
| Deployments | 16 per owner, 10 000 per cluster, 64 apps each | MAX_DEPLOYMENTS_PER_OWNER, MAX_DEPLOYMENTS, MAX_APPS_PER_DEPLOYMENT |
| Organization and app-team names | 64 characters | MAX_ORG_NAME_CHARS, MAX_APP_TEAM_NAME_CHARS |
| Team rows changed at once | 64 teams | MAX_TEAM_BATCH |
Teams and members one GET /orgs/{org} answers |
1000 of each (limit, 1 to 1000; teamsAfter, membersAfter and the answer’s nextTeamsAfter, nextMembersAfter page through the rest) |
ORG_PAGE_LIMIT |
| Sign-up invites | 10 000, each at most 10 000 uses | MAX_SIGN_UP_INVITES, MAX_SIGN_UP_INVITE_USES |
| Compute pools | 32, names 1–64 bytes; 10 000 payer overrides | MAX_POOLS, MAX_POOL_NAME_BYTES, MAX_ORG_QUOTAS |
| Recovery disk | written every 5 min; the newest 3 files per subject; unlisted segments kept 7 days | RECOVERY_EVERY, KEEP, SEGMENT_KEEP |
| Rollback checkpoint | every 1 s | CHECKPOINT_EVERY |
| Compute runs, files and job nodes | See Compute actions | MAX_COMPUTE_WALL_SECS, MAX_COMPUTE_MEMORY_MIB, MAX_COMPUTE_FUEL |
| Replicas per app | --replicas, 3 by default; moves keep at least 3 |
A body past a limit is answered 413, error code TOO_LARGE, with the limit
in the message. Under 64 MiB the node’s own check answers, sealed like any
answer. Past 64 MiB the sealed envelope is refused before it can be opened, so
its 413 ({"error":{"code":"too_large",...}}, which calimero-client
reports as TOO_LARGE) comes back in the clear: sealing it would mean spending
the request id on bytes nobody has authenticated, letting a relay make the node
vouch for a refusal of a request the client never sent. The node reads and drops
the rest of such a body before it answers, up to 1 GiB and 120 s
(MAX_DISCARDED_BYTES, SEALED_READ_TIME), because a client that sends its
whole body before reading would otherwise meet a reset, not the answer; past
that, or for a declared length past 1 GiB or a client waiting on
Expect: 100-continue, it answers at once and closes.
Time limits
Section titled “Time limits”| What | Lifetime |
|---|---|
| Session token | 15 minutes |
| Refresh token | 30 days (7 bound to a holder key); exchanged by the first refresh once an hour old |
| API key | Up to 1 year |
| Passkey ceremony (sign-in, sign-up, step-up challenge) | 5 minutes |
| Invite | 7 days by default; 1 use by default |
| Sign-up invite | 7 days by default; at most 1 year |
| Account proof | 5 minutes |
| Organization or account recovery | 72 hours from start to finish (RECOVERY_DELAY_SECS) |
| Client idempotency record | 24 hours; the newest 10 000 kept regardless; at most 100 000 per app |
Node idempotency record (node:…) |
10 minutes; the newest 1000 kept regardless |
| Revoked session remembered | 1 hour |
sys_until / read-index wait |
2 seconds |
Quotas
Section titled “Quotas”Per account or per organization (the payer), set by the operator
(POST /ops/quotas, with org for one payer’s compute and file overrides),
checked at apply (The system group); a
refusal is 429 QUOTA_EXCEEDED.
| Quota | Default |
|---|---|
| Apps owned | 100 |
| Bundle and package bytes uploaded | 1 GiB |
| API keys | 50 |
| Organizations owned (every one from cluster version 1.0.0-rc.32; before, the personal one not counted) | 20 |
| Accounts on the cluster | 100 000 |
Stored file bytes per organization (maxFileBytesPerOrg; uploaded plain blobs count too from cluster version 1.0.0-rc.39) |
50 GB |
Concurrent compute runs per organization (maxConcurrentRunsPerOrg) |
4 |
Reserved compute fuel per organization (computeFuelPerOrg) |
10 times MAX_COMPUTE_FUEL |
Teams per organization, app teams included (maxTeamsPerOrg) |
1000 (MAX_TEAMS_PER_ORG) |
Metadata bytes per organization: its own, its members’ and its teams’, as JSON (maxMetadataBytesPerOrg) |
1 MiB (MAX_METADATA_BYTES_PER_ORG) |
Metadata bytes of the organizations one account owns, summed (maxMetadataBytesPerAccount) |
2 MiB (MAX_METADATA_BYTES_PER_ACCOUNT) |
Fuel per developer per UTC day (maxFuelPerDeveloperPerDay; the developer usage is billed to: a deployment’s owner for its instances, else the app’s org or owner) |
0 (no limit); checked before a client’s call or an xcall to any of its apps runs, not at apply: init, timer ticks and event handlers still run and count |
Every node holds the system state in memory and writes all of it into each snapshot, so
what one organization or account keeps there is bounded: teams per organization, and
metadata bytes per organization and per owning account. Across the cluster, metadata is so
bounded by maxAccounts times maxMetadataBytesPerAccount. A write that would not grow a
total always passes, so an organization over a bound (from before it, or a lowered quota)
can still shrink. Apply enforces these from cluster version 1.0.0-rc.39, and a change from
their defaults is written only from that version (409 FEATURE_NOT_ACTIVE); a node refuses
a write past them before it is logged on any version.
The fuel cap is approximate by at most one refresh interval (5 s). A call never
asks a peer: the node reads the apps it replicates from its own replicas, and the
others from what every peer answered at its last refresh, which asks all peers at
once every 5 s while a cap is set. A developer can so run past its cap for up to one
interval. A peer that stops answering keeps the figures it last reported. An app no
peer has reported yet counts as nothing, so the cap fails open rather than closed:
refusing every call to all of a developer’s apps whenever one replica of one of them
is unreachable would be worse than a developer briefly exceeding a daily cap. The cap is a
decimal string in JSON, as every 64-bit integer is
(Types); a node writes a non-zero cap only once every node runs
its release or newer (409 UPGRADE_PENDING).
Roles and capabilities
Section titled “Roles and capabilities”Organization roles (guest < member < admin < owner), team row roles (lead,
member, read-only) and the capability bits are on
Organizations, teams & access.
In calimero-node
Section titled “In calimero-node”Where the node implements this chapter, by the names in its code: paths are under crates/node/src
unless another crate is named. The design and its reasons are above; a module’s own detail is in its
//! doc, and the node’s mental model is crates/node/AGENTS.md.
Quotas
Section titled “Quotas”Code: system::Quotas, set with POST /ops/quotas.
Live in the system state and are checked at apply, so every node enforces the same limits; refusals
are 429 QUOTA_EXCEEDED.
maxFileBytesPerOrg counts the plaintext bytes of a component’s files, and from
Feature::MeteredBlobs the bytes of the plain blobs uploaded to it (BlobRecord::metered).
SystemState::app_file_bytes holds them per app, and payer_file_bytes is its sum per payer
(usage::payer), kept in step by set_app_file_bytes.
SystemCmd::ChargeFileBytes { app_id, delta } refuses a charge past the quota and floors a release
at 0.
DeleteApp, DeleteOrg and DeleteTeam free an app’s files through remove_app.
TransferApp of an app leaving a personal organization (to the new owner’s) is refused when that
organization’s quota would not hold its files.
The exception is maxFuelPerDeveloperPerDay (Q20, D76, D78; "0", the default, is no limit; a
decimal string in JSON, a number refused, system::decimal_u64).
It is charged to the app’s developer, usage::developer (#4839), the same identity usage is billed
to: the owner of the deployment an app was created from, else the app’s organization or owner.
So two payers’ instances of one developer’s deployment share one cap.
The fuel lives in the app groups’ usage books, so it is checked where a client’s call, a delivered
xcall or a synchronous xcall runs (Node::fuel_quota_refusal, from call_local_component, after
the idempotent replay and the delivered-xcall check, before the run); an action’s own calls are not
refused, as its start was.
The check asks no peer (Node::developer_fuel_cached): apps this node replicates are read from the
replica, the others from Node::refresh_usage, which every USAGE_REFRESH (5 s) while a cap is set
asks all peers at once (internal/usage/today) and keeps a silent peer’s last figures; so the cap
is approximate by one interval and an app no peer ever reported counts as nothing (fails open).
A refused delivered xcall is the target’s final answer (D29, deliver_one), not a dead letter.
The refusal is not logged, so the key is not spent; init, timer ticks and event handlers are never
refused, and they still count toward the developer’s day.
The quota is fuel; wall time is information only (D76).
A non-zero cap is written only once every registered node’s attested release is this node’s or newer
(Node::nodes_behind_release, as D71 gates base_seq), else 409 UPGRADE_PENDING
(api::UPGRADE_PENDING, one code for every such release gate), judged before the operator is asked
to sign (__set_quotas, #4791): an older node would drop the field and its snapshots would reset
the cap.
Accepted gap (#4809): an older node added after the cap is set, then sent a quota change itself,
writes the quotas without the cap; the runbook says not to add nodes older than 1.0.0-rc.12 then,
and the W19 minimum-release gate closes it.
The bounds on the system state are system::state_caps: SystemState::check_state_caps judges
CreateTeam, SetOrgMetadata, SetMemberMetadata and UpdateTeam with metadata, in
Node::sys_write before a write is proposed and in system/orgs.rs at apply once the logged
cluster version brings Feature::StateCaps. An organization’s metadata bytes
(org_metadata_bytes) are the JSON of its own, its members’ and its teams’ metadata; an
account’s are those of every organization it owns. App teams ScopeApps makes count toward
maxTeamsPerOrg but are not refused by it.
Usage reads (app_usage, internal/usage, replicas_usage_on) use replica_group, never a group
the node keeps after the app moved away.