Recreating Bitcoin 1:Start over with a Simple Web Transaction System
Welcome to the world of Bitcoin !!!
WHAT is the book really about?
Position, concept position, concept position of Bitcoin.
Because the position is clear, understanding the natural occurrence.
HOW to position?
Find the WHY of the problem, give the solution, lead to the next problem, give the solution, and so on.
Inner ring: Problem/solution loop
Outer ring: Conceptual systems emerge naturally
How many complex must a man understand, before he can create a simple
In 1999, at a cafe, in the town of Midway, Satoshi Nakamoto appeared in the seat by the window, just like he always did.
Satoshi liked this seat, not because of the view outside, but because of the power socket.
Satoshi was a programmer. Recently he had been on vacation, coming here every day to write code. For him, the perfect day is just like this.
At that time, the world of Internet was at the beginning of its new life, with many things unnamed and much finger-pointing needed when describing something.
Satoshi was staring blankly with a coffee in his hand, when the cafe’s owner Bob asked, “Hi Satoshi! Haven’t seen you going about coding these couple of days. What are you thinking?”
“I’ve been wanting to do something new recently. My past work had been too normal. Right now, I’m on vacation. I have plenty of time, so I want to do something… something big!” said Satoshi.
“Something big! Ha! If you ask me, I’d tell you the biggest problem there is right now is Federal Reserve’s printing money all over the place,” interjected Alice, a regular at the cafe. “These selfish bastards are causing me to passively lose money every year. Getting these robbers and thieves is something big!”
“That sounds pretty anarchist to me! Not good. But it does give me the inspiration of creating a global digital cash system, with absolutely no extra increase in issue!” said Satoshi.
“Currency originates from value: no matter whether it was shells, gold, or any other thing that served as a currency in history. The first thing to becoming a currency was to have utility value. Then after a long period of public consensus, it will become a currency. The value of such system lies precisely in serving as an immutable ledger for people to use.” of course, this is a cognition that Satoshi only had after a long time.
“If you can make that happen, I will have my cafe be your first tester!” owner Bob shouted across the room.
“Good luck young man!” Alice waved his fist.
A warm current of emotion rose in Satoshi’s heart. He took out his notebook and started drawing. Bitcoin’s design just got started.
Starting with the Simplest Transaction System #
I’ll start with the simplest version and let Bob start using it. Then I will improve it as it goes. This should be a good idea!
And since it’s digital cash, we can call it ‘Bitcoin’.
The first version was made into a single-server web system. Satoshi bought a computer (the server), placed it in the cafe, connected it online, and bought a domain: www.bitcoin.org (note: at the end of the story, we will witness the domain being stolen by a scoundrel. Satoshi will have to use a new domain: www.bitcoinsv.com). Customers at the cafe could now use it through a browser! (see graph below)
Although I’m creating a digital cash system, its essence is a transaction system. Transactions are the core of a market. Cash is only a number in the passing of transactions.
If based on the conventional approach of system design, a system can be separated into the program part and the data part
The key function of the program is to execute transactions.
The key function of the data is to store transactions.
For simplicity, regular files will be used for storage (see graph below).
How to design the data part?
At least two files are needed:
1.user.txt, including username, password, and balance.
2.transaction.txt, including time, payer, payee, amount.
(see graph below)
What functions do the program part require?
If based on the conventional approach, we first need registering the user. But since users are all regulars at the cafe, we’ll do away with this step. I will manually register the account for anyone who wants to use Bitcoin, by adding a piece of information in the user.txt file.
I really want the cafe to start using it as soon as possible. Right, I must do it before Bob changes his mind.
And it must have the user registration function. Otherwise, someone named Carol could disguise as Alice to send payment to himself.
As for executing transactions, it only needs writing in the transaction and searching for the transaction. (see graph below)
Here it gets a bit tricky: every time Alice sends a payment to Bob, the program needs to find the balance of Alice in user.txt to make sure there’s sufficient balance.
If there is sufficient balance, it first needs to write the transaction information in the transaction.txt and then change the balances of Alice and Bob in user.txt.
Balance is of utmost importance in the construction of an account: it is the wealth someone has accumulated in their lifetime. It must be dealt very carefully.
A person’s wealth in the world all depends on this little number, oh! Poor little creature!
Satoshi spent an afternoon finishing up the first design of Bitcoin. He stretched out his arms and legs, turned to owner Bob and said, “It’s done! I’ll start coding tomorrow and you can start testing it this week!”
“This fast! You are heck of a genius!” Bob said, standing behind the coffee machine and fiddling with a drink in a cup. “Come, have a cup of my new coffee. This one is on me!”
“This is just a simple version, far from what I imagine ultimately,” Satoshi took the coffee and had a sip.
“Umm… what a nice feeling!”
The method of writing this book is to create a reason for Satoshi to come up with a solution.
This reason might be a bug, or an abstract concept.
Anyway, there would be no solution without a reason.
Even if the reason totally originated from my imagination, it’d still create a context.
Next chapter ：Recreating Bitcoin 2:First Version is Online!
Recreating Bitcoin:A Fictional Story of Why Bitcoin was Designed This Way
Part one : Transactions
Recreating Bitcoin 1:Start over with a Simple Web Transaction System
Recreating Bitcoin 2:First Version is Online!
Recreating Bitcoin 3:Getting Rid of the Account Model
Recreating Bitcoin 4:Digital Signature
Recreating Bitcoin 5:Public Key and Private Key
Recreating Bitcoin 6:Version 0.0.2 is Online!
Recreating Bitcoin 7:UTXO
Recreating Bitcoin 8:System Refactoring Based on UTXO
Recreating Bitcoin 9:Everything is Transaction
Recreating Bitcoin 10:Transaction Script
Part Two : Swarm System
Recreating Bitcoin 11:Swarm System (Part I)
Recreating Bitcoin 12:Swarm System (Part II)
Recreating Bitcoin 13:P2P Network
Recreating Bitcoin 14:Synchronizing Transactions
Recreating Bitcoin 15:Synchronizing Ledger
Recreating Bitcoin 16:Block chain
Recreating Bitcoin 17:Network Flexibility
Recreating Bitcoin 18:Proof of Work (Part I)
Recreating Bitcoin 19:Proof of Work (Part II)
Recreating Bitcoin 20:The Reorganization and Division of
Complete book selling at Amazon( > US > UK > CA > JP > DE > FR > ES > IT) #
©2019 - Recreating.org all rights reserved