What exactly is blockchain?

Welcome to Tencent Cloud + Community to get more Tencent's massive technical practice dry goods~

Translator: ArrayZoneYour, this member is from Cloud+Community Translation Agency

Original link: https://www.investinblockchain.com/what-exactly-is-blockchain/

Original author: Matt Bourke

If I tell you:

Blockchain does not exist.

Or blockchain has two completely different meanings.

Or, blockchain is another name for three completely different things.

don't think so? Hear me out. Blockchain is a very inefficient database, known as one of the technologies necessary for the functioning of the jigsaw puzzle in Bitcoin. Bitcoin technology is based on "blockchain" technology, not blockchain technology is based on Bitcoin technology. "Blockchain technology" is very different from the concept of "A Blockchain" or "The Blockchain". Confused? From a technical point of view, these different terms have subtle differences. In this article, you'll learn what each term really means and gain a solid understanding of how blockchain works.

Let's start with "Blockchain Technology"

Blockchain technology is actually a decentralized trustless network that utilizes local assets, decentralized ledgers and some algorithms based on game theory models to bring each party in the network to a consensus.

What is "A Blockchain"?

Suppose you now have an Excel spreadsheet where each row contains several columns of data, one of which contains "transaction information".

Now, if a particular column in each row contains all the data for that row plus the unique fingerprint (a new hash value ) corresponding to the hash value passed in the previous row, then the rows are concatenated in order. Forms a " hash chain ".

An instance of a hash chain. All data has a unique hash value, just like a fingerprint, modifying any one of them will break the chain

Users can use software to detect these hashes. The software can judge the validity of each hash value through the calculation method of the hash chain. Once an invalid hash value appears, the user can know that someone later (after the hash chain was created) forged a row of data.

Hash chains can be very useful, but there are no exciting features. Why do we talk about hash chains, and what is the connection between hash chains and "one blockchain"?

Going a step further, expand the rows in the spreadsheet above into multiple spreadsheets, each filled with transaction information. We call the transaction information combined in this way a "transaction block".

If you create a hash value of all the data in one spreadsheet, and then create a hash value of all the data in that table in another spreadsheet, we can calculate it by combining the hash values ​​of the two tables in the above way new hash value. Concatenate them like the image below and you have a chain of spreadsheets.

Remember: since these tables contain a block of transactions, they make up a simple and efficient blockchain.

So what does "blockchain" mean?

Originally, "blockchain" was a technology that seemed disruptive to large modern corporations, even without the disruptive-sounding names of "cryptocurrency" or "distributed ledger."

Now, you may often hear someone grab the attention of investors by saying, "We're doing blockchain." The concept of "blockchain" has also been widely spread, at this time the concept basically refers to "a computer network built around the concept of a decentralized ledger".

We've even seen "blockchains" built without "one blockchain", instead using other storage technologies such as DAGs (Directed Acyclic Graphs).

When many incumbents refer to "blockchain," they really mean "a shared database that is only shared with people we trust." This is not new, distributed databases have been around for at least a decade when Bitcoin came along.

What is the charm of "blockchain"?

The real charm of blockchain is not in the technology of data storage, but in how to make all untrusted users in the network reach a consensus.

For example, through a "blockchain", everyone can recognize that Alice paid and only paid Bob. Her transaction information proves that she did not pay the double amount. (Example: Alice paid both Bob and John $5 at exactly the same exact time).

The double-spending problem was the major breakthrough that Bitcoin has achieved.

Transaction information will be stored in "one blockchain" bound to the network. Any user on the network can download a copy of the blockchain (if they choose to do so), and then run the software to verify the transaction information added to the network.

The software will reject any form of double-spending attempt. If the transaction is valid, the software will update the ownership of bitcoin (or other assets) on the blockchain.

When users use the "blockchain" to transact, their software actually does the following:

The software (the user's wallet) creates a script. This script is written in a computer language that all computers can process and test. This script is signed with a private key that users of the network can use to prove their ownership of a blockchain.

Once ownership is proven with a digital signature, the network can continue processing script content. Take the scenario mentioned above as the simplest script example - "Alice pays Bob five dollars", at this time the computer in the network will verify the authenticity of Alice's transaction entry, if the transaction is valid, the entire network will agree to update the information, Alice will decrease by $5 and Bob's account will increase by $5.

Once ownership has been proved using a digital signature, the network can continue processing the script. The simplest script would simply say "Give Alice $5". Computers on the network will then verify that Alice has an entry in the blockchain; if valid, the entire network will agree to update Alice's account by $5, and Bob's account by $5.

Here's another interesting phenomenon: a common misconception is that "Bitcoin doesn't offer contracts". Actually provided! A script is a contract. When you hear the term "smart contract", realize that this is a marketing term for transaction scripts.

The key problem with "blockchain" is the double-spending problem - the process I explained above does not solve this problem.

What if two computers around the world receive different scripts from Alice at the same time? One script said: "Give Bob five dollars", another script said: "Give Susan five dollars" - how does the network reach consensus?

You see, the charm of "blockchain" is not "blockchain", but proof of work.

Proof-of-work is a computer algorithm that blockchain networks use to ensure the decentralization of the network, and it also prevents computers in the network from constructing historical information on their own.

A simple way to understand proof of work is given below:

Imagine a lottery system running on the network, and every few minutes the network randomly selects a computer as the winner. At this point the network will say, "This computer is a winner!"

The network then says to the winning computer: "Give all other computers your latest valid transaction block and winning ticket. If you can prove that you have a winning ticket, all other computers will check that the transaction block you provided contains only valid The transaction information. If it does, we will update our blockchain to get your newly created block, and you will get your reward accordingly.”

This is cryptocurrency mining simplified. By allowing only one user to contribute a block of transactions, we can ensure that only a single record of Alice's double-spend attempt goes into the block of transactions.

At this time, if different computers are building different transaction blocks, that is, Alice currently has a double-spending transaction passed in the network, Alice can only spend a sum of money in the end. This is because updates to their replicas are done based on the most recent block provided before, and subsequent updates ignore any blocks that do not match the latest replica.

Now everyone has an up-to-date copy of the blockchain, and any new blocks created after that must be hash-linked on top of the current blockchain.

What is "The Blockchain"?

Generally speaking, this term is often used to represent the first blockchain - the Bitcoin blockchain. However, in the current marketing environment, its concept has been very vague.

Q&A

Blockchain Topics - What is Blockchain?

Related Reading

What is blockchain?

Concise Blockchain Principles

How to learn blockchain technology

This article has been authorized by the author to push Tencent Cloud + community, please indicate the source of the article when reprinting

 Original link: https://cloud.tencent.com/developer/article/1055228

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324526475&siteId=291194637