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 ...
21
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 ...
18
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, ...
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 ...
16
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.
...
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) ...
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 ...
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.
...
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 ...
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 ...
12
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 ...
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 ...
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
Which is the smallest hash that has ever been hashed?
The 12 lowest block hashes in Bitcoin as of Jan 22 2023:
Block 756951 (0000000000000000000000005d6f06154c8685146aa7bc3dc9843876c9cefd0f)
Block 742035 (...
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 ...
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 ...
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 ...
9
votes
Accepted
How to 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 ...
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 ...
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 ...
8
votes
Accepted
What is the different between CompactSize and VarInt encoding?
There are two distinct variable-length integer encodings implemented in Bitcoin Core's serialization framework:
The encoding used in the P2P protocol for the lengths of vectors (number of ...
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 ...
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 ...
7
votes
Why does the blockchain need blocks?
A block is just an arbitrary grouping of transactions. It makes a convenient chunk of data for a proof-of-work to be performed on. You could hypothetically do the proof-of-work on the transactions ...
7
votes
How does solving a block work in relation to the first letter/number after the 0's?
The comparison used is numeric
These are numbers not strings of characters. You can see this by looking at the code in the 2009 main.cpp of the Bitcoin reference implementation:
uint256 ...
7
votes
Accepted
Is timestamping needed for anything except difficulty adjustment
It seems to me that PoW overwrites whatever timestamps there may be, and in effect determines what "time" is for the blockchain.
I think this is your confusion: arguably, timestamping is ...
7
votes
Accepted
What are the components of the raw block shown in this image?
The diagram is wrong
The data in the gap between the two brackets is the count of transactions and most of the first coinbase transaction.
The start/top of the second bracket is positioned incorrectly....
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
block × 633blockchain × 233
transactions × 122
bitcoin-core × 66
mining-theory × 59
hash × 42
bitcoind × 38
mining-reward × 31
difficulty × 29
mining-pools × 21
validation × 20
transaction-fees × 19
protocol × 19
block-header × 19
blocksize × 18
api × 17
bitcoin-core-development × 17
blockchain-fork × 17
coinbase-transaction × 16
timestamp × 16
merkle-tree × 15
blockchain.info × 14
synchronization × 14
proof-of-work × 13
confirmations × 13