Opcodes · control · enabled

OP_BEGIN (0x65)

Marks the start of a loop by pushing the current instruction position to the control stack. The matching OP_UNTIL jumps back here. This byte was the disabled OP_VERIF before May 2026. OP_BEGIN and OP_UNTIL must pair up even inside an unexecuted branch, and an OP_IF block cannot cross a loop boundary.

Verified
Stack in → out
∅ → ∅
Cost
Base instruction cost 100. Loops are bounded by the density-based operation cost and hashing limits, not by an iteration count.
Bitcoin status
Not in Bitcoin (BTC)BTC has no loops. 0x65 is OP_VERIF there, which fails even in an unexecuted branch.

Example

OP_0 OP_BEGIN OP_1ADD OP_DUP OP_10 OP_EQUAL OP_UNTIL

Step through it opcode by opcode in Bitauth IDE, the in-browser BCH VM debugger.

Sources

  1. CHIP-2021-05 Loops: Bounded Looping Operations
  2. Libauth BCH_2026_05 opcodes (bch-2026-opcodes.ts)
  3. Announcing Bitcoin Cash Node v29.0.0
  4. BCHN script interpreter (interpreter.cpp)