Bitcoin Forum
April 23, 2024, 05:01:33 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 4 »  All
  Print  
Author Topic: Difference between SegWit addresses  (Read 9494 times)
OmegaStarScream (OP)
Staff
Legendary
*
Offline Offline

Activity: 3458
Merit: 6099



View Profile
November 02, 2017, 07:10:27 AM
 #1

Electrum 3.0 is out and the addresses are starting with bc1 apparently. I have a hardware wallet in the other hand where SegWit is supported too but the addresses are starting with 3 instead. What are the differences and are they compatible between each other (including the old addresses). Could I receive/send without having to worry?

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
1713891693
Hero Member
*
Offline Offline

Posts: 1713891693

View Profile Personal Message (Offline)

Ignore
1713891693
Reply with quote  #2

1713891693
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713891693
Hero Member
*
Offline Offline

Posts: 1713891693

View Profile Personal Message (Offline)

Ignore
1713891693
Reply with quote  #2

1713891693
Report to moderator
1713891693
Hero Member
*
Offline Offline

Posts: 1713891693

View Profile Personal Message (Offline)

Ignore
1713891693
Reply with quote  #2

1713891693
Report to moderator
bitcoinveda
Member
**
Offline Offline

Activity: 378
Merit: 10


View Profile
November 02, 2017, 10:01:17 AM
 #2

segwit addresses fees are low compared to BTC address and they are  identical in cryptographic format
Carlton Banks
Legendary
*
Offline Offline

Activity: 3430
Merit: 3071



View Profile
November 02, 2017, 11:23:29 AM
Merited by Mitchell (10), OmegaStarScream (5), minerjones (5), Mr. Big (5), ezeminer (5), Jet Cash (1), TheBeardedBaby (1), FrueGreads (1), Financisto (1)
 #3

Electrum 3.0 is out and the addresses are starting with bc1 apparently. I have a hardware wallet in the other hand where SegWit is supported too but the addresses are starting with 3 instead. What are the differences and are they compatible between each other (including the old addresses). Could I receive/send without having to worry?


The addresses starting with 3 (nested Segwit in a P2SH type) are definitely backwards compatible: older (non-Segwit) wallet software can receive BTC from your P2SH addresses, and they can send to them too.

The addresses starting bc1 (bech32 P2WPKH type) are a new Segwit only type to make addresses easier to use. They essentially make addresess case-insensitive, e.g. BC1MYNEWBITCOINADDRESSISBECH32 is the exact same address as bc1mynewbitcoinaddressisbech32

I'm sure bc1 (bech32 P2WPKH) are backwards compatible at the blockchain level, because they'd need a hard fork to implement them if not, but that doesn't mean that old wallet software will allow you to send BTC to them. Receiving from them using old wallet software may also be a problem, depending on how that specific wallet software is written. But old wallet software may be able to send or receive, to reiterate, it entirely depends on how the software was written.


It's maybe best to think of the 3 (P2SH) addresses as transitional, and the bc1 (bech32 P2WPKH) addresses as better for a post-Segwit situation (i.e. once non-Segwit addresses become atypical for users and businesses)

Vires in numeris
BillyBobZorton
Legendary
*
Offline Offline

Activity: 1204
Merit: 1028


View Profile
November 02, 2017, 01:27:02 PM
 #4

Just an interesting bit of information to have on mind when it comes to long term cold storage with segwit addresses: if you want to claim one of these dumb non-segwit forks like BCash that may happen in the future, you will not receive the coins. In other words, if there is a hardfork that does not support segwit, you will get no coins. So if there is ever another one of these with enough relevance to get some free money, remember that you must move your coins back to a legacy format address (the ones that start with 1.....). I think most people don't know that. Not that I expect anyone to make more non-segwit hardforks, but just in case, have that on mind. Im personally not moving my cold storage from the legacy format, I don't see the need.
monkeydominicorobin
Full Member
***
Offline Offline

Activity: 294
Merit: 104


✪ NEXCHANGE | BTC, LTC, ETH & DOGE ✪


View Profile
November 03, 2017, 08:10:03 AM
 #5

Electrum 3.0 is out and the addresses are starting with bc1 apparently. I have a hardware wallet in the other hand where SegWit is supported too but the addresses are starting with 3 instead. What are the differences and are they compatible between each other (including the old addresses). Could I receive/send without having to worry?

Of course they are compatible. The original developers of Bitcoin created segwit. But you should not confuse it with segwit2x which is a disgrace.

Thekool1s
Legendary
*
Offline Offline

Activity: 1512
Merit: 1218


Change is in your hands


View Profile
November 03, 2017, 10:11:36 AM
 #6

Electrum 3.0 is out and the addresses are starting with bc1 apparently. I have a hardware wallet in the other hand where SegWit is supported too but the addresses are starting with 3 instead. What are the differences and are they compatible between each other (including the old addresses). Could I receive/send without having to worry?


The addresses starting with 3 (nested Segwit in a P2SH type) are definitely backwards compatible: older (non-Segwit) wallet software can receive BTC from your P2SH addresses, and they can send to them too.

The addresses starting bc1 (bech32 P2WPKH type) are a new Segwit only type to make addresses easier to use. They essentially make addresess case-insensitive, e.g. BC1MYNEWBITCOINADDRESSISBECH32 is the exact same address as bc1mynewbitcoinaddressisbech32

I'm sure bc1 (bech32 P2WPKH) are backwards compatible at the blockchain level, because they'd need a hard fork to implement them if not, but that doesn't mean that old wallet software will allow you to send BTC to them. Receiving from them using old wallet software may also be a problem, depending on how that specific wallet software is written. But old wallet software may be able to send or receive, to reiterate, it entirely depends on how the software was written.


It's maybe best to think of the 3 (P2SH) addresses as transitional, and the bc1 (bech32 P2WPKH) addresses as better for a post-Segwit situation (i.e. once non-Segwit addresses become atypical for users and businesses)

Hey Carlton Banks, can you explain this in simple english kindly? I am not a technical guy, don't understand the terms like P2SH etc. I have few questions, that i would like to ask.

1) What are these Segwit Addresses?
2) How are these different from normal Addresses?
3) How are the fees low compared to other addresses?
4) If i upgrade from 2.9.3 to 3.0 will i have old addresses or it will swipe them?

The One
Legendary
*
Offline Offline

Activity: 924
Merit: 1000



View Profile
November 03, 2017, 11:17:56 AM
 #7

The addresses starting bc1 (bech32 P2WPKH type) are a new Segwit only type to make addresses easier to use. They essentially make addresess case-insensitive, e.g. BC1MYNEWBITCOINADDRESSISBECH32 is the exact same address as bc1mynewbitcoinaddressisbech32


So the number of possible addresses is reduced using bech32? Isn't that a disadvantage.

..C..
.....................
........What is C?.........
..............
...........ICO            Dec 1st – Dec 30th............
       ............Open            Dec 1st- Dec 30th............
...................ANN thread      Bounty....................

Carlton Banks
Legendary
*
Offline Offline

Activity: 3430
Merit: 3071



View Profile
November 03, 2017, 11:44:16 AM
Last edit: January 25, 2018, 11:11:41 AM by Carlton Banks
Merited by Mitchell (20), haroldtee (3), Financisto (1)
 #8

1) What are these Segwit Addresses?
  • There are 2 different Segwit address formats. They are P2SH (starting with a "3") and bech32 (starting "bc1")
  • P2SH can be sent to by people using older Bitcoin software with no Segwit support. This supports backwards compatibility
  • People sending from newer Bitcoin software that has Segwit and bech32 can send to the new address type that starts "bc1"
  • People sending from older Bitcoin software that has no Segwit probably cannot send to the new address type that starts "bc1"

So, if people send you BTC from old software, give them the Segwit addresses that start with "3". If people send you BTC using new Segwit Bitcoin software, give them the Segwit addresses that start with "bc1".

If you don't know if someone has the newer bech32 software or not, there's no need to worry, their software will simply refuse to send the transaction, so no harm can be done.


2) How are these different from normal Addresses?

  • You won't get the Segwit fee reduction unless you spend from one of these addresses
  • The addresses starting "3" are normal addresses. They already exist in the Bitcoin blockchain now. The difference is that the Bitcoin script permits a wide variety of options, in this case, using Segwit in a way that old Bitcoin software can handle (obviously old software has no clue what Segwit is, it didn't exist back then, this method works around that)
  • The addresses starting "bc1" are not normal addresses. They are brand new, and only work with Segwit
  • With addresses starting "bc1", it doesn't matter if you USE UPPER CASE. or if you use lower case. bc1bech32segwitaddressescanbeupperorlowercase is the same address as BC1BECH32SEGWITADDRESSESCANBEUPPERORLOWERCASE, neither your wallet software or the blockchain will care


3) How are the fees low compared to other addresses?

There are no guarantees. Bitcoin isn't like going to Walmart (where a price is the only price you can get), it's like going to an auction house. The miners control whose transactions they include in blocks, and they can do it any way they like, even totally crazy ways that lose them money.

But, you could expect to pay fees of ~50% less than non-Segwit transactions, for a regular transaction where you pay from just one address to one address (with one change address). Why? Sort of complicated, but I can explain if you like.


4) If i upgrade from 2.9.3 to 3.0 will i have old addresses or it will swipe them?

No. Old addresses can exist alongside Segwit addresses in the same wallet.

If you're nervous about this, just use a new wallet for all Segwit transactions. But Electrum's approach to wallet specs is flexible enough to allow it, and also the standard way of doing it, it has alot of fail safety built into the design. It should be fine (Disclaimer: I don't use Electrum wallet)

Vires in numeris
DannyHamilton
Legendary
*
Offline Offline

Activity: 3374
Merit: 4598



View Profile
November 03, 2017, 01:19:20 PM
Merited by Mitchell (20), OmegaStarScream (5), Financisto (1)
 #9

So the number of possible addresses is reduced using bech32?

No.

The old P2PKH addresses that started with a 1 were typically 34 characters long.

The new bech32 addresses are typically 42 characters long.

Also...

The first character of the old addresses indicated the address type, and the last 6 characters were part of the checksum, leaving approximately 27 characters of base58 key hash data. This leaves enough room for more than:
1.46 × 1048 possible addresses


With a bech32 P2WPKH address, the first 3 characters indicate the address type, and the last 6 characters are the checksum, leaving 33 characters of base32 key hash data.  This leaves enough room for more than:
1.46 × 1048 possible addresses

Since the public key hash is only a 160 bit value, there are only 1.46 × 1048 possible addresses.  Therefore, BOTH address formats have enough room for ALL possible currently valid addresses.
Carlton Banks
Legendary
*
Offline Offline

Activity: 3430
Merit: 3071



View Profile
November 03, 2017, 01:37:45 PM
Merited by Mitchell (20)
 #10

The public key hash for a bech32 address can also be a 256 bit value, but only for P2WSH addresses. These will have a larger number of possible addresses.

Vires in numeris
DannyHamilton
Legendary
*
Offline Offline

Activity: 3374
Merit: 4598



View Profile
November 03, 2017, 01:42:34 PM
Merited by Mitchell (10)
 #11

The public key hash for a bech32 address can also be a 256 bit value, but only for P2WSH addresses. These will have a larger number of possible addresses.

Correct.  bech32 P2WSH addresses are about 20 characters longer than bech32 P2WPKH addresses.
The One
Legendary
*
Offline Offline

Activity: 924
Merit: 1000



View Profile
November 03, 2017, 01:48:41 PM
 #12

So the number of possible addresses is reduced using bech32?

No.

The old P2PKH addresses that started with a 1 were typically 34 characters long.

The new bech32 addresses are typically 42 characters long.

Also...

The first character of the old addresses indicated the address type, and the last 6 characters were part of the checksum, leaving approximately 27 characters of base58 key hash data. This leaves enough room for more than:
1.46 × 1048 possible addresses


With a bech32 P2WPKH address, the first 3 characters indicate the address type, and the last 6 characters are the checksum, leaving 33 characters of base32 key hash data.  This leaves enough room for more than:
1.46 × 1048 possible addresses

Since the public key hash is only a 160 bit value, there are only 1.46 × 1048 possible addresses.  Therefore, BOTH address formats have enough room for ALL possible currently valid addresses.

Cheers.

Is the sensitivity of case really important? I'm sure most people use their mouse to copy and paste the address.

..C..
.....................
........What is C?.........
..............
...........ICO            Dec 1st – Dec 30th............
       ............Open            Dec 1st- Dec 30th............
...................ANN thread      Bounty....................

Carlton Banks
Legendary
*
Offline Offline

Activity: 3430
Merit: 3071



View Profile
November 03, 2017, 02:08:45 PM
 #13

Is the sensitivity of case really important? I'm sure most people use their mouse to copy and paste the address.

In situations where people don't copy and paste, it helps to reduce the chance of errors.

Vires in numeris
DannyHamilton
Legendary
*
Offline Offline

Activity: 3374
Merit: 4598



View Profile
November 03, 2017, 02:34:28 PM
 #14

Is the sensitivity of case really important? I'm sure most people use their mouse to copy and paste the address.
In situations where people don't copy and paste, it helps to reduce the chance of errors.

base32 was chosen for improved error checking possibilities.  The fact that base32 can be represented with single case characters is just an added benefit for those situations where the user might need to write it down or tell it to someone else.  Another added benefit is that it also makes it possible to use smaller QR Codes (or the same size QR Code with increased redundancy).
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3374
Merit: 6531


Just writing some code


View Profile WWW
November 03, 2017, 02:36:46 PM
 #15

Is the sensitivity of case really important? I'm sure most people use their mouse to copy and paste the address.

In situations where people don't copy and paste, it helps to reduce the chance of errors.
Not only that, but the bech32 addresses use BCH codes (well BCH-like codes) which are an error correcting code. Bech32 addresses can detect up to 4 errors when entering the address and tell you where those errors are. They can also correct up to 2 errors (IIRC) but no wallet will actually do error correction for you because that is a good way to accidentally send money elsewhere.

Stedsm
Legendary
*
Offline Offline

Activity: 3052
Merit: 1273



View Profile
November 03, 2017, 03:10:28 PM
 #16

Electrum 3.0 is out and the addresses are starting with bc1 apparently. I have a hardware wallet in the other hand where SegWit is supported too but the addresses are starting with 3 instead. What are the differences and are they compatible between each other (including the old addresses). Could I receive/send without having to worry?

Didn't try but I could say that there are many persons in my contact who are using the same type of addresses that start with 3.
Initially, I thought that they are multisig addresses and I asked them whether it is or not, but they didn't tell me anything except that they are using the same address for every transaction and not facing any problems using the same and it's not including mixed transactions just like we see in exchange addresses. Even I would like to know if such addresses are multisig or not?

██████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
██████████████████████
.SHUFFLE.COM..███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
█████████████████████
████████████████████
██████████████████████
████████████████████
██████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
██████████████████████
██████████████████████
██████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
.
...Next Generation Crypto Casino...
jnano
Member
**
Offline Offline

Activity: 301
Merit: 74


View Profile
November 03, 2017, 03:19:50 PM
 #17

When is Core expected to add GUI support for these?
Spendulus
Legendary
*
Offline Offline

Activity: 2898
Merit: 1386



View Profile
November 03, 2017, 03:52:40 PM
 #18

Electrum 3.0 is out and the addresses are starting with bc1 apparently. I have a hardware wallet in the other hand where SegWit is supported too but the addresses are starting with 3 instead. What are the differences and are they compatible between each other (including the old addresses). Could I receive/send without having to worry?

Didn't try but I could say that there are many persons in my contact who are using the same type of addresses that start with 3.
Initially, I thought that they are multisig addresses and I asked them whether it is or not, but they didn't tell me anything except that they are using the same address for every transaction and not facing any problems using the same and it's not including mixed transactions just like we see in exchange addresses. Even I would like to know if such addresses are multisig or not?

https://en.bitcoin.it/wiki/List_of_address_prefixes

"3" is a script hash prefix. If I recall correctly encrypted paper wallets address must start with a "3" in addition to the multisig starting with a "3".
Carlton Banks
Legendary
*
Offline Offline

Activity: 3430
Merit: 3071



View Profile
November 03, 2017, 04:14:03 PM
Last edit: February 12, 2018, 07:24:04 PM by Carlton Banks
 #19

Is the sensitivity of case really important? I'm sure most people use their mouse to copy and paste the address.

In situations where people don't copy and paste, it helps to reduce the chance of errors.
Not only that, but the bech32 addresses use BCH codes (well BCH-like codes) which are an error correcting code. Bech32 addresses can detect up to 4 errors when entering the address and tell you where those errors are. They can also correct up to 2 errors (IIRC) but no wallet will actually do error correction for you because that is a good way to accidentally send money elsewhere.

Ah, interesting. Sounds familiar, I read the BIP173 text pretty quickly Grin

So there is no error correction whatsoever in Satoshi-era types like P2PKH and P2SH? (or even the original type P2PK?)


When is Core expected to add GUI support for these?


Upcoming 0.15.1 (which may or may not include waiting for 0.15.0.2 first, achow101 might tell us more)

Edit: Segwit GUI in Bitcoin Core will now be in 0.15.2, 0.15.1 will be bugfixes and backports

02/12/2018 Edit: Segwit wallets will be in the Bitcoin Core 0.16.0 release, very soon

Vires in numeris
DannyHamilton
Legendary
*
Offline Offline

Activity: 3374
Merit: 4598



View Profile
November 03, 2017, 04:27:27 PM
 #20

So there is no error correction whatsoever in Satoshi-era types like P2PKH and P2SH? (or even the original type P2PK?)

It was possible to detect with reasonable reliability if the address was invalid (one or more errors).

However, it was not possible to easily identify the specific character or characters that were erroneous, nor was it possible to correct those errors for the user.
Pages: [1] 2 3 4 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!