Fresh features from the #1 AI-enhanced learning platform.Try it free
Fresh features from the #1 AI-enhanced learning platformCrush your year with the magic of personalized studying.Try it free

Blockchain - Bitcoin Transactions

Get a hint
Account-based ledger
Click the card to flip 👆
1 / 13
1 / 13
Terms in this set (13)
Intuitively: We consider Bitcoin to use an account-based ledger. However, an account-based approach
takes a lot of effort to track the balances of every account.
▪ In an account-based ledger, transactions can transfer arbitrary amounts of coins between accounts.
▪ Transactions lead to a "world-state" of accounts and account balances.
▪ In Ethereum, the hash of the Merkle root of the Merkle tree of all accounts and their balances is stored in
the block.
▪ By using a transaction-based ledger, Bitcoin enables wallet owners to define conditional transactions
using Bitcoin Script
Transactions (Tx) have a number of inputs and a number of outputs.
▪ Inputs (Txin): Former outputs, that are being consumed
▪ Outputs (Txout): New creation of coins
▪ In transactions where new coins are created, no Txin is used (no coins are consumed)
▪ Each transaction has a unique identifier (TxID). Each output has a unique identifier within a transaction. We
refer to them (in this example) as #TX[#txout], e.g., 1[1], which is the second Txout of the second transaction.
Example:
0. No input required, as coins are created.
1. The Tx is used as an Txin. Two Txout are
created, one to Bob and one to Alice. (1[0] and 1[1])
The Tx is signed by Alice.
2. Uses first Txout of Tx1. Creates two Txout to
Carol and Bob, signed by Bob.
3. Uses second Txout of Tx1. Creates two Txout to
David and Alice, signed by Alice.

Change Address:
Why does Alice have to send money back to herself?
In Bitcoin, either all or none of the coins have to be
consumed by another transactions. The address the
money is sent back to is called a change address. This
enables an efficient verification, as one only has to
keep a list of unspent transaction outputs (UTXO).
Consolidating funds:
Instead of having many unspent transaction outputs, a
user can create a transaction that uses all UTXO she
has and creates a single UTXO with all the coins in it.
Joint payments:
Two or more people can combine their inputs and
create one output. Of course, it requires signatures
from all involved people.
As previously stated, transactions consist of inputs and outputs following
these principles:
▪ All inputs reference an existing unspent output or a coinbase
transaction.
▪ Inputs and outputs contain scripts (scriptSig, scriptPubKey) for
verification.
▪ Output scripts (scriptPubKey) specify the conditions to redeem their
value.
▪ Input scripts (scriptSig) provide a signature to redeem the referenced
output.
▪ Only outputs store the BTC value and the receiver's address.
▪ All coins have a history (inputs/outputs) up to the original
coinbase transaction that created them.
Metadata
It contains the size of the transaction,
the number of inputs and outputs, the
version and a lock-time. The hash is also
contained, which can be referenced.
Inputs
An array of all inputs. Each input
contains the previous transaction and
the index of Txout. Also a signature
script is provided.
Outputs
An array of all outputs. One output has
two fields: the amount of the transferred
coins1 and the scriptPubKey.