Skip to content

Implement P2SH_32

Calin Culianu requested to merge cculianu/bitcoin-cash-node:p2sh_32 into master

This implements a the required changes to the codebase to support p2sh_32 (that is, OP_HASH256 rather than OP_HASH160 as an alternative for p2sh). For reference: announcements!52 (merged)

The final work and finished touches for this MR are in !1600 (merged). They are not here (so you may see some TODOs here that were handled in !1600 (merged) and that also include proper test vectors there).


  • Get all the tests working (they presently don't compile)
  • Go back review TODOs This has been done in !1600 (merged)
  • Evaluate whether we should have the wallet support these addresses, and if so, what the costs and caveats of that might be (currently wallet does not speak p2sh_32).
    • It was decided for now the wallet won't support these for itself, but it can send to them.
  • Even if we lack wallet support, add support for sending to p2sh_32 via RPC and/or via the GUI wallet.
  • Add unit and functional tests specific to this new feature

Test Plan

  • ninja all check-extended check-upgrade-activated-extended (must all pass)
  • ninja bench-bitcoin (must all complete)
Edited by freetrader

Merge request reports