All Questions
28
questions
2
votes
1
answer
55
views
Where exactly is the mining code in Bitcoin Core?
I've been looking for months for the real mining code in the Bitcoin Core source code for the function/s that implement the incrementing of the nonce and hashing blocks for mining and never found ...
0
votes
3
answers
1k
views
Finding Hash with 11 leading zeroes
For an exercise, I'm trying to find a sha256 hash with 11 leading zeroes.
For this reason, I wrote a Python script that basically tries all intergers from 1 to N and brute forces the hash. Now my N is ...
0
votes
1
answer
97
views
Is the winning hash the same as the nonce?
Is the miner is trying to solve the nonce or a winning hash?
"The SHA-256 hash of a block's header must be lower than or equal to the current target for the block to be accepted by the network.&...
0
votes
1
answer
82
views
What determines the size of a hash during mining?
I have been struggling with this quite a bit. From what I understand is that a miner generates nonces to find a nonce that is smaller than the target hash. However, how does one determine the size of ...
2
votes
2
answers
6k
views
How is the Target Hash determined?
So, I understand how the amount of leading 0's are calculated, but how is the hexadecimal that come after the leading 0's calculated? For example, the previous mined blocks hash was
...
4
votes
2
answers
687
views
Is that proved that for each block there is always nonce value which will make block hash to start by n count of 0
Sorry for the obvious question, but I'm looking for a mathematical prove.
Block header is calculated as a concatenation of the following values.
Version
hashPrevBlock
hashMerkleRoot
timeStamp
Bits
...
1
vote
1
answer
397
views
Why do miners need a nonce if the timestamp changes the hash of the block?
As the title says.
If the timestamp is constantly changing with every guess, why does the miner also include the nonce? Is it because they're mining too fast for the timestamp to change?
2
votes
2
answers
875
views
Why is the nonce bruteforced from 0 to n while mining?
bitcoin noob here.
I was wondering why is the nonce increased from 0 to n while searching for a blockhash?
Why not start at some other integer > 0 for example?
My background is in ethereum-dev, so ...
1
vote
1
answer
3k
views
Why is it important that the hash algorithm is puzzle friendly?
I don't understand "PUZZLE FRIENDLY". Here the definition I read:
A hash function h is puzzle friendly if for every possible N-bit
output value y, if K is chosen from a distribution with high ...
0
votes
2
answers
477
views
Understanding the Hash Function
Can someone please explain in detail the components of the final hash that determines the winner of the block?
My understanding is that the miners are taking
The Merkle Root,
The time stamp,
The ...
2
votes
1
answer
302
views
Who decides what the next, correct Nonce is?
As I understand finding the correct Nonce is the basis when hashing transactions for Proof of Work.
How and where is this decided in the ecosystem what the next Nonce is?
In my limited understanding ...
3
votes
1
answer
922
views
What if is there is no solution to a block?
Please let me know if I understand something wrong.
Let's say I want to create a new block and verify previous transactions. To do this, I need to:
Choose which transactions I want to include in my ...
3
votes
1
answer
2k
views
Why check for multiple nonces despite finding a golden nonce?
I'm still new at trying to understand the entire idea surrounding the mining process.
I read the following:
When mining, you are given a set of data to perform hashes on. As you
noted, this is done ...
5
votes
1
answer
6k
views
Blockchain SHA256 hash and nonce [duplicate]
I have been reading the SHA256 hash creation with a random nonce. So, my understanding is every miner would pull uncommited transactions and would try to create a Hash of the transactions with a ...
1
vote
1
answer
240
views
Does 4 byte Nonce enough to proof of work?
Is it always possible to find an hash value of a block, smaller than the current difficulty, just using 4 byte (Nonce) ? How can we be sure about it ?