OpenBazaar Updates Bitcoin Wallets with Segwit Support

OpenBazaar Updates Bitcoin Wallets with Segwit Support

Segregated Witness has thankfully activated on the Bitcoin network before the release of OpenBazaar 2.0. This has given us an opportunity to upgrade OpenBazaar to make use of segwit before putting it in the hands of users. Had segwit activated later, it would have made upgrading to segwit much more difficult as all parties to an escrow transaction (the buyer, vendor, and moderator) would need upgrade before segwit could be used. This would also necessitate the need to build in more complex script negotiations to get all parties to agree on what type of script to use. By implementing segwit now we can, hopefully, reduce the fees users will pay to transact on OpenBazaar. Openbazaar Segwit

Specifics

For multisig transactions OpenBazaar will use Bech32 encoded pay-to-witness-script-hash (P2WSH) addresses. The downside to using this address type is that many external wallets are not yet upgraded to send to these addresses. However, the OpenBazaar internal wallet is, so the worse case scenario if you don’t currently use a segwit compatible wallet is that you can send the coins into the OpenBazaar internal wallet and fund your transaction from there. For the time being the internal wallet will continue to vend old-style pay-to-pubkey-hash (P2PKH) addresses. We would like to switch to pay-to-witness-pubkey-hash (P2WPKH) addresses but, again, few external wallets support sending to this address type and it would make it difficult for people to send money into the wallet. We could switch to using nested P2SH addresses, but this would be a very disruptive change to our codebase and the benefits aren’t really worth the cost at this point. Once enough other wallets have enabled sending to P2WPKH we will switch the internal wallet over to P2WPKH. We’ve already done some prep work that will make the transition to the new address type seamless as the wallet will know how to detect payments to and spend from both P2PKH and P2WPKH addresses.   Read More at the OpenBazaar Blog