Block Reference
COUNTER_PRESET
PLC Family
TYPE 0x0632 · PLC FAMILY

COUNTER_PRESET

Preset counter. SATISFIED while the current count is still below the preset target (accumulating). Becomes UNSATISFIED once the current count reaches or exceeds the preset value. No Tapscript equivalent exists.

PLC Invertible
COUNTER_PRESET current: 3 < preset: 10 current < preset → SATISFIED (still accumulating)
FieldData TypeSizeSideDescription
currentNUMERIC1-4 BConditionsCurrent counter value (NUMERIC[0])
presetNUMERIC1-4 BConditionsTarget preset value (NUMERIC[1])

No witness fields required — evaluation uses only the two NUMERIC condition fields.

0x0632 0 2 NUMERIC · 3B NUMERIC · 3B Conditions = 14 bytes
0x0632 0 0 Witness = 4 bytes (empty block)
Total 18 bytes
1.Read current (NUMERIC[0]) and preset (NUMERIC[1]) from conditions fields
2.If fewer than 2 NUMERIC fields → ERROR
3.If current < preset → SATISFIED (still accumulating)
4.If current ≥ preset → UNSATISFIED (target reached)
ConditionResult
Fewer than 2 NUMERIC fieldsERROR
current ≥ presetUNSATISFIED
current < presetSATISFIED
Conditions (current=3, preset=10)
{
  "type": "COUNTER_PRESET",
  "inverted": false,
  "fields": [
    { "type": "NUMERIC", "value": 3 },
    { "type": "NUMERIC", "value": 10 }
  ]
}

This creates a counter that remains SATISFIED until 10 events have been accumulated. Once current reaches 10, the block becomes UNSATISFIED.

current=3, preset=10

current=0, preset=10: 0 < 10 → SATISFIED
current=5, preset=10: 5 < 10 → SATISFIED
current=9, preset=10: 9 < 10 → SATISFIED (boundary)
current=10, preset=10: 10 ≥ 10 → UNSATISFIED (target reached)
current=15, preset=10: 15 ≥ 10 → UNSATISFIED (exceeded)
Threshold Triggers
Gate a spending path on reaching a specific event count. The UTXO remains spendable (SATISFIED) while accumulating, and locks (UNSATISFIED) once the threshold is hit — triggering a transition to a different covenant path.
Accumulation Targets
Track deposit counts or confirmation milestones. A treasury UTXO can enforce that at least N contributions have been recorded before releasing funds by combining COUNTER_PRESET with other covenant blocks.
Batch Size Enforcement
Enforce that a batch processing covenant only fires after a preset number of items have been queued, preventing premature batch execution and ensuring efficiency.
← COUNTER_DOWN COUNTER_UP →