Skip to content

OP_CHECKSIGADD order of the stack elements #25

Description

@rafaelpac

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions