Bitcoin Mechanics Slides

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/186

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

187 Terms

1
New cards

Bitcoin Consensus

A decentralized protocol ensuring all transactions are validated by miners and recorded in an append-only ledger.

2
New cards

Account-Based Ledger

A financial model where balances are stored in accounts and updated when transactions occur

3
New cards

Transaction-Based Ledger

A ledger model used by Bitcoin where transactions reference previous outputs rather than modifying account balances directly.

4
New cards

Validity of Transactions

Transactions must be traced back to their origin to ensure the sender has sufficient funds

5
New cards

Bitcoin’s Use of Hash Pointers

Transactions reference previous transactions through cryptographic hash pointers

6
New cards

Unspent Transaction Output (UTXO)

The remaining portion of a Bitcoin transaction output that has not been spent

7
New cards

Merging Value in Bitcoin

Multiple transaction inputs can be combined into a single output

8
New cards

Joint Payments

Bitcoin allows multiple signers to authorize transactions

9
New cards

Bitcoin Scripts

A stack-based scripting language used to define spending conditions for Bitcoin transactions.

10
New cards

Common Bitcoin Script Instructions

Includes OP_DUP (duplicate top stack item)

11
New cards

Pay-to-Script-Hash (P2SH)

A transaction type allowing users to pay to a script hash rather than a public key

12
New cards

Proof-of-Burn

A mechanism where coins are permanently destroyed by sending them to an unspendable address

13
New cards

Escrow Transactions

A Bitcoin use case where funds are locked in a multi-signature contract requiring multiple approvals for release.

14
New cards

Green Addresses

A technique where a trusted intermediary signs transactions

15
New cards

Efficient Micro-Payments

Incremental payments using pre-signed transactions

16
New cards

Locktime in Bitcoin

A transaction parameter that prevents spending until a specified block height or timestamp is reached.

17
New cards

Bitcoin Blocks

Bundles of transactions linked cryptographically

18
New cards

Merkle Trees in Bitcoin

A data structure that efficiently organizes and verifies transactions within a block

19
New cards

Coinbase Transaction

The first transaction in a Bitcoin block

20
New cards

Bitcoin P2P Network

A decentralized network of nodes that propagates transactions and blocks without a central authority.

21
New cards

Transaction Flooding

A broadcast mechanism where nodes relay transactions to their peers to ensure network-wide propagation.

22
New cards

Race Conditions in Bitcoin

Situations where conflicting transactions or blocks compete for inclusion

23
New cards

Hard Fork

A blockchain protocol upgrade that is not backward-compatible

24
New cards

Soft Fork

A backward-compatible blockchain upgrade that tightens validation rules while allowing older nodes to remain functional.

25
New cards

Bitcoin’s Throughput Limits

Bitcoin can handle approximately 7 transactions per second due to its 1MB block size and 10-minute block interval.

26
New cards

Cryptographic Limitations in Bitcoin

Bitcoin relies on specific cryptographic primitives (e.g.

27
New cards

Bitcoin’s Storage Growth

The blockchain size increases over time

28
New cards

Simplified Payment Verification (SPV)

A method allowing lightweight clients to verify transactions without storing the full blockchain.

29
New cards

Software Diversity in Bitcoin

While Bitcoin Core is the dominant implementation

30
New cards

Bitcoin’s Economic Balance

The system is designed with fixed supply and reward halving to control inflation and miner incentives.

31
New cards

Bitcoin’s Role as Digital Gold

Bitcoin’s scarcity and security make it a store of value akin to gold

32
New cards

What is an account-based ledger?

A financial ledger where balances are stored in accounts and updated with each transaction

33
New cards

How does an account-based ledger differ from a transaction-based ledger?

In an account-based ledger

34
New cards

What is the primary advantage of an account-based ledger?

It simplifies transaction verification by maintaining account balances rather than tracking individual unspent transaction outputs (UTXOs).

35
New cards

What is a potential security risk in an account-based ledger?

Double-spending attacks may be easier since balances are updated directly

36
New cards

How are transactions verified in an account-based ledger?

The ledger checks the sender’s balance before approving a transaction

37
New cards

How does an account-based ledger prevent double spending?

It uses a central authority or distributed consensus to verify transactions and update balances in real-time.

38
New cards

What kind of systems commonly use account-based ledgers?

Traditional banking systems

39
New cards

What role do digital signatures play in an account-based ledger?

Digital signatures authenticate transactions

40
New cards

How does an account-based ledger handle user identity?

Users are typically identified by account addresses or public keys

41
New cards

What is a nonce in an account-based ledger?

A unique transaction identifier that prevents replay attacks by ensuring each transaction is used only once.

42
New cards

How does Ethereum implement an account-based ledger?

Ethereum maintains account balances and smart contract states in its ledger rather than tracking UTXOs.

43
New cards

What are the two types of accounts in Ethereum's account-based ledger?

Externally Owned Accounts (EOAs) controlled by private keys and Contract Accounts controlled by smart contracts.

44
New cards

How do smart contracts interact with an account-based ledger?

They execute code and modify account balances based on predefined conditions.

45
New cards

Why is gas required in Ethereum’s account-based ledger?

Gas fees prevent spam and allocate computational resources fairly by charging for execution costs.

46
New cards

How does state management differ between an account-based and a transaction-based ledger?

Account-based ledgers update account states

47
New cards

48
New cards

Alice wants to send 17 coins to Bob using a transaction-based ledger. How should she structure the transaction?

Alice must use her entire UTXO of 25 coins as input and create two outputs: 17 coins to Bob and 8 coins back to herself as change.

49
New cards

What happens to the input UTXO once Alice spends it in a transaction?

The original UTXO is considered spent and removed from the UTXO set

50
New cards

No

Bob receives 17 coins from Alice. Can he now spend exactly 5 coins from this transaction?

51
New cards

Alice initially has a UTXO of 25 coins. She sends 10 coins to Bob. How many UTXOs does she have afterward?

Alice has one new UTXO worth 15 coins if she included a change output.

52
New cards

What happens if Alice does not include a change output in her transaction?

Any remaining value from the input UTXO is considered a transaction fee and given to the miner.

53
New cards

If Alice has two UTXOs (one worth 5 coins and another worth 10 coins)

how can she send 12 coins to Bob?

54
New cards

What does 'merging value' mean in a transaction-based ledger?

It refers to combining multiple UTXOs as inputs in a transaction to send a larger amount.

55
New cards

Alice and Bob want to send a joint payment of 30 coins to Charlie. Alice has a UTXO worth 20 coins

and Bob has a UTXO worth 15 coins. How should they structure the transaction?

56
New cards

How are joint payments structured in Bitcoin's transaction-based ledger?

Multiple parties sign a transaction where their UTXOs are included as inputs

57
New cards

Alice receives a 50-coin UTXO. She then makes a transaction sending 30 coins to Bob and 10 coins to Carol. What are the outputs?

One output of 30 coins to Bob

58
New cards

If Alice tries to spend only a portion of her UTXO without creating a change output

what happens?

59
New cards

Why does Bitcoin require entire UTXOs to be used in a transaction?

Since UTXOs are immutable

60
New cards

How does the transaction-based ledger model differ from an account-based ledger in handling balances?

Instead of modifying a balance

61
New cards

What is a Bitcoin transaction hash?

A unique identifier for a transaction

62
New cards

What is the purpose of the 'version' field in a Bitcoin transaction?

It specifies the transaction format and helps with protocol upgrades.

63
New cards

What does 'vin_sz' indicate in a Bitcoin transaction?

It represents the number of inputs included in the transaction.

64
New cards

What does 'vout_sz' indicate in a Bitcoin transaction?

It represents the number of outputs generated by the transaction.

65
New cards

What is 'lock_time' in a Bitcoin transaction?

It defines the earliest time or block height at which the transaction can be included in a block.

66
New cards

How is the size of a Bitcoin transaction measured?

It is measured in bytes or virtual bytes (vBytes) if SegWit is used.

67
New cards

What is included in a Bitcoin transaction input?

It contains references to previous transaction outputs (UTXOs) being spent and an unlocking script (scriptSig or witness data).

68
New cards

What is the purpose of the scriptSig in a Bitcoin transaction input?

It provides the cryptographic signature needed to unlock and spend a referenced UTXO.

69
New cards

What does a Bitcoin transaction output contain?

It includes the output value (amount in BTC) and a locking script (scriptPubKey) defining spending conditions.

70
New cards

How is a Bitcoin transaction fee determined?

It is the difference between the sum of input values and the sum of output values

71
New cards

What happens if the sum of all transaction inputs is greater than the sum of all outputs?

The difference is considered a transaction fee and is collected by the miner who confirms the transaction.

72
New cards

What is OP_DUP in a Bitcoin script?

An operation that duplicates the top stack element

73
New cards

What is OP_HASH160 in a Bitcoin script?

It applies a hash function (RIPEMD-160 after SHA-256) to the top stack element

74
New cards

What is OP_EQUALVERIFY in a Bitcoin script?

It compares two stack elements and fails the script if they are not equal

75
New cards

What is OP_CHECKSIG in a Bitcoin script?

It verifies that a provided signature matches the expected public key for spending a UTXO.

76
New cards

What is a Pay-to-Public-Key-Hash (P2PKH) transaction?

A standard Bitcoin transaction type where funds are locked to a hashed public key and can only be spent with a valid signature.

77
New cards

What is a Pay-to-Script-Hash (P2SH) transaction?

A transaction where the recipient provides a script hash

78
New cards

What is the role of 'scriptPubKey' in a Bitcoin transaction?

It defines the conditions under which the output can be spent

79
New cards

How do Bitcoin nodes verify a transaction?

They check that all inputs are valid

80
New cards

What is the difference between the 'transaction being redeemed' and the 'redeeming transaction'?

The transaction being redeemed provides inputs for the new transaction (redeeming transaction) that spends its outputs.

81
New cards

What is Bitcoin Script?

A stack-based scripting language used to define conditions for spending Bitcoin outputs.

82
New cards

Why is Bitcoin Script not Turing complete?

It lacks loops and recursion to prevent infinite execution

83
New cards

What are the key design goals of Bitcoin Script?

Simplicity

84
New cards

How many instructions does Bitcoin Script have?

256 instructions

85
New cards

What are the possible outcomes of a Bitcoin script execution?

Either successful execution (valid transaction) or an error (invalid transaction).

86
New cards

What does OP_DUP do in Bitcoin Script?

Duplicates the top item on the stack

87
New cards

What is the purpose of OP_HASH160 in Bitcoin Script?

It applies SHA-256 followed by RIPEMD-160

88
New cards

How does OP_EQUALVERIFY work in Bitcoin Script?

It compares the top two stack elements and marks the transaction invalid if they do not match.

89
New cards

What does OP_CHECKSIG do in Bitcoin Script?

Verifies a digital signature using a public key to confirm transaction authenticity.

90
New cards

What is OP_CHECKMULTISIG used for?

It verifies multiple signatures from a set of public keys

91
New cards

How does Bitcoin Script handle joint payments?

It allows multiple parties to co-sign transactions using OP_CHECKMULTISIG.

92
New cards

What is the typical execution flow of a Bitcoin script in a P2PKH transaction?

The stack processes ` OP_DUP OP_HASH160
93
New cards

What happens when OP_DUP is executed?

The public key is duplicated on the stack for later verification.

94
New cards

Why does Bitcoin Script use OP_HASH160?

It produces a short

95
New cards

What does OP_EQUALVERIFY do in a standard P2PKH script execution?

It ensures the provided public key hash matches the expected recipient's hash.

96
New cards

What does OP_CHECKSIG verify at the end of script execution?

It checks if the signature provided corresponds to the correct public key.

97
New cards

What happens if a Bitcoin script execution encounters an error?

The transaction is invalid and rejected by the network.

98
New cards

How does Bitcoin ensure script execution is deterministic?

By using a stack-based system with no looping or conditional branching beyond basic logic.

99
New cards

Why is script execution linear in Bitcoin?

It avoids complex computation

100
New cards

What does it mean when a script execution returns 'true'?

It means the transaction is valid and meets the spending conditions.