OP_CHECKSIGADD order of the stack elements

Open Beginner friendly
#25 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
65/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Domain
documentation

Research direction

Start with opcodes/OP_CHECKSIGADD.md and compare its stack-order description with the OP_CHECKSIGADD section of BIP-342. Correct the documented pop order to match the BIP and verify that the explanation reflects the witness signature's position on the stack.

Written by the indexing model from the issue text.

Description

OP_CHECKSIGADD says that:

Pop 3 items from the stack:

  1. Signature (top)
  2. Public key
  3. An integer counter

But BIP-342 Rules for signature opcodes says:

For OP_CHECKSIGADD,

  1. the public key (top element),
  2. a CScriptNum n (second to top element), and
  3. a signature (third to top element)
    are popped from the stack.

The signature (witness) has to go first on the stack, so it has to be the third one, as the BIP says.

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.