opcodes like OP_VERIFY can also cause script to fail

Open
#21 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
55/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Domain
documentation

Research direction

Start with script/script.md at the linked revision, especially the failure-condition list around line 17. Add the proposed OP_VERIFY, unmatched conditional, unclosed conditional, and final false-stack cases, then review the document to confirm all suggested failure conditions are represented.

Written by the indexing model from the issue text.

Description

referencing https://github.com/thunderbiscuit/opcodeexplained.com/blob/ecc35350a57a049c5e45d2c12b5f597dda54104d/script/script.md?plain=1#L17

Suggesting :

 - If the opcode functions to validate a condition and quickly terminate when that condition is not valid (ie: OP_VERIFY).
 - if OP_ENDIF is reached without a previous opening OP_IF, OP_NOTIF, or OP_ELSE.

and then as the last two in this list:

 - if at the end of the script, a conditional segment was not closed by OP_ENDIF.
 - If after the script concludes, the top of the stack is "false" (empty or zero -- regardless of additional items below).
Dominant language
JavaScript
Stars
38
Forks
14
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from thunderbiscuit/opcodeexplained.com

All issues in thunderbiscuit/opcodeexplained.com

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.