SlideShare a Scribd company logo
1 of 19
Transactions 102
@blockstrap
#StartingBlock2015
Introduction & Primer
First, some context
These slides are from the #StartingBlock2015 tour by @blockstrap.
6 European countries in 8 days – (Istanbul, Amsterdam, Barcelona, Prague, Berlin
& London). We met lots of great people, answered lots of great questions and had
a great time. We look forward to meeting many of them again in the near future.
These slides might only make perfect sense if you were at the talks and can
remember all the additional points we made whilst discussing the tech.
This deck is 6th
of 6.
Questions? Comments? @MrAdamGiles adam@neuroware.io
Transactions 102
Refresher
➔ Transactions transfer control of coins from inputs to outputs
➔ Control is enforced by cryptography
➔ Refresh on public/private keys
• Two keys, one private one public
• Encryption by one, decryption by the other and vice versa
• If you can encrypt a known value, which is then decrypted by the
public key, you must have the private key
Transactions 102
To Construct A Transaction
➔ You need the address of the person you’re going to pay
➔ Find UTXO’s Unspent Transaction Outputs that exceed the amount you
wish to pay (that you control)
➔ Calculate the transaction fee (optional but recommended)
➔ Create the outputs with the correct scriptPubKey
➔ Sign the transaction details
➔ Broadcast the transaction, see if it works
Transactions 102
ScriptPubKey Is A Mini-Program
➔ scriptPubKey defines who can spend the coin by specifying a small
verification program that is run in order to perform that verification
➔ 40 bytes of instructions
➔ Forth like scripting language, deliberately not turing complete
➔ Elements are pushed onto a stack, if the end of the stack is true then the
Transaction is valid and works
Transactions 102
ScriptPubKey Is A Mini-Program
You can get quite clever with it
• Multi-signatures required where m of n are required
• Verifications that don’t need private keys
• Time bound, escrow services
• The beginnings of smart contracts
• Deliberately make coins unspendable
Transactions 102
Signature Scripts
➔ In order for the network to validate and relay your transaction you have to
prove you have that private key
➔ You do this through the SignatureScript
◆ Full unhashed public key
◆ A secp256k1 signature of most of the transaction data
● The Txn ID & output index of the input
● Previous Txn’s scriptPubKey
● The output’s scriptPubKey
● The value of the transaction
➔ The signed transaction is then sent to the network for relaying
Transactions 102
P2PKH
➔ When decoded the scriptPubKey says this:
OP_DUP OP_HASH160 <PubkeyHash> OP_EQUALVERIFY OP_CHECKSIG
➔ You append the SignatureScript to the front, then evaluate LtoR
<Sig> <PubKey> OP_DUP OP_HASH160 <PubkeyHash> OP_EQUALVERIFY OP_CHECKSIG
Transactions 102
This Is Complicated
➔ Use a library or toolset to do this encryption - if it’s wrong you don’t get
error messages, it just doesn’t work
➔ … and you could lose your coins!
➔ Start on the testnets
• work just like the real networks
• coins are free
• playground for experimentation
Transactions 102
Store Data In The Blockchain
➔ Space is limited - 79 bytes in the testnet
➔ If your data is larger than that, use an external reference
• URL to object
• Magnet link for torrentable files
➔ People store things on the blockchain
• Messages
• Prayers
• Proof of existence
• URLs/email addresses/auth codes
• Marketing
➔ FlorinCoin blockchain provides more storage space
Transactions 102
Store Data In The Blockchain
➔ Burn 0 satoshi as one output as part of a bigger transaction, and pay the
mining fee
➔ First command says ‘these coins can’t be spent’ - takes 1 byte
➔ Known as OP_RETURN, always evaluates to false
➔ What you do with the rest of the data is up to you
➔ You’ll need a special script that looks for this data and processes it
independently
➔ Obviously, read only once the Transaction is sent
Programmable Money
Transactions 102
Multi-Signaure Addresses
➔ An Address that requires multiple people to sign Transactions from it
➔ Known as m of n where n<16
➔ The public keys of all the signers are combined to create a special multi-sig
Address. Anyone can send coins to this Address
➔ To spend these coins you have to create a Transaction without
broadcasting it, then pass it round the signers until you have the required
number of signatures
OP_2 [A's pubkey] [B's pubkey] [C's pubkey] OP_3 OP_CHECKMULTISIG
Transactions 102
Micropayment Channel
➔ A way to allow many mini-transactions to be rolled up into two Transactions
➔ Buyer places a bond Transaction and a time-bound refund Transaction
(which isn't broadcast yet)
➔ As the buyer consumes the service, new refund Transactions are created
but not broadcast, changing the amount of the refund
➔ When the service is complete, the most recent refund Transaction is
broadcast
Transactions 101
Addresses Private key
Public key
Hash
Encode
Address
Transactions 101
HD f(n) = Private key
Public key
Hash
Encode
Address
Any Questions?

More Related Content

What's hot

What's hot (20)

How to Create AltCoin(Alternative Cryptocurrency)?
How to Create AltCoin(Alternative Cryptocurrency)?How to Create AltCoin(Alternative Cryptocurrency)?
How to Create AltCoin(Alternative Cryptocurrency)?
 
Metadata in the Blockchain: The OP_RETURN Explosion
Metadata in the Blockchain: The OP_RETURN ExplosionMetadata in the Blockchain: The OP_RETURN Explosion
Metadata in the Blockchain: The OP_RETURN Explosion
 
create your own cryptocurrency
create your own cryptocurrencycreate your own cryptocurrency
create your own cryptocurrency
 
以比特幣為例的區塊鏈技術介紹 ( Intro to Blockchain using Bitcoin as an example)
以比特幣為例的區塊鏈技術介紹 ( Intro to Blockchain using Bitcoin as an example)以比特幣為例的區塊鏈技術介紹 ( Intro to Blockchain using Bitcoin as an example)
以比特幣為例的區塊鏈技術介紹 ( Intro to Blockchain using Bitcoin as an example)
 
A quick introduction to Consensus Models
A quick introduction to Consensus ModelsA quick introduction to Consensus Models
A quick introduction to Consensus Models
 
Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)
Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)
Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)
 
Introduction to Blockchain and Ethereum
Introduction to Blockchain and EthereumIntroduction to Blockchain and Ethereum
Introduction to Blockchain and Ethereum
 
Blockchain
BlockchainBlockchain
Blockchain
 
Pi network
Pi networkPi network
Pi network
 
The Bitcoin Lightning Network
The Bitcoin Lightning NetworkThe Bitcoin Lightning Network
The Bitcoin Lightning Network
 
Bitcoin, Banking and the Blockchain
Bitcoin, Banking and the BlockchainBitcoin, Banking and the Blockchain
Bitcoin, Banking and the Blockchain
 
Intro to smart contract on blockchain en
Intro to smart contract on blockchain enIntro to smart contract on blockchain en
Intro to smart contract on blockchain en
 
Altcoins
AltcoinsAltcoins
Altcoins
 
Girl Develop It - Intro To Blockchain And Cryptocurrencies
Girl Develop It - Intro To Blockchain And CryptocurrenciesGirl Develop It - Intro To Blockchain And Cryptocurrencies
Girl Develop It - Intro To Blockchain And Cryptocurrencies
 
Sidechains Presentation
Sidechains PresentationSidechains Presentation
Sidechains Presentation
 
Introduction to blockchain and cryptocurrency technologies
Introduction to blockchain and cryptocurrency technologiesIntroduction to blockchain and cryptocurrency technologies
Introduction to blockchain and cryptocurrency technologies
 
Encode: Intro to Tezos
Encode: Intro to TezosEncode: Intro to Tezos
Encode: Intro to Tezos
 
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for CypherpunksTrick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
 
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
 
Blockchain part 2
Blockchain part 2Blockchain part 2
Blockchain part 2
 

Viewers also liked

Microsoft Office Excel 2007 Top 100 Simplified Tips And Tricks
Microsoft Office Excel 2007 Top 100 Simplified Tips And TricksMicrosoft Office Excel 2007 Top 100 Simplified Tips And Tricks
Microsoft Office Excel 2007 Top 100 Simplified Tips And Tricks
DQue QQ
 

Viewers also liked (20)

CBGTBT - Part 1 - Workshop introduction & primer
CBGTBT - Part 1 - Workshop introduction & primerCBGTBT - Part 1 - Workshop introduction & primer
CBGTBT - Part 1 - Workshop introduction & primer
 
Kelas 7 smp seni budaya
Kelas 7 smp seni budayaKelas 7 smp seni budaya
Kelas 7 smp seni budaya
 
Buku Siswa Seni Budaya Kelas VII SMP Kurikulum 2013
Buku Siswa Seni Budaya Kelas VII SMP Kurikulum 2013Buku Siswa Seni Budaya Kelas VII SMP Kurikulum 2013
Buku Siswa Seni Budaya Kelas VII SMP Kurikulum 2013
 
Stem Cell Case Study By Dr. Bennett
Stem Cell Case Study By Dr. BennettStem Cell Case Study By Dr. Bennett
Stem Cell Case Study By Dr. Bennett
 
PRP Biologics 3
PRP Biologics 3PRP Biologics 3
PRP Biologics 3
 
PRP Biologics 3
PRP Biologics 3PRP Biologics 3
PRP Biologics 3
 
PRP Biologics 2
PRP Biologics 2PRP Biologics 2
PRP Biologics 2
 
Microsoft Office Excel 2007 Top 100 Simplified Tips And Tricks
Microsoft Office Excel 2007 Top 100 Simplified Tips And TricksMicrosoft Office Excel 2007 Top 100 Simplified Tips And Tricks
Microsoft Office Excel 2007 Top 100 Simplified Tips And Tricks
 
Siliguri Quiz Club, Confluence 2017 by Soumik Choudhury
Siliguri Quiz Club, Confluence 2017 by Soumik ChoudhurySiliguri Quiz Club, Confluence 2017 by Soumik Choudhury
Siliguri Quiz Club, Confluence 2017 by Soumik Choudhury
 
Bitcoin
BitcoinBitcoin
Bitcoin
 
Ppt 2007 tutorial complete
Ppt 2007 tutorial completePpt 2007 tutorial complete
Ppt 2007 tutorial complete
 
Functions and formulas of ms excel
Functions and formulas of ms excelFunctions and formulas of ms excel
Functions and formulas of ms excel
 
Siliguri Quiz Club, Confluence 2017 by Adwitiya Maitry
Siliguri Quiz Club, Confluence 2017 by Adwitiya MaitrySiliguri Quiz Club, Confluence 2017 by Adwitiya Maitry
Siliguri Quiz Club, Confluence 2017 by Adwitiya Maitry
 
How does a blockchain work?
How does a blockchain work?How does a blockchain work?
How does a blockchain work?
 
MS EXCEL PPT PRESENTATION
MS EXCEL PPT PRESENTATIONMS EXCEL PPT PRESENTATION
MS EXCEL PPT PRESENTATION
 
Blockchain demystification
Blockchain demystificationBlockchain demystification
Blockchain demystification
 
Blockchain: the technologies behind Bitcoin, Ethereum, ICO, and more
Blockchain: the technologies behind Bitcoin, Ethereum, ICO, and moreBlockchain: the technologies behind Bitcoin, Ethereum, ICO, and more
Blockchain: the technologies behind Bitcoin, Ethereum, ICO, and more
 
ISTA 2017 - Blockchain, beyond Bitcoin
ISTA 2017 - Blockchain, beyond BitcoinISTA 2017 - Blockchain, beyond Bitcoin
ISTA 2017 - Blockchain, beyond Bitcoin
 
Block chain 101 what it is, why it matters
Block chain 101  what it is, why it mattersBlock chain 101  what it is, why it matters
Block chain 101 what it is, why it matters
 
Blockchain: The Information Technology of the Future
Blockchain: The Information Technology of the FutureBlockchain: The Information Technology of the Future
Blockchain: The Information Technology of the Future
 

Similar to CBGTBT - Part 6 - Transactions 102

CRYPTO CURRENCY-2022OD205.pdf
CRYPTO CURRENCY-2022OD205.pdfCRYPTO CURRENCY-2022OD205.pdf
CRYPTO CURRENCY-2022OD205.pdf
JESUNPK
 

Similar to CBGTBT - Part 6 - Transactions 102 (20)

Blockchain and Bitcoin
Blockchain and BitcoinBlockchain and Bitcoin
Blockchain and Bitcoin
 
Blockchain meetup
Blockchain meetupBlockchain meetup
Blockchain meetup
 
Investment Club Presentation 1 2021
Investment Club Presentation 1 2021Investment Club Presentation 1 2021
Investment Club Presentation 1 2021
 
C-Suite Snacks Webinar Series: How Companies are Making Money in Bitcoin and ...
C-Suite Snacks Webinar Series: How Companies are Making Money in Bitcoin and ...C-Suite Snacks Webinar Series: How Companies are Making Money in Bitcoin and ...
C-Suite Snacks Webinar Series: How Companies are Making Money in Bitcoin and ...
 
bitcoin
bitcoinbitcoin
bitcoin
 
15-Bitcoin.pptx
15-Bitcoin.pptx15-Bitcoin.pptx
15-Bitcoin.pptx
 
Blockchain and Bitcoin.pptx
Blockchain and Bitcoin.pptxBlockchain and Bitcoin.pptx
Blockchain and Bitcoin.pptx
 
[Workshop] Getting Started with Cryptos, NFTs & Web 3.0 for Absolute Beginners
[Workshop] Getting Started with Cryptos, NFTs & Web 3.0 for Absolute Beginners[Workshop] Getting Started with Cryptos, NFTs & Web 3.0 for Absolute Beginners
[Workshop] Getting Started with Cryptos, NFTs & Web 3.0 for Absolute Beginners
 
Ethereum wallet Intro 以太坊錢包介紹
Ethereum wallet Intro 以太坊錢包介紹Ethereum wallet Intro 以太坊錢包介紹
Ethereum wallet Intro 以太坊錢包介紹
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to Blockchain
 
Understanding Bitcoin (Blockchain) and its Potential for Disruptive Applications
Understanding Bitcoin (Blockchain) and its Potential for Disruptive ApplicationsUnderstanding Bitcoin (Blockchain) and its Potential for Disruptive Applications
Understanding Bitcoin (Blockchain) and its Potential for Disruptive Applications
 
CRYPTO CURRENCY-2022OD205.pdf
CRYPTO CURRENCY-2022OD205.pdfCRYPTO CURRENCY-2022OD205.pdf
CRYPTO CURRENCY-2022OD205.pdf
 
Introduction to Ethereum Blockchain & Smart Contract
Introduction to Ethereum Blockchain & Smart ContractIntroduction to Ethereum Blockchain & Smart Contract
Introduction to Ethereum Blockchain & Smart Contract
 
Blockchain
BlockchainBlockchain
Blockchain
 
Blockchain talk open value meetup 31-8-17
Blockchain talk open value meetup 31-8-17Blockchain talk open value meetup 31-8-17
Blockchain talk open value meetup 31-8-17
 
Blockchain and smart contracts, what they are and why you should really care ...
Blockchain and smart contracts, what they are and why you should really care ...Blockchain and smart contracts, what they are and why you should really care ...
Blockchain and smart contracts, what they are and why you should really care ...
 
Introduction to Bitcoin for programmers
Introduction to Bitcoin for programmersIntroduction to Bitcoin for programmers
Introduction to Bitcoin for programmers
 
Privacy Preserving Paradigms of Blockchain Technology
Privacy Preserving Paradigms of Blockchain TechnologyPrivacy Preserving Paradigms of Blockchain Technology
Privacy Preserving Paradigms of Blockchain Technology
 
Multi-Signature Deep Dive
Multi-Signature Deep DiveMulti-Signature Deep Dive
Multi-Signature Deep Dive
 
bitcoin_presentation
bitcoin_presentationbitcoin_presentation
bitcoin_presentation
 

Recently uploaded

Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
nirzagarg
 
Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...
Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...
Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...
Call Girls In Delhi Whatsup 9873940964 Enjoy Unlimited Pleasure
 
💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
nirzagarg
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
ydyuyu
 
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
@Chandigarh #call #Girls 9053900678 @Call #Girls in @Punjab 9053900678
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Chandigarh Call girls 9053900678 Call girls in Chandigarh
 

Recently uploaded (20)

Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
 
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...
Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...
Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...
 
💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
 
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls DubaiDubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck Microsoft
 

CBGTBT - Part 6 - Transactions 102

  • 2. Introduction & Primer First, some context These slides are from the #StartingBlock2015 tour by @blockstrap. 6 European countries in 8 days – (Istanbul, Amsterdam, Barcelona, Prague, Berlin & London). We met lots of great people, answered lots of great questions and had a great time. We look forward to meeting many of them again in the near future. These slides might only make perfect sense if you were at the talks and can remember all the additional points we made whilst discussing the tech. This deck is 6th of 6. Questions? Comments? @MrAdamGiles adam@neuroware.io
  • 3. Transactions 102 Refresher ➔ Transactions transfer control of coins from inputs to outputs ➔ Control is enforced by cryptography ➔ Refresh on public/private keys • Two keys, one private one public • Encryption by one, decryption by the other and vice versa • If you can encrypt a known value, which is then decrypted by the public key, you must have the private key
  • 4. Transactions 102 To Construct A Transaction ➔ You need the address of the person you’re going to pay ➔ Find UTXO’s Unspent Transaction Outputs that exceed the amount you wish to pay (that you control) ➔ Calculate the transaction fee (optional but recommended) ➔ Create the outputs with the correct scriptPubKey ➔ Sign the transaction details ➔ Broadcast the transaction, see if it works
  • 5. Transactions 102 ScriptPubKey Is A Mini-Program ➔ scriptPubKey defines who can spend the coin by specifying a small verification program that is run in order to perform that verification ➔ 40 bytes of instructions ➔ Forth like scripting language, deliberately not turing complete ➔ Elements are pushed onto a stack, if the end of the stack is true then the Transaction is valid and works
  • 6. Transactions 102 ScriptPubKey Is A Mini-Program You can get quite clever with it • Multi-signatures required where m of n are required • Verifications that don’t need private keys • Time bound, escrow services • The beginnings of smart contracts • Deliberately make coins unspendable
  • 7. Transactions 102 Signature Scripts ➔ In order for the network to validate and relay your transaction you have to prove you have that private key ➔ You do this through the SignatureScript ◆ Full unhashed public key ◆ A secp256k1 signature of most of the transaction data ● The Txn ID & output index of the input ● Previous Txn’s scriptPubKey ● The output’s scriptPubKey ● The value of the transaction ➔ The signed transaction is then sent to the network for relaying
  • 8. Transactions 102 P2PKH ➔ When decoded the scriptPubKey says this: OP_DUP OP_HASH160 <PubkeyHash> OP_EQUALVERIFY OP_CHECKSIG ➔ You append the SignatureScript to the front, then evaluate LtoR <Sig> <PubKey> OP_DUP OP_HASH160 <PubkeyHash> OP_EQUALVERIFY OP_CHECKSIG
  • 9.
  • 10. Transactions 102 This Is Complicated ➔ Use a library or toolset to do this encryption - if it’s wrong you don’t get error messages, it just doesn’t work ➔ … and you could lose your coins! ➔ Start on the testnets • work just like the real networks • coins are free • playground for experimentation
  • 11. Transactions 102 Store Data In The Blockchain ➔ Space is limited - 79 bytes in the testnet ➔ If your data is larger than that, use an external reference • URL to object • Magnet link for torrentable files ➔ People store things on the blockchain • Messages • Prayers • Proof of existence • URLs/email addresses/auth codes • Marketing ➔ FlorinCoin blockchain provides more storage space
  • 12. Transactions 102 Store Data In The Blockchain ➔ Burn 0 satoshi as one output as part of a bigger transaction, and pay the mining fee ➔ First command says ‘these coins can’t be spent’ - takes 1 byte ➔ Known as OP_RETURN, always evaluates to false ➔ What you do with the rest of the data is up to you ➔ You’ll need a special script that looks for this data and processes it independently ➔ Obviously, read only once the Transaction is sent
  • 14. Transactions 102 Multi-Signaure Addresses ➔ An Address that requires multiple people to sign Transactions from it ➔ Known as m of n where n<16 ➔ The public keys of all the signers are combined to create a special multi-sig Address. Anyone can send coins to this Address ➔ To spend these coins you have to create a Transaction without broadcasting it, then pass it round the signers until you have the required number of signatures OP_2 [A's pubkey] [B's pubkey] [C's pubkey] OP_3 OP_CHECKMULTISIG
  • 15. Transactions 102 Micropayment Channel ➔ A way to allow many mini-transactions to be rolled up into two Transactions ➔ Buyer places a bond Transaction and a time-bound refund Transaction (which isn't broadcast yet) ➔ As the buyer consumes the service, new refund Transactions are created but not broadcast, changing the amount of the refund ➔ When the service is complete, the most recent refund Transaction is broadcast
  • 16.
  • 17. Transactions 101 Addresses Private key Public key Hash Encode Address
  • 18. Transactions 101 HD f(n) = Private key Public key Hash Encode Address

Editor's Notes

  1. Assume familiar with software, just not blockchains Bitcoin can be polizing, quickly decends into conversations/arguments about politics, But as software is eating the workd, that&amp;apos;s what we&amp;apos;ll be focusing on Simplified first , then circle back round and dive deeper Simplifications can be missleading Tell meif too fast/slow