Bitcoin Addresses
Legacy vs SegWit
What is the difference between Legacy and SegWit?
The most visible difference between Legacy and SegWit addresses are the
address formats.
There are three address types:
Legacy (P2PKH): addresses start with a 1.
Nested SegWit (P2SH): addresses start with a 3.
Native SegWit (bech32): addresses start with bc1.
All three addresses can be used to send and receive bitcoin. So what’s the difference?
Well for starters, not all wallets support all three address types. Legacy addresses are
the original BTC addresses. You can expect all wallets to support sending and
receiving to Legacy addresses.
However, not every wallet or service has upgraded to support the new SegWit address
format and therefore, some wallets can only send to Legacy addresses. Luckily, if
someone wants to send you BTC from a SegWit address, your Legacy address will be
to receive it just fine.
SEGWIT
SegWit is a protocol update to Bitcoin that makes Bitcoin transaction sizes smaller,
which allows Bitcoin to handle more transactions at once (scalability). It achieves this
by separating Bitcoin signature data from transaction data.
SegWit, also known as Segregated Witness or Bitcoin Improvement Proposal (BIP)
141, was a response to Bitcoin’s scalability problem, or struggle to handle increasing
amounts of transactions, as Bitcoin continued to gain in popularity. SegWit was
activated on August 24th, 2017.
Proposed initially by Bitcoin developer Dr. Pieter Wuille, SegWit called for the
segregation of digital signatures and other data (collectively called the “witness”) from
transaction data, hence the name “SegWit”.
The reason for this proposal was that digital signatures made up 65% of the
transaction size for a given transaction. By segregating this data from the rest of the
transaction data and moving it to the end of the transaction, Bitcoin transactions
would become much smaller in size.
If you’ve used a wallet, you might’ve noticed that your Bitcoin wallet has different
kind of bitcoin address. Some might start with “1”, some might start with a “3”, and
some might start with “bc1”.
Bitcoin addresses that start with a “1” are Legacy addresses that existed before
SegWit. Addresses that start with “3” are P2SH or multi-purpose addresses that
support both non-SegWit and SegWit transactions. Addresses that start with “bc1”
are bech32 or native SegWit addresses that are the newest, SegWit-only address
format with the lowest transaction fees.
Nested SegWit (P2SH) format
Addresses begin with “3”. From this format, we can’t differentiate whether they are
MultiSig addresses or Segregated Witness suitable addresses. P2SH is the
abbreviation of “Pay To Script Hash” and it supports more than Legacy Functions
more complex formats , such as defining several digital signatures to license deals.