Change address format in RPCExamples from legacy to bech32 #18185

issue theStack opened this issue on February 20, 2020
  1. theStack commented at 1:04 PM on February 20, 2020: contributor

    Regarding that Bitcoin Core switched to bech32 as the default format for addresses recently (with release 0.19.0.1), this should also be reflected in the RPC help texts. The change was already done for the RPCs getaddressinfo (commit https://github.com/bitcoin/bitcoin/commit/2ee0cb3330ccf70f0540cb42370796e32eff1569 by jonatack, PR #17283) and validateaddress (commit https://github.com/bitcoin/bitcoin/pull/18122/commits/7f1475c7119e8c72bce39a63386a6ca859066b80 by my humble self, PR https://github.com/bitcoin/bitcoin/pull/18122/), but there are still some RPCExamples around with Base58 addresses, i.e.

    • setlabel
    • sendtoaddress
    • getreceivedbyaddress
    • .....

    All those legacy address usages should be identified and substituted by bech32 addresses where it makes sense (note that e.g. for signmessage and verifymessage there is as far as I know no possibility to sign with segwit addresses yet, hence the legacy addresses should stay). For the address, the newly introduced string constant EXAMPLE_ADDRESS (in src/rpc/util.h) can be used, which contains an illegal bech32 address.

    Useful skills:

    Basic understanding of address formats.

    Want to work on this issue?

    The purpose of the good first issue label is to highlight which issues are suitable for a new contributor without a deep understanding of the codebase.

    You do not need to request permission to start working on this. You are encouraged to comment on the issue if you are planning to work on it. This will help other contributors monitor which issues are actively being addressed and is also an effective way to request assistance if and when you need it.

    For guidance on contributing, please read CONTRIBUTING.md before opening your pull request.

  2. theStack added the label good first issue on Feb 20, 2020
  3. fanquake added the label Docs on Feb 20, 2020
  4. fanquake added the label RPC/REST/ZMQ on Feb 20, 2020
  5. yusufsahinhamza cross-referenced this on Feb 22, 2020 from issue rpc: update some RPCExamples to bech32 by yusufsahinhamza
  6. yusufsahinhamza cross-referenced this on Feb 25, 2020 from issue rpc: Change RPCExamples to bech32 by yusufsahinhamza
  7. MarcoFalke closed this on Mar 11, 2020

  8. sidhujag referenced this in commit db2052837f on Mar 11, 2020
  9. sidhujag referenced this in commit b232f23b00 on Nov 10, 2020
  10. bitcoin locked this on Feb 15, 2022
  11. knst referenced this in commit d780995d47 on May 16, 2023
  12. PastaPastaPasta referenced this in commit 52581d3f2b on May 31, 2023

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-05-19 06:54 UTC