Bitcoin Forum
May 05, 2024, 05:42:45 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How does difficulty work?  (Read 606 times)
theantnest (OP)
Newbie
*
Offline Offline

Activity: 10
Merit: 1


View Profile
July 01, 2017, 10:18:02 AM
Merited by ABCbits (1)
 #1

Please excuse this beginner question. I'm trying to gain a deeper understanding of how Bitcoin works.

It is my rudimentary understanding that the network has a huge amount of hashpower and so difficulty is artificially created in order to control inflation.

My question is: Exactly how is the difficulty created? Is there complex math thrown into the equation which takes a known amount of CPU power to resolve? If this is the case, is this math just garbage that is effectively useless/ discarded?

It seems like a lot of computaional power and energy is being wasted if this is the case.
1714930965
Hero Member
*
Offline Offline

Posts: 1714930965

View Profile Personal Message (Offline)

Ignore
1714930965
Reply with quote  #2

1714930965
Report to moderator
1714930965
Hero Member
*
Offline Offline

Posts: 1714930965

View Profile Personal Message (Offline)

Ignore
1714930965
Reply with quote  #2

1714930965
Report to moderator
TalkImg was created especially for hosting images on bitcointalk.org: try it next time you want to post an image
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714930965
Hero Member
*
Offline Offline

Posts: 1714930965

View Profile Personal Message (Offline)

Ignore
1714930965
Reply with quote  #2

1714930965
Report to moderator
cr1776
Legendary
*
Offline Offline

Activity: 4032
Merit: 1299


View Profile
July 01, 2017, 10:23:30 AM
Merited by ABCbits (1)
 #2

Please excuse this beginner question. I'm trying to gain a deeper understanding of how Bitcoin works.

It is my rudimentary understanding that the network has a huge amount of hashpower and so difficulty is artificially created in order to control inflation.

My question is: Exactly how is the difficulty created? Is there complex math thrown into the equation which takes a known amount of CPU power to resolve? If this is the case, is this math just garbage that is effectively useless/ discarded?

It seems like a lot of computaional power and energy is being wasted if this is the case.

This explains a lot:
https://en.bitcoin.it/wiki/Difficulty

This "waste" provides security.
theantnest (OP)
Newbie
*
Offline Offline

Activity: 10
Merit: 1


View Profile
July 01, 2017, 10:29:26 AM
 #3

Thanks!

Could we not throw useful things into the CPU to create difficulty? Like an emulator or something. Sorry if this is a stupid obvious question.
HeRetiK
Legendary
*
Offline Offline

Activity: 2926
Merit: 2091


Cashback 15%


View Profile
July 01, 2017, 10:32:53 AM
 #4

Thanks!

Could we not throw useful things into the CPU to create difficulty? Like an emulator or something. Sorry if this is a stupid obvious question.

There are some alternative cryptocurrencies that try exactly that. One of the problems with that approach however is that you lose security.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
theantnest (OP)
Newbie
*
Offline Offline

Activity: 10
Merit: 1


View Profile
July 01, 2017, 10:37:40 AM
 #5

Aha.

What is this approach called? I'd like to do some more learning
HeRetiK
Legendary
*
Offline Offline

Activity: 2926
Merit: 2091


Cashback 15%


View Profile
July 01, 2017, 10:45:07 AM
Merited by ABCbits (1)
 #6

Aha.

What is this approach called? I'd like to do some more learning

I remember Primecoin being one of the first alt coins to do that. There's a couple more, but I can't name then on the top of my hat. As far as I know there's no general name for that approach.

Some coins also use Proof of Stake (as opposed to Bitcoin's Proof of Work) as less computation intensive alternative. It's a contentious approach, but may be worth a look if you want to get into the guts of cryptocurrencies.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
theantnest (OP)
Newbie
*
Offline Offline

Activity: 10
Merit: 1


View Profile
July 01, 2017, 10:52:35 AM
 #7

Thanks, yes I just want to learn for learning's sake.

I did the same thing in the 90's when the internet was emerging mainstream. For me, it is very interesting to see this tech emerge and I really do believe it can change the world as we know it. I know I'm a bit late to the party, but I intend to catch up.

I've started to notice a bit of attention being pointed towards the inefficiency of the network with headlines such as "Bitcoin uses enough power to run a small country" etc.

With climate change and sustainability being such a hot topic, I think this can be a big dent in Bitcoin's image as it becomes more widely adopted and hashpower increases. If that hashpower and difficulty could be used for good purposes, it could turn a potential negative into a big plus.
ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4166


View Profile
July 01, 2017, 11:25:53 AM
 #8

With climate change and sustainability being such a hot topic, I think this can be a big dent in Bitcoin's image as it becomes more widely adopted and hashpower increases. If that hashpower and difficulty could be used for good purposes, it could turn a potential negative into a big plus.
It doesn't really matter that much. Bitcoin does use a huge amount of hashpower but as the technology improve, theres bound to be renewable energy in the future, with more efficient ASICs. Mining has evolved to be one which only the big companies can afford. I would think that the technology industry is using a lot more energy than Bitcoin and mining is a small insignificant part of it.

I highly doubt it would ever be possible for us to integrate something which is useful and still can keep the network secure. Other than that, it would be impossible for anyone to adopt it with them having to throw their ASICs away and millions being wasted.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
theantnest (OP)
Newbie
*
Offline Offline

Activity: 10
Merit: 1


View Profile
July 01, 2017, 11:38:44 AM
Last edit: July 15, 2017, 11:32:39 AM by theantnest
 #9

I would think that the technology industry is using a lot more energy than Bitcoin

Maybe true, but the entire tech industry is efficiency driven. More computational power for less watts is what's driving the whole semiconductor industry. Bitcoin seems to be doing the opposite. And as the network grows and difficulty increases, transactions per watt actually gets worse.

Unless I am misunderstanding it, with the current model it doesn't matter how much hashpower is added, you will still only get 3.3 transactions per second.
theantnest (OP)
Newbie
*
Offline Offline

Activity: 10
Merit: 1


View Profile
July 01, 2017, 11:51:45 AM
 #10

Thanks!

Could we not throw useful things into the CPU to create difficulty? Like an emulator or something. Sorry if this is a stupid obvious question.

There are some alternative cryptocurrencies that try exactly that. One of the problems with that approach however is that you lose security.

I understand that with added variables and complexity the possibility to find and exploit an attack vector increases. Is there some more specific explanation to why this approach would make the network less secure? It must be possible to insulate the bitcoin blockchain from the difficulty algortithm, no?
ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4166


View Profile
July 01, 2017, 12:02:42 PM
 #11

Maybe true, but the entire tech industry is efficiency driven. More computational power for less watts is what's driving the whole semiconductor industry.
That's exactly what we are doing. The cost for the transaction volume seems to be reasonable, given the benefits it provides.
Bitcoin seems to be doing the opposite. And as the network grows and difficulty increases, transactions per watt actually gets worse.
The efficiency of ASIC is definitely getting better. The hashpower increase doesn't mean that the electrical cost is growing exponentially. The transaction per watt can only be solved by scaling Bitcoin.

Proof-of-work may be the closest we can get to having a blockchain with a good security.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
HeRetiK
Legendary
*
Offline Offline

Activity: 2926
Merit: 2091


Cashback 15%


View Profile
July 01, 2017, 12:04:03 PM
 #12

I would think that the technology industry is using a lot more energy than Bitcoin

Maybe true, but the entire tech industry is efficiency driven. More computational power for less watts is what's driving the whole semiconductor industry. Bitcoin seems to be doing the opposite. And as the network grows and difficulty increases, transactions per watt actually gets worse.

Unless I am misunderstanding it, with the current model it doesn't matter how much hashpower is added, you will still only get 3.3 transactions per second.

Growth in computational power does not equal growth in power usage. With each generation the the chips used for Bitcoin are getting more and more efficient.

A better metric is the worth of the block reward, as this strongly correlates with how much resources a miner is ready to spend on machines and electricity. With each halving the amount of resources available to miners shrinks - apart from the capital growth relative to Fiat, that is.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
HeRetiK
Legendary
*
Offline Offline

Activity: 2926
Merit: 2091


Cashback 15%


View Profile
July 01, 2017, 12:14:34 PM
 #13

I understand that with added variables and complexity the possibility to find and exploit an attack vector increases. Is there some more specific explanation to why this approach would make the network less secure? It must be possible to insulate the bitcoin blockchain from the difficulty algortithm, no?

In its current state, changing the proof of work algorithm of Bitcoin is near impossible as you'd face heavy opposition from miners due to the nature of the current mining infrastructure (ie. sha256 ASICs).

The way I understand it the main problem with using the computational powers of miners for other utilities as well is that so far there's no meaningful way to intermarry utility and security - ie. the computational power used for utility can only be provided on top of the computational power used for security.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
theantnest (OP)
Newbie
*
Offline Offline

Activity: 10
Merit: 1


View Profile
July 01, 2017, 01:36:00 PM
Last edit: July 15, 2017, 11:32:54 AM by theantnest
 #14

Boy, do I wish I came to this forum a long time ago.

Compared to Reddit, the quality of answers is astonishing.

Thanks guys.
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!