HOW BITCOIN MINING WORKS?

How Bitcoin Mining Work?
In traditional fiat money systems, governments simply print more money when they need to. But in bitcoin, money isn’t printed at all – it is discovered. Computers around the world ‘mine’ for coins by competing with each other.

How does mining take place?

People are sending bitcoins to each other over the bitcoin network all the time, but unless someone keeps a record of all these transactions, no-one would be able to keep track of who had paid what. The bitcoin network deals with this by collecting all of the transactions made during a set period into a list, called a block. It’s the miners’ job to confirm those transactions, and write them into a general ledger.

Making a hash of it


This general ledger is a long list of blocks, known as the 'blockchain'. It can be used to explore any transaction made between any bitcoin addresses, at any point on the network. Whenever a new block of transactions is created, it is added to the blockchain, creating an increasingly lengthy list of all the transactions that ever took place on the bitcoin network. A constantly updated copy of the block is given to everyone who participates, so that they know what is going on.
But a general ledger has to be trusted, and all of this is held digitally. How can we be sure that the blockchain stays intact, and is never tampered with? This is where the miners come in.
When a block of transactions is created, miners put it through a process. They take the information in the block, and apply a mathematical formula to it, turning it into something else. That something else is a far shorter, seemingly random sequence of letters and numbers known as a hash. This hash is stored along with the block, at the end of the blockchain at that point in time.
Hashes have some interesting properties. It’s easy to produce a hash from a collection of data like a bitcoin block, but it’s practically impossible to work out what the data was just by looking at the hash. And while it is very easy to produce a hash from a large amount of data, each hash is unique. If you change just one character in a bitcoin block, its hash will change completely.
Miners don’t just use the transactions in a block to generate a hash. Some other pieces of data are used too. One of these pieces of data is the hash of the last block stored in the blockchain.
Because each block’s hash is produced using the hash of the block before it, it becomes a digital version of a wax seal. It confirms that this block – and every block after it – is legitimate, because if you tampered with it, everyone would know.
If you tried to fake a transaction by changing a block that had already been stored in the blockchain, that block’s hash would change. If someone checked the block’s authenticity by running the hashing function on it, they’d find that the hash was different from the one already stored along with that block in the blockchain. The block would be instantly spotted as a fake.
Because each block’s hash is used to help produce the hash of the next block in the chain, tampering with a block would also make the subsequent block’s hash wrong too. That would continue all the way down the chain, throwing everything out of whack.

Competing for coins


So, that’s how miners ‘seal off’ a block. They all compete with each other to do this, using software written specifically to mine blocks. Every time someone successfully creates a hash, they get a reward of 25 bitcoins, the blockchain is updated, and everyone on the network hears about it. That’s the incentive to keep mining, and keep the transactions working.
The problem is that it’s very easy to produce a hash from a collection of data. Computers are really good at this. The bitcoin network has to make it more difficult, otherwise everyone would be hashing hundreds of transaction blocks each second, and all of the bitcoins would be mined in minutes. The bitcoin protocol deliberately makes it more difficult, by introducing something called ‘proof of work’.
The bitcoin protocol won’t just accept any old hash. It demands that a block’s hash has to look a certain way; it must have a certain number of zeroes at the start. There’s no way of telling what a hash is going to look like before you produce it, and as soon as you include a new piece of data in the mix, the hash will be totally different.
Miners aren’t supposed to meddle with the transaction data in a block, but they must change the data they’re using to create a different hash. They do this using another, random piece of data called a ‘nonce’. This is used with the transaction data to create a hash. If the hash doesn’t fit the required format, the nonce is changed, and the whole thing is hashed again. It can take many attempts to find a nonce that works, and all the miners in the network are trying to do it at the same time. That’s how miners earn their bitcoins.

WHO IS SATOSHI NAKAMOTO?



Who is Satoshi Nakamoto?




While we may not know who he (or she) was, we know what he did. Satoshi Nakamoto was the inventor of the bitcoin protocol, publishing a paper via the Cryptography Mailing Listin November 2008.
He then released the first version of the bitcoin software client in 2009, and participated with others on the project via mailing lists, until he finally began to fade from the community toward the end of 2010.
Nakamoto worked with people on the open-source team, but took care never to reveal anything personal about himself, and the last anyone heard from him was in the spring of 2011, when he said that he had “moved on to other things”.

But he was Japanese, right?

Best not to judge a book by its cover. Or in fact, maybe we should.
“Satoshi” means "clear thinking, quick witted; wise". “Naka” can mean “medium, inside, or relationship”. “Moto” can mean “origin”, or “foundation”.
Those things would all apply to the person who founded a movement by designing a clever algorithm. The problem, of course, is that each word has multiple possible meanings.
We can’t know for sure whether he was Japanese or not. In fact, it’s rather presumptuous to assume that he was actually a ‘he’.
We’re just using that as a figure of speech, but allowing for the fact that this could have been a pseudonym, ‘he’ could have been a ‘she’, or even a ‘they’.

Does anyone know who Nakamoto was?

No, but the detective techniques that people use when guessing are sometimes even more intriguing than the answer. The New Yorker’s Joshua Davis believed that Satoshi Nakamoto was Michael Clear, a graduate cryptography student at Dublin's Trinity College.
He arrived at this conclusion by analyzing 80,000 words of Nakamoto’s online writings, and searching for linguistic clues. He also suspected Finnish economic sociologist and former games developer Vili Lehdonvirta.
Both have denied being bitcoin’s inventor. Michael Clear publicly denied being Satoshi at the 2013 Web Summit.


Adam Penenberg at FastCompany disputed that claim, arguing instead that Nakamoto may actually have been three people: Neal King,Vladimir Oksman, and Charles Bry. He figured this out by typing unique phrases from Nakamoto’s bitcoin paper into Google, to see if they were used anywhere else.
One of them, "computationally impractical to reverse," turned up in a patent application made by these three for updating and distributing encryption keys. The bitcoin.org domain name originally used by Satoshi to publish the paper had been registered three days after the patent application was filed.
It was registered in Finland, and one of the patent authors had traveled there six months before the domain was registered. All of them deny it. Michael Clear also publicly denied being Satoshi at the 2013 Web Summit.
In any case, when bitcoin.org was registered on August 18th 2008, the registrant actually used a Japanese anonymous registration service, and hosted it using a Japanese ISP. The registration for the site was only transferred to Finland on May 18th 2011, which weakens the Finland theory somewhat.
Others think that it was Martii Malmi, a developer living in Finland who has been involved with bitcoin since the beginning, and developed its user interface.
A finger has also been pointed at Jed McCaleb, a lover of Japanese culture and resident of Japan, who created troubled bitcoin exchange Mt. Gox and co-founded decentralized payment systems Ripple and later Stellar.
Another theory suggests that computer scientists Donal O'Mahony and Michael Peirceare Satoshi, based on a paper that they authored concerning digital payments, along with Hitesh Tewari, based on a book that they published together. O’Mahony and Tewari also studied at Trinity College, where Michael Clear was a student.
Israeli scholars Dorit Ron and Adi Shamir of the Weizmann Institute retracted allegationsmade in a paper suggesting a link between Satoshi and Silk Road, the black market web site that was taken down by the FBI in October 2013. They had suggested a link between an address allegedly owned by Satoshi, and the site. Security researcher Dustin D. Trammell owned the address, and disputed claims that he was Satoshi.
In May 2013, Internet pioneer Ted Nelson threw another hat into the ring: Japanese mathematician Professor Shinichi Mochizuki, although he admits that the evidence is circumstantial at best.
In February 2014, Newsweek’s Leah McGrath Goodman claimed to have tracked down the real Satoshi NakamotoDorian S Nakamoto has since denied he knows anything about bitcoin, eventually hiring a lawyer and releasing an official statement to that effect.
Hal FinneyMichael WeberWei Dai and several other developers were among those who are periodically named in media reports and online discussions as potential Satoshis. A group of forensic linguistics experts from Aston University believe the real creator of bitcoin is Nick Szabo, based upon analysis of the Bitcoin White Paper.
Dominic Frisby, a comedian and a writer, also suggests that BitGold creator Szabo was the most likely candidate to be Satoshi in his book, “Bitcoin: The Future of Money”. His detailed analysis involved the linguistics of Satoshi's writing, judging the level of technical skill in C++ and even Satoshi's likely birthday.
In Nathaniel Popper's book, 'Digitial Gold', released in May 2015, Popper reveals that in a rare encounter at an event Szabo again denied that he was Satoshi.
Then in early December 2015, reports by Wired and Gizmodo tentatively claimed to have identified Nakamoto as Australian entrepreneur Craig S WrightWIRED cited "an anonymous source close to Wright" who provided a cache of emails, transcripts and other documents that point to Wright's role in the creation of bitcoin. Gizmodo cited a cache of documents sourced from someone claiming to have hacked Wright’s business email account, as well as efforts to interview individuals close to him. The idea that the Wright-Satoshi connection is nothing but a hoax has been floated by observers, though the compelling nature of the evidence published will no doubt fuel speculation for some time to come.
For the most part, all of these potential Satoshi's have insisted they are not Nakamoto.

So what do we know about him?

One thing we know, based on interviews with people that were involved with him at an early stage in the development of bitcoin, is that he thought the system out very thoroughly.
His coding wasn’t conventional, according to core developer Jeff Garzik, in that he didn’t apply the same rigorous testing that you would expect from a classic software engineer.

How rich is he?

An analysis by Sergio Lerner, an authority on bitcoin and cryptography, suggests that Satoshi mined many of the early blocks in the bitcoin network, and that he had built up a fortune of around 1 million unspent bitcoins. That hoard would be worth $1bn at November 2013’s exchange rate of $1,000.

What is he doing now?

No one knows what Satoshi is up to, but one of the last emails he sent to a software developer, dated April 23 2011, said “I’ve moved on to other things. It’s in good hands with Gavin and everyone.”

Did he work for the government?

There are rumors, of course. People have interpreted his name as meaning “central intelligence”, but people will see whatever they want to see. Such is the nature of conspiracy theories.
The obvious question would be why one of the three-letter agencies would be interested in creating a cryptocurrency that would subsequently be used as an anonymous trading mechanism, causing senators and the FBI alike to wring their hands about potential terrorism and other criminal endeavours. No doubt conspiracy theorists will have their views on that, too.
Perhaps it doesn’t matter. Core developer Jeff Garzik puts it succinctly. “Satoshi published an open-source system for the purpose that you didn’t have to know who he was, and trust who he was, or care about his knowledge,” he points out. Open-source code makes it impossible to hide secrets. “The source code spoke for itself.”
Moreover, it was smart to use a pseudonym, he argues, because it forced people to focus on the technology itself rather than on the personality behind it. At the end of the day,bitcoin is now far bigger than Satoshi Nakamoto.
Having said that, if the real Satoshi Nakamoto is out there – 

What is Bitcoin?

    Bitcoin is a form of digital currency, created and held electronically. No one controls it. Bitcoins aren’t printed, like dollars or euros – they’re produced by people, and increasingly businesses, running computers all around the world, using software that solves mathematical problems.
It’s the first example of a growing category of money known as cryptocurrency.

What makes it different from normal currencies?

Bitcoin can be used to buy things electronically. In that sense, it’s like conventional dollars, euros, or yen, which are also traded digitally.
However, bitcoin’s most important characteristic, and the thing that makes it different to conventional money, is that it is decentralized. No single institution controls the bitcoin network. This puts some people at ease, because it means that a large bank can’t control their money.

Who created it?

A software developer called Satoshi Nakamoto proposed bitcoin, which was an electronic payment system based on mathematical proof. The idea was to produce a currency independent of any central authority, transferable electronically, more or less instantly, with very low transaction fees.

Who prints it?



 No one. This currency isn’t physically printed in the shadows by a central bank, unaccountable to the population, and making its own rules. Those banks can simply produce more money to cover the national debt, thus devaluing their currency.
Instead, bitcoin is created digitally, by a community of people that anyone can join. Bitcoins are ‘mined’, using computing power in a distributed network.
This network also processes transactions made with the virtual currency, effectively making bitcoin its own payment network.

So you can’t churn out unlimited bitcoins?

That’s right. The bitcoin protocol – the rules that make bitcoin work – say that only 21 million bitcoins can ever be created by miners. However, these coins can be divided into smaller parts (the smallest divisible amount is one hundred millionth of a bitcoin and is called a ‘Satoshi’, after the founder of bitcoin).

What is bitcoin based on?

Conventional currency has been based on gold or silver. Theoretically, you knew that if you handed over a dollar at the bank, you could get some gold back (although this didn’t actually work in practice). But bitcoin isn’t based on gold; it’s based on mathematics.
Around the world, people are using software programs that follow a mathematical formula to produce bitcoins. The mathematical formula is freely available, so that anyone can check it.
The software is also open source, meaning that anyone can look at it to make sure that it does what it is supposed to.

What are its characteristics?

Bitcoin has several important features that set it apart from government-backed currencies.

1. It's decentralized

The bitcoin network isn’t controlled by one central authority. Every machine that mines bitcoin and processes transactions makes up a part of the network, and the machines work together. That means that, in theory, one central authority can’t tinker with monetary policy and cause a meltdown – or simply decide to take people’s bitcoins away from them, as the Central European Bank decided to do in Cyprus in early 2013. And if some part of the network goes offline for some reason, the money keeps on flowing.

2. It's easy to set up

Conventional banks make you jump through hoops simply to open a bank account. Setting up merchant accounts for payment is another Kafkaesque task, beset by bureaucracy. However, you can set up a bitcoin address in seconds, no questions asked, and with no fees payable.

3. It's anonymous

Well, kind of. Users can hold multiple bitcoin addresses, and they aren’t linked to names, addresses, or other personally identifying information. However…

4. It's completely transparent

…bitcoin stores details of every single transaction that ever happened in the network in a huge version of a general ledger, called the blockchain. The blockchain tells all.
If you have a publicly used bitcoin address, anyone can tell how many bitcoins are stored at that address. They just don’t know that it’s yours.
There are measures that people can take to make their activities more opaque on the bitcoin network, though, such as not using the same bitcoin addresses consistently, and not transferring lots of bitcoin to a single address.

5. Transaction fees are miniscule

Your bank may charge you a £10 fee for international transfers. Bitcoin doesn’t.

6. It’s fast

You can send money anywhere and it will arrive minutes later, as soon as the bitcoin network processes the payment.

7. It’s non-repudiable

When your bitcoins are sent, there’s no getting them back, unless the recipient returns them to you. They’re gone forever.
So, bitcoin has a lot going for it, in theory. But how does it work, in practice? Read more to find out how bitcoins are mined, what happens when a bitcoin transaction occurs, and how the network keeps track of everything.