Skip to content

Latest commit

 

History

History
67 lines (48 loc) · 1.92 KB

070.md

File metadata and controls

67 lines (48 loc) · 1.92 KB
BUIP070: Support BitPay's new Bitcoin Cash address format in BUCash
Proposer: Gal Buki (@torusJKL)
Submitted on: 2017-11-08
Status: passed

Motivation

Bitcoin and Bitcoin Cash share the same address format. This had the effect that users have sent BTC or BCH to an address that was used on the other chain such that if the other party does not recognize that chain the coins are "lost".

In addition users have sent BCH to SegWit addresses making them unspendable on the BCH chain even if the owner had the private key.

Objectives

Implement a new address format that only needs minimal changes on the wallet side but would make the addresses distinguishable from each other such that users do not send funds to addresses from wallets that use the BTC chain.

Solution

Use the new address format which has been implemented by BitPay in their Copay wallet by changing the version byte of the address. The version byte is set to 28 for p2pkh addresses and 40 for p2sh addresses.

Example p2pkh
Old format: 1422ciKobfkK2Zk3TpNSebmEBEtDHEP5nG

New format: CKUvBkfsUiiqvheU9ZhNE7PFoN6d99oMoo

Example p2sh
Old format: 36XTMVtgJqqNYymsSvRonpUsbZRGkm1jvX

New format: HBMZpJKmAA43B9euJc5xmD1QdDSHh9j6kR

Development task

BUCash should develop the following:

  • allow to use the new address format when sending a payment
  • allow to use the new address format when signing and verifying a message
  • allow to configure in the GUI if addresses should be displayed in the new or old format
  • provide a command line argument to convert the old format to the new and vice versa

References

BitPay's blog about the new address format

BitPay's address translator

Basic support in Bitcoin Classic 1.3.7