VAULT quine:
op | stack |
---|---|
START |
{1,0,<release_sig>} |
<counter> |
<counter> {1,0,<release_sig>} |
<leaf-update-script-body> |
<leaf-update-script-body> <counter> {1,-1,<release_sig>} |
TOALTSTACK |
<counter> {1,0} |
DUP |
<counter> <counter> {1,0,<release_sig>} |
NOTIF |
<counter> <release_sig> |
DROP |
<release_sig> |
<relase_pubkey> |
<release_pubkey> <release_sig> |
CHECKSIG |
{1,0} |
ELSE |
<counter> {1,0} |
SWAP |
{1,0} <counter> |
IF |
<counter> |
1ADD |
<next_counter> |
ELSE |
<counter> |
1SUB |
<next_counter> |
ENDIF |
<next_counter> |
0 |
0 <next_counter> |
-1 |
-1 0 <next_counter> |
0 |
0 -1 0 <next_counter> |
3 |
3 0 -1 0 <next_counter> |
ROLL |
<next_counter> 0 -1 0 |
FROMALTSTACK |
<leaf-update-script-body> <next_counter> 0 -1 0 |
DUP |
<leaf-update-script-body> <leaf-update-script-body> <next_counter> 0 -1 0 |
2 |
2 <leaf-update-script-body> <leaf-update-script-body> <next_counter> 0 -1 0 |
SWAP |
<leaf-update-script-body> 2 <leaf-update-script-body> <next_counter> 0 -1 0 |
VAULT |
1 |
ENDIF |
{1,0} |
Initial script:
0 -1 0 <initial_counter> 'TOALTSTACK DUP NOTIF DROP <release_pubkey> CHECKSIG ELSE SWAP IF 1ADD ELSE 1SUB ENDIF 0 -1 0 3 ROLL FROMALTSTACK DUP 2 SWAP VAULT ENDIF' DUP 2 SWAP OP_VAULT