SlideShare una empresa de Scribd logo
1 de 17
Bitcoin Transactions
Deconstructed
Presented by: Jeff Flowers
1
Transactions
How is value moved on the network
2
Overview
• Transactions
• General Structure
• Standard Types
• Methods of Inquiry
• Detailed Examples
3
Transactions
• Movement of value on the network
• These actions are wrapped within a transaction prior to broadcast
• Transactions are in plain text and readable by all
• Broadcasted to all Bitcoin nodes
4
Structure
These are data structures, as such conform to well defined rules
5
• Inputs are the source of funds being moved, pointers to the
transaction hash and sequence number of the UTXO containing
moved value
• The output of a transaction is the creation of an unspent transaction
output (UTXO)
• UTXO are denominated in Satoshis
• A locking script that encumbers this value requiring specific
conditions to be met for the owner to spend
6
Transaction Structure Cond.
• A transaction completely depletes the UTXO
being used
• Should only a portion be required, change
must be considered
• Change is the unused portion of the UTXO
being moved
• The difference between the new UTXO and
change is taken by the network as a fee
7
Standard Transactions
• Pay-to-Public-Key-Hash (P2PKH)
• Pay-to-Public-Key
• Multi-Signature
• Data Output
• Pay-to-Script-Hash (P2SH)
8
Standard Transactions
• Pay-to-Public-Key-Hash (P2PKH)
• Pay-to-Public-Key
• Multi-Signature
• Data Output
• Pay-to-Script-Hash (P2SH)
The majority of Bitcoin transactions today
are of this general type. These types of
transactions are used to transfer value,
typically from one user to another. They
are constructed having the form: scriptSig
(or the unlocking script) first, followed by
the scriptPubKey (or locking script).
9
Standard Transactions
• Pay-to-Public-Key-Hash (P2PKH)
• Pay-to-Public-Key
• Multi-Signature
• Data Output
• Pay-to-Script-Hash (P2SH)
Another payment transaction. These types
of transactions are effectively outdated
with P2PKH being preferred. The public
key itself, not its hash, is stored in the
locking script. This has the advantages of
being shorter, though less secure.
10
Standard Transactions
• Pay-to-Public-Key-Hash (P2PKH)
• Pay-to-Public-Key
• Multi-Signature
• Data Output
• Pay-to-Script-Hash (P2SH)
A M of N schema, where there are N total
number of keys and M are needed to
create the signature for a valid transaction.
Presently limited to a maximum of 15 listed
public keys.
11
Standard Transactions
• Pay-to-Public-Key-Hash (P2PKH)
• Pay-to-Public-Key
• Multi-Signature
• Data Output
• Pay-to-Script-Hash (P2SH)
The allure of the Block Chain, as a single
source of shared truth embodied by a
immutable database opens up many
possibilities. Notary services and beyond.
As such, developers have wanted to take
full advantage of this instrument.
OP_RETURN allows for 40 bytes of data
to be stored in the block chain.
12
Standard Transactions
• Pay-to-Public-Key-Hash (P2PKH)
• Pay-to-Public-Key
• Multi-Signature
• Data Output
• Pay-to-Script-Hash (P2SH)
Payment to P2SH goes instead to a
potentially complex locking script but rather
to the hash of the script. This greatly
shortens the overall size of the transaction.
A future spend of this UTXO requires the
script whose hash matches.
13
My Method of Inquiry
After building my transaction, I had a serial hex mess -
But what did all of this stuff mean?
14
15
16
Resources
• Builder (Bitcore): http://bit.ly/1ORgoeF
• Explorer: https://chain.so/
• Hex Converter: http://www.rapidtables.com/convert/number/hex-to-
ascii.htm
• Decoder: https://blockchain.info/decode-tx
• Broadcaster: https://live.blockcypher.com/bcy/pushtx/
• Blog: http://www.siliconian.com/blog
17

Más contenido relacionado

La actualidad más candente

Decentralized: Blockchain & Cryptocurrency Laws in Canada
Decentralized: Blockchain & Cryptocurrency Laws in CanadaDecentralized: Blockchain & Cryptocurrency Laws in Canada
Decentralized: Blockchain & Cryptocurrency Laws in CanadaAlexander Davis
 
Blockchain Basics
Blockchain BasicsBlockchain Basics
Blockchain BasicsRohit Kumar
 
Blockchain and Bitcoin
Blockchain and BitcoinBlockchain and Bitcoin
Blockchain and BitcoinHugo Rodrigues
 
Bitcoin Explained
Bitcoin ExplainedBitcoin Explained
Bitcoin ExplainedAlex Sousa
 
Bitcoin, Banking and the Blockchain
Bitcoin, Banking and the BlockchainBitcoin, Banking and the Blockchain
Bitcoin, Banking and the Blockchainseancarmody
 
Introduction to bitcoin
Introduction to bitcoinIntroduction to bitcoin
Introduction to bitcoinWolf McNally
 
Blockchain - Presentacion Betabeers Galicia 10/12/2014
Blockchain - Presentacion Betabeers Galicia 10/12/2014Blockchain - Presentacion Betabeers Galicia 10/12/2014
Blockchain - Presentacion Betabeers Galicia 10/12/2014WeKCo Coworking
 
What is Cryptocurrency
What is Cryptocurrency What is Cryptocurrency
What is Cryptocurrency James Travis
 
The Bitcoin blockchain (en)
The Bitcoin blockchain (en)The Bitcoin blockchain (en)
The Bitcoin blockchain (en)Davide Carboni
 
Blockchain Introduction
Blockchain IntroductionBlockchain Introduction
Blockchain IntroductionZAID SHARIFF
 
Demysitifying Bitcoin and Blockchain
Demysitifying Bitcoin and Blockchain Demysitifying Bitcoin and Blockchain
Demysitifying Bitcoin and Blockchain Ganesh Kondal
 
Paper: Crypto Currency Mining
Paper: Crypto Currency MiningPaper: Crypto Currency Mining
Paper: Crypto Currency MiningHugo Rodrigues
 
2018 SAI workshop blockchain Kristof Verslype
2018 SAI  workshop blockchain Kristof Verslype2018 SAI  workshop blockchain Kristof Verslype
2018 SAI workshop blockchain Kristof VerslypeSmals
 
An Introduction to Bitcoin, Blockchain and Cryptocurrency
An Introduction to Bitcoin, Blockchain and CryptocurrencyAn Introduction to Bitcoin, Blockchain and Cryptocurrency
An Introduction to Bitcoin, Blockchain and CryptocurrencyAmarpreet Singh
 
Block Chain Bitcoin and Crypto Currency
Block Chain Bitcoin and Crypto CurrencyBlock Chain Bitcoin and Crypto Currency
Block Chain Bitcoin and Crypto CurrencyNidhin P Koshy
 
EDUCATION ON CRYPTOGRAPHY
EDUCATION ON CRYPTOGRAPHYEDUCATION ON CRYPTOGRAPHY
EDUCATION ON CRYPTOGRAPHYglobalbtcrating
 
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 SarangNinad Sarang
 

La actualidad más candente (20)

Decentralized: Blockchain & Cryptocurrency Laws in Canada
Decentralized: Blockchain & Cryptocurrency Laws in CanadaDecentralized: Blockchain & Cryptocurrency Laws in Canada
Decentralized: Blockchain & Cryptocurrency Laws in Canada
 
Blockchain Basics
Blockchain BasicsBlockchain Basics
Blockchain Basics
 
Blockchain and Bitcoin
Blockchain and BitcoinBlockchain and Bitcoin
Blockchain and Bitcoin
 
Bitcoin Explained
Bitcoin ExplainedBitcoin Explained
Bitcoin Explained
 
Bitcoin, Banking and the Blockchain
Bitcoin, Banking and the BlockchainBitcoin, Banking and the Blockchain
Bitcoin, Banking and the Blockchain
 
Introduction to bitcoin
Introduction to bitcoinIntroduction to bitcoin
Introduction to bitcoin
 
Cryptocurrency101
Cryptocurrency101Cryptocurrency101
Cryptocurrency101
 
Blockchain - Presentacion Betabeers Galicia 10/12/2014
Blockchain - Presentacion Betabeers Galicia 10/12/2014Blockchain - Presentacion Betabeers Galicia 10/12/2014
Blockchain - Presentacion Betabeers Galicia 10/12/2014
 
What is Cryptocurrency
What is Cryptocurrency What is Cryptocurrency
What is Cryptocurrency
 
The Bitcoin blockchain (en)
The Bitcoin blockchain (en)The Bitcoin blockchain (en)
The Bitcoin blockchain (en)
 
Blockchain Introduction
Blockchain IntroductionBlockchain Introduction
Blockchain Introduction
 
Demysitifying Bitcoin and Blockchain
Demysitifying Bitcoin and Blockchain Demysitifying Bitcoin and Blockchain
Demysitifying Bitcoin and Blockchain
 
Paper: Crypto Currency Mining
Paper: Crypto Currency MiningPaper: Crypto Currency Mining
Paper: Crypto Currency Mining
 
2018 SAI workshop blockchain Kristof Verslype
2018 SAI  workshop blockchain Kristof Verslype2018 SAI  workshop blockchain Kristof Verslype
2018 SAI workshop blockchain Kristof Verslype
 
An Introduction to Bitcoin, Blockchain and Cryptocurrency
An Introduction to Bitcoin, Blockchain and CryptocurrencyAn Introduction to Bitcoin, Blockchain and Cryptocurrency
An Introduction to Bitcoin, Blockchain and Cryptocurrency
 
Block Chain Bitcoin and Crypto Currency
Block Chain Bitcoin and Crypto CurrencyBlock Chain Bitcoin and Crypto Currency
Block Chain Bitcoin and Crypto Currency
 
Blockchain for Beginners
Blockchain for Beginners Blockchain for Beginners
Blockchain for Beginners
 
EDUCATION ON CRYPTOGRAPHY
EDUCATION ON CRYPTOGRAPHYEDUCATION ON CRYPTOGRAPHY
EDUCATION ON CRYPTOGRAPHY
 
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
 
Hui
HuiHui
Hui
 

Similar a BTC Transactions Deconstructed

Architecture and operations.pptx
Architecture and operations.pptxArchitecture and operations.pptx
Architecture and operations.pptxharshitmittal737363
 
BitCoin explained
BitCoin explainedBitCoin explained
BitCoin explainedHarelc
 
BlockChain Techonology - Unit 1.pptx
BlockChain Techonology   -   Unit 1.pptxBlockChain Techonology   -   Unit 1.pptx
BlockChain Techonology - Unit 1.pptxos3558995
 
Blockchain Fundamental_KIPMI_2022.02.26.pdf
Blockchain Fundamental_KIPMI_2022.02.26.pdfBlockchain Fundamental_KIPMI_2022.02.26.pdf
Blockchain Fundamental_KIPMI_2022.02.26.pdfadinugroho751867
 
Blockchain and Cryptocurrencies
Blockchain and CryptocurrenciesBlockchain and Cryptocurrencies
Blockchain and CryptocurrenciesnimeshQ
 
Blockchain, DLT, Tokens and ICO Introduction Course
Blockchain, DLT, Tokens and ICO Introduction CourseBlockchain, DLT, Tokens and ICO Introduction Course
Blockchain, DLT, Tokens and ICO Introduction CourseJean-Marc Seigneur
 
Introducing r3 corda™ a distributed ledger designed for financial services
Introducing r3 corda™  a distributed ledger designed for financial servicesIntroducing r3 corda™  a distributed ledger designed for financial services
Introducing r3 corda™ a distributed ledger designed for financial servicesRazi Rais
 
以比特幣為例的區塊鏈技術介紹 ( 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)Nicholas Lin
 
Introduction to Consensus techniques
Introduction to Consensus techniques Introduction to Consensus techniques
Introduction to Consensus techniques Vasiliy Suvorov
 
Blockchain Application Design and Development, and the Case of Programmable M...
Blockchain Application Design and Development, and the Case of Programmable M...Blockchain Application Design and Development, and the Case of Programmable M...
Blockchain Application Design and Development, and the Case of Programmable M...Ingo Weber
 
Icsa2018 blockchain tutorial
Icsa2018 blockchain tutorialIcsa2018 blockchain tutorial
Icsa2018 blockchain tutorialLen Bass
 
PSU CSE 541 Project Idea
PSU CSE 541 Project IdeaPSU CSE 541 Project Idea
PSU CSE 541 Project IdeaNitish Upreti
 
Final presentation (1)
Final presentation (1)Final presentation (1)
Final presentation (1)BidisaBiswas1
 

Similar a BTC Transactions Deconstructed (20)

Architecture and operations.pptx
Architecture and operations.pptxArchitecture and operations.pptx
Architecture and operations.pptx
 
BitCoin explained
BitCoin explainedBitCoin explained
BitCoin explained
 
BlockChain Techonology - Unit 1.pptx
BlockChain Techonology   -   Unit 1.pptxBlockChain Techonology   -   Unit 1.pptx
BlockChain Techonology - Unit 1.pptx
 
Blockchain Fundamental_KIPMI_2022.02.26.pdf
Blockchain Fundamental_KIPMI_2022.02.26.pdfBlockchain Fundamental_KIPMI_2022.02.26.pdf
Blockchain Fundamental_KIPMI_2022.02.26.pdf
 
Blockchain and Cryptocurrencies
Blockchain and CryptocurrenciesBlockchain and Cryptocurrencies
Blockchain and Cryptocurrencies
 
Introduction to Blockchain Technology
Introduction to Blockchain TechnologyIntroduction to Blockchain Technology
Introduction to Blockchain Technology
 
Blockchain, DLT, Tokens and ICO Introduction Course
Blockchain, DLT, Tokens and ICO Introduction CourseBlockchain, DLT, Tokens and ICO Introduction Course
Blockchain, DLT, Tokens and ICO Introduction Course
 
Introducing r3 corda™ a distributed ledger designed for financial services
Introducing r3 corda™  a distributed ledger designed for financial servicesIntroducing r3 corda™  a distributed ledger designed for financial services
Introducing r3 corda™ a distributed ledger designed for financial services
 
Blockchain for NGOs
Blockchain for NGOsBlockchain for NGOs
Blockchain for NGOs
 
Bitcoin presentation
Bitcoin presentationBitcoin presentation
Bitcoin presentation
 
Blockchain
Blockchain Blockchain
Blockchain
 
BlockChain-1.pptx
BlockChain-1.pptxBlockChain-1.pptx
BlockChain-1.pptx
 
以比特幣為例的區塊鏈技術介紹 ( 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)
 
Introduction to Consensus techniques
Introduction to Consensus techniques Introduction to Consensus techniques
Introduction to Consensus techniques
 
Blockchain Application Design and Development, and the Case of Programmable M...
Blockchain Application Design and Development, and the Case of Programmable M...Blockchain Application Design and Development, and the Case of Programmable M...
Blockchain Application Design and Development, and the Case of Programmable M...
 
Icsa2018 blockchain tutorial
Icsa2018 blockchain tutorialIcsa2018 blockchain tutorial
Icsa2018 blockchain tutorial
 
01 what is blockchain
01 what is blockchain01 what is blockchain
01 what is blockchain
 
PSU CSE 541 Project Idea
PSU CSE 541 Project IdeaPSU CSE 541 Project Idea
PSU CSE 541 Project Idea
 
Blockchain (1).pptx
Blockchain (1).pptxBlockchain (1).pptx
Blockchain (1).pptx
 
Final presentation (1)
Final presentation (1)Final presentation (1)
Final presentation (1)
 

Último

Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 

Último (20)

Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 

BTC Transactions Deconstructed

  • 2. Transactions How is value moved on the network 2
  • 3. Overview • Transactions • General Structure • Standard Types • Methods of Inquiry • Detailed Examples 3
  • 4. Transactions • Movement of value on the network • These actions are wrapped within a transaction prior to broadcast • Transactions are in plain text and readable by all • Broadcasted to all Bitcoin nodes 4
  • 5. Structure These are data structures, as such conform to well defined rules 5
  • 6. • Inputs are the source of funds being moved, pointers to the transaction hash and sequence number of the UTXO containing moved value • The output of a transaction is the creation of an unspent transaction output (UTXO) • UTXO are denominated in Satoshis • A locking script that encumbers this value requiring specific conditions to be met for the owner to spend 6
  • 7. Transaction Structure Cond. • A transaction completely depletes the UTXO being used • Should only a portion be required, change must be considered • Change is the unused portion of the UTXO being moved • The difference between the new UTXO and change is taken by the network as a fee 7
  • 8. Standard Transactions • Pay-to-Public-Key-Hash (P2PKH) • Pay-to-Public-Key • Multi-Signature • Data Output • Pay-to-Script-Hash (P2SH) 8
  • 9. Standard Transactions • Pay-to-Public-Key-Hash (P2PKH) • Pay-to-Public-Key • Multi-Signature • Data Output • Pay-to-Script-Hash (P2SH) The majority of Bitcoin transactions today are of this general type. These types of transactions are used to transfer value, typically from one user to another. They are constructed having the form: scriptSig (or the unlocking script) first, followed by the scriptPubKey (or locking script). 9
  • 10. Standard Transactions • Pay-to-Public-Key-Hash (P2PKH) • Pay-to-Public-Key • Multi-Signature • Data Output • Pay-to-Script-Hash (P2SH) Another payment transaction. These types of transactions are effectively outdated with P2PKH being preferred. The public key itself, not its hash, is stored in the locking script. This has the advantages of being shorter, though less secure. 10
  • 11. Standard Transactions • Pay-to-Public-Key-Hash (P2PKH) • Pay-to-Public-Key • Multi-Signature • Data Output • Pay-to-Script-Hash (P2SH) A M of N schema, where there are N total number of keys and M are needed to create the signature for a valid transaction. Presently limited to a maximum of 15 listed public keys. 11
  • 12. Standard Transactions • Pay-to-Public-Key-Hash (P2PKH) • Pay-to-Public-Key • Multi-Signature • Data Output • Pay-to-Script-Hash (P2SH) The allure of the Block Chain, as a single source of shared truth embodied by a immutable database opens up many possibilities. Notary services and beyond. As such, developers have wanted to take full advantage of this instrument. OP_RETURN allows for 40 bytes of data to be stored in the block chain. 12
  • 13. Standard Transactions • Pay-to-Public-Key-Hash (P2PKH) • Pay-to-Public-Key • Multi-Signature • Data Output • Pay-to-Script-Hash (P2SH) Payment to P2SH goes instead to a potentially complex locking script but rather to the hash of the script. This greatly shortens the overall size of the transaction. A future spend of this UTXO requires the script whose hash matches. 13
  • 14. My Method of Inquiry After building my transaction, I had a serial hex mess - But what did all of this stuff mean? 14
  • 15. 15
  • 16. 16
  • 17. Resources • Builder (Bitcore): http://bit.ly/1ORgoeF • Explorer: https://chain.so/ • Hex Converter: http://www.rapidtables.com/convert/number/hex-to- ascii.htm • Decoder: https://blockchain.info/decode-tx • Broadcaster: https://live.blockcypher.com/bcy/pushtx/ • Blog: http://www.siliconian.com/blog 17

Notas del editor

  1. Transactions are an expression of intent to transfer value between parties. Pic: https://commons.wikimedia.org/wiki/File:Bitcoin_Transaction_Inputs_and_Outputs.png
  2. Pic: https://commons.wikimedia.org/wiki/File:Bitcoin_Transaction_Visual.png
  3. What do they do? Movement of value across a decentralized network. Although cryptographic solutions abound in Bitcoin, transactions are clear text. A signed transaction is broadcasted to all nodes on the network, not just to the address receiving a payment. Every node independently validates each transaction to prevent an invalid transaction.
  4. What are they? Just because these are data structures and must therefore conform to well defined rules - that doesn’t say anything about knowing what those rules are. I had to search through multiple sources. As no one source held a complete record what exactly the role of each byte. Also, never forget that one is reading HEX.
  5. A block explorer is critical in this case - either you are making a RPC to a local copy of the Block Chain, or more likely you are using someone’s Web API. The information of a transaction ID and seq can only be had via these two routes. The Script is not the only mechanism for ‘locking’ down a transaction: nLockTime :: A transaction is invalid until such time (or block height) exceeds the value ascribed to this. Most of the time, this value is set to null - and is therefore ignored. However, if a value has been assigned then it acts exactly like the post dating of a check. As this makes for an invalid transaction though, no relay will accept this transaction. If you wish to use this, then you must use a service that will hold the transaction and only releasing it after this condition has been met. Lastly it uses UNIX time - one major difference being signed Vs. Unsigned. Bitcoin uses an unsigned 32 byte integer. As such nLockTime is immune to 2038 UNIX ‘bug’.
  6. Failure to include a proper change address will result in unintended loss. Instead of a separate data field for fees, the network subtracts inputs and outputs with this difference being ‘fees’. Change addresses (all addresses really) should never be re-used. The re-use of an address is considered bad security practice.
  7. isStandard() == This function within the Bitcoin Protocol defines the five (5) standard transactions. A transaction that is not standard may be rejected by the miner. It does not mean though that it can’t go through, and some mining pools will process non-standard transactions: see ELIGIUS
  8. The “transaction” that one typically is referring to. The mechanism whereby value is encumbered by another.
  9. Older mechanism. Shorter - though one’s public key is completely in the clear.
  10. There is a limit of 15 public keys - and one should double check if this is still the case (April 17 2015)
  11. To reduce the potential for bloat, OP_RETURN was brought into 0.9 of the core client. This transaction returns null and does not move/encumber value. It is simply a means to placing data into the blockchain in a prune-able manner that does not otherwise effect unspent transaction outputs. Currently the max information that can be stored is 40 bytes —> 80 bytes with v0.10 upgrade. So target a data payload of 40 bytes until more nodes have upgraded their software.
  12. Suppose you have a multi-sig address and someone wishes to pay to this. This would require that the transaction contains the N public keys and may result in a large transaction, and hence a larger fee. Instead the hash of this complex script is used. A question asked, revolved around the ‘size’ and pricing transactions. Upon further research: (April 19 2015; https://en.bitcoin.it/wiki/Transaction_fees) A transaction that is smaller than 1,000 bytes and all outputs are greater than 0.01 BTC, then the fee can be waived. Though the typical fee is 0.0001 BTC or 0.1 mBTC. However, for larger transactions - the current rate is 0.1 mBTC per 1,000 bytes.
  13. I was able to create a serialized hex transaction and then send it to the network, but I wondered what did all those characters mean?
  14. I’m a bit old school and still like the feeling that paper affords. So I printed up a transaction and proceeded to deconstructing what each field meant. It was my way of really getting into the data. When looking at a transaction, you must always remember that everything is in hex. Also, it is byte size - so you need to basically grab two characters at a time in order to make any meaning.
  15. Then Checked Out: http://www.siliconian.com/blog/16-bitcoin-blockchain/22-deconstructing-bitcoin-transactions
  16. Hex to ASCII Vs. Hex-to-Decimal. This was by far the most complex, as I was constantly switching these in my mind.