Detailed explanation of blockchain technology, how it works

Blockchain is the core technology of the digital cryptocurrency Bitcoin. A blockchain is a distributed database containing a record of all transactions or digital events that have been executed and shared between participating parties. Every transaction is verified by the majority of participants in the system. It contains every record for every transaction. Bitcoin is the most popular cryptocurrency and an example of blockchain. Blockchain technology first appeared in 2008, when a person or group of people called "Satoshi Nakamoto" published a white paper on "Bitcoin: A Peer-to-Peer Electronic Cash System". Blockchain technology records transactions in a digital ledger that is distributed across the network, making it impervious to corruption. Anything of value, such as land assets, cars, etc., can be recorded on the blockchain as a transaction.

How does blockchain technology work?

One well-known use of blockchain is Bitcoin. Bitcoin is a cryptocurrency used to exchange digital assets online. Bitcoin uses cryptographic proofs rather than third-party trust to allow two parties to execute transactions over the internet. Every transaction is secured with a digital signature.

Distributed database: There is no central server or system that holds blockchain data. The data is distributed across millions of computers connected to the blockchain around the world. The system allows notarization of data on each node and is publicly verifiable.

Network of Nodes: Nodes are computers connected to the blockchain network. Nodes use clients to connect to the blockchain. Clients help validate transactions and propagate them to the blockchain. When a computer is connected to the blockchain, a copy of the blockchain data is downloaded into the system, and the nodes are synchronized with the latest data blocks on the blockchain. Nodes connected to the blockchain are called miners, which help execute transactions in exchange for rewards.

Disadvantages of the current trading system:

  • Cash can only be used for small local transactions.
  • Huge wait times during transaction processing.
  • A third party is required to verify and execute transactions, which complicates the process.
  • If a central server (such as a bank) is compromised, the entire system will be affected, including participants.
  • Organizations doing the verification charge a lot for the process, making the process expensive.

Building Trust Through Blockchain:

Blockchain enhances trust across business networks. That's not to say you can't trust people who don't need to be trusted to operate on a blockchain network.

Blockchains build trust through five properties:

  • Distributed  : Every incoming transaction is shared and updated between the distributed ledger and the nodes connected to the blockchain. All of this is done in real time because there is no central server controlling the data.
  • Security  : With permissions and encryption, there is no unauthorized access to the blockchain.
  • Transparent  : Because every node or participant in the blockchain has a copy of the blockchain data, they have access to all transaction data. They can verify their identities themselves without the need for a mediator.
  • Consensus-based  : All relevant network participants must agree that a transaction is valid. This is achieved by using a consensus algorithm.
  • Flexible  : Smart contracts executed based on specific conditions can be written into the platform. Blockchain networks can evolve in tandem with business processes.

Benefits of blockchain technology:

  • Save time  : settlements do not require verification by a central authority, making the settlement process faster and cheaper.
  • Cost Savings  : Blockchain networks can reduce fees in several ways. No third-party verification is required. Participants can share assets directly. Intermediaries are reduced. Since each participant has a shared ledger, transaction workload is minimized.
  • Tighter Security  : No one can tweak blockchain data as it is shared by millions of participants. The system is safe from cybercrime and fraud.

A blockchain is nothing more than a blockchain that possesses some important properties for enabling decentralization on the Internet. Decentralization means that no one person has full authority or control over the network, but authority is distributed among the users who use it, and in the case of blockchain, between miners and users.

  • The blockchain provides immutability (in theory, it is possible to change the content, but due to the computing power required, in most cases, this is almost impossible, unless there is a bug in Ethereum, It resulted in a hard fork which created two versions of the content and thus two currencies, Ethereum and Ethereum Classic).
  • Blockchain provides transparency and trust. Blockchain is shared, so it allows the system to be transparent and everyone can verify the data present in it.
  • Blockchain is secure. Well-known and reliable blockchains use cryptographic features approved and used by cryptographic experts around the world. However, this may change as quantum computing develops.
  • Blockchain is highly available because the system is based on thousands of peers in a p2p network.

In the most basic way, we can think of the blockchain as a linked list. The next item in the list is all dependent on the previous item, with the exception of the first block (also known as the genesis block), which is hardcoded into the blockchain.

Suppose we have 10 blockchains, then the 10th block depends on the 9th block, the 9th block depends on the 8th block, and so on. So, in a way, the 10th block also depends on all previous blocks and the genesis block. So if someone tries to change the data of the 2nd block, he must also change the data of all subsequent blocks, otherwise the blockchain becomes invalid because the subsequent blocks depend on the data in the 2nd block , the second block has changed, but not the following blocks. Therefore, as blocks are added, immutability increases, and as we will see later, changing blocks is an expensive operation.

Also, to add/change blocks in the blockchain, one has to show some proof. To avoid adding a large number of blocks to the blockchain, the concept of difficulty was introduced. To add a block, we have to calculate the hash of the block. Hashes contain certain properties which make computing the hash time-consuming. For example, someone might keep it hard to have a certain number of zeros at the beginning of the hash. So by randomly changing the nonce (arbitrary data exists so that the hashed property remains constant), we have to find the hash of the block holding the property.

Difficulty is adjusted after a certain amount of time to maintain an average constant rate of mining blocks.

mined block

Mining blocks means adding blocks that exist in the blockchain network. A miner selects a set of transactions from a pool of transactions and then mines a block, or rather, calculates a hash to add the block to the network. If two or more miners are mining the same block at the same time, the more difficult block is selected otherwise known as a stale block. Mining typically rewards miners with blockchain currency.

bitcoin

Bitcoin is a cryptocurrency (a digital currency) primarily used to facilitate transactions without the need for third-party intermediaries. It all started in 2009 when a mysterious man named Satoshi Nakamoto (whose real identity is still unknown) published a paper called "Bitcoin: A Peer-to-Peer Electronic Cash System" (Bitcoin: a Peer-to-Peer Electronic Cash System) -to-Peer Electronic Cash System). Satoshi is the smallest unit of Bitcoin. The unit of Satoshi is equal to 0.00000001 Bitcoin!

The most interesting thing here is that these bitcoins are not issued by any central bank or authority. They are "mined" by a group of people known as "miners". They solve complex math problems/puzzles in exchange for a certain amount of bitcoins.

blockchain

A blockchain is a data structure or ledger that stores information about any transaction that takes place (not just Bitcoin). Anything stored once cannot be changed or modified. This feature of blockchain makes it the most secure. It is decentralized and establishes a peer-to-peer network, thus eliminating any middlemen.

A blockchain consists of blocks stored in chronological order. The average capacity of each block is about 500 transactions. These blocks are very secure due to the cryptography involved. Each block will have a unique "hash" value attached to it, calculated from the data stored in the block. Every time a new block is added to the chain, the new block also contains the hash of the previous block. Therefore, it is practically impossible (and would break the entire chain) to modify the contents of any previous block. This makes the blockchain immutable.

Some jargon involved:

  • Blockchains are immutable  : this means that once data is written into the blockchain, no one, not even system administrators, can change it. The blockchain can be changed in an append-only manner. In other words, transactions can only be added to the blockchain. Modification and deletion are not allowed.
  • Blockchain is decentralized  : this means it does not depend on a central point of control. Everything is scattered. This makes the system fair and secure.
  • Smart Contracts  : These are a set of agreements or more like a computer program, stored on a blockchain and executed when certain conditions are met.
  • Consensus Protocol  : This is a set of protocols that keeps all nodes in the network synchronized with each other. It prevents any single entity from controlling the entire blockchain system. The purpose of the consensus protocol is to guarantee the use and compliance of a single chain.
  • Hashing  : Data stored in a block is transformed into a fixed-length output by a mathematical algorithm (e.g. Bitcoin uses SHA-256). Hash values ​​are unique to the same data, and it is impossible to generate the same hash using different pieces of data.
  • Wallets  : Bitcoin wallets are like physical wallets. It contains your private key, which you can use to store/spend bitcoins on the blockchain.
  • Private Key  : It is similar to a password that we use to initiate transactions. Also, using these private keys, we can spend bitcoins from the wallet using cryptographic signatures.

Guess you like

Origin blog.csdn.net/JavaMonsterr/article/details/125638115