Bitcoin Forum
July 30, 2021, 08:08:39 AM
 News: Latest Bitcoin Core release: 0.21.1 [Torrent]
 Home Help Search Login Register More
 Pages: [1]
 Author Topic: What's the mathematical puzzle miner solve?  (Read 164 times)
Little Mouse
Sr. Member

Offline

Activity: 1022
Merit: 475

 May 03, 2021, 05:56:07 PMMerited by DdmrDdmr (2)

When we read article on mining, we get a term "solving mathematical puzzle". To get a block, miner needs to solve the mathematical puzzle and whoever can solve the puzzle will be able to get a block and thus the reward (I can be wrong technically, this is what I know).
What's this puzzle all about? What do miner exactly solve? Please try to avoid technical term if possible, I would like to know in easy way.
1627632519
Hero Member

Offline

Posts: 1627632519

Ignore
 1627632519

1627632519
 Report to moderator
1627632519
Hero Member

Offline

Posts: 1627632519

Ignore
 1627632519

1627632519
 Report to moderator
1627632519
Hero Member

Offline

Posts: 1627632519

Ignore
 1627632519

1627632519
 Report to moderator
Once a transaction has 6 confirmations, it is extremely unlikely that an attacker without at least 50% of the network's computation power would be able to reverse it.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1627632519
Hero Member

Offline

Posts: 1627632519

Ignore
 1627632519

1627632519
 Report to moderator
jackg
Copper Member
Legendary

Offline

Activity: 2184
Merit: 2146

https://bit.ly/387FXHi ← lightning theory

 May 03, 2021, 06:04:37 PM

Maths has two different types of algorithms, linear and non linear.

As input x gets bigger and output y gets bigger, output z will get bigger.

The other type of algorithm is non linear for example taking the remainder after a decimal:
Regardless of the size of the input, we know the output will be between 0 or 1.

The sha algorithm uses blocks that are of the same size and runs a function on each pair of bits to return either a 0 or a 1 as an output for each bit. This is essentially the mathematical problem being solved.

(the problem with trying to fudge the numbers for non linear algorithms is that it's much harder to guess what second it is than what day it is)..

 ░░░░░▄▄██████▄▄░░▄████▀▀▀▀▀▀████▄░███▀░░░░░░░░░░▀█▀████░░░▄██████▄▄░░░██░░░░░█████████░░░░██▌░░░░█████████████████░░░░█████████████████░░░░░███████████████████▄░░▀██████▀░░░████▀█▄▄░░░░░░░░░░▄███░░▀████▄▄▄▄▄▄████▀░░░░░▀▀██████▀▀ .ChipMixer.{ MIXING REINVENTED FOR YOUR PRIVACY #.ChipMixer. ░░░░░▄▄██████▄▄░░▄████▀▀▀▀▀▀████▄░███▀░░░░░░░░░░▀█▀████░░░▄██████▄▄░░░██░░░░░█████████░░░░██▌░░░░█████████████████░░░░█████████████████░░░░░███████████████████▄░░▀██████▀░░░████▀█▄▄░░░░░░░░░░▄███░░▀████▄▄▄▄▄▄████▀░░░░░▀▀██████▀▀
hatshepsut93
Legendary

Offline

Activity: 1960
Merit: 1536

 May 03, 2021, 06:45:14 PM

"Mathematical puzzle" is simply a very bad naming. The word "puzzle" implies that there's is some sort of optimal solution to the problem that is better than just guessing. But miners are actually doing exactly that - guessing. They guess a number that when passed into a function together with block data would produce a valid result, in this case another number with certain amount of zeroes at the start. It takes very little tries to find a number that would produce a few zeroes at the start, but nowdays you need to get much more zeroes, so it takes a lot of tries. Mining hardware, aka ASICS, are computers designed to calculate this one specific function as fast as possible, so they can try billions or trillions of guesses per second.

 .BEST..CHANGE.BEST EXCHANGE RATES ➊➊➊➊➊ .........BUY & SELL........ ..............FAQ............AFFILIATE PROGRAM ➊➊➊➊➊ ░██████████████████░█████████████████████████████▀░░░████████████████░░▄███████████████▀▀░░▀▀██████████████▄▄░░▄▄████████████████░░██████████████████░░██████████████████▄▄█████████████████████████████░██████████████████░ ░██████████████████░████████████████████████████████▀▀▀█▀██████░▀█████▀░░░░░▀██████▌░░░▀▀▀░░░░░░████████▄░░░░░░░░░░░█████████▀░░░░░░░░░███████████▄░░░░░▄▄███████████▄▄▄▄███████████████████████████████░██████████████████░ ░██████████████████░███████████████████████████████████████████████████▀▀░░▐███████████▀▀░░▄░░░█████████▀░░░▄█▀░░░▐██████████▄▄█▀░░░░░█████████████▌░▄▄▄░▐██████████████████████████████████████████████░██████████████████░
seoincorporation
Legendary

Offline

Activity: 2142
Merit: 1778

 May 03, 2021, 07:06:49 PM

...
What's this puzzle all about? What do miner exactly solve? Please try to avoid technical term if possible, I would like to know in easy way.

The mining is related to sha256, I remember an old video from 2014 where a user show us how to mine a block by hand step by step, so if you want to understand how it is done the I will leave the link to the video, I hope this helps.

Mining Bitcoin with pencil and paper
bitcoinVPSD
Full Member

Offline

Activity: 446
Merit: 101

 May 03, 2021, 09:31:43 PM

Maths has two different types of algorithms, linear and non linear.

As input x gets bigger and output y gets bigger, output z will get bigger.

The other type of algorithm is non linear for example taking the remainder after a decimal:
Regardless of the size of the input, we know the output will be between 0 or 1.

The sha algorithm uses blocks that are of the same size and runs a function on each pair of bits to return either a 0 or a 1 as an output for each bit. This is essentially the mathematical problem being solved.

(the problem with trying to fudge the numbers for non linear algorithms is that it's much harder to guess what second it is than what day it is)..
OMG, even reading your explanations on the matter, I still cannot understand it roughly  In short, is it the use of an algorithm and decoding what's inside it? Really confusing, today, most of us, we know BTC as a money-making tool, I must admit it

ranochigo
Legendary

Online

Activity: 2422
Merit: 2423

@ me if you need my response

 May 03, 2021, 11:25:13 PMMerited by DdmrDdmr (2)

They are finding a suitable hash that meets the current target. PoW as the term describes, requires the miners to provide a hash of the block header that is less than or equal to the current target. As the occurance of a hash is rare when the difficult gets higher, miners are essentially going through many iterations of the block headers by changing specific components, most commonly the nonce or the extra nonce to try to find a valid block which meets the target requirement.

Block headers consist of the merkle root, timestamp, nonce, last block hash, etc. They are hashed twice to produce a result and is only valid at the current target if the value of the hash is below the current target.

It is not accurate to call it a puzzle we they're not exactly given a problem to solve.

 ░░░░░▄▄██████▄▄░░▄████▀▀▀▀▀▀████▄░███▀░░░░░░░░░░▀█▀████░░░▄██████▄▄░░░██░░░░░█████████░░░░██▌░░░░█████████████████░░░░█████████████████░░░░░███████████████████▄░░▀██████▀░░░████▀█▄▄░░░░░░░░░░▄███░░▀████▄▄▄▄▄▄████▀░░░░░▀▀██████▀▀ .ChipMixer.{ MIXING REINVENTED FOR YOUR PRIVACY #.ChipMixer. ░░░░░▄▄██████▄▄░░▄████▀▀▀▀▀▀████▄░███▀░░░░░░░░░░▀█▀████░░░▄██████▄▄░░░██░░░░░█████████░░░░██▌░░░░█████████████████░░░░█████████████████░░░░░███████████████████▄░░▀██████▀░░░████▀█▄▄░░░░░░░░░░▄███░░▀████▄▄▄▄▄▄████▀░░░░░▀▀██████▀▀
o_e_l_e_o
Legendary

Offline

Activity: 1372
Merit: 6621

 May 04, 2021, 09:10:29 AM

Here is an ELI5:

Each block has what is called a block header at the start. The block header is a summary of the block. It tells you things like what the previous block was, what time it is, and a thing called a Merkle Root which is a summary of every transaction in that block. It also contains a number called the nonce, which can be changed freely.

When a miner wants to solve a block, they first build the block by choosing transactions, and then they calculate the block header. They hash the block header twice and end up with a number. If this number is smaller than the current target, they have successfully mined a block. If their number is larger than the target, then they change something in the block header (usually the nonce), and try again.

 ░░░░░▄▄██████▄▄░░▄████▀▀▀▀▀▀████▄░███▀░░░░░░░░░░▀█▀████░░░▄██████▄▄░░░██░░░░░█████████░░░░██▌░░░░█████████████████░░░░█████████████████░░░░░███████████████████▄░░▀██████▀░░░████▀█▄▄░░░░░░░░░░▄███░░▀████▄▄▄▄▄▄████▀░░░░░▀▀██████▀▀ .ChipMixer.{ MIXING REINVENTED FOR YOUR PRIVACY #.ChipMixer. ░░░░░▄▄██████▄▄░░▄████▀▀▀▀▀▀████▄░███▀░░░░░░░░░░▀█▀████░░░▄██████▄▄░░░██░░░░░█████████░░░░██▌░░░░█████████████████░░░░█████████████████░░░░░███████████████████▄░░▀██████▀░░░████▀█▄▄░░░░░░░░░░▄███░░▀████▄▄▄▄▄▄████▀░░░░░▀▀██████▀▀
pawanjain
Sr. Member

Offline

Activity: 1666
Merit: 479

AKA hmrawal

 May 04, 2021, 10:20:56 AM

When we read article on mining, we get a term "solving mathematical puzzle". To get a block, miner needs to solve the mathematical puzzle and whoever can solve the puzzle will be able to get a block and thus the reward (I can be wrong technically, this is what I know).
What's this puzzle all about? What do miner exactly solve? Please try to avoid technical term if possible, I would like to know in easy way.

I will try to keep this simple.
To understand the puzzle you will first have to understand how the SHA256 algorithm works.

Each block contains a merkle root, block header, block size, transactions, transaction count, nonce etc...
A miner uses his hashing power to generate hash of a block. This is where the SHA256 hashing algorithm comes into picture.
Example: https://www.blockchain.com/btc/block/0000000000000000000ab0825fc30cf2844723262e0c0f2bfd048b2e752029da

The mathematical puzzle which the bitcoin miners solve are nothing but the hash with required number of leading zeroes.
The number of leading zeroes are determined based on the difficulty and when a miner finds out the particular hash, it signals the other miners regarding the same thus claiming the block rewards.

 .████▄             ▄██████████▄    ▄    ▄██████▀████▀  ▄███▄  ▀████▀▀▀  ▄██▀▀▀██▄  ▀▀▄████   ████▄███████████████▀████   ████▀▄█▄  ▀██▄▄▄██▀  ▄█▄▄███▄  ▀███▀  ▄███▄▄███▀▀█▀   ▀   ▀█▀▀███▄▀█▀                 ▀█▀ Duelbits ▄████▄▄          ▄█████████▄        ▄█████████████▄     ▄██████████████████▄   ▄████▄▄▄█████████▄▄▄███▄ ▄████▐▀▄▄▀▌██▄█▄██▐▀▄▄▀▌███ ██████▀▀▀▀████▀███▀▀▀▀█████▐████████████■▄▄▄■██████████▀▐██████████████████████████▀██████████████████████████▀▀███████████████████████▀  ▀███████████████████▀    ▀███████████████▀ .         ▄ ▄▄▀▀▀▀▄▄         ▄▀▀▄      █         █   ▀▄     █       ▄█▄     ▀▄   █      ▄▀ ▀▄      ▀█▀    ▄▀     ▀█▄▄▄▀▀ ▀  ▄▀  ▄▀  ▄▀Live Games ▄▄▀▀▀▀▀▀▀▄▄ ▄▀ ▄▄▀▀▀▀▀▄▄ ▀▄▄▀ █ ▄  █  ▄ █ ▀▄█ █   ▀   ▀   █ █  ▄▄▄█ ▀▀▀▀▀▀▀▀▀▀▀▀▀ █ █   ██▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█  █▄██ ▀▀█  ▀▀█  ▀▀█ █  █▄█Slots .        ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄        █         ▄▄  █▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄       ██  ▄▄         █       ██             █       ██   ▄▀▀▄▀▀▄   █       ██   ▀▄   ▄▀   █       █Blackjack | ▄▄▀▀█▌          ▄▄▀█▄    █        ▄▀     ▀▄▄ █       █    ▄▄    ▀█    ▄▄█    █  █   ▐▌  ▄▀ █      ▀▀    █▄▀  ▐▌           ██ ▄▀▀▄▄        ▄▀▀▀  ▄  ▀▄▄   ▄▀█  ▄▀   ▄  ▀█▀  █   ▄▀ ▄▀   █  █  ▄▀ █     █▄▀   ▄▀ NEW GAME!CRASH | NEW VIPLOUNGE | Instant/Daily/Weekly/Monthly BitsACE'S REVAMPED REWARDS! | [ Đ ][ Ł ]AVAILABLE NOW
pooya87
Legendary

Offline

Activity: 2436
Merit: 4121

 May 05, 2021, 03:31:54 AMMerited by Quickseller (3), pawanjain (1)

When we read article on mining, we get a term "solving mathematical puzzle". To get a block, miner needs to solve the mathematical puzzle and whoever can solve the puzzle will be able to get a block and thus the reward (I can be wrong technically, this is what I know).
What's this puzzle all about? What do miner exactly solve? Please try to avoid technical term if possible, I would like to know in easy way.

I will try to keep this simple.
To understand the puzzle you will first have to understand how the SHA256 algorithm works.

Each block contains a merkle root, block header, block size, transactions, transaction count, nonce etc...
A miner uses his hashing power to generate hash of a block. This is where the SHA256 hashing algorithm comes into picture.
Example: https://www.blockchain.com/btc/block/0000000000000000000ab0825fc30cf2844723262e0c0f2bfd048b2e752029da

The mathematical puzzle which the bitcoin miners solve are nothing but the hash with required number of leading zeroes.
The number of leading zeroes are determined based on the difficulty and when a miner finds out the particular hash, it signals the other miners regarding the same thus claiming the block rewards.
You made it more complicated rather than making it simpler
It is also not about "leading zeros" but a very simple integer comparison where we want a to be smaller than or equal to b and for example 0035 is bigger than 0031 and is rejected even though both have 2 leading zeros.

A simple explanation of mining IMO would be to compare it with rolling a dice.
Imagine if you wanted to get a number that is smaller than 3. You roll the dice and you have a chance of getting 2 and win on your first try but if you get something bigger like 5 you have to roll again. You do this random work of rolling the dice until you get a number that is smaller than or equal to your target.
That's mining. The only "math" in it is the integer comparison.

 ░░░░░▄▄██████▄▄░░▄████▀▀▀▀▀▀████▄░███▀░░░░░░░░░░▀█▀████░░░▄██████▄▄░░░██░░░░░█████████░░░░██▌░░░░█████████████████░░░░█████████████████░░░░░███████████████████▄░░▀██████▀░░░████▀█▄▄░░░░░░░░░░▄███░░▀████▄▄▄▄▄▄████▀░░░░░▀▀██████▀▀ .ChipMixer.{ MIXING REINVENTED FOR YOUR PRIVACY #.ChipMixer. ░░░░░▄▄██████▄▄░░▄████▀▀▀▀▀▀████▄░███▀░░░░░░░░░░▀█▀████░░░▄██████▄▄░░░██░░░░░█████████░░░░██▌░░░░█████████████████░░░░█████████████████░░░░░███████████████████▄░░▀██████▀░░░████▀█▄▄░░░░░░░░░░▄███░░▀████▄▄▄▄▄▄████▀░░░░░▀▀██████▀▀
Quickseller
Copper Member
Legendary

Offline

Activity: 2506
Merit: 2106

 May 05, 2021, 04:17:55 AM

A simple explanation of mining IMO would be to compare it with rolling a dice.
Imagine if you wanted to get a number that is smaller than 3. You roll the dice and you have a chance of getting 2 and win on your first try but if you get something bigger like 5 you have to roll again. You do this random work of rolling the dice until you get a number that is smaller than or equal to your target.
That's mining. The only "math" in it is the integer comparison.
This is a good explanation.

To explain to someone who doesn't have basic knowledge of bitcoin:
equations have inputs and outputs. For example the equation y = 2x + 4 has one input, x, and out output, y. When you pass the input "3" into this equation, the output will be 10 because 2(3) equals 6 and 6 plus 4 equals 10. (remember PEMDAS).

In order to find a valid block, a miner will need to figure out the input to an equation that has an output below a certain value. The equation that is used is much more complex  than my above example, sha256. The equation used is also non-linear, which means if the inputs, 1, 2 and 3 were passed through the equation the output for the input 1 may or may not be greater than the output for the input of 2, and the output for the input of 3 may or may not be greater than the output of 2.

It is very easy to calculate the output based on the input, but it is impossible to calculate the input based on the output. So miners basically use the "guess and check" method by checking many inputs to see what the output is. Unlike most math tests you took in school, there are an unlimited number of possible inputs that can possibly be used to calculate the output.
dansus021
Hero Member

Offline

Activity: 994
Merit: 505

LookRemote.info - Remote Jobs Online

 May 05, 2021, 05:57:08 AM

oh there's old video its 6 year ago but you can see manually solved mathematical puzzle

so basically it try mining using pencil and paper

 ▄▀▀▀▀▀▄▄               ▄▄▀█    ▄█        ▀▄         ▄▄▀▀   █  ▄▀ ▐▌         █    ▄▄▀▀    ▄▄█▄▀▀▀ █           █▄▀▀    ▄▄▀▀  █▀▀▄█▌▌       ▄▄▀▀    ▄▄▀▀    ▄▄▀   ▀▄█    ▄▀▀    ▄▄▀▀    ▄▄▀▀     █   █                      ▄▄▄      █ ▐▌            ▄▄       █   █▄       █▀█         ▄▀▀ █        ▀▄ ▀██       █  ▀▄     ▄▀   ▄ █         █       █  ▄ ▀▄  █    █   ▀▀▀▄   █▀▀      █  ▄▀  ▐▌█      █  ▄▀  █ ▐▌  ▄███▄▄▀  ▄██▄█  ▄███▄▄▀  ▄█▄▄▄█ ..TFS.. M o v e   Y o u r   G a m eT o   T h e   N e x t   L e v e l │ ▄▄███████▄▄▄█████████████▄███████████▀▀███████████▀▀▀    ████████▀    ▄▀   ▄██████████▄▄█     ████████████ ▄█▄ ▄█████▀█████████████▀▀▀███████▀▀.TG GROUP | ▄▄███████▄▄▄█████████████▄███████████▀▀███████████▀▀▀    ████████▀    ▄▀   ▄██████████▄▄█     ████████████ ▄█▄ ▄█████▀█████████████▀▀▀███████▀▀.TG CHANNEL | ▄▄███████▄▄▄█████████████▄███▀█████▀  ▀▀▀██████   ▀▀      ████████▄         ██████████▄       ████████▄▀     ▄▄██████▀█████████████▀▀▀███████▀▀.TWITTER | ▄▄███████▄▄▄█████████████▄███▀▀▀▀████████████▀      ▀█▀  ▀█ ████        █    █ ████▄      ▄█▄  ▄█ █████▄▄▄▄██████████▀█████████████▀▀▀███████▀▀.MEDIUM │ ....JOIN NOW...
Little Mouse
Sr. Member

Offline

Activity: 1022
Merit: 475

 May 05, 2021, 01:03:49 PM

What's the current target we are talking about? What does that mean?
Actually I'm writing an article on mining bitcoin as I can see a lot of people are interested. I could write these term simply and write a guideline but I think it’s good to share every details, break down every terms so that a beginner gets no problem understanding what's happening behind the keyword mining.
ranochigo
Legendary

Online

Activity: 2422
Merit: 2423

@ me if you need my response

 May 05, 2021, 01:19:10 PM

What's the current target we are talking about? What does that mean?
Here: https://en.bitcoin.it/wiki/Target.

The target determines the validity of the hash of a block header. For it to be included in the current chain, the block hash must be lower than the target or else it won't be accepted by the nodes. When you're talking about difficulty, it is just a representation of the target numerically. In reality, the hash is compared against the target and not the difficulty. They have an inversely proportional relationship; the range of acceptable hashes narrows when the target is smaller/difficulty increases.

 ░░░░░▄▄██████▄▄░░▄████▀▀▀▀▀▀████▄░███▀░░░░░░░░░░▀█▀████░░░▄██████▄▄░░░██░░░░░█████████░░░░██▌░░░░█████████████████░░░░█████████████████░░░░░███████████████████▄░░▀██████▀░░░████▀█▄▄░░░░░░░░░░▄███░░▀████▄▄▄▄▄▄████▀░░░░░▀▀██████▀▀ .ChipMixer.{ MIXING REINVENTED FOR YOUR PRIVACY #.ChipMixer. ░░░░░▄▄██████▄▄░░▄████▀▀▀▀▀▀████▄░███▀░░░░░░░░░░▀█▀████░░░▄██████▄▄░░░██░░░░░█████████░░░░██▌░░░░█████████████████░░░░█████████████████░░░░░███████████████████▄░░▀██████▀░░░████▀█▄▄░░░░░░░░░░▄███░░▀████▄▄▄▄▄▄████▀░░░░░▀▀██████▀▀
Hero Member

Offline

Activity: 742
Merit: 2470

 May 05, 2021, 02:52:42 PM

When we read article on mining, we get a term "solving mathematical puzzle". To get a block, miner needs to solve the mathematical puzzle and whoever can solve the puzzle will be able to get a block and thus the reward (I can be wrong technically, this is what I know).
What's this puzzle all about? What do miner exactly solve? Please try to avoid technical term if possible, I would like to know in easy way.
Kano(C)
Bitcoin mining details
https://kano.is/index.php?k=minedet

The simpified version:
Bitcoin mining
https://kano.is/index.php?k=mining

But I have no idea how to explain technical details without technical terms:)

 .BEST..CHANGE.BEST EXCHANGE RATES ➊➊➊➊➊ .........BUY & SELL........ ..............FAQ............AFFILIATE PROGRAM ➊➊➊➊➊ ░██████████████████░█████████████████████████████▀░░░████████████████░░▄███████████████▀▀░░▀▀██████████████▄▄░░▄▄████████████████░░██████████████████░░██████████████████▄▄█████████████████████████████░██████████████████░ ░██████████████████░████████████████████████████████▀▀▀█▀██████░▀█████▀░░░░░▀██████▌░░░▀▀▀░░░░░░████████▄░░░░░░░░░░░█████████▀░░░░░░░░░███████████▄░░░░░▄▄███████████▄▄▄▄███████████████████████████████░██████████████████░ ░██████████████████░███████████████████████████████████████████████████▀▀░░▐███████████▀▀░░▄░░░█████████▀░░░▄█▀░░░▐██████████▄▄█▀░░░░░█████████████▌░▄▄▄░▐██████████████████████████████████████████████░██████████████████░
bitmover
Legendary

Offline

Activity: 1288
Merit: 2631

 May 05, 2021, 04:40:49 PM

What's this puzzle all about? What do miner exactly solve? Please try to avoid technical term if possible, I would like to know in easy way.

You are asking how does Proof of Work works.

I made this Proof of Work summary a few years ago:

Proof of Work is an algorithm that rewards participants who solve a cryptographic puzzle in order to validate transactions and create new blocks (this process in known as mining).
This puzzle consists in scanning for a value (called Nonce) that when hashed together with thr block data, the hash begins with a number of zeros.

In this website you can see how this process works. You can try to find a Nonce that when hashed generates a hash that start with 0000 on your own. You will see that it is hard, unless you are very lucky. And you are going to be lucky twice in row, if you do go to a casino or something like that lol.

The difficult in finding that nonce increases exponentially as more zeros are required by the block. Difficult is adjusted every 2016 blocks, based on the average hashrate of those past 2016 blocks, so that 2016 blocks are mined every two weeks. (So a block is mined every 10 minutes)

Miners only get their reward if they are mining the longest chain, as it has the greatest processing power invested. If the honest nodes control the majority processing power, the honest chain will always be the longest and will outpace attacker’s chain.

To modify a past transaction the attacker would have to redo the PoW of the block and all subsequent blocks, and outpace the honest chain. For this to happen, the attacker’s would need more processing power than the honest chain, also known as 51% attack.

The website I mentioned is very good and it explains things in a visual way.

You can see the blocks. Insert some random data (transactions) and you will see that you will have to mine the block again (finding a nonce which will make the hash meets the target) and all of subsequent blocks.. Try it

 ░░░░░▄▄██████▄▄░░▄████▀▀▀▀▀▀████▄░███▀░░░░░░░░░░▀█▀████░░░▄██████▄▄░░░██░░░░░█████████░░░░██▌░░░░█████████████████░░░░█████████████████░░░░░███████████████████▄░░▀██████▀░░░████▀█▄▄░░░░░░░░░░▄███░░▀████▄▄▄▄▄▄████▀░░░░░▀▀██████▀▀ .ChipMixer.{ MIXING REINVENTED FOR YOUR PRIVACY #.ChipMixer. ░░░░░▄▄██████▄▄░░▄████▀▀▀▀▀▀████▄░███▀░░░░░░░░░░▀█▀████░░░▄██████▄▄░░░██░░░░░█████████░░░░██▌░░░░█████████████████░░░░█████████████████░░░░░███████████████████▄░░▀██████▀░░░████▀█▄▄░░░░░░░░░░▄███░░▀████▄▄▄▄▄▄████▀░░░░░▀▀██████▀▀
pawanjain
Sr. Member

Offline

Activity: 1666
Merit: 479

AKA hmrawal

 May 05, 2021, 05:09:09 PM

You made it more complicated rather than making it simpler
It is also not about "leading zeros" but a very simple integer comparison where we want a to be smaller than or equal to b and for example 0035 is bigger than 0031 and is rejected even though both have 2 leading zeros.

A simple explanation of mining IMO would be to compare it with rolling a dice.
Imagine if you wanted to get a number that is smaller than 3. You roll the dice and you have a chance of getting 2 and win on your first try but if you get something bigger like 5 you have to roll again. You do this random work of rolling the dice until you get a number that is smaller than or equal to your target.
That's mining. The only "math" in it is the integer comparison.

Lol, I guess I am really bad at explaining stuff

Thanks for posting this. This thread has made me more aware of the mining part now.

Also, I didn't know that the difficulty is inversely proportional to the target required to mine the block.
Can you or someone explain how is the difficulty calculated with respect to the target?

 .████▄             ▄██████████▄    ▄    ▄██████▀████▀  ▄███▄  ▀████▀▀▀  ▄██▀▀▀██▄  ▀▀▄████   ████▄███████████████▀████   ████▀▄█▄  ▀██▄▄▄██▀  ▄█▄▄███▄  ▀███▀  ▄███▄▄███▀▀█▀   ▀   ▀█▀▀███▄▀█▀                 ▀█▀ Duelbits ▄████▄▄          ▄█████████▄        ▄█████████████▄     ▄██████████████████▄   ▄████▄▄▄█████████▄▄▄███▄ ▄████▐▀▄▄▀▌██▄█▄██▐▀▄▄▀▌███ ██████▀▀▀▀████▀███▀▀▀▀█████▐████████████■▄▄▄■██████████▀▐██████████████████████████▀██████████████████████████▀▀███████████████████████▀  ▀███████████████████▀    ▀███████████████▀ .         ▄ ▄▄▀▀▀▀▄▄         ▄▀▀▄      █         █   ▀▄     █       ▄█▄     ▀▄   █      ▄▀ ▀▄      ▀█▀    ▄▀     ▀█▄▄▄▀▀ ▀  ▄▀  ▄▀  ▄▀Live Games ▄▄▀▀▀▀▀▀▀▄▄ ▄▀ ▄▄▀▀▀▀▀▄▄ ▀▄▄▀ █ ▄  █  ▄ █ ▀▄█ █   ▀   ▀   █ █  ▄▄▄█ ▀▀▀▀▀▀▀▀▀▀▀▀▀ █ █   ██▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█  █▄██ ▀▀█  ▀▀█  ▀▀█ █  █▄█Slots .        ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄        █         ▄▄  █▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄       ██  ▄▄         █       ██             █       ██   ▄▀▀▄▀▀▄   █       ██   ▀▄   ▄▀   █       █Blackjack | ▄▄▀▀█▌          ▄▄▀█▄    █        ▄▀     ▀▄▄ █       █    ▄▄    ▀█    ▄▄█    █  █   ▐▌  ▄▀ █      ▀▀    █▄▀  ▐▌           ██ ▄▀▀▄▄        ▄▀▀▀  ▄  ▀▄▄   ▄▀█  ▄▀   ▄  ▀█▀  █   ▄▀ ▄▀   █  █  ▄▀ █     █▄▀   ▄▀ NEW GAME!CRASH | NEW VIPLOUNGE | Instant/Daily/Weekly/Monthly BitsACE'S REVAMPED REWARDS! | [ Đ ][ Ł ]AVAILABLE NOW
pooya87
Legendary

Offline

Activity: 2436
Merit: 4121