SlideShare a Scribd company logo
1 of 16
Download to read offline
1
Aprile 8th 2019 – Blockchain Devs, Milan
A l e s s a n d r o C o n f e t t i
2
Image from Julia Donaldson's books – in pictures
Alessandro Confetti - Aprile 8th 2019 – Blockchain Devs, Milan
IS THERE
SUCH A THING AS
A FAST BITCOIN
CHAIN?
QUESTIONS TO ASK YOURSELF…
3
Alessandro Confetti - April 26th 2018 – Politecnico, Milan
1.Who can set or change 

the rules of the protocol?
2.Who runs the nodes 

and pay for them?
3.Who can read 

and/or write 

the blocks?
4.Who validates the block 

and at which cost?
Source howmuch.net
4
Ok, I need a blockchain, but which one?
By Pavel Kravchenko Sep 26, 2016
Alessandro Confetti - Aprile 8th 2019 – Blockchain Devs, Milan
SLOW
FAST
5
Alessandro Confetti - Aprile 8th 2019 – Blockchain Devs, Milan
Source blockchainhub.net
STATE CHANNELS
Parties agree upon:
1.How to set initial state
2.How to handle state
changes
3.When and how to set
final state
6
Source The Basics of State Channels
Alessandro Confetti - Aprile 8th 2019 – Blockchain Devs, Milan
PAYMENT CHANNELS
1. Alice & Bob: agree upon the amount of money they
want to exchange, and how and/or up to when to
move the entire amount or fractions of it 

(aka smart-contract)
2. Alice & Bob: prove to own the amount of money in
their wallets and set it aside for each other on the
blockchain (aka funding transaction)
3. Alice or Bob: sends money to the each other on a
side-chain (aka commitment transactions)
4. Alice & Bob: close the transactions flow based on
the contract rules, and save the new balance
between Bob and Alice to their respective wallets or
refund them back if something goes wrong (aka
settlement transaction)
7
Alice Bob
bitcoin blockchain
side-chain transactions
mono-directional
Alice Bob
bitcoin blockchain
side-chain transactions
bi-directional
Alessandro Confetti - Aprile 8th 2019 – Blockchain Devs, Milan
PAYMENT CHANNELS
1. smart-contract:
• transaction-level timelocks (nLocktime)
• ARC (asymmetric revocable commitments) using script-
level timelocks (CHECKLOCKTIMEVERIFY)
• HTLC (Hash Time Lock Contracts) with script-level
timelocks (CHECKSEQUENCEVERIFY)
2. funding transaction:
• multisignature 2-of-2 address founded by both parties
and stored on the bitcoin blockchain
3. commitment transactions:
• bitcoin-like transactions starting from the founding
transaction using the same multisignature 2-of-2 as
input and parties’ wallets as output
4. settlement transaction:
• last bitcoin-like transaction saved back to the bitcoin
blockchain
8
• Problems:
• transaction-level timelocks: limited
channel life-time, transaction
number limited by blocks ahead
• Requires a channel for each
recipient
• Costs:
• transaction fees for initial and final
state persistence
• money is frozen until settlement
transaction
• Risks: contract safeguards levels
Alessandro Confetti - Aprile 8th 2019 – Blockchain Devs, Milan
Routed Payment Channels

(aka Lightning Network)
..allow any participant to route a payment 

from channel to channel without trusting 

any of the intermediaries.
Andreas M. Antonopoulos - Mastering Bitcoin, 2nd Edition [O’Reilly Media 2017]
9
The Bitcoin Lightning Network: Scalable Off-Chain Instant Payments (white paper)
Alessandro Confetti - Aprile 8th 2019 – Blockchain Devs, Milan
LIGHTNING NETWORK
10
Alessandro Confetti - Aprile 8th 2019 – Blockchain Devs, Milan
Source TheBlockPro.com
Alessandro Confetti - Aprile 8th 2019 – Blockchain Devs, Milan
LIGHTNING NETWORK
1. Alice: search for Eric’s LN node and ask for an hash of a secret
2. Alice: find out a route to Eric’s LN node
3. Alice: creates a HTLC with Eric’s hash with a +10 blocks refund,
payable to Bob if he knows the Eric’s secret
4. Bob: creates a HTLC with a +9 blocks refund payable to Carol
if she knows the Eric’s secret
5. Carol: creates a HTLC with a +8 blocks refund payable to
Diana if she knows the Eric’s secret
6. Diana: creates a HTLC with a +7 blocks refund payable to Eric
(that obviously he knows his own secret…)
7. Eric: claims the HTLC from Diana and gives her the secret
8. Diana: claims the HTLC from Carol and gives her the secret
9. Carol: claims the HTLC from Bob and gives him the secret
10. Bob: claims the HTLC from Alice
11. Diana: claims the or Bob: sends money to the each other
11
Alessandro Confetti - Aprile 8th 2019 – Blockchain Devs, Milan
Andreas M. Antonopoulos - Mastering Bitcoin, 2nd Edition [O’Reilly Media 2017]
LIGHTNING NETWORK
1. smart-contract:
• HTLC (Hash Time Lock Contracts) with script-level
timelocks (CHECKSEQUENCEVERIFY)
2. funding transaction:
• multisignature 2-of-2 address founded by both parties
and stored on the bitcoin blockchain
3. commitment transactions:
• bitcoin-like transactions starting from the founding
transaction using the same multisignature 2-of-2 as
input and parties’ wallets as output
4. settlement transaction:
• last bitcoin-like transaction saved back to the bitcoin
blockchain
5. Routing protocol:
• onion-routed protocol based on a scheme called Sphinx
• path is fixed at 20 hops padded with random data
12
• Benefits:
• privacy of transactions
• fungibility of the currency (limits
censorship and surveillance on
transactions)
• speed of transactions in millisecond
• micropayments
• increment of capacity of standard
bitcoin blockchain
• Costs:
• transaction fees for initial and final
state persistence
• transaction fees for each hop
• money is frozen until settlement
transaction for each channel
Alessandro Confetti - Aprile 8th 2019 – Blockchain Devs, Milan
LIGHTNING NETWORK
13
Alessandro Confetti - Aprile 8th 2019 – Blockchain Devs, Milan
Source eclair
LIGHTNING NETWORK
14
Alessandro Confetti - Aprile 8th 2019 – Blockchain Devs, Milan
Source bitcoinvisuals.com
WE ARE HIRING IN ITALY!
i n f o - i t @ t h o u g h t w o r k s . c o m
TECNOLOGY RADAR VOL19
https://info.thoughtworks.com/technology-radar-subscription.html
$ tail -f questions
16
Alessandro Confetti
aconfet@thoughtworks.com
twitter @zigolab 

blog http://blog.zigolab.it

More Related Content

Recently uploaded

Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call GirlsMira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call GirlsPriya Reddy
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.krishnachandrapal52
 
Down bad crying at the gym t shirtsDown bad crying at the gym t shirts
Down bad crying at the gym t shirtsDown bad crying at the gym t shirtsDown bad crying at the gym t shirtsDown bad crying at the gym t shirts
Down bad crying at the gym t shirtsDown bad crying at the gym t shirtsrahman018755
 
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理AS
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Roommeghakumariji156
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...kajalverma014
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"growthgrids
 
Local Call Girls in Gomati 9332606886 HOT & SEXY Models beautiful and charmi...
Local Call Girls in Gomati  9332606886 HOT & SEXY Models beautiful and charmi...Local Call Girls in Gomati  9332606886 HOT & SEXY Models beautiful and charmi...
Local Call Girls in Gomati 9332606886 HOT & SEXY Models beautiful and charmi...Sareena Khatun
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdfMatthew Sinclair
 
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...meghakumariji156
 
一比一原版犹他大学毕业证如何办理
一比一原版犹他大学毕业证如何办理一比一原版犹他大学毕业证如何办理
一比一原版犹他大学毕业证如何办理F
 
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...kumargunjan9515
 
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理F
 
一比一原版帝国理工学院毕业证如何办理
一比一原版帝国理工学院毕业证如何办理一比一原版帝国理工学院毕业证如何办理
一比一原版帝国理工学院毕业证如何办理F
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge GraphsEleniIlkou
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样ayvbos
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查ydyuyu
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...gajnagarg
 

Recently uploaded (20)

Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call GirlsMira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.
 
Down bad crying at the gym t shirtsDown bad crying at the gym t shirts
Down bad crying at the gym t shirtsDown bad crying at the gym t shirtsDown bad crying at the gym t shirtsDown bad crying at the gym t shirts
Down bad crying at the gym t shirtsDown bad crying at the gym t shirts
 
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
 
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
Local Call Girls in Gomati 9332606886 HOT & SEXY Models beautiful and charmi...
Local Call Girls in Gomati  9332606886 HOT & SEXY Models beautiful and charmi...Local Call Girls in Gomati  9332606886 HOT & SEXY Models beautiful and charmi...
Local Call Girls in Gomati 9332606886 HOT & SEXY Models beautiful and charmi...
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
 
一比一原版犹他大学毕业证如何办理
一比一原版犹他大学毕业证如何办理一比一原版犹他大学毕业证如何办理
一比一原版犹他大学毕业证如何办理
 
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
 
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理
 
一比一原版帝国理工学院毕业证如何办理
一比一原版帝国理工学院毕业证如何办理一比一原版帝国理工学院毕业证如何办理
一比一原版帝国理工学院毕业证如何办理
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

What is lightning network and how it works.

  • 1. 1 Aprile 8th 2019 – Blockchain Devs, Milan A l e s s a n d r o C o n f e t t i
  • 2. 2 Image from Julia Donaldson's books – in pictures Alessandro Confetti - Aprile 8th 2019 – Blockchain Devs, Milan IS THERE SUCH A THING AS A FAST BITCOIN CHAIN?
  • 3. QUESTIONS TO ASK YOURSELF… 3 Alessandro Confetti - April 26th 2018 – Politecnico, Milan 1.Who can set or change 
 the rules of the protocol? 2.Who runs the nodes 
 and pay for them? 3.Who can read 
 and/or write 
 the blocks? 4.Who validates the block 
 and at which cost? Source howmuch.net
  • 4. 4 Ok, I need a blockchain, but which one? By Pavel Kravchenko Sep 26, 2016 Alessandro Confetti - Aprile 8th 2019 – Blockchain Devs, Milan SLOW FAST
  • 5. 5 Alessandro Confetti - Aprile 8th 2019 – Blockchain Devs, Milan Source blockchainhub.net
  • 6. STATE CHANNELS Parties agree upon: 1.How to set initial state 2.How to handle state changes 3.When and how to set final state 6 Source The Basics of State Channels Alessandro Confetti - Aprile 8th 2019 – Blockchain Devs, Milan
  • 7. PAYMENT CHANNELS 1. Alice & Bob: agree upon the amount of money they want to exchange, and how and/or up to when to move the entire amount or fractions of it 
 (aka smart-contract) 2. Alice & Bob: prove to own the amount of money in their wallets and set it aside for each other on the blockchain (aka funding transaction) 3. Alice or Bob: sends money to the each other on a side-chain (aka commitment transactions) 4. Alice & Bob: close the transactions flow based on the contract rules, and save the new balance between Bob and Alice to their respective wallets or refund them back if something goes wrong (aka settlement transaction) 7 Alice Bob bitcoin blockchain side-chain transactions mono-directional Alice Bob bitcoin blockchain side-chain transactions bi-directional Alessandro Confetti - Aprile 8th 2019 – Blockchain Devs, Milan
  • 8. PAYMENT CHANNELS 1. smart-contract: • transaction-level timelocks (nLocktime) • ARC (asymmetric revocable commitments) using script- level timelocks (CHECKLOCKTIMEVERIFY) • HTLC (Hash Time Lock Contracts) with script-level timelocks (CHECKSEQUENCEVERIFY) 2. funding transaction: • multisignature 2-of-2 address founded by both parties and stored on the bitcoin blockchain 3. commitment transactions: • bitcoin-like transactions starting from the founding transaction using the same multisignature 2-of-2 as input and parties’ wallets as output 4. settlement transaction: • last bitcoin-like transaction saved back to the bitcoin blockchain 8 • Problems: • transaction-level timelocks: limited channel life-time, transaction number limited by blocks ahead • Requires a channel for each recipient • Costs: • transaction fees for initial and final state persistence • money is frozen until settlement transaction • Risks: contract safeguards levels Alessandro Confetti - Aprile 8th 2019 – Blockchain Devs, Milan
  • 9. Routed Payment Channels
 (aka Lightning Network) ..allow any participant to route a payment 
 from channel to channel without trusting 
 any of the intermediaries. Andreas M. Antonopoulos - Mastering Bitcoin, 2nd Edition [O’Reilly Media 2017] 9 The Bitcoin Lightning Network: Scalable Off-Chain Instant Payments (white paper) Alessandro Confetti - Aprile 8th 2019 – Blockchain Devs, Milan
  • 10. LIGHTNING NETWORK 10 Alessandro Confetti - Aprile 8th 2019 – Blockchain Devs, Milan Source TheBlockPro.com Alessandro Confetti - Aprile 8th 2019 – Blockchain Devs, Milan
  • 11. LIGHTNING NETWORK 1. Alice: search for Eric’s LN node and ask for an hash of a secret 2. Alice: find out a route to Eric’s LN node 3. Alice: creates a HTLC with Eric’s hash with a +10 blocks refund, payable to Bob if he knows the Eric’s secret 4. Bob: creates a HTLC with a +9 blocks refund payable to Carol if she knows the Eric’s secret 5. Carol: creates a HTLC with a +8 blocks refund payable to Diana if she knows the Eric’s secret 6. Diana: creates a HTLC with a +7 blocks refund payable to Eric (that obviously he knows his own secret…) 7. Eric: claims the HTLC from Diana and gives her the secret 8. Diana: claims the HTLC from Carol and gives her the secret 9. Carol: claims the HTLC from Bob and gives him the secret 10. Bob: claims the HTLC from Alice 11. Diana: claims the or Bob: sends money to the each other 11 Alessandro Confetti - Aprile 8th 2019 – Blockchain Devs, Milan Andreas M. Antonopoulos - Mastering Bitcoin, 2nd Edition [O’Reilly Media 2017]
  • 12. LIGHTNING NETWORK 1. smart-contract: • HTLC (Hash Time Lock Contracts) with script-level timelocks (CHECKSEQUENCEVERIFY) 2. funding transaction: • multisignature 2-of-2 address founded by both parties and stored on the bitcoin blockchain 3. commitment transactions: • bitcoin-like transactions starting from the founding transaction using the same multisignature 2-of-2 as input and parties’ wallets as output 4. settlement transaction: • last bitcoin-like transaction saved back to the bitcoin blockchain 5. Routing protocol: • onion-routed protocol based on a scheme called Sphinx • path is fixed at 20 hops padded with random data 12 • Benefits: • privacy of transactions • fungibility of the currency (limits censorship and surveillance on transactions) • speed of transactions in millisecond • micropayments • increment of capacity of standard bitcoin blockchain • Costs: • transaction fees for initial and final state persistence • transaction fees for each hop • money is frozen until settlement transaction for each channel Alessandro Confetti - Aprile 8th 2019 – Blockchain Devs, Milan
  • 13. LIGHTNING NETWORK 13 Alessandro Confetti - Aprile 8th 2019 – Blockchain Devs, Milan Source eclair
  • 14. LIGHTNING NETWORK 14 Alessandro Confetti - Aprile 8th 2019 – Blockchain Devs, Milan Source bitcoinvisuals.com
  • 15. WE ARE HIRING IN ITALY! i n f o - i t @ t h o u g h t w o r k s . c o m TECNOLOGY RADAR VOL19 https://info.thoughtworks.com/technology-radar-subscription.html
  • 16. $ tail -f questions 16 Alessandro Confetti aconfet@thoughtworks.com twitter @zigolab 
 blog http://blog.zigolab.it