xln

Rejected remote input policy

Owner canon (2026-09-05): a user or peer can never take a Runtime down. Any input a Runtime rejects because the sender is wrong (malformed remote EntityInput, a conflicting user-authored prepare/materialize, an authenticated peer Account frame whose tx fails validation) is a rejection, never a runtime fault.

The transition types the rejection and logs it without reading process env; the Runtime loop reads the policy once per frame attempt and decides what the frame does with the recorded outcome.

mode when behaviour
fail-fast (default) tests, dev, CI, any NODE_ENV != production the rejection is logged and surfaced to the caller of the Runtime loop, so a hostile or buggy peer surfaces in tests
log-and-drop NODE_ENV=production or XLN_REJECT_FAIL_FAST=0 the rejection is logged and the offending input/tx is dropped; the Runtime keeps serving

XLN_REJECT_FAIL_FAST=1 forces fail-fast even in production.

Surfacing is not a corrupted-state halt: the Runtime is never marked mutated-and-unreadable by a sender-caused rejection. An ingress rejected before mutation keeps its exact input queued and re-raises the typed error; a rejection decided inside a frame is raised only after that frame is durable, so honest work committed beside it is never rolled back.

The log line to watch

Every such line in a test, scenario or stand run is a bug to investigate (fail-fast makes it a halt). In production it is the audit trail of peers to inspect.

Where it is enforced

Both engines evict exactly the rejected tx and keep the rest of the signer’s queue: TS in core/runtime/mempool/entity-inputs.ts, Rust in kernel.rs and resident.rs. In fail-fast mode both halt.