2.2 Bitcoin Blockchain: Transaction Structure
Transaction in Bitcoin System
Scenario: Person A wants to send 5 BTC to Person B
- Person B shares his address with Person A
- Person A creates a transaction message and adds Person B’s address and 5 BTC to it
- Person A then signs the transaction with his private key and shares his public key to the network for signature verification
- Person A broadcasts the transaction on the Bitcoin network
\ Double Spending Problem
Spending the same Bitcoins in more than one transaction is called the double spending problem.
\ Encountering Double Spending in Blockchain
The security measures which prevent double-spending in Blockchain:
- Transaction details are sent to all or as many nodes in the network
- Blockchain is constantly growing, and each peer maintains a copy of the Blockchain
- Blockchain ensures that any modification in the block will lead to recomputing of the following blocks
- Anyone can validate the transactions and this validation prevents double spending
\ Pseudonymity in Bitcoin
Pseudonymity is the near anonymous state in which users have disguised identities and do not disclose their true identities
- Bitcoin is a permissionless Blockchain where you don’t need to set up an account
- The public and private keys are generated by the wallet
- The address acts as an identifier or pseudonym of a user’s transaction
\ Bitcoin Addresses
The Bitcoin address corresponds to a public key based on ECDSA(Elliptic Curve Digital Signature Algorithm) used in Bitcoin.
Here is a sample Bitcoin address: 1PHYrmdJ22MKbJevpb3MBNpVckjZHt89hz
A wallet can have many such addresses and can be used for transactions
\ Bitcoin Transactions: UTXOs UTXO or Unspent Transaction Output is the fundamental building block of Bitcoin.
\ Bitcoin Transaction Structure
A Bitcoin transaction has three pieces of information:
- Input: This is a record of which Bitcoin address was used to send the Bitcoins to a receiver in the first place
- Amount: This is the number of Bitcoins that the sender sends to the receiver
- Output: This is sent to the sender’s address as a change
\ Bitcoin Transactions and Input/Output
Transaction structure in Bitcoin reflects double entry bookkeeping
\ \