Internal bug detected: “isValid == error_msg.empty()” when validateaddress(bc1p0xlxvlhemja6c4dqv22uapctqupfhlxm9h8z3k2e72q4k9hcz7v07qwwzcrf) #28064

issue meglio openend this issue on July 11, 2023
  1. meglio commented at 5:55 am on July 11, 2023: none

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    validateaddress(bc1p0xlxvlhemja6c4dqv22uapctqupfhlxm9h8z3k2e72q4k9hcz7v07qwwzcrf)

    when calling through rpc api, throws an error:

    0Internal bug detected: "isValid == error_msg.empty()"
    1rpc/output_script.cpp:64 (operator())
    2Bitcoin Core v25.0.0
    3Please report this issue here: https://github.com/bitcoin/bitcoin/issues
    

    Expected behaviour

    Address validation to return is_valid=false in the rpc api result.

    This address bc1p0xlxvlhemja6c4dqv22uapctqupfhlxm9h8z3k2e72q4k9hcz7v07qwwzcrf is taken from the test vectors found here:

    https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki

    Steps to reproduce

    Call RPC API: validateaddress(bc1p0xlxvlhemja6c4dqv22uapctqupfhlxm9h8z3k2e72q4k9hcz7v07qwwzcrf)

    Relevant log output

    0Internal bug detected: "isValid == error_msg.empty()"
    1rpc/output_script.cpp:64 (operator())
    2Bitcoin Core v25.0.0
    3Please report this issue here: https://github.com/bitcoin/bitcoin/issues
    

    How did you obtain Bitcoin Core

    Pre-built binaries

    What version of Bitcoin Core are you using?

    v25.0.0

    Operating system and version

    MacOS Ventura 13.4 (22F66)

    Machine specifications

    No response

  2. MarcoFalke commented at 6:03 am on July 11, 2023: member
    This will be fixed in 25.1, see 725c3dc2dd1402d631e05ef461fe2abbac9a008f
  3. MarcoFalke added this to the milestone 25.1 on Jul 11, 2023
  4. MarcoFalke added the label RPC/REST/ZMQ on Jul 11, 2023
  5. fanquake commented at 7:56 am on July 11, 2023: member
    Closing, given the fix has been backported. @meglio if you’re able to compile the 25.x branch, and confirm this fixes your issue, please do.
  6. fanquake closed this on Jul 11, 2023

  7. russeree commented at 7:58 am on July 11, 2023: contributor

    This is currently resolved in master via the addition of an else case to if (ConvertBits<5, 8, false>([&](unsigned char c) { data.push_back(c); }, dec.data.begin() + 1, dec.data.end()))

    here

    https://github.com/bitcoin/bitcoin/blob/ef29d5d7e239b42269dd22ea94a709b5e4ceb5e5/src/key_io.cpp#L194-L197


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: 2024-06-29 07:13 UTC

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