Questions tagged [mining-technical-details]

Questions concerned with the technical details of mining such as blockheader assembly, or details in the mining algorithm. Questions about the conceptual nature of mining should rather be tagged with [mining-theory].

Filter by
Sorted by
Tagged with
9 votes
3 answers
5k views

Probablity Distribution of mining

What is the probability distribution of solving a block, given the same difficulty. So if I try to mine multiple times using the same difficulty, is it normal distribution with mean of 10 minutes? ...
23 votes
2 answers
27k views

What is the extraNonce?

This question helps identify the various components of the getwork "data" field, but I'm curious where the extraNonce comes from. My hunch is it's the first four bytes of the second half of the data, ...
0 votes
1 answer
1k views

Bitcoin Miner Pseudo code

I want to understand how the mining process works so that I can code up my own bitcoin miner. Does anybody have pseudo code of a bitcoin miner that will help me achieve this? Also, help with an ...
0 votes
2 answers
483 views

Bitcoin Mining using an iPhone?

Is it possible to start Bitcoin mining using an iPhone with 4G internet connection? Storage is not an issue,or is it? (Mine is 256GB).
0 votes
1 answer
566 views

How will mining work after 2140?

The nonce header of a block has 32 bits. The vast majority of the time, none of the 2^32 nonces will result in a block hash below the target. So to continue mining, miners usually change the ...
3 votes
2 answers
6k views

Bitcoin mining algorithm

I was looking at some sample mining algorithms and also some sample code and there was something which I didnt really understand. In Simple bitcoin mining algorithm he says , The simplest miner would ...
1 vote
1 answer
256 views

Given the current hashing powers, what do pools actually do in practice?

Given the current hashing powers, what do pools actually do in practice to find a block? Ok, so here is my thinking, please correct me if I'm wrong anywhere: Here's the format of the block header, ...
2 votes
1 answer
49 views

Could a miner set a maximium transaction fee rate?

Could a miner set a maximimum transaction fee rate? I mean validate only transactions between x and y satoshis/byte? I know is not clever. Is it possible?
0 votes
1 answer
262 views

How do Bitcoin clients/miners verify balances quickly?

Bitcoin clients must find balances for some public keys quickly. Especially, miners must find balances for all incoming transactions. I see the problem: public key with associated address can appear ...
1 vote
1 answer
93 views

Sorry newbie, I dont get the PoS block creation, to much contradiction

I am sorry for the repeat question but I cant find a clear answer. Most of the time PoS isnt explained in detail (only explaining the advantage) and a lot of sources contradict each other and now I am ...
5 votes
3 answers
419 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 ...
25 votes
2 answers
7k views

How does AsicBoost work?

The AsicBoost paper by Timo Hanke and Sergio Demian Lerner describes a way of increasing ASIC performance by 20%. It's a bit sparse on the details, though. What are they optimizing?
1 vote
2 answers
14k views

When mining with 2 computers, do I need to use 2 separate wallets addresses?

I understand that each miner is working on a different block. Correct me if I'm wrong but this is because the first transaction in a block basically contains my wallet address so I can receive the ...
13 votes
3 answers
27k views

What are ASIC miners actually doing?

I'm trying to understand Bitcoin mining (software-wise), and I wonder how ASIC miners are different? I'm going through this minimal Bitcoin miner Github repository. Which part of Program.cs are ASICs ...
1 vote
1 answer
483 views

Explain this comment on nNonce from the bitcoin miner.cpp source?

This comment is in the 0.9.3 miner.cpp bitcoin source, right above the ScanHash_CryptoPP definition. // // ScanHash scans nonces looking for a hash with at least some zero bits. // It operates on ...
6 votes
2 answers
2k views

What happens to extinct blockchains, and transactions inside of them?

While understanding the concept of block chain and proof of work, few things are confusing me. Miners always consider the longest chain(by difficulty) and work on expanding it. Now, lets say two ...
10 votes
2 answers
36k views

Want to write my own solo cpu bitcoin miner

I just want to understand how this mining process works (from the developers point of view from very start to end). Can someone guide me towards a doc or a open source code (I am newbie here so a VERY ...
0 votes
1 answer
792 views

Debug Bitcoin Core Mining

I'm running the generate command on a bitcoin core fork (with difficulty = 1) and bitcoind running in another window and outputting the best/vs. hashes as it should when generate is running. However, ...
16 votes
3 answers
24k views

How do mining pools work?

I understand the following Pooled mining is a mining approach where multiple generating clients contribute to the generation of a block, and then split the block reward according the ...
5 votes
2 answers
722 views

Miner speed conversion

What is the exact ratio one would use to convert Miner speed from Hashes per second to Shares per second, assuming Difficulty 1 shares?
5 votes
2 answers
2k views

How are eth transaction faster than btc? [closed]

If I'm not wrong miners are trying to find nonce that satisfies a rule. Then why is btc so slow? I want a technical answer. Can btc ever match eth speed, given no politics?
5 votes
3 answers
1k views

Visualize Bitcoin Hashing

According to https://en.bitcoin.it/wiki/Hash, BitCoin uses the SHA-256 hash algorithm to generate verifiably "random" numbers in a way that requires a predictable amount of CPU effort. ...
1 vote
1 answer
715 views

Bitcoin mining algorithm - target - Java

Default share difficulty is 1 (big-endian target for difficulty 1 is 0x00000000ffff0000000000000000000000000000000000000000000000000000) How to calculate this? How it look like on Java code? What ...
3 votes
1 answer
1k views

In pooled mining, what is pdiff, bdiff and ldiff?

In pooled mining, there seem to be three different terms for difficulty in use. Apparently, the Stratum protocol uses bdiff, BTCGuild uses pdiff, and Ldiff is common for various Scrypt pools as ...
0 votes
1 answer
1k views

Mining: GetWork, Get Nonce, ???, Submit Hash?

I make a getwork request and get back data, hash1, midstate, and target. Mining on a KC705 development FPGA board, and following the readme.md file here: https://github.com/progranism/Open-Source-FPGA-...
1 vote
2 answers
395 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 ...
2 votes
1 answer
356 views

How does the block discovery rate of a mining rig relate to the overall computing power of the network?

Is it correct to say that, since the difficulty will keep the block generation rate at 6 per hour on average, that with one-sixth of the network computing power, I will get one block per hour, on ...
0 votes
1 answer
340 views

Question solved by bitcoin miners [duplicate]

What computational questions are solved by bitcoin miners and what is the computational complexity of one instance of this question. Essentially, how would someone program an application for bitcoin ...
0 votes
1 answer
1k views

In Stratum protocol, whether the miners know the mining address?

In Stratum protocol, since the coinbase transaction has to be hashed in the miner's side, so the pool has to send coinbase1 and coinbase2 to the miners. Therefore, is it possible for the miner to ...
0 votes
0 answers
169 views

Should mining.notify.merkle_branches contain the coinbase transaction or not?

Okay I'm working on a new pool-server though got a question. I'm using litecoin testnet right now to test stuff and here's a getblocktemplate() response I get; { "result": { "version": 2, "...
2 votes
1 answer
86 views

Where is the code that specifies when a block is released?

I'm not sure how this exactly works. So roughly every 10 mins a block is released to the network. How is this done? Does my bitcoin client signal this? Would that mean in theory if there was just one ...
3 votes
1 answer
1k views

How do pool server's handle multiple workers sharing one connection with Stratum protocol

The stratum protocol supports authorizing multiple workers in a single connection. Unfortunately, I didn't find any documentation about how this should be handled by pool server software. If multiple ...
2 votes
1 answer
377 views

Cheating ASICs and Mining Software

I've noticed the recently solved block hashes have started with a number of zeros (8 last time I checked). Couldn't we just tell our mining hardware/software to assume the first few digits are in fact ...
1 vote
0 answers
777 views

H-not-zero errors

In developing a miner, I noted a few "unknown work" errors -- presumably because I was CPU mining and not responding to the pool in a timely enough manner. However, more disturbingly, I received a H-...
1 vote
0 answers
416 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://...
4 votes
2 answers
6k views

Why don't any of the SHA-256 vulnerabilities matter for mining?

Wikipedia lists several vulnerabilities in SHA-256. Presumably, none of them can be used to mine faster, or it would be done already. Why don't these vulnerabilities lead to a problem for mining?
1 vote
2 answers
4k views

How to hash data from 'getblocktemplate' request

I've been reading lots of articles, trying to understand how to hash the data returned from getwork; but I totally overlooked getblocktemplate. I'm just trying to understand how all the data below is ...
1 vote
1 answer
1k views

Difference between coinbaseaux.flags vs. coinbasetxn.data?

After reading through most of the protocol, and trying to piece everything together, I'm still at a loss as to how some things work. For example, the difference between coinbaseaux.flags and ...
4 votes
1 answer
2k views

SHA256 Implementation Gate Equivalent

I needed help in understanding how to calculate the GE for a SHA256 implementation. I need to calculate the GE of individual functions in the SHA256 hashing algorithm. Could anyone please direct me ...
6 votes
1 answer
902 views

What happens when the nonce field overflows?

The nonce field of a block header is 4 bytes, so the max nonce is: 4,294,967,295. That could be computed in a few seconds with a reasonable rig (solo mining) or much quicker on large pools. What ...
1 vote
1 answer
149 views

Do Miners have to get below the Target or the Bits value?

You get a specific Target value when you divide the maximum Target by the Difficulty. But when you convert the Target in to the Bits format, you're only taking the first 3 bytes of the Target and ...
2 votes
0 answers
68 views

Which function is called to mine a block, broadcast the newly mined block & receive a newly mined block?

I am trying to understand the control flow and handling of transactions in the memory pool.
2 votes
1 answer
160 views

Why does the bitcoin mining code have the same if statement twice?

From the v0.9.3 miner.cpp source (https://github.com/bitcoin/bitcoin/blob/v0.9.3/src/miner.cpp#L598-L604): if (GetTimeMillis() - nHPSTimerStart > 4000) { static CCriticalSection cs; { ...
4 votes
1 answer
599 views

Why does the daemon require peers in order to start mining?

I wanted to start mining Bitcoin from the genesis block, so I cloned Bitcoin and removed the checkpoints. Then I compiled and started up the daemon. I wasn't connected to any other peers, however, so ...
2 votes
2 answers
1k views

Does the nonce have to be a number?

Since we're just trying to produce a specific hash output, couldn't the nonce also include letters or otherwise random bits?
5 votes
2 answers
481 views

If block sizes go up, won't sigop limits have to change too?

Gavin Andresen, one of the core developers, has discussed increasing the block size to 16.7 MB (and doubling that every two years). The maximum number of signature operations per block is currently ...
1 vote
1 answer
393 views

What mining parameters are not modifiable with ASIC miners?

When ASIC mining devices ship, what parameters of mining become hardcoded? How would these ASIC mining devices respond to any changes to mining procedure / algorithms?
4 votes
1 answer
553 views

A full/multi nonce range search or just a partial range search?

In a work, there are only two elements in the block header change between hash attempts. That is, NTime and Nonce. The miner starts the nonce search to get a valid share, and there are several ...
5 votes
2 answers
5k views

What is the difference in hashing algorithm between bitcoin and litecoin?

I am having trouble finding litecoin mining specifications. I would first of all require something like this: https://en.bitcoin.it/wiki/Block_hashing_algorithm Except for litecoins. I need to know ...
-2 votes
2 answers
737 views

Are ASIC miners going to be depreciated due to it overtaking much of the network power in the future?

I read somewhere the Bitcoin developers were thinking about depreciating the ASIC miners since it's overtaking the network in the future by integrating scrypt with the current encryption. Where was ...