TYPE 0x0622 · PLC FAMILY

LATCH_RESET

Latch reset contact. Activates when state is 1 or greater (set), allowing the latch to be reset. Paired with RECURSE_MODIFIED to flip the state back to 0. Complementary to LATCH_SET for reversible state toggles.

PLC Non-Invertible
LATCH_RESET state ≥ 1 state = 0 SATISFIED UNSATISFIED RECURSE_MODIFIED flips 1 → 0
FieldData TypeSizeSideDescription
stateNUMERIC1-4 BConditionsCurrent latch state: 0 = unset, ≥ 1 = set
delay_blocksNUMERIC1-4 BConditionsDelay countdown (block count). Reset only fires when delay has decayed to 0 via the RECURSE_MODIFIED carry-rule chain. Must be ≥ 0.
resetter_pubkeyPUBKEY32-33 BWitnessResetter key (folded out of conditions via merkle_pub_key; revealed at spend time and bound by Merkle proof). Required by HasRequiredPubkeys(block, 1) at consensus.

Public key folded into Merkle leaf via merkle_pub_key (PubkeyCountForBlock = 1). No key field in conditions.

Two NUMERIC fields (state and delay_blocks) are required.

0x0622 0 2 NUMERIC · 3B NUMERIC · 3B Conditions ≈ 14 bytes
0x0622 0 1 PUBKEY · 35B Witness ≈ 39 bytes
Total ≈ 53 bytes
1.HasRequiredPubkeys(block, 1): at least one PUBKEY (the resetter key) must be present in the merged block; else → ERROR. Identity is bound at MLSC-proof level via merkle_pub_key.
2.Collect NUMERICs. Fewer than 2 → ERROR. ReadNumeric the first as state and the second as delay_blocks; either undecodable → ERROR
3.If delay_blocks < 0ERROR
4.If state ≥ 1 and delay_blocks == 0SATISFIED (set + matured; the RESET rung is live — pair with RECURSE_MODIFIED to enforce 1→0 and decrement delay_blocks in the output). Otherwise (unset, or set but delay_blocks > 0) → UNSATISFIED. Without the delay_blocks == 0 gate the timed-reset semantics would not be consensus-active — covenants shipped with delay > 0 would otherwise fire immediately.
ConditionResult
No PUBKEY in the merged blockERROR
Fewer than 2 NUMERIC fields, or either undecodableERROR
delay_blocks < 0ERROR
state == 0 (already unset)UNSATISFIED
state ≥ 1 but delay_blocks > 0 (still maturing)UNSATISFIED
state ≥ 1 and delay_blocks == 0 (set + matured, RESET rung is live)SATISFIED
Conditions (latch set, ready to reset, 144-block delay)
{
  "type": "LATCH_RESET",
  "inverted": false,
  "fields": [
    { "type": "NUMERIC", "value": 1 },
    { "type": "NUMERIC", "value": 144 }
  ]
}

This latch is in the set state (1) with a 144-block delay parameter. A spend authorized by the resetter key with RECURSE_MODIFIED will flip state back to 0.

Reset Authorization
A separate key holder can reset a latch that was previously set, returning the covenant to its original state. Useful for multi-party workflows where set and reset are controlled by different parties.
Feature Deactivation
Paired with LATCH_SET, this creates a toggle system. Features activated by setting the latch can be deactivated by resetting it, enabling on/off governance controls within covenant chains.
Reversible State Toggle
LATCH_SET and LATCH_RESET together model a full SR (set-reset) flip-flop in ladder logic. The covenant can cycle between states indefinitely, with different keys controlling each transition.