Author

Topic: Mathematical Inputs and Outputs for Mining (Read 147 times)

newbie
Activity: 4
Merit: 4
October 13, 2022, 09:00:36 PM
#2
Answers to 0 and 1.

Version, hashPrevBlock, hashMerkleRoot, Time, Bits, Nonce

Source: https://en.bitcoin.it/wiki/Block_hashing_algorithm

Answer to 2.

No.

Answer to 3.

"The lower the target, the more difficult it is to generate a block."
"difficulty = difficulty_1_target / current_target"

Source: https://en.bitcoin.it/wiki/Difficulty

Answer to 4.

Miners do not submit a target hash. Miners submit a nonce to the network, that when hashed, is less than or equal to the target hash. The nonce is a 32-bit number and the target hash is a 256-bit number.
newbie
Activity: 4
Merit: 4
October 13, 2022, 04:29:56 PM
#1
All else being peripheral, I appreciate your time in reading and any advice you may be able to provide – thank you.

I am learning about the mathematics behind the proof of work. As I understand it, the basic concept is predicated upon the SHA-256 hashing algorithm. The idea is that the blockchain sends out a target hash, which miners compete to solve by producing a hash equal to or below the target hash value. The target hash is a 64-bit hexadecimal string. However, the first eight digits are always 0, leaving 56-bits to be solved.

The maximum target hash is:

00000000ffff0000000000000000000000000000000000000000000000000000

To win a block, one must: 1) produce a string with the correct number of zeros; and 2) get a number lower than the target hash. Generally, the winning hash must be lower than the hash of the previous block.

However, I am still struggling to find a way to interact with the network to get some hands on experience and visually see the algorithms running the mining process. Some ongoing questions I have are:

Question 0: What are the specific inputs necessary to mine a block?

Question 1: What is the specific value presented to miners that is being hashed?

Question 2: Is it necessary to get the right number of zeros if the value is lower than the target?

Question 3: How does the difficulty mechanism impact or effect the target hash?  

Question 4: How can one submit a target hash to the network for validation?
Jump to: