Bitcoin Forum
May 07, 2024, 09:16:45 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Mathematical Inputs and Outputs for Mining  (Read 129 times)
GoldPlebeian (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 4


View Profile
October 13, 2022, 09:29:56 PM
Last edit: October 14, 2022, 02:01:06 AM by GoldPlebeian
 #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?
1715073405
Hero Member
*
Offline Offline

Posts: 1715073405

View Profile Personal Message (Offline)

Ignore
1715073405
Reply with quote  #2

1715073405
Report to moderator
1715073405
Hero Member
*
Offline Offline

Posts: 1715073405

View Profile Personal Message (Offline)

Ignore
1715073405
Reply with quote  #2

1715073405
Report to moderator
1715073405
Hero Member
*
Offline Offline

Posts: 1715073405

View Profile Personal Message (Offline)

Ignore
1715073405
Reply with quote  #2

1715073405
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715073405
Hero Member
*
Offline Offline

Posts: 1715073405

View Profile Personal Message (Offline)

Ignore
1715073405
Reply with quote  #2

1715073405
Report to moderator
1715073405
Hero Member
*
Offline Offline

Posts: 1715073405

View Profile Personal Message (Offline)

Ignore
1715073405
Reply with quote  #2

1715073405
Report to moderator
GoldPlebeian (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 4


View Profile
October 14, 2022, 02:00:36 AM
Last edit: October 14, 2022, 03:49:44 AM by GoldPlebeian
Merited by mikeywith (4)
 #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.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!