Questions tagged [block-header]

The block header is a portion of each block in the block chain that identifies the basic parameters of that particular block such as the block version, the time it was generated, the hash of the previous block, and the hash of the transactions in that block.

Filter by
Sorted by
Tagged with
0
votes
1answer
349 views

How can miners alter timestamps to prevent or delay BIP09 feature activation?

In bitcoin mailing list , a proposal had the following concern. BIP 09 is vulnerable to miners fiddling with timestamps in a way that could prevent or delay activation - for example by only ...
1
vote
1answer
114 views

Does the 1 MB block size limit include the header?

I was able to follow the code to validation.cpp: // Size limits if (block.vtx.empty() || block.vtx.size() > MAX_BLOCK_BASE_SIZE || ::GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION | ...
15
votes
1answer
24k views

What is a nonce?

When I see the block info on blockchain, I see that there is a field named "nonce", I could not find any relevant information on web regarding what a nonce is. Please explain what a nonce is what is ...
1
vote
1answer
1k views

Creating a P2P network like Block Chain

Posting this in Bitcoin community because I believe that you guys would be the best to answer the question since my question is related with the blockchain. I am wondering how to create a P2P ...
0
votes
1answer
180 views

How a Light Node can get a block?

I'd like to better understand how a light node can retrieve a complete node. If I understood correctly, I can consider a light node a node which is part of the peer-to-peer network that receives and ...
2
votes
1answer
297 views

SPV clients - how much does occupy the full blockchain headers?

Does a spv client need to download the full blockchain headers? how much does it occupy? is it better for security? I saw a blockchain-headers file in my android wallet that only occupies -30MB.
-1
votes
1answer
342 views

Is the miners address part of the block or the block header? [closed]

Should the following be sufficient merkle root, block number, previous block hash, timestamp and nonce?
2
votes
1answer
473 views

How is the mempool incorporated in the calculation of the block hash?

So I've been reading about how the nonce is calculated. There is one part that I don't get. So there is a mempool, and each node (or mining node) takes a part (or the whole part) of that mempool, ...
0
votes
3answers
567 views

Bitcoin-qt taking forever to acquire the blockchain

I thought that this was the old days when it took forever for bitcoin core to acquire the bootstrap but it looks like it's still the case. I basically ran the program for 2 hours and I'm still under ...
1
vote
2answers
572 views

Reason behind hashing the nonce in prevBlockHash?

I understand the role that the nonce plays in the block header for calculating a hash for a valid proof of work. But what I ask is: Do we consider the nonce in the prevBlockHash calculation of the ...
4
votes
1answer
829 views

bitcoin protocol: transaction encoding

I am writing a program (in golang) to mine bitcoins. Supposing I have this dummy transaction, how may I encode it so it can be used in the block im trying to mine? Also, supposing I have a block ...
4
votes
1answer
2k views

Bitcoin mining: block structure

please note I have made this question previously (link) and I was indicated to visit here. I am writing a program using GoLang to mine bitcoins. It's part of my college conclusion project and likely ...
3
votes
1answer
112 views

Why does bitcoin-cli return strange version numbers for blocks?

I've been looking at the version numbers of blocks, but I'm getting strange results from bitcoin-cli getblock. "version": 536870913 However, when I run the same command with the false option (to get ...
5
votes
3answers
2k views

At which point do blocks get validated in the mining process?

I'm trying to understand how mining works and I'm stuck on the part about validating blocks and adding them to the blockchain. When a miner finds a solution to a block, he shares it with the network,...
2
votes
2answers
850 views

getting bitcoin address of blk*.dat files

I know that getting the address from the blk*.dat files is discussed a lot of times. But I don't get it why? When I have the raw scriptSig I can encode it and get the bitcoin address or not? E.g. the ...
1
vote
1answer
259 views

Previous block hash on first Bitcoin block?

The bitcoin-explorer command bx fetch-header -t 1 fetches the first Bitcoin block and shows the block header. If I check the "first" block header, where does "previous block hash" come from?
2
votes
1answer
1k views

Do the leading zeros in the desired hash pattern for mining change?

If I understood it well, miners collect transactions in temporary files on which they apply a cryptographic function. The result will be reviewed against a desired pattern. Does this "desired pattern"...
2
votes
2answers
496 views

How often do miners recalculate the merkle root they're working on?

I think that I understood most of the things about Bitcoin but there is still a mystery. We can see on https://blockchain.info/ that there are up to 4/5 new transactions every seconds. My question ...
1
vote
0answers
100 views

Why do transactions get verified before it is clear that the block header is valid?

When I researched for the answer on What happens in detail, when Bitcoin Core verifies a block during synchronization?, I noticed something: According to the Wiki-Entry on Protocol rules some of the ...
10
votes
1answer
4k views

How does the bitcoin network recover in case of a hash collision in the block hash?

A Bitcoin client has to download the whole blockchain from the P2P network in order to become a full node. A full node is able to determine, if a transaction in the network is valid or not. To ...
3
votes
1answer
2k views

Why is the block header 80 bytes, not 128 bytes (= two SHA-256 blocks)?

According to the Bitcoin Developer Reference, the block header is 80 bytes total: BYTES NAME 4 version 32 previous block header hash 32 merkle root hash 4 time 4 nonce ...
1
vote
1answer
289 views

Block Broadcasting - Unsolicited Block Push

Can someone, please, direct me to the source code section(s) relevant for an Unsolicited Block Push as described in the Bitcoin Developer Guide? I've been going through main.cpp and searched for the ...
0
votes
1answer
359 views

Amount of block locator hashes in “getblocks” message

How many block locator hashes are sent in a getblocks message? And how distant are these locator hashes from one another?
1
vote
0answers
126 views

Are there multiple representations of the same target value? Are they interchangable?

The block target in Bitcoin is encoded in block headers as a 24 bit integer raised to an 8 bit exponent: int(nBits[1:4]) * 2 ** (8 * (int(nBits[0]) - 3)) Are there multiple nBits representations of ...
2
votes
1answer
403 views

Why is the target stored in compact form in the block header?

Why is the target converted to "Bits" and not stored in full in the block header? For example, why: { "hash" : "000000000003ba27aa200b1cecaad478d2b00432346c3f1f3986da1afd33e506", "height" : 100000, "...
2
votes
2answers
688 views

How does “headers first” affect BLKxxxx.dat structure?

Assuming a full node running Bitcoincore v0.10 (with txindex=1), how exactly does the new "headers first" functionality affect the structure of the blockchain data? (Specifically, the blkxxxx.dat data,...
2
votes
2answers
158 views

Nonce in Merged Mining

When mining Bitcoin, the nonce is included in the header, which is then hashed and checked to see if it is below the target threshold. Everybody can verify that the header does indeed hash below the ...
7
votes
2answers
2k views

How is it that concurrent miners do not subvert each other's work?

Every time a new block is added on top of block chain, the miners have to restart their work because the next block has to have a proper reference to previous block. Let's suppose that there is some ...
3
votes
1answer
934 views

Given a block, is there a list of all hashes for all possible 2^32 nonce values?

I am working in a computational research lab, and we're taking a look at Bitcoin. I'm trying to develop a simulation of Bitcoin mining for a nonexistent computer architecture. I want to simulate the ...
11
votes
1answer
11k views

Is it chain of headers rather than a chain of blocks?

We know widely used explanation of the blockchain: "Every block contains a hash of the previous block". The sentence above implies that since every block contains a hash of the previous block, ...
11
votes
5answers
4k views

Why didn't Satoshi make the nonce space larger?

I know Satoshi isn't around to ask anymore, so this might be futile to ask, but I'm hoping someone might have some insight about this. Bitcoin mining typically utilizes an extraNonce (bnExtraNonce ...
4
votes
3answers
383 views

How hard is it to alter a block after it was found?

Once a miner has found a block, how easy it is for him to add or remove a tx included in that very block? Would he have to solve the modified block from the scratch or is there a point he can resume ...
0
votes
2answers
316 views

How Is Block Assembled?

I think I understand mining well enough, but what I don't get is how the blocks of transactions are assembled. According to this post - What exactly is Mining? - the miners assemble the blocks and ...
6
votes
2answers
2k views

How to create a SPV client?

What are the steps a SPV client takes in order to sync? Connect to a peer Set bloom filter for wallet addresses Download all block-headers since latest checkpoint Request every block again with ...
3
votes
1answer
450 views

Is there any relation between the block version field and the one of the transaction?

I am struggling to validate my custom miner against the testnet network and I can't seem to add a block of mine to the chain. I've noticed that all the other miners are appending version 2 blocks, so ...
1
vote
1answer
320 views

How is the difficulty of bitcoin mining propagated?

Let's say the current difficulty is set as finding a hash with 4 leading zeroes; once this is found, a block with this hash is propagated. Every client that receives this block checks that it has 4 ...
6
votes
3answers
9k views

Full example data for scrypt Stratum-client [closed]

I'm trying to write a Mining client for Scrypt-based mining using Stratum Communication. As of now, I have some trouble verifying all my bit orders and sequences. Hashes I'm generating get always ...
1
vote
0answers
390 views

Litecoin getwork specification, endianness

Please help me with getwork protocol for litecoin miner.There is mixed info online about endiannes of data provided by getwork and data that should be submitted to mining pools. According to https://...
0
votes
1answer
2k views

Bitcoin block hashing algorithm. nonce [closed]

Referencing the Bitcoin wiki, what is the auhoritative source for providing a hash of the previous block? Or do miners keep listening to latest blocks? How is hash of the Merkle root generated? Can ...
1
vote
1answer
875 views

Why do we need a mining speed above 4.3Ghash/s?

I believe there will be a simple flaw in my understanding somewhere. From what I can tell for any given block you increment a nonce up to 2^32 (4294967296) per second (and the timestamp every second) ...
1
vote
2answers
380 views

Purpose of unique header in block hashing algorithm

https://en.bitcoin.it/wiki/Block_hashing_algorithm said this about the block header: "Given just those fields, people would frequently generate the exact same sequence of hashes as each other and the ...
5
votes
2answers
2k views

Why the timestamp component of the block header?

What is the reason for the timestamp field in the block header? Surely the nonce should be the only property that changes? Should the nonce reset to 0 everytime the timestamp changes?
26
votes
3answers
79k views

The bitcoin mining algorithm from a programmer's viewpoint

This page: Blocks said mining is actually to solve a mathematical problem, but reading Block hashing algorithm doesn't give much help. I also tried reading bitcoind source code, but reading code takes ...
6
votes
1answer
6k views

Could Hadoop be used as a mining pool architecture? [closed]

The context is here I don't know how exactly the new blockchain candidate was calculated in Bitcoin Network, so I guess it was based on a Merkle candidate of (a) bitcoin client/s. Also I presume that ...
3
votes
1answer
164 views

What was the intended benefit of truncating the Target?

I'm thinking about how the Target value is truncated to and later compared to the SHA-256hash of the Block Header. Given that The maximum target (lowest possible difficulty) is ...
9
votes
1answer
29k views

Whats the process of Creating a Block on the BlockChain

have been mining on pools and blindly going a long for the ride of > generating a block Can somebody walk through the process in simple terms of the steps involved in creating a block on the ...
1
vote
1answer
981 views

Mining software and pool tricks

Just changing the nonce of a block to be mined is not enough to cover enough hashes to solve it. What are the most common tricks used by the mining software and pools in order to create enough getwork ...
5
votes
1answer
902 views

Version field in transactions, blocks, etc

A field labelled "version" appears in many contexts regarding the Bitcoin protocol. Sometimes one uses the current version of the Bitcoin client (version message), sometimes 1 is used (block, tx), why ...
8
votes
2answers
437 views

Why is the Block Header txn_count field always zero?

According to the Protocol Specification, the txn_count field of a Block Header is always set to 0, why is that? What are the intended future uses of this field?
11
votes
2answers
2k views

Mining pool performance optimization

What are the main components one should focus on when trying to maximize a mining pool's performance? Assuming the code is pretty optimal (there aren't any inefficiencies), what should a pool owner ...