rpc: fix OpenRPC hex pattern to allow empty strings #36462

pull ViniciusCestarii wants to merge 1 commits into bitcoin:master from ViniciusCestarii:openrpc-hex-pattern changing 2 files +3 −3
  1. ViniciusCestarii commented at 10:46 PM on October 7, 2026: contributor

    The OpenRPC schema from getopenrpcinfo declares every STR_HEX value with the pattern ^[0-9a-fA-F]+$. That pattern rejects the empty string, but the node both returns and accepts empty hex. For example:

    • scriptSig.hex is "" for native segwit input (decoderawtransaction, getrawtransaction, etc)
    • decodescript "" succeeds

    So a client that validates traffic against the schema rejects valid requests and responses.

    This changes the pattern to ^([0-9a-fA-F]{2})*$ (zero or more hex-encoded bytes)

  2. rpc: Fix OpenRPC hex pattern to allow empty strings 4d7e00d36b
  3. DrahtBot added the label RPC/REST/ZMQ on Oct 7, 2026
  4. DrahtBot commented at 10:46 PM on October 7, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    ACK maflcko, sedited, willcl-ark

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. maflcko commented at 4:55 AM on October 8, 2026: member

    lgtm ACK 4d7e00d36bf0d287dc241c3aae3852f3d799ed08

  6. sedited approved
  7. sedited commented at 8:00 AM on October 8, 2026: contributor

    ACK 4d7e00d36bf0d287dc241c3aae3852f3d799ed08

  8. sedited requested review from willcl-ark on Oct 8, 2026
  9. willcl-ark approved
  10. willcl-ark commented at 8:16 AM on October 8, 2026: member

    ACK 4d7e00d36bf0d287dc241c3aae3852f3d799ed08

  11. sedited merged this on Oct 8, 2026
  12. sedited closed this on Oct 8, 2026

  13. maflcko commented at 9:09 AM on October 8, 2026: member

    In theory, one could have size set (in the docs and the schema), if the size is hard and known, but this is probably a massively larger change.

  14. fanquake referenced this in commit d66ea38afc on Oct 8, 2026
  15. fanquake commented at 10:54 AM on October 8, 2026: member

    Backported to 32.x in #36427.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-10-14 17:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me