/_includes/specials/taproot/00-bech32m.md

https://github.com/bitcoinops/bitcoinops.github.io · Markdown · 36 lines · 32 code · 4 blank · 0 comment · 0 complexity · eb5348681d683507a9cc3a429d884424 MD5 · raw file

  1. Starting at block {{site.trb}}, expected in November, Bitcoin users will be
  2. able to safely receive payments to taproot addresses. Given the
  3. user enthusiasm for taproot and the five months that wallet
  4. developers have to implement support for it, Optech expects there to be
  5. several popular wallets that will allow their users to generate taproot
  6. addresses at the earliest possible moment.
  7. That means any other wallet or service that sends bitcoins to
  8. user-provided addresses needs to be able to send to taproot addresses by
  9. block {{site.trb}} or risk confusing and disappointing its users. Pay
  10. to TapRoot (P2TR) addresses use [bech32m][topic bech32] as specified in [BIP350][], which
  11. is slightly different than [BIP173][]'s bech32 algorithm used for segwit
  12. v0 P2WPKH and P2WSH addresses. Bech32m uses the constant
  13. `0x2bc830a3` instead of bech32's `0x01` in the checksum function.
  14. Changing that single constant provides the
  15. ability to verify bech32m checksums, but the code still needs to use the original constant for existing
  16. P2WPKH and P2WSH addresses. The code needs to decode the address
  17. without verifying the checksum, determine whether it uses v0 segwit (bech32) or
  18. v1+ segwit (bech32m), and then validate the checksum with the appropriate
  19. constant. For examples, see the [PR][bech32#56] that updated the bech32
  20. reference implementations for C, C++, JS, and Python. If the code already
  21. uses the reference libraries, they can be updated to the latest code from
  22. that repository, although note that some of the APIs have slight
  23. changes. BIP350 and the reference implementations provide test vectors
  24. that all bech32m implementations should use.
  25. Although *receiving* payments to taproot addresses won't be safe until
  26. block {{site.trb}}, *sending* payments should not cause any problems for the
  27. sender. Bitcoin Core has supported relaying and mining transactions
  28. with taproot-paying outputs since version 0.19 (released November 2019).
  29. Optech encourages developers of wallets and services to implement
  30. support for paying bech32m taproot addresses now rather than waiting
  31. until after taproot activates.
  32. [bech32#56]: https://github.com/sipa/bech32/pull/56