bitcoin transactions examples
TRANSCRIPT
Bitcoin Transactions Deconstructed
Presented by: Jeff Flowers
TransactionsHow is value moved on the network
Overview
• Transactions
• General Structure
• Standard Types
• Methods of Inquiry
• Detailed Examples
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
StructureThese are data structures, as such conform to well defined rules
• 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
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
Standard Transactions
• Pay-to-Public-Key-Hash (P2PKH)
• Pay-to-Public-Key
• Multi-Signature
• Data Output
• Pay-to-Script-Hash (P2SH)
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).
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.
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.
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.
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.
My Method of Inquiry After building my transaction, I had a serial hex mess -
But what did all of this stuff mean?
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