Block Reference
LATCH_RESET
PLC Family
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 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 BConditionsOptional delay parameter (block count) for reset timing

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 3 NUMERIC · 1B NUMERIC · 3B Conditions = 12 bytes
0x0622 0 2 PUBKEY · 32B SIG · 64B Witness = 104 bytes
Total 148 bytes
1.Verify witness PUBKEY against Merkle leaf (merkle_pub_key). If missing or mismatch → ERROR
2.Read state and delay_blocks from NUMERIC fields. If fewer than 2 NUMERIC fields → ERROR
3.If delay_blocks < 0 → ERROR
4.If state ≥ 1 → SATISFIED (latch can be reset)
5.If state == 0 → UNSATISFIED (already unset)
ConditionResult
Merkle leaf pubkey count mismatchERROR
Fewer than 2 NUMERIC fieldsERROR
delay_blocks < 0ERROR
state == 0 (already unset)UNSATISFIED
state ≥ 1 (set, can reset)SATISFIED
Conditions (latch set, ready to reset, 144-block delay)
{
  "type": "LATCH_RESET",
  "inverted": false,
  "fields": [
    { "type": "PUBKEY", "hex": "03def2...33 bytes" },
    { "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.
← LATCH_SET COUNTER_DOWN →