- keep a worksheet up to date in committed
docs/worksheets/when we reach a stopping point or complete a task (resumable session traces;bin/worksheet <slug>to start one)..workspace/remains optional private scratch.
See docs/signing-canonical-and-validation.md for the full rationale. The two rules:
-
Signed-message fields are
Option[T](omit-safe) or REQUIRED (no default) — never a non-Optionfield with a default. ABoolean = false/SortedMap = emptyon a signed message is a latentInvalidSignature: the client omits it, the chain's decoder re-fills it, and the signed vs verified canonicals diverge (dropNulls stripsnull, notfalse/{}). Guarded byPublishVersionSigningCanonicalSuite— add a case for any new signed message. -
The block-validity gate (
validateUpdate/validateSignedUpdate) does STRUCTURAL checks only; stateful rejection that needsCalculatedStategoes in the combiner (gracefulCombineRejected→RejectionReceipt, the authoritative deterministic gate). tessellation block acceptance is all-or-nothing, so a stateful Invalid on one tx drops the whole block. Registry stateful checks are combine-only (L1 can't see the version lineage); fiber stateful checks stay at L1 (the recreatedCommitIndexhas the seqNum — OnChain v2 carries only per-batchtouched*deltas; the cumulative commit maps live inCalculatedStateand the DL1 folds/heals them, see docs/proposals/onchain-incrementals.md). -
validateSignedUpdate(block acceptance) must NEVER readCalculatedState.registrylineage. Any validator that callslineageOf/refResolvesAndMatches/versionAppendableinsidevalidateSignedUpdateis a block-poisoning hazard: a TOCTOU race (concurrent publish, yank) returnsInvalid→ the entire block is dropped for ALL transactions in the snapshot. Rule: registry lineage checks belong ONLY in the combiner as gracefulCombineRejected.validateSignedUpdatefor fiber upgrade/create ops: structural checks only (field presence, expression depth, sequence number against theCommitIndex). Reading the RELOCATED commit maps (CalculatedState.fiberCommits/assetCommitsviaCommitIndex.fromCalculated) is NOT a violation — same safe triple as v1OnChain, merely moved; the rule bars lineage reads. Guarded by this comment — review every new L0Validator method that takes aSchemaReforSchemaBindingparameter.
Full agent guide: AGENTS.md