Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Bigpiggy01 on January 15, 2018, 10:12:11 AM



Title: Looking for decent guides on how to open Segwit compliant wallets.
Post by: Bigpiggy01 on January 15, 2018, 10:12:11 AM
The topic really says it all.
I'm looking for a decent guide/guides to making electrum/core segwit compliant.
I'd be happy to contribute a couple of translations (Chinese, Malay and Danish) to where ever the guides are posted.


Title: Re: Looking for decent guides on how to open Segwit compliant wallets.
Post by: achow101 on January 15, 2018, 06:03:18 PM
What do you mean by "making electrum/core segwit compliant"? Do you mean how to make a segwit wallet with these software?


Title: Re: Looking for decent guides on how to open Segwit compliant wallets.
Post by: Bigpiggy01 on January 16, 2018, 03:35:00 PM
Exactly  ;D



Title: Re: Looking for decent guides on how to open Segwit compliant wallets.
Post by: Valle on January 17, 2018, 06:10:55 AM
There are none, only bitcoin core source code + bips + tests from https://github.com/bitcoin/bitcoin/tree/master/src/test/data
You'll need implement basic bitcoin first,  then bip143 hash (this gives bitcoin cash implementation almost for free), then p2sh, then segwit tx validation.


Title: Re: Looking for decent guides on how to open Segwit compliant wallets.
Post by: Bigpiggy01 on January 17, 2018, 10:06:10 AM
There are none, only bitcoin core source code + bips + tests from https://github.com/bitcoin/bitcoin/tree/master/src/test/data
You'll need implement basic bitcoin first,  then bip143 hash (this gives bitcoin cash implementation almost for free), then p2sh, then segwit tx validation.

UGH! And I need to make it grandparent friendly. I guess I'd better start writing then.


Title: Re: Looking for decent guides on how to open Segwit compliant wallets.
Post by: achow101 on January 17, 2018, 06:29:37 PM
There are none, only bitcoin core source code + bips + tests from https://github.com/bitcoin/bitcoin/tree/master/src/test/data
You'll need implement basic bitcoin first,  then bip143 hash (this gives bitcoin cash implementation almost for free), then p2sh, then segwit tx validation.
Umm, no. That's completely wrong. Electrum supports segwit out of the box. When you create a wallet, there is an option for Legacy or Segwit. Choosing Segwit lets you use bech32 addresses. It's super easy.

For Bitcoin Core, once 0.16.0 is released, it will use p2sh wrapped segwit by default.


Title: Re: Looking for decent guides on how to open Segwit compliant wallets.
Post by: Valle on January 18, 2018, 03:03:27 AM
Ah, seems I misunderstood the question since a segwit implementation is already in bitcoin core.


Title: Re: Looking for decent guides on how to open Segwit compliant wallets.
Post by: superbotolo on January 18, 2018, 03:46:27 AM
Umm, no. That's completely wrong. Electrum supports segwit out of the box. When you create a wallet, there is an option for Legacy or Segwit. Choosing Segwit lets you use bech32 addresses. It's super easy.

For Bitcoin Core, once 0.16.0 is released, it will use p2sh wrapped segwit by default.

May I ask one question? If I create a Segwit wallet on Electrum, can I use that wallet to send/receive bitcoins from Legacy wallets? Also, will I be able to use the Lightning Network?


Title: Re: Looking for decent guides on how to open Segwit compliant wallets.
Post by: Xynerise on January 18, 2018, 07:39:18 AM
Ah, seems I misunderstood the question since a segwit implementation is already in bitcoin core.
Geez but is not really fleshed out so you have to do everything manually.
I believe full segwit support will come in the next update.


May I ask one question? If I create a Segwit wallet on Electrum, can I use that wallet to send/receive bitcoins from Legacy wallets? Also, will I be able to use the Lightning Network?
Segwit addresses and transactions are backwards compatible with legacy addresses (except in the case of "native segwit" addresses AKA Bech32 -- the ones that start with bc1)
Bech32 addresses are not backwards compatible with legacy software so you'll have to update your wallet to be able to SEND funds to such addresses of your wallet is not updated, but you can always RECEIVE funds from them.


Yes, you'll be able to use the lightning network with Segwit addresses.
IIRC you can only use the lightning network with Segwit addresses because they're the only ones with the transaction malleability fix which makes lightning work seamlessly.


Title: Re: Looking for decent guides on how to open Segwit compliant wallets.
Post by: achow101 on January 21, 2018, 02:55:56 AM
May I ask one question? If I create a Segwit wallet on Electrum, can I use that wallet to send/receive bitcoins from Legacy wallets?
Kind of. Electrum jumped straight to using the new Bech32 address format for segwit addresses which only work with wallets that have implemented Bech32 support. There's a trick you can do to get the P2SH nested segwit addresses which are backwards compatible but are still segwit.

You can always send to non-segwit addresses.

Also, will I be able to use the Lightning Network?
No. You will need to use a software that supports the Lightning Network.