Skip to main content
19 votes
Accepted

How does block synchronization work in Bitcoin Core today?

Since the introduction of headers-first synchronization in Bitcoin Core 0.10, the blockchain data structure can be seen as having three components: The block header tree: a tree data structure, with ...
Pieter Wuille's user avatar
8 votes
Accepted

How does headers-first prevent disk-fill attack?

To add to the other answer, since Bitcoin Core 24.0, there is an additional protection implemented against low-difficulty header spam: header pre-syncing. To recapitulate, since the headers-first ...
Pieter Wuille's user avatar
3 votes
Accepted

What does the block time represent?

I've always been under the impression that a block's timestamp represents the second at which a block was found. It is, though not with that much accuracy. The protocol allows for a roughly 3-hour ...
Pieter Wuille's user avatar
3 votes
Accepted

How are the block header bytes treated when calculating the block size in weight?

Are these header bytes treated as non-segwit bytes, i.e. cost 4 WU, so we actually have 3,999,668 WU (4,000,000 - 320 WU for header - 12 WU for tx counter) for transactions? Yes. The header weighs ...
Pieter Wuille's user avatar
2 votes
Accepted

What is pchCommand?

Yes, pchCommand is the name of the variable for the message name in the network message header. The naming of this variable uses Hungarian Notation. p indicates it is a pointer, ch indicates that it ...
Ava Chow's user avatar
  • 70.9k
2 votes

What if a miner just broadcasts the header and never gives the body? What will happen?

Since nobody can determine that the block is valid, they will treat it just like anything else that they cannot determine is valid -- they will ignore it. Miners can't start mining based on the header ...
David Schwartz's user avatar
2 votes

What if a miner just broadcasts the header and never gives the body? What will happen?

Full nodes will want to see the body in order to maintain their UTXO set. The miners block headers alone are not enough. Also, the miner would never be able to spend the block rewards, because that ...
RedGrittyBrick's user avatar
2 votes

What are the exact degrees of freedom in finding a valid block?

First of all is my understanding accurate? In other words are the only degrees of freedom the following?: choice of coinbase transaction message If by that you mean the scriptSig of the coinbase ...
Pieter Wuille's user avatar
2 votes
Accepted

How does hash work in a block for many transactions?

Miners keep a pool of unconfirmed transactions (called "mempool") which usually contains many more transactions that can fit in one block. When a new block is created, miners immediately ...
Vojtěch Strnad's user avatar
1 vote

In what order is the blockheader hashed?

They are hashed in the order they appear in the network serialisation: block The block message is sent in response to a getdata message which requests transaction information from a block hash. ...
RedGrittyBrick's user avatar
1 vote

How does hash work in a block for many transactions?

the hash value could be changed very frequently until the block finished? Even if no new transactions were arriving and the set of transactions was unchanging, the hash value would be changing ...
RedGrittyBrick's user avatar
1 vote

What is a nonce?

Yet another info and info, NONCE stands for: Number used ONCE
Faruk Postacioglu's user avatar

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