The chain: blocks in series – Hacker Noon

Staring into the blackbox

Q. How do you know my transaction was valid? Who checks it?
Q. Where did I send my virtual money?
Q. Is the virtual money in my wallet? Why can’t I just modify it?
Q. How is it ensured that the seller actually received the funds?
Q. Can someone else claim to be me?
Q. Why do I need give my money to the miner? And how much?
Q. What is this thing that we exchanged anyway? Just some numbers?
Q. What if I want to reverse the transaction and return the item?

There are lots of questions. The virtual world can be confusing. A lot of moving parts are at play here and in due time, you will learn exactly how they operate. Let’s start with the basics.


In the physical world, this is not an unheard of concept. Fingerprints, retina scans, handwritten signatures are all various ways to validate one’s identity. In the virtual world, it is similar. Each transaction needs to signed. When you sign a transaction, you effectively say that you approve those funds to be transferred from your account into someone else’s account. But what really is the signature?

Here we use a technique that is known as public key cryptography.

Digital signature

Public key
This is a key that everyone holds

Private key
This is a key that only you hold

Message + Private key = 
Signed Message

Signed Message + Public key = 

The precise implementation of public key cryptography used in Bitcoin is called Elliptic-curve cryptography. You can read more about it here.

A transaction is written down. It is signed by the buyer. The seller gets it. Where do they go?

Where are the funds banked?

Back to the physical world: at the end of the day, the cashier takes all of his collected receipts and gives it to his manager. He scrutinizes them as he flicks through the lump of cash that his shop has accumulated. If everything adds up, he takes the cash bundle over to the bank. Bank says thank you very much and deposits the money in their account while noting down that it belongs to the managers account. From there, things gets real tricky. Smaller banks give the money to the bigger banks who in turn gives it to even bigger banks. Anyone who has played a game of poker can tell you. If you are up against a high-roller, expect lots of bluffs. The odds are stacked against you. The Wall Street are the high rollers and the traditional banking system is riddled with fraud and power abuse allegations. Some even say that the demise of Wall Street is what led to the birth of Blockchain.

Here in the virtual space, transparency is important. To that end, there is a general ledger that everyone holds. Whenever anyone makes a transaction, the transaction goes over to the general ledger. All general ledgers are updated and the transaction is set in stone.

One might ask: how exactly are all ledgers around the world updated? That’s an important question. Because the whole purpose is defeated if there happens to be a central body that passes messages back and forth. Luckily, there isn’t one. Thanks to peer-to-peer technology. More on that later. By the way, this ledger is known as blockchain.

Let’s recapitulate and dive a bit deeper.

A transaction consists of money-in and money-out. Money-in comes from transactions that were previously addressed to you. These are called unspent outputs. Once you use them in a transaction, these previous transactions are considered spent and you can not use them any more. All the successful transactions get listed on the general ledger, which contains all the transactions ever done since the beginning of cryptocurrency. Every day there are thousands of transactions occurring. Each of one them are required to be checked to ensure that nothing malicious has taken place. These validations are done by miners using a procedure called Proof of Work¹. Miners process a bulk of transactions in one go. They pack them all together and out comes a block. This is attached onto the top of the blockchain and alert goes to everyone. Anyone can find out if the miner acted vindictively, unless the majority of miners revolt against the system. This is known as the 51% attack. And it can cause the collapse of the cryptocurrency system.

I have only scratched the surface here. Leaving you with more questions than answers.
> Why sort of incentive does miners have to keep them going?
> Why would anyone want to verify what miners are doing?
> Who regulates the money supply? Who settles disputes?
> Why are transactions loaded onto a block?

The purpose was to simply whet your appetite for what is coming next. Money fuels the economy. And cryptocurrency allows the economy of the virtual world to be conceived.


  1. Miners don’t validate the transaction per se. They simply try to add the block to the blockchain. But as an outcome of this process, transactions are correctly validated. To learn more about the Proof of Work, check out Satoshi Nakamoto’s white-paper.

read original article here