Umbrel: Native Segwit (Bech32) Support

Created on 9 Oct 2020  路  8Comments  路  Source: getumbrel/umbrel

Bitcoin core addresses are not Native Segwit (Bech32, bc1 addresses). Shouldn't a shiny new node stack like this use it by default?

enhancement

Most helpful comment

Just as a note, native segwit (p2wpkh/Bech32/bc1q) will actually be used for most of your UTXOs. We show compatibility segwit (p2sh-p2wpk/3) addresses for deposits for increased compatibility so it'll work when sending from old wallets/exchanges that don't yet support sending to native segwit addresses.

However this is only for the deposit. We use native segwit addresses for change internally. So as soon as you open a channel, or send a transaction your Bitcoin will all be in native segwit addresses.

e.g:

Send 1 BTC to Umbre in compatibility segwit address:

Wallet:
1 BTC: compatibility segwit UTXO

Open a 0.1 BTC channel:

Wallet
0.1 BTC: locked in native segwit Lightning channel
0.9 BTC: native segwit UTXO

All 8 comments

@maltokyo I tried running Umbrel on Ubuntu today and noticed that it creates an address starting with "2N" for receiving (testnet)

image

I am assuming this is a multisig address (testnet-legacy). Where can I read more about the settings that are used for creating the default wallet in Bitcoin Core and generating new address? Will there be an option in Umbrel for users to create new wallet (multiple wallets), import/export wallet in future?

Or maybe its just creating a new p2sh-segwit address with getnewaddress command:

image

So @prayank23 is there no bech32 available?

So @prayank23 is there no bech32 available?

getnewaddress can be run with 'bech32' as address_type but I am not sure where is this mentioned in the Umbrel code. Still checking in the repository.

Just as a note, native segwit (p2wpkh/Bech32/bc1q) will actually be used for most of your UTXOs. We show compatibility segwit (p2sh-p2wpk/3) addresses for deposits for increased compatibility so it'll work when sending from old wallets/exchanges that don't yet support sending to native segwit addresses.

However this is only for the deposit. We use native segwit addresses for change internally. So as soon as you open a channel, or send a transaction your Bitcoin will all be in native segwit addresses.

e.g:

Send 1 BTC to Umbre in compatibility segwit address:

Wallet:
1 BTC: compatibility segwit UTXO

Open a 0.1 BTC channel:

Wallet
0.1 BTC: locked in native segwit Lightning channel
0.9 BTC: native segwit UTXO

@prayank23

I tried running Umbrel on Ubuntu today and noticed that it creates an address starting with "2N" for receiving (testnet)

That's just a compatibility segwit address on testnet.

Where can I read more about the settings that are used for creating the default wallet in Bitcoin Core and generating new address?

We don't use the Bitcoin Core wallet, we use the LND on-chain wallet, which is backed by Neutrino until Bitcoin Core is synced, and then it's backed by Bitcoin Core.

Will there be an option in Umbrel for users to create new wallet (multiple wallets), import/export wallet in future?

Probably not, that's not the intended use case for Umbrel. It's designed to be a server that you connect your wallets to, not a wallet itself. The included Bitcoin wallet only has basic functionality as it's only supposed to be used for depositing/withdrawing funds to open/close Lightning channels.

Hi @lukechilds many thanks for the replies. Good to know.

Is there some code I could change to enable bech32 for even the receive address? Just doesn't feel good that it's not an option.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kilrau picture kilrau  路  9Comments

jaonoctus picture jaonoctus  路  3Comments

AaronDewes picture AaronDewes  路  3Comments

mayankchhabra picture mayankchhabra  路  4Comments

rstmsn picture rstmsn  路  5Comments