
Bitcoin Mining in Plain English - enmaku
http://codinginmysleep.com/bitcoin-mining-in-plain-english/
======
codesuela
Something that I still don't quite get: Who adjusts the difficulty. As far as
I understand there still is a central server somewhere who broadcasts the
difficulty and awards Bitcoins which to me kind of clashes with the
distributed nature of Bitcoins.

~~~
doublec
There is no such central server. The difficulty is adjusted using an algorithm
that all the bitcoin clients implement. This looks at the generation times of
the last 2,016 blocks and works out from that if difficulty needs to be higher
or lower.

Since all clients implement the same algorithm, they all get the same
difficulty value.

~~~
tocomment
Could someone program up a client that "cheats"? Or is there something
preventing that.

~~~
doublec
Any blocks that client produced would not match the expectations of the other
clients. The difficulty being different would mean a successful hash that
solves the block may not be seen as solving it by the other clients. They
would reject it and your cheating client would be on its own fork.

If you could convince others to run your client then your network would get
bigger. If it got >50% of the entire network then your blockchain would
effectively be the main chain.

~~~
ksadeghi
It would also have to maintain the >50% hashing power for more than 120
blocks. And even then it's not guaranteed as smaller pools could get lucky and
solve more blocks than the larger rouge miner.

------
pbhjpbhj
In the article it sounds like the bitcoins are mined serially and that someone
can pip you to the post. This contradicts my understanding of bitcoin. I dont
think the simplification of the mathematical process makes it at all clear.

Is it like a teacher telling a class 'what are the prime factors of 91' and
awarding a sweet to the winner? Or are there many sums to calculate and anyone
providing an answer gets a sweet? When the result comes out how is the source
verified - in a classroom if I were sly I might be able to relay the answer to
the teacher faster than the one who calculated it??

~~~
doublec
It's like a teacher telling a class "Pick a number between 1 and 1000". If
they pick the same number as the teacher, they win. If more than one picks the
winning number, the first person to get it to the teacher wins.

There's no "many sums to calculate" contributing towards a result. It's more a
lottery - did my one calculation produce the right number.

~~~
enmaku
Exactly. For the statisticians in the room, it's a Poisson process. That means
that over time your results should average out to meet certain expectations
but each individual hash either solves the problem completely or doesn't solve
it at all - no in-betweens and no teamwork.

~~~
pbhjpbhj
Doesnt this mean that it youve got slower hardware then youll always lose at
finding the next number?

------
npguy
I lost the plot where you said if there are 12 confirmations, it means that
the transaction is 12 blocks behind .. :-(

~~~
saturn7
Confirmations = "Current Block Number" - "Block Number your transaction is in"

~~~
npguy
Thanks. Will read again.

------
mfringel
So, a block chain contains all transactions in the BitCoin network since the
beginning of time?

How does this not end up with having to eventually transmit multiple gigs of
data every time you want to do a transaction?

~~~
andrewla
Generally, the gigs of data are transmitted just once, during application
setup. After that, clients can pick up new blocks are they are generated by
the network. There are numerous proposals for generating a "summary block"
that would securely allow a snapshot to be generated to avoid the initial
download. [1]

There are light-weight clients out there that rely on a web service of some
form for keeping track of the whole block chain[2].

In order to issue a new transaction, though, you only need to transmit the
transaction itself: a list of signed transactions: "transfer x bitcoins from
this address to this address", basically.

[1] Some suggested implementations are listed here
<https://bitcointalk.org/index.php?topic=74559.0>

[2] <https://en.bitcoin.it/wiki/Thin_Client_Security>

(Edit: fixed formatting)

~~~
enmaku
Exactly. The integrity of the chain is kept not by including every transaction
since the dawn of time in each block, but by simply including the hash of the
previous block. This simultaneously shows where in the chain each block
belongs and verifies that nothing about the previous block has changed.

------
tocomment
Really basic question, what's the purpose of mining? Was it just set up as a
fair way to distribute the initial coins, or is there a fundamental on-going
function it serves?

~~~
andrewla
The main purpose of mining is to secure the block chain. The reward is a the
incentive for miners to exist.

Each block that gets mined means that in order to undo a transaction that was
previously in the block chain, an attacker would have to mine a block before
the network produced another block on the main chain.

So if your transaction was in block 33123, and the chain looks like

    
    
      block 41873 : [ parent : ... ]
      block 33123 : [ parent : block 41873 ]
      block 71282 : [ parent : block 33123 ]
    

then in order to undo block 33123, an attacker would have to produce three
blocks:

    
    
      block 41234 : [ parent : block 41873 ]
      block 39834 : [ parent : block 41234 ]
      block 58762 : [ parent : block 39834 ]
    

before the network produced a new block on the main block chain. So the
attacker would have to have 3x the computing power of the remainder of the
network.

------
uptown
Any "currency" that requires this an explanation as complicated as Bitcoin
will never achieve widespread adoption.

~~~
MikeCapone
I don't know if you've ever heard about the way central banks work, but it's
pretty complicated too.

There's a difference between using the currency in transactions - which is
potentially simple for both dollars and bitcoins - and managing the behind the
scenes of the money supply and control mechanisms. Few people need to be
central bankers, and few people need to be bitcoin miners, so I don't feel
it's that big a deal.

~~~
uptown
I'm well aware of the central banks and their complexities, but bitcoin just
adds a layer on top of that - ultimately bitcoin needs to be converted back to
traditional currency in order to be useful for the masses. You haven't really
escaped the central bank ... you've just added your own layer of complexity on
top of that pre-existing and never-going-anywhere system.

~~~
enmaku
Bitcoin replaces that layer. I've personally transacted business in Bitcoin
without converting it back to traditional currencies and it works pretty damn
well, actually. At the moment the primary reason Bitcoin "needs" to be
converted back into traditional currency to be useful to the masses is that
they haven't started using it yet.

Think about it: if 1% of people are using Bitcoin then that means there's only
a 1 in 100 chance that any given transaction you make can be made with
Bitcoins. That's an admittedly low degree of usefulness. If you can get 2% of
the people to start using Bitcoin it just became twice as useful and half as
many transactions will now require you to convert funds back to traditional
currencies. At some "critical mass" adoption level, Bitcoin becomes just as
useful as any other currency without such a constant need to move in or out of
traditional currencies.

It's called the Network Effect and it's a hell of a market force.

Also your argument is invalid because you could say the exact same thing about
holding a bank balance in USD while living in Europe: "But I have to exchange
these dollars for Euros in order to even use them at all, man this U.S. Dollar
is just completely worthless and unnecessarily complex because no one around
me will accept it."

~~~
uptown
"Think about it: if 1% of people are using Bitcoin then that means there's
only a 1 in 100 chance that any given transaction you make can be made with
Bitcoins."

You're going with the "we just need to get 1% thing", huh? What percent of the
world's population is currently using Bitcoin?

~~~
enmaku
1% was a completely arbitrary example, it wasn't meant to set a goal or
anything. I was just illustrating the point that Bitcoin isn't ONLY good if
you convert it to USD/EUR/whatever, it's just not adopted as widely as those
currencies.

~~~
uptown
"it's just not adopted as widely as those currencies."

Which brings us full-circle back to my original point.

~~~
jl6
What percentage of the world's population was using the internet in 1983?

~~~
enmaku
I don't have data going back that far. My earliest data I have on-hand goes
back to 1997 at which point about 2% of the world (11% in the developed world)
had internet access. I _do_ have host count data, though and can tell you that
in August of 1983 there were a whopping 562 web sites in existence. In July
1997 when only 2 (or 11) percent of people had access, there were about 19.5
million. As of January of this year there are almost 900 million.

So let's extrapolate: There were about 5.84 billion people in the world in
1997, 2% of which is about 117 million people on the internet (round numbers).
Thus, in 1997, we can estimate one in every 6 internet users had their own web
site.

Today there are about 6.97 billion people in the world and about 35% of them
have internet access (74% in the developed world, but I digress). This means
that about 2.4 billion people are responsible for about 900 million web sites
- that's one web site per 2.7 internet users. If we work backwards from this
imaginary (and probably wrong) line, we can estimate that there were about
3,000 internet users back in 1983.

There are currently estimates that the Bitcoin network is made up of between
15 and 20 thousand users. Let's call it 15, just to be pessimistic. Adjusting
for world population that puts us about on-par with the internet's adoption
level in 1987. Bitcoun is about 4 years old, while the 1987 internet was about
6 years old, which means we're growing 50% faster than the internet did.
Assuming nothing gigantic implodes along the way, Bitcoin is on its way to
greatness.

Of course that's assuming you can compare Bitcoin to the internet, which you
probably can't ;-)

~~~
cnp
As a fairly untechnical user, I would like to add that as soon as I figured
out how to actually _get_ bitcoins (bitinstant) the process became quite
natural and the usefulness apparent.

