Skip to content

rpc: scriptPubKey type says multisig when Core doesn't #1181

Closed

Description

@Naomi-Gift

Every scriptPubKey has a type field that says what kind of script it is. rbitcoin's rule for spotting a multisig is not the same as Core's, so some scripts get the wrong type.

This matters because wallets, explorers and other tools read type to decide how to show or handle an output. If rbitcoin says multisig and Core says nonstandard, the same transaction looks different depending on which node you ask.

How to see it:

decodescript 5101ab51ae

This says "1 of 1 multisig", but the only "key" is a single byte. That can't be a real key.

  • Core: nonstandard
  • rbitcoin: multisig
decodescript 51210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798aeae

This is a key followed by OP_CHECKMULTISIG twice, with no number saying how many keys there are.

  • Core: nonstandard
  • rbitcoin: multisig

A bare multisig with 17 keys goes the other way. The script is too long to paste here, but:

  • Core: multisig (Core allows up to 20 keys)
  • rbitcoin: nonstandard (it stops at 16)

After #1176, desc already gets all three right: raw(…) for the first two, multi(…) for the 17-key one. So right now type and desc can disagree about the same script.

Fix:

Make type use the same multisig check desc uses after #1176, so both give the same answer as Core. Then the three scripts above become nonstandard, nonstandard and multisig.

Activity

  1. added a commit that references this issue on Oct 24, 2026
    29dd8bd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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