Hot answers tagged

23 votes

Why does each block store a Merkle root?

Merkle roots do not verify transactions, they verify a set of transactions. Transaction ID's are hashes of the transaction, and the Merkle tree is constructed from these hashes. It means that if a ...
  • 8,752
21 votes
Accepted

What are the arguments for and against the increase of the block size limit?

Please note, this answer was written in Februar 2015. The debate has significantly evolved since then, but I haven't gotten around to updating this answer, yet. I'm sorry, this kinda turned out less ...
  • 65.9k
20 votes

What is chainwork?

Pieter's answer is good, the chainwork value is the expected work amount in the chain, expressed as a 32 bytes integer, for the double SHA-256 hashes calculation work. The chainwork is used to ...
  • 481
20 votes
Accepted

What's the purpose of a maximum block size?

Why is this limit present? 1. To Maintain Consensus There has to be clearly defined rules about which blocks are valid and which are not for the network to agree. Obviously no node will accept a ...
  • 13.8k
18 votes

Why does each block store a Merkle root?

Merkle roots are stored in Bitcoin block headers so as to enable efficient membership proofs for transactions in a block, which are necessary for Simple Verified Payment verification (SPV) nodes that ...
  • 1,317
17 votes

Where is the UTXO data stored?

I assume this question is about Bitcoin Core's internal operations. This description is valid for version 0.8 and later (up to 0.14 at least). One part of the system deals with the active chain, ...
16 votes
Accepted

So I mined a block, but why would other nodes accept my mined block?

The incentive to mine on the currently longest chain is that there is a risk to the dishonest miner that honest, non-mining nodes may have already propagated the first block and hence reject and not ...
15 votes

Can there be a blockchain without mining?

I don't know anything about Multichain so I'm not sure if this is the answer you're looking for, but here's one answer that might help you. The interesting thing about proof-of-work (Nakamoto) ...
  • 1,317
15 votes
Accepted

How is a proof-of-stake block mined at the block level, and how does it accomplish it's goals?

Proof-of-stake mining is similar to Proof-of-work at a technical level. It involves a sort of lottery, similar to proof-of-work, but the difficult of this lottery is weighted depending on how many ...
  • 1,120
15 votes
Accepted

What would happen if two blocks had the same hash?

Blocks are identified by their hash. This means that in your story, in Jan 2017, when B gets broadcast, any node that it is advertized to will think "I already have this block", and ignore it. ...
13 votes
Accepted

Shortest and Longest block interval time ever recorded in Bitcoin

(This data is current through block 535276.) Based on block timestamps (which do not have to be accurate), the longest difference between successive blocks is 463160 seconds (5 days, 8 hours, 39 ...
13 votes

Why is increasing block size in the Bitcoin network considered to decrease security?

Generally speaking, a larger block leads to more computational resources (tx validation, bandwidth, storage, memory) required for each person who wishes to validate newly confirmed transactions. ...
  • 2,451
12 votes

What is the magic number used in the block structure?

The magic number is not something specific to bitcoin. Magic numbers are used in computer science for both files and protocols. They identify the type of the file/data structure. A program receiving ...
  • 2,204
12 votes
Accepted

Download single and specific block for study purposes

However this is JSON, I imagine I can't use it to verify the nonce. You can. You can build the block header using the data at the beginning of the JSON object and then hash that. Of course it would ...
  • 63.8k
12 votes
Accepted

Understanding POW and transactions

This is a common misconception: mining is progress free. Yes, it may take 10000 hashes in your example on average to find a block, but this only means that every attempt has 1/10000 chance of being a ...
11 votes
Accepted

Why are block header bits necessary? (Valid difficulty is already implied by chain history)

They aren't really necessary. The reason that they are included can only be known by Satoshi, and AFAIK, he did not state why he chose to include nBits in the block header (or many other things that ...
  • 63.8k
10 votes
Accepted

Parameters in UpdateTip - calculation of log2_work

FYI the code under discussion is available here on GitHub. -> is a member access operator in C++, just as . is. They both expect the name of an object's member on the right (e.g. a member function ...
10 votes

Who mined the infamous block 364422?

Disclaimer: I proposed a partial solution myself to this problem (BIP 143, see below). Did the miner collude with the creator of the transaction? Yes, because they are the same person. It's a ...
10 votes
Accepted

Why are there more than two transaction outputs in a coinbase transaction?

A coinbase transaction can have as many outputs as the miner who created it wants. You may see that there are not just one output for the reward, sometimes there are multiple outputs so that the ...
  • 63.8k
9 votes
Accepted

When does a miner decide to stop collecting transactions and start calculating hashes to try to win?

I am confused about whether a miner chooses to wait for more transactions (more fees) or starts as soon as it receives the first transaction from the network. Once a miner has started calculating the ...
  • 15.2k
9 votes
Accepted

Who mined the infamous block 364422?

Excellent answer by Pieter Wuille. Pieter just forgot to answer the question of the post title, "Who mined the infamous block 364423?" Unfortunately, the question is was "wrong": the first two links ...
  • 186
9 votes

What is the "confirmation" field in a block?

Blocks in Bitcoin, as they exist in the blockchain, don't actually contain a confirmation field. When you query for a block in bitcoin-rpc or similar, additional information is added to the block ...
9 votes

How to prevent a miner from stealing another miner's block?

A is protected by adding coinbase transaction with himself's bitcoin address. from https://en.bitcoin.it/wiki/Block_hashing_algorithm The body of the block contains the transactions. These are ...
  • 333
9 votes
Accepted

How get raw block data?

There's a boolean parameter to that RPC call that'll return it as a hex string representing the binary contents of the block. If verbosity is 0, returns a string that is serialized, hex-encoded ...
  • 1,264
8 votes
Accepted

How many Bitcoin are mined per day?

Colin's calculation has a mistake in that it doesn't account for partial Bitcoins not being paid out in block rewards. It rounds down the reward per day, but should round each block reward down to the ...
  • 65.9k
8 votes

Verifying Bitcoin ownership

A bitcoin transaction can have 1 or more inputs and 1 or more outputs. Inputs are previous transaction outputs that sent bitcoins, and outputs are instructions on where to send the bitcoins from the ...
  • 181
8 votes
Accepted

Can a Bitcoin block be less than 1mb?

Yes. Let's calculate the minimum size of a block: The block header must be exactly 80 bytes. This is the only part of the block that miners actually mine; the rest of the block is data that the ...
7 votes
Accepted

What is a block?

There are a lot of questions on the Bitcoin SE about blocks, but remarkably I couldn't find any that explicitly lay out what a block is. A blocks has two things: A block header and a list of ...
  • 13.8k
7 votes
Accepted

How does a new block get distributed

When a node discovers a new block, it will send an (unsolicited) inv (inventory message) to announce the new block to its peers. The peers should then respond by sending a getdata message requesting ...
  • 65.9k
7 votes
Accepted

Do I need to keep all blocks when running Bitcoin Core?

Full nodes keep all blocks by default, but this is not necessary to achieve full node security. Full nodes validate the complete blockchain and enforce all consensus rules regardless of whether a full ...
  • 65.9k

Only top scored, non community-wiki answers of a minimum length are eligible