L3 - Bitcoin Basics Flashcards

1
Q

Who invented Bitcoin and when?

A

By Satoshi Nakamoto in 2008

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

When was the first block mined?

A

2009

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Three key properties of bitcoin blockchain

A
  • Trust Free
  • Tamper-Resistant (resistant to manipulation)
  • Transparent (every participant can read and validate all info and the current state)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Structure of a block

A
  • Block size
  • Block header
  • transaction counter
  • transactions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does the block header include?

A
  • Version
  • Hash of previous block
  • Hash of Merkle root
  • Timestamp
  • Difficulty
  • Nonce
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What creates the chaining?

A

Hash of previous block

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Based on what is the block’s hash which is used for chaining calculated?

A

From the version until the nonce field.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the block height?

A

The current block height is simply the number of blocks in the blockchain minus one.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Where is the height of the block stored in?

A

The coinbase transaction (TX0)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is there to know about the Genesis block?

A
  • references a previous block with hash 0

- contains only the mining reward transaction (first 50 BTC which can never be spent)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Where are account balances calculated?

A

Off-chain (in a wallet). Transactions lead to a world-state. Bitcoin uses a transaction-based ledger and does not add up account balances.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Where can wallet owners define conditional transactions?

A

Using Bitcoin Script

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the inputs in a TX)

A

former outputs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

TXin meaning

A

transaction input

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

TXout

A

transaction output

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which transactions have no Txin?

A

Transactions where new coins are created

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is TxID

A

Each transaction has a unique identifier TxID.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is the change address?

A

The address the money is sent back to is called a change address. In Bitcoin, either all or none of the coins have to be consumed by another transaction. This enables efficient verification, as one only has to keep a list of UTXO.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is consolidating funds?

A

Instead of having many UTXO a user can create a transaction that uses all the UTXO she has and creates a single UTXO with all the coins in it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is a joint payment?

A

Two or more parties can combine their input and create one output. Of course, it requires signatures from all involved parties.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

coinbase transaction

A

A coinbase transaction is the first transaction in a block. It is a unique type of bitcoin transaction that can be created by a miner. The miners use it to collect the block reward for their work and any other transaction fees collected by the miner are also sent in this transaction.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Does the input store the BTC value and the receiver’s address?

A

No, only the outputs store the BTC value and the receiver’s address

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is the lock time

A

Locktime sets the earliest time a transaction can be mined in to a block. It’s the last field in a piece of transaction data.

24
Q

Three building blocks of the logical data structure of transaction

A
  • Metadata (size of transaction, # inputs & outputs, version, lock time, hash of transaction)
  • inputs (previous transaction, index of txout, signature script)
  • outputs (amount of transferred coins and scriptPubKey)
25
Q

What is a mesh network?

A

A mesh network (or simply meshnet) is a local area network topology in which the infrastructure nodes (i.e. bridges, switches, and other infrastructure devices) connect directly, dynamically and non-hierarchically to as many other nodes as possible and cooperate with one another to efficiently route data to and from clients.
This lack of dependency on one node allows for every node to participate in the relay of information.
-> random structure
-> resilient if it brakes or nodes leaves

26
Q

What are peers?

A

neighbouring nodes

27
Q

To communicate, nodes need clear rules, which are:

A
  • How to find other nodes (bootstrapping)
  • How to sync the blockchain
  • How to send and receive transactions
  • How to send and receive blocks.
28
Q

Are wallet owners in the network?

A

No, only light nodes, full nodes and miners

29
Q

What is the name of the basic network?

A

Gossip protocol.

30
Q

How does the gossip protocol work?

A

Messages about new blocks or transactions are validated and then broadcasted. To prevent a second broadcast, the node keeps track of the transactions and blocks sent themselves.

31
Q

How are new nodes introduced to the network?

A
  • Hard-coded DNS services which offer IP-addresses of nodes –> if down then hard-coded seed addresses (last restort)
  • Addresses stored in a database maintained locally. Text-file provided addresses
  • Command-line provided addresses (for a test network)
32
Q

Role of the wallet owner (user)

A
  • owns different private keys to UTXOs
  • is the owner of all stored currencies on these addresses
  • sends money by signing and publishing new transactions to a connected light node, full node or miner
33
Q

Role of a full node (software)

A
  • maintains the complete blockchain. Its record of the chain is complete, it contains every single transaction and block until the genesis block
  • is connected to other full nodes and exchanges information. Namely:
  • validates every transaction and block it receives
  • relays all new transactions and blocks
34
Q

Miner (software)

A
  • miner needs same record as a full node to work properly. He is also connected to other nodes and maintains the network.
  • additionally, the miner is responsible for creating new blocks by trying to solve the mining puzzle
  • the miner gets rewarded by creating new blocks
35
Q

Light node (software)

A
  • can act as a relay (receive and pass on) for transactions of one wallet owner
  • validates whether a single transaction of the wallet owner was executed correctly
  • light node requires a full node to connect to the network
  • -> almost no relevance today. Centralized services are used to create transactions.
36
Q

Total size of the Bitcoin blockchain

A

388 GB

37
Q

What is the index?

A

Index contains a database which stores the location of each block on the disk keyed with its hash

38
Q

What is the .blk file?

A

Contains the actual blockchain in raw network format

39
Q

What is the chainstate?

A

A LevelDB database with all currently unspent transaction outputs in the system (UTXO). This is used when operating a Bitcoin node in favor of the raw blockchain data.

40
Q

What is the mempool?

A

A list of unconfirmed transactions to be part of a future block

41
Q

What is in the wallet.dat file?

A

Data regarding the user’s (owner of the node) personal wallet

42
Q

How does a newly created transaction find its way into a block? 5 Steps

A
  1. The transaction is created and signed by the wallet owner.
  2. The transaction is sent to a full node. It validates the transaction.
  3. The transaction is spread in the network. Every full node also validates it for themself and adds to the memory pool.
  4. A Miner builds the transaction into a block and publishes it to the network.
  5. Other nodes validates the block, update the memory pool and start over.
43
Q

What are the properties of an N/M multisig address?

A
  • requires more than one signature
  • N = number of required signatures
  • M = number of maximum signatures
44
Q

What does 2/3 multisig mean?

A

That this address requires two arbitrary signatures from a pool of three predefined signatures.

45
Q

How does a Bitcoin escrow work?

A

Alice creates a 2/3 multisig-address and transfers the money to it. Bob can now safely send his good. When the good arrives, both Alice and Bob can sign the transaction and Bob receives his money. –> If the exchange is correctly executed, the escrow is not involved.

46
Q

For which use-case are micropayments used?

A

Alice wants to continuously use a service from Bob and pay a certain small amount of Bitcoin for each usage. Creating new transactions every time won’t work as:

  • Too many transactions get created
  • The fees for the transaction would be too high
47
Q

How does micropayment work?

A
  • At the beginning, Alice sends her maximum spendable amount to a 2/2 multisig address.
  • Every time she consumes the service by Bob she sings a transaction locally for the multisig address, send the accumulated amount to Bob and the change to herself. A message containing this incomplete transaction is sent to Bob
  • If she is finished using the service, Bob will sign the last transaction he received and publishes it on the network.
48
Q

What is the problem with Micropayments?

A

The problem is that Bob could decide not to sign the last transaction (or any transaction at all), leaving Alice’s money stuck inside the multisig address.

49
Q

How to solve the problem with Micropayments?

A
  • Alices can demand from Bob to create a transaction from the multisig-address, transferring the complete funds back to her before creating it. This transaction contains the lock time as the transaction should only be spendable after a certain amount of time t and if the output is not spent otherwise.
    (Time in terms of block height)
50
Q

Different approaches for storing and managing secret keys lead to different trade-offs between

A

availability, security, and convenience

51
Q

What is cold storage?

A
  • enhanced security
  • does not have to be only to receive coins
    cons:
  • takes time to activate (availability) and is less convenient
52
Q

What is hot storage?

A
  • immediately available
  • convenient
    con:
  • security
53
Q

4 wallet types

A
  • Brain wallet
  • Paper wallet
  • Hardware wallet
  • online wallet
54
Q

What is a brain wallet?

A
  • stores Bitcoins with noting but a secret passphrase

- Idea: a deterministic function to generate a private key out of a passphrase

55
Q

How does a hardware wallet work?

A
  • key is stored on the hardware device

- additional: generation of a 24-word passphrase. If device gets destroyed, the passphrase allows for a recovery.

56
Q

Hoes does an online wallet work?

A
  • let other people store your Bitcoins for you (custodian wallet)
  • No access to the private key, coins can only be used through a certain interface
  • common with most exchanges
    con:
  • very dangerous. Many exchanges got hacked.