Chapter 187: Old Classmate

To enter a P2P network, in order to protect your bitcoins from being taken by others, you must need a password.

And the Bitcoin cipher is pretty powerful.

Each person will have a randomly generated number first, which is between 0 and 2 to the 256th power, and it may appear more than the number of atoms in the whole universe, so no matter how top hackers are, it is impossible to decipher it, and the security is extremely high.

Next up is a base58 base algorithm.

What is called 58 base, for example, binary is 0 and 1, decimal is 1 to 10, and hexadecimal is based on the decimal system with six letters from A to F.

The base 58 system contains numbers, lowercase letters, and uppercase letters.

This algorithm turns the aforementioned random number into a string, which looks similar to the "mystery code", but is much more complicated.

The final string is your private key, which is your "account password"

Since you have a password, you still have to have an account, and on the basis of the private key, a public key is calculated through an elliptic curve ECPOINT algorithm, which is your account.

Finally, on the basis of the public key, a relatively short string is calculated as your address by algorithm, and you can start trading.

If you need to receive money, tell the other party the address, and if you want to pay, you need to tell someone your public key and address, where the public key is used to check whether the address is yours.

It is impossible to deduce the private key from the public key, the number is too large.

"It's true that the safer the transaction, the more complicated it is." After listening to the core mechanism of Bitcoin, Wu Bin sighed with emotion, and then asked: "Then how to solve the inflation problem?" ”

"Simple." Li Yan snapped his fingers, "The number of bitcoins is limited, and this mechanism that controls the speed and quantity of his issuance is the so-called mining." ”

"A specific algorithm?" Wu Bin asked.

"Well, almost, since there are a lot of transactions, someone has to sort out the account book, and in Bitcoin, this account book is called the blockchain, where each block corresponds to a bill, and any transaction information and transfer records are recorded in this blockchain."

"Every once in time, the Bitcoin system will generate a random code on the system node, and all the computers in the Internet can go to find this code, and whoever finds this code will produce a block, and then get a bitcoin, this process is often called mining."

Speaking of this, Li Yan knocked on the graphics card configuration on Wu Bin's computer screen and said, "And this algorithm is where the graphics card is used." ”

"The version number of this block, the hash value of the previous block, the transaction address, the time of the update, and the current difficulty are combined with a random number X to perform the sha256 function, and the sha256 function can encrypt any string to get a 64-bit hexadecimal number."

"If the final number is less than the given target value, it is a success, and one bitcoin will be awarded."

"Oh yes, this mined bitcoin is not the same '1' as the kind of bitcoin you heard that can sell for thousands of dollars a single one, this bitcoin is based on the current data structure, which is split into 8 small digits."

"So it's 0.00000001?" Wu Bin thought about it and said.

Li Yan nodded: "Yes, it is estimated that by 2140, 21 million bitcoins will be issued, a veritable mountain of gold, a mountain of gold that everyone can dig." After speaking, Li Yan suddenly shook his head: "It's a pity, this was originally a very interesting math problem, but now it has been monopolized by the mine, and the 'decentralization', 'equality of everyone' and 'computing democracy' imagined by the founder have become bubbles." ”

After recalling, Wu Bin silently uninstalled Bitcoin Miner, originally thinking about whether he could research a better algorithm to calculate the results faster.

However, in the end, he found that the so-called mining algorithm, which sounds extremely complicated, is actually just guessing numbers, fixed and simple, and there is nothing that can be improved.

There is only one way to achieve this so-called "mining" game, and that is to find the hardware that executes the algorithm the most times per unit of time, and similarly, it is very easy to cheat in this seemingly fair game, and that is that whoever has more such hardware is most likely to win the game first.

Back in the day, when Bitcoin was first born, everyone could indeed mine with the CPU of a home computer.

It's a pity that as long as it's a profitable thing, someone must come up with a cheat.

In 2010, a hardware engineer discovered that AMD's GPU chips had a specific computing component that could speed up the critical step of guessing numbers.

As a result, the "GPU miner" assembled by multiple GPUs quickly eliminated the ordinary computer miner, which is why the graphics card is different from other computer hardware in those years, and the price often rises instead of falling, and it is still out of stock.

Later, there were more terrifying FPGA mining machines, which further eliminated unnecessary image computing hardware units in the GPU, so that the efficiency of "mining" was greatly improved again.

In the end, the mining farm with 20,000 "mining machines" joined the "game", announcing the complete end of the era of individual players.

"Alas~ Sure enough, you have to take the lead in everything, and everyone knows about it, so you can't play those rich brothers."

Seeing that Bitcoin Miner was successfully uninstalled, Wu Bin sighed and continued to write his code silently.

In the rest of the winter vacation, Wu Bin would often take a few books to the park and sit with the cats for an afternoon, sometimes Fang Qing came, and the two just nodded and smiled at each other, and then he read the book, she drew cats, and occasionally ...... I also draw people.

During the Chinese New Year, under the organization of Gu Fan, the study group established by Wu Bin in the third class was allowed to go to the teachers' homes to pay New Year's greetings.

At the bus stop on Shangbei Road, Gu Fan, who was wearing a ski shirt, saw Wu Bin standing next to the station reading from a distance, shook his head, sighed "It hasn't changed", and ran over.

"Happy New Year, Crazy Wu."

Gu Fan, who slapped Wu Bin hard from behind, said hello.

Wu Bin, who was stumbling after being patted, didn't fight back, stood firm, shook his head, looked at Gu Fan and said, "Childish." ”

This made Gu Fan, who had figured out how to defend against Wu Bin's counterattack, a little embarrassed, as if Wu Bin had become a mature college student, and he was still a hairy child in high school.

And just when Gu Fan was embarrassed and didn't know how to answer the next sentence, the book in Wu Bin's hand smashed on his head.

"Happy New Year, scumbag Gu."

"Poof, okay, pretend to be deep with me, right?" Wu Bin, who reacted immediately, locked Wu Bin's neck.

As the two were fighting, another familiar voice came to their ears.

"You're all college students, can you not be so embarrassed on the street."

The two looked back and saw that it was Xu Hao, and there was a girl next to him who they were also very familiar with.

PS: It's not cool...... There are a lot of things to deal with these days, but I don't have time, but now I've done it and I'm back to stable updates.

PS2: Actually, there are a lot of interesting statements about Bitcoin mining farms, and if there are any students who are interested, I will find an opportunity to write about them later.