Transactions are the most important part of the Bitcoin blockchain and all other features were created to make sure that they are created, validated, propagated, and added to the distributed ledger.
Table of contents.
- Transactions in Bitcoin.
- Transaction chains.
Bitcoin is based on trust, trust in a decentralized system. The bitcoin system is simple enough, users have wallets that store keys and time after time send and receive funds between each other. The main purpose of bitcoin unlike Ethereum is the exchange of value between two parties and the store of value. Transactions are propagated across the network and are validated, verified, and added to blocks and new ones are created and added to the chain.
All transactions are public records but users can decide to stay anonymous. Using the links provided in the references section, we can search for any data we need from the bitcoin blockchain. The links take the bitcoin address, transaction hash, or a block number and return the corresponding data related to the search parameter.
Transactions in Bitcoin.
As stated the main purpose of bitcoin is to support the exchange of value - transactions. They inform the network that a participant A sent amount X to participant B, and now participant B owns amount X. Participant B can now be able to spend amount X. This chain of ownership is recorded in distributed ledgers that are immutable.
A typical transaction has inputs and outputs. The inputs are debits to a bitcoin wallet address and outputs consist of credits to a bitcoin wallet address. Wallets are the interfaces that participants use to interact with the blockchain.
All transactions have a fee, this is to prevent infinite loops and other issues we shall later discuss. Due to this fee, inputs and outputs may not match, in that, the outputs will be slightly less compared to the inputs.
A transaction also has proof of ownership for each bitcoin(inputs). Since these transactions are public any participant can validate the transaction. The following image shows a Bitcoin transaction as double-entry bookkeeping;
Common transactions on Bitcoin involve a simple payment for services such as travel after which change is returned to the sender. Such transactions have single inputs and two outputs.
Another form of a Bitcoin transaction is one with several inputs and a single output.
This is similar to exchanging cents and coins for larger notes in fiat currency.
The final form of transaction is seen on the decentralized ledger as a transaction that distributes a single input to multiple outputs that represent multiple recipients.
Such transactions are common to large organizations distributing funds, e.g payroll systems.
A chain is formed whereby for participant A to be able to send amount X to participant B, the payment uses the previous transaction output of A as its input. This could be previous transactions between A and another party C. regardless they are used as inputs to the new transaction. This transaction will also create new outputs which will be referenced by the next subsequent transactions.
As we can see this will result in chains. This is also why it is impossible to corrupt a single transaction on the blockchain.
These transactions form blocks, the blocks are also chained together each referencing the previous block. It is only the genesis block created by Satoshi Nakamoto that does not have a predecessor. Using the links provided in the references section, we can look for a search bar and search for '1' - the first block.
Conventional fiat currency supports the concept of 'change/balances', that is, if a buyer buys an asset that costs $10 with a $20 note, he/she expects a balance of $10. The same also applies to Bitcoin and Ethereum blockchains. In the latter network, the Wei is the smallest denomination unit of Ether, it is commonly used to pay for gas fees.
Transactions outputs referencing both the new owner and the current owner are referred to as change addresses. All transactions generate change unless the wallet aggregates inputs such that they match the exact amount of payment that has been requested.
Transactions are the backbone of the bitcoin network. Ethereum does more than transactions, in that we can program conditional logic that executes when rules have been met.
Transactions are meant to move inputs to outputs. All transactions reference a previous transaction just like all blocks reference a predecessor block. This creates a high level of immutability in the decentralized ledger.