SlideShare a Scribd company logo
Introduction to
Segregated Witness
By Priyab Satoshi (@twitmyreview)
Agenda
• Bitcoin transactions
• The scaling debate
• Segwit - Segregated Witness
• Benefit from SegWit
• Bitcoin Improvement Proposals
Bitcoin Transactions
• A bitcoin transaction is data that describes the
movement of bitcoins.It is basically a series of
inputs and a series of outputs.
Bitcoin Transaction Structure
• The transaction data tells you how to unlock
existing packages of bitcoins (from previous
transactions), and how to lock them up again
Block Limit
• Originally, there was no limit to the size of blocks
• This allowed malicious actors to make up fake
"block" data and do DDOS Attacks
• The solution Satoshi Nakamoto designed was to
put a limit on block size, which was 1 MB.
• Attacks using huge blocks would be instantly
detected and rejected, without significantly
slowing down the network.
Block Structure
Scalability and Malleability
• A new block is added to the chain at random intervals
averaging, by design, ten minutes (proof-of-work
causes this delay). Miners can only add transactions
within these limits
• With the limit on block-size, this limits the number of
transactions that can be processed in a given time.
• Transaction malleability: Cryptographically signed
signature doesn't encompass all transaction data
several different ways of losing or stealing bitcoins are
possible.
Scalability and Malleability
• 60% - 70% of the transaction size is the
signature. This not only creates transaction bloat
but also creates malleability issues.
Scalability Problem
• As transactions increase and become data-
heavy, it clogs the blocks, which bogs down the
network when demand is high. This becomes an
increasing issue as more people start using
Bitcoin and adopt the technology. In order for
the Bitcoin to succeed and be useful, a solution
to process the blocks faster is necessary.
The Scaling Debate
Solutions to the scaleability problem
• Segwit (e.g. BTC)
• Increase the block size (e.g BCC)
• The Lightning Network
Segregated Witness
(SegWit)
• It was locked in on 8th of August. Two weeks to
signal support
• August 24th 2017 Segwit Activated on Block 481,824
• Aims to speed up Bitcoin confirmation of Bitcoin
transactions
• It also moves signatures out of the transaction
addressing the malleability problem. This will make it
safer to use with the Lightning Network.
SegWit Timeline
SegWit Support
What is Segwit?
• The proposal is to move all of the unlocking code to the
end of the transaction data. The TXID is then created from
all of the transaction data, except for the unlocking code.
• The TXID is only influenced by the effects of a transaction
(the movement of bitcoins), and not by any code needed
to validate the transaction (i.e. signatures used to unlock
existing bitcoins so that they can be spent).
• We separated the "validating" part (unlocking code) from
the "effective" part of the transaction.
Segwit vs Non SegWit
Transaction
Segwit Block Size
SegWit Adoption
How to Use SegWit
• Install a SegWit-supporting wallet.
• Receive money on new SegWit addresses, which start with 3. You must
generate new addresses; your old addresses will never be SegWit addresses.
Note that not all addresses starting with 3 are SegWit addresses, and it is
impossible to tell just from looking at an address whether it is a SegWit
address.
• Whenever you spend BTC which you have received via SegWit addresses,
you will receive the SegWit discount. If you send a transaction spending some
BTC received via non-SegWit addresses and some BTC received via SegWit
addresses, you will receive a partial discount. The destination address doesn't
matter.
• There are no compatibility issues: non-SegWit wallets can send BTC to SegWit
addresses, and SegWit wallets can send BTC to non-SegWit addresses.
Saving Transaction Fee
using Segwit 
• For segwit, a new concept called weight was introduced, so what matters now is fee / (virtual
size) .
• Here are the transaction ids for reference — Normal, Segwit in P2SH, Native Segwit. As you
can see you can get a cool 38% discount using native segwit !!
• You save on transaction fee and you transaction is smaller taking less space. This allows more
transactions to get into blocks. This reduces mempool congestion and decreases the average
transaction fee, because you are now competing with less unconfirmed tx to get into blocks
Segwit Address
• Originally proposed by Satoshi Nakamoto, legacy addresses of Bitcoin are
simple addresses that start with the digit
‘1’ (1Nh7uHdvY6fNwtQtM1G5EZAFPLC33B59rB).
• Activation of segwit simply means that you have new address formats
available on Bitcoin’s blockchain which are called multi-signature (P2SH)
addresses starting with the digit
‘3’ (3JxDR5iheVDMZP88tiFrtY4bw9UBZwTMcc).
• Benefits that you can enjoy by using segwit addresses.

- Signature Time Optimization up to 60%

- Reduction In Transaction Fees up to 40%

- Future Scaling Optimizations Such As Lightning Networks
• To upgrade to segwit, it is simple as sending a transaction from a Non-
Segwit address to a Segwit Adress.
Benefits of SegWit
• First, by improving efficiency, it enables transactions to be
confirmed faster. As a result of that, it will also potentially reduce the
relatively higher transaction fees that were an offshoot of the
increased demand.
• SegWit laid the groundwork for a “Lightning Network”, where
transactions are faster, cheaper, and more scalable. It also opens
up payment channels that move transactions off the main
blockchain, and some developers have already worked on this
technology.
• Because the witness structure contains Script versioning, it is also
possible to make changes to or introduce new opcodes to SegWit
scripts that would have originally required a hardfork to function
without SegWit.
Bitcoin Improvement
Proposal
• BIP141 Segregated Witness (Consensus layer) – activated on August 24,
2017
• BIP142 Address Format for Segregated Witness – withdrawn, superseded
by BIP 173
• BIP143 Transaction Signature Verification for Version 0 Witness Program [1]
– activated on August 24, 2017
• BIP144 Segregated Witness (Peer Services) – activated on August 24, 2017
• BIP148 Mandatory activation of segwit deployment – activated (mandated
the activation of BIP141, 143, 144)
• BIP173 Bech32 addresses, released as part of Bitcoin Core version 0.16.0
in February 2018.[31]
Useful Reference
• https://www.reddit.com/r/indiacryptogrp/comments/84lcba/
introduction_to_segregated_witness_online_event/
• https://bitcoincore.org/en/2016/01/26/segwit-benefits/
• https://bitcoincore.org/en/segwit_wallet_dev/
• https://bitcoincore.org/en/2016/10/27/segwit-upgrade-guide/
• https://bitcoincore.org/en/2016/10/28/segwit-costs/
• https://www.youtube.com/watch?v=QYZv92F2kCw - Segwit explained
• https://www.youtube.com/watch?v=M_GmiapVJAQ - Bitcoin Scaling
Explained: Big Blocks vs. SegWit
Thank You

More Related Content

PPTX
Erc 721 tokens
PPTX
Non fungilble tokens and Blockchain Standards
PDF
Hire blockchain developers from employcoder
PPTX
What's the difference, fungible and not fungible tokens
PDF
Defi synthetic assets development (2)
PPTX
Blockchain Hyperledger Development
PDF
Alpaca NFT Field Study
Erc 721 tokens
Non fungilble tokens and Blockchain Standards
Hire blockchain developers from employcoder
What's the difference, fungible and not fungible tokens
Defi synthetic assets development (2)
Blockchain Hyperledger Development
Alpaca NFT Field Study

What's hot (19)

PDF
Are Cryptocurrencies the Future Global Currency System?
PDF
Will non fungible tokens (nft) become popular
PPTX
Why NFTs has overtaken Defoe As the hottest trend in blockchain
PPTX
Nft scenario in India
PDF
NFT Webinar
PPTX
Alwintechnologies - A blockchain development company establishing a strong, l...
DOCX
Security Token Offering(STO) Services | STO Developement
PPTX
Solana blockchain development
PPTX
Non-fungible tokens. From smart contract code to marketplace
PDF
Lecture series Michael Naylor: Tokenizing the Equity of Private Companies 1/2019
PPTX
The Art of non-fungible tokens
PPTX
Smart Contractjp 1st section about
PDF
How Smart Lawyers Handle Smart Contracts
PPTX
How To Pick The Best Crypto Asset To Invest In
PDF
Ethereum - Introduction to Smart Contracts
PPTX
How Security Tokens Can Be Created In Blockchain ?
PPTX
P09 | Anurag Gupta | Non-Fungible Token | MCA
PPTX
Ico pros and cons
PDF
All About Ethereum
Are Cryptocurrencies the Future Global Currency System?
Will non fungible tokens (nft) become popular
Why NFTs has overtaken Defoe As the hottest trend in blockchain
Nft scenario in India
NFT Webinar
Alwintechnologies - A blockchain development company establishing a strong, l...
Security Token Offering(STO) Services | STO Developement
Solana blockchain development
Non-fungible tokens. From smart contract code to marketplace
Lecture series Michael Naylor: Tokenizing the Equity of Private Companies 1/2019
The Art of non-fungible tokens
Smart Contractjp 1st section about
How Smart Lawyers Handle Smart Contracts
How To Pick The Best Crypto Asset To Invest In
Ethereum - Introduction to Smart Contracts
How Security Tokens Can Be Created In Blockchain ?
P09 | Anurag Gupta | Non-Fungible Token | MCA
Ico pros and cons
All About Ethereum
Ad

Similar to Introduction to Segwit (20)

PPTX
SECWIT.pptx
PPTX
Segregated witness and bitcoin scaling debate
PPTX
A Segwit Coin is not a Bitcoin
PDF
BITCOIN SCALING: SEGWIT PASSES EMERGENT CONSENSUS AT LAST
PDF
Upgrading the Bitcoin protocol - Simone Bronzini - Codemotion Rome 2018
PPTX
Bitcoin improvement proposal segregated witness
PDF
Bitcoin Status Report - On-Chain Scaling Aug 2016
PPTX
Understanding Blockchain
PDF
Blockchain overview, use cases, implementations and challenges
PPTX
A research-oriented introduction to the cryptographic currencies (starting wi...
PDF
Blockchain & Cryptocurrencies Intro - July 2017
PDF
Fork your mother if you want fork: A short history of Bitcoin scaling wars
PDF
Introduction into blockchains and cryptocurrencies
PDF
Blockchain, DLT, Tokens and ICO Introduction Course
PPTX
The Basic Theories of Blockchain
PPTX
Blockchain, Ethereum and Business Applications
PDF
Bitcoin Blockchain - Under the Hood
PPTX
20190606 blockchain101
PPTX
Spartan Blockchain - Women in Blockchain Workshop Presentation
SECWIT.pptx
Segregated witness and bitcoin scaling debate
A Segwit Coin is not a Bitcoin
BITCOIN SCALING: SEGWIT PASSES EMERGENT CONSENSUS AT LAST
Upgrading the Bitcoin protocol - Simone Bronzini - Codemotion Rome 2018
Bitcoin improvement proposal segregated witness
Bitcoin Status Report - On-Chain Scaling Aug 2016
Understanding Blockchain
Blockchain overview, use cases, implementations and challenges
A research-oriented introduction to the cryptographic currencies (starting wi...
Blockchain & Cryptocurrencies Intro - July 2017
Fork your mother if you want fork: A short history of Bitcoin scaling wars
Introduction into blockchains and cryptocurrencies
Blockchain, DLT, Tokens and ICO Introduction Course
The Basic Theories of Blockchain
Blockchain, Ethereum and Business Applications
Bitcoin Blockchain - Under the Hood
20190606 blockchain101
Spartan Blockchain - Women in Blockchain Workshop Presentation
Ad

More from Priyab Satoshi (15)

PPTX
Introduction to Chatbots
PPTX
Introduction to IOT security
PPTX
Introduction to State Channels & Payment Channels
PPTX
Introduction to GDPR
PPTX
Cryptocurrency & ICO Regulations in US
PPTX
Online privacy & security
PPTX
Introduction to Cognitive Automation
PPTX
Robotic process automation Introduction
PPTX
Kademlia introduction
PDF
Decentralised Exchanges - An Introduction
PDF
On-chain Crowdfunding & Asset Token
PPTX
Introduction to blockchain
PDF
Blockchain and Decentralization
PDF
Cryptocurrency & Regulatory Environment
PPTX
Understanding blockchain
Introduction to Chatbots
Introduction to IOT security
Introduction to State Channels & Payment Channels
Introduction to GDPR
Cryptocurrency & ICO Regulations in US
Online privacy & security
Introduction to Cognitive Automation
Robotic process automation Introduction
Kademlia introduction
Decentralised Exchanges - An Introduction
On-chain Crowdfunding & Asset Token
Introduction to blockchain
Blockchain and Decentralization
Cryptocurrency & Regulatory Environment
Understanding blockchain

Recently uploaded (20)

PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
RMMM.pdf make it easy to upload and study
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
GDM (1) (1).pptx small presentation for students
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Lesson notes of climatology university.
PDF
A systematic review of self-coping strategies used by university students to ...
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Complications of Minimal Access Surgery at WLH
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PPTX
Presentation on HIE in infants and its manifestations
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Classroom Observation Tools for Teachers
Chinmaya Tiranga quiz Grand Finale.pdf
FourierSeries-QuestionsWithAnswers(Part-A).pdf
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
STATICS OF THE RIGID BODIES Hibbelers.pdf
RMMM.pdf make it easy to upload and study
Anesthesia in Laparoscopic Surgery in India
Module 4: Burden of Disease Tutorial Slides S2 2025
GDM (1) (1).pptx small presentation for students
Abdominal Access Techniques with Prof. Dr. R K Mishra
O7-L3 Supply Chain Operations - ICLT Program
Lesson notes of climatology university.
A systematic review of self-coping strategies used by university students to ...
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Complications of Minimal Access Surgery at WLH
102 student loan defaulters named and shamed – Is someone you know on the list?
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Presentation on HIE in infants and its manifestations
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Classroom Observation Tools for Teachers

Introduction to Segwit

  • 1. Introduction to Segregated Witness By Priyab Satoshi (@twitmyreview)
  • 2. Agenda • Bitcoin transactions • The scaling debate • Segwit - Segregated Witness • Benefit from SegWit • Bitcoin Improvement Proposals
  • 3. Bitcoin Transactions • A bitcoin transaction is data that describes the movement of bitcoins.It is basically a series of inputs and a series of outputs.
  • 4. Bitcoin Transaction Structure • The transaction data tells you how to unlock existing packages of bitcoins (from previous transactions), and how to lock them up again
  • 5. Block Limit • Originally, there was no limit to the size of blocks • This allowed malicious actors to make up fake "block" data and do DDOS Attacks • The solution Satoshi Nakamoto designed was to put a limit on block size, which was 1 MB. • Attacks using huge blocks would be instantly detected and rejected, without significantly slowing down the network.
  • 7. Scalability and Malleability • A new block is added to the chain at random intervals averaging, by design, ten minutes (proof-of-work causes this delay). Miners can only add transactions within these limits • With the limit on block-size, this limits the number of transactions that can be processed in a given time. • Transaction malleability: Cryptographically signed signature doesn't encompass all transaction data several different ways of losing or stealing bitcoins are possible.
  • 8. Scalability and Malleability • 60% - 70% of the transaction size is the signature. This not only creates transaction bloat but also creates malleability issues.
  • 9. Scalability Problem • As transactions increase and become data- heavy, it clogs the blocks, which bogs down the network when demand is high. This becomes an increasing issue as more people start using Bitcoin and adopt the technology. In order for the Bitcoin to succeed and be useful, a solution to process the blocks faster is necessary.
  • 10. The Scaling Debate Solutions to the scaleability problem • Segwit (e.g. BTC) • Increase the block size (e.g BCC) • The Lightning Network
  • 11. Segregated Witness (SegWit) • It was locked in on 8th of August. Two weeks to signal support • August 24th 2017 Segwit Activated on Block 481,824 • Aims to speed up Bitcoin confirmation of Bitcoin transactions • It also moves signatures out of the transaction addressing the malleability problem. This will make it safer to use with the Lightning Network.
  • 14. What is Segwit? • The proposal is to move all of the unlocking code to the end of the transaction data. The TXID is then created from all of the transaction data, except for the unlocking code. • The TXID is only influenced by the effects of a transaction (the movement of bitcoins), and not by any code needed to validate the transaction (i.e. signatures used to unlock existing bitcoins so that they can be spent). • We separated the "validating" part (unlocking code) from the "effective" part of the transaction.
  • 15. Segwit vs Non SegWit Transaction
  • 18. How to Use SegWit • Install a SegWit-supporting wallet. • Receive money on new SegWit addresses, which start with 3. You must generate new addresses; your old addresses will never be SegWit addresses. Note that not all addresses starting with 3 are SegWit addresses, and it is impossible to tell just from looking at an address whether it is a SegWit address. • Whenever you spend BTC which you have received via SegWit addresses, you will receive the SegWit discount. If you send a transaction spending some BTC received via non-SegWit addresses and some BTC received via SegWit addresses, you will receive a partial discount. The destination address doesn't matter. • There are no compatibility issues: non-SegWit wallets can send BTC to SegWit addresses, and SegWit wallets can send BTC to non-SegWit addresses.
  • 19. Saving Transaction Fee using Segwit  • For segwit, a new concept called weight was introduced, so what matters now is fee / (virtual size) . • Here are the transaction ids for reference — Normal, Segwit in P2SH, Native Segwit. As you can see you can get a cool 38% discount using native segwit !! • You save on transaction fee and you transaction is smaller taking less space. This allows more transactions to get into blocks. This reduces mempool congestion and decreases the average transaction fee, because you are now competing with less unconfirmed tx to get into blocks
  • 20. Segwit Address • Originally proposed by Satoshi Nakamoto, legacy addresses of Bitcoin are simple addresses that start with the digit ‘1’ (1Nh7uHdvY6fNwtQtM1G5EZAFPLC33B59rB). • Activation of segwit simply means that you have new address formats available on Bitcoin’s blockchain which are called multi-signature (P2SH) addresses starting with the digit ‘3’ (3JxDR5iheVDMZP88tiFrtY4bw9UBZwTMcc). • Benefits that you can enjoy by using segwit addresses.
 - Signature Time Optimization up to 60%
 - Reduction In Transaction Fees up to 40%
 - Future Scaling Optimizations Such As Lightning Networks • To upgrade to segwit, it is simple as sending a transaction from a Non- Segwit address to a Segwit Adress.
  • 21. Benefits of SegWit • First, by improving efficiency, it enables transactions to be confirmed faster. As a result of that, it will also potentially reduce the relatively higher transaction fees that were an offshoot of the increased demand. • SegWit laid the groundwork for a “Lightning Network”, where transactions are faster, cheaper, and more scalable. It also opens up payment channels that move transactions off the main blockchain, and some developers have already worked on this technology. • Because the witness structure contains Script versioning, it is also possible to make changes to or introduce new opcodes to SegWit scripts that would have originally required a hardfork to function without SegWit.
  • 22. Bitcoin Improvement Proposal • BIP141 Segregated Witness (Consensus layer) – activated on August 24, 2017 • BIP142 Address Format for Segregated Witness – withdrawn, superseded by BIP 173 • BIP143 Transaction Signature Verification for Version 0 Witness Program [1] – activated on August 24, 2017 • BIP144 Segregated Witness (Peer Services) – activated on August 24, 2017 • BIP148 Mandatory activation of segwit deployment – activated (mandated the activation of BIP141, 143, 144) • BIP173 Bech32 addresses, released as part of Bitcoin Core version 0.16.0 in February 2018.[31]
  • 23. Useful Reference • https://www.reddit.com/r/indiacryptogrp/comments/84lcba/ introduction_to_segregated_witness_online_event/ • https://bitcoincore.org/en/2016/01/26/segwit-benefits/ • https://bitcoincore.org/en/segwit_wallet_dev/ • https://bitcoincore.org/en/2016/10/27/segwit-upgrade-guide/ • https://bitcoincore.org/en/2016/10/28/segwit-costs/ • https://www.youtube.com/watch?v=QYZv92F2kCw - Segwit explained • https://www.youtube.com/watch?v=M_GmiapVJAQ - Bitcoin Scaling Explained: Big Blocks vs. SegWit