时间:2023-07-11|浏览:219
In the Bitcoin system, every full node keeps track of UTXO. To understand the UTXO model, it's important to know that Bitcoin adopts a transaction-based ledger system. In other words, Bitcoin doesn't have "accounts" but only "addresses". You can create as many wallet addresses as you want on the Bitcoin blockchain, and the total amount of Bitcoin you own is the sum of all Bitcoin in all your wallet addresses. Bitcoin doesn't consolidate these addresses to create your account.
Therefore, the core of the Bitcoin network is transactions. Transactions transfer value from transaction inputs to transaction outputs. Transaction inputs are the source of value, usually the output of a previous transaction.
To dive deeper into UTXO, let's start by explaining transactions on Bitcoin.
A Bitcoin transaction is basically telling the network that a user with a certain amount of Bitcoin has authorized the transfer of those Bitcoin to another user. The new owner can then use those Bitcoin for another authorized transfer, forming a chain of ownership transfers.
Each blockchain network serves as a distributed ledger, and transactions are like entries in a double-entry bookkeeping system. Each transaction includes one or more "inputs" (debit) from Bitcoin accounts and one or more "outputs" (credit) to Bitcoin accounts.
Let's expand on the topic of accounting:
There have been four types of accounting techniques invented by human society: 1. In primitive societies, "knotted accounting" was invented. 2. In agricultural societies, "ledger accounting" was introduced. 3. In industrial societies, "double-entry bookkeeping" was developed. This method allows for clear balance sheets and is suitable for industrial enterprise management. However, it still leaves room for manipulation of data at the source by managers or accountants. 4. Blockchain is a distributed ledger, which is a kind of database shared, replicated, and synchronized among network members.
The rule of double-entry bookkeeping is "debit equals credit". This method uses the "debit" and "credit" symbols, which are not meaningful in themselves. Using these symbols helps us understand the origins and details of transactions and events.
The sum of the inputs and outputs does not have to be equal. In fact, the sum of the outputs should be slightly less than the sum of the inputs. The difference is the implicit "transaction fee" that is collected by the miners who include the transaction in the ledger. (In the diagram, the transaction fee is the small fee shown)
In the example below, Alice's transaction to Bob uses the output of a previous transaction as its input. The output consists of two parts: part of it is for Bob (0.0150 BTC), and the rest is used as change (0.0845 BTC). The transaction forms a chain, where the input of the latest transaction corresponds to the output of the previous transaction.
Alice's private key signature unlocks the output of the previous transaction and proves her ownership of these funds to the Bitcoin network. She includes Bob's address in the transaction, creating a "restriction" that requires Bob's signature to spend the funds. This process demonstrates the transfer of value between Alice and Bob.
Transaction outputs assign a value associated with a private key to a new user. The target key is referred to as a secure lock. In future transactions, this key is needed to access the funds.
Now, the question arises: in the Bitcoin network, which comes first, the input or the output? The answer to this question is: the output comes first.
In Bitcoin, there is a special type of transaction called a "coinbase transaction," which is how new coins are created in the Bitcoin network.
Coinbase transactions do not require spending. In fact, they only have one input called the "coinbase," which is a transaction that creates Bitcoin out of nothing. The coinbase transaction has one output, which pays the newly created Bitcoin to the miner's Bitcoin address.
In the diagram below, the output of the coinbase transaction sends 25.09094928 bitcoins to the miner
用戶喜愛的交易所
已有账号登陆后会弹出下载