First, what is a blockchain?
Blockchain (Blockchain) is a distributed database system (1), which is composed of nodes, which is characterized by non-alteration, non-forgery, and can be understood as the book System (Ledger). It is an important concept of Bitcoin, a copy of the complete Bitcoin blockchain, which records each transaction of its tokens (tokens). With this information, we can find the value of every address, at any point in history.
Blockchain consists of a series of data blocks generated using cryptography, each containing a hash of the previous chunk (hash), starting from the founding block (Genesis Block) and connecting to the current block, forming a block chain. Each chunk is guaranteed to occur after the previous chunk in chronological order, otherwise the hash value of the previous chunk is unknown. These characteristics make Bitcoin's double flower (double-spending) very difficult. Blockchain is the core innovation of Bitcoin.
The concept of blockchain is first mentioned in Nakamoto's bitcoin white Paper [2], but exists in the form of a proof-of-work chain (Proof-of-work chain), and the following is a description of the blockchain concept in Nakamoto:
The timestamp server implements a random hash of a set of data that exists as a block (block), adds a timestamp, and broadcasts the random hash as if it were posted on a news or World News Group Network (Usenet). Obviously, the timestamp confirms that the specific data must exist at a particular time, because only at that moment can the corresponding random hash value be obtained. Each timestamp should include the previous timestamp in its random hash value, with each subsequent timestamp being enhanced (reinforcing) by a previous timestamp, thus forming a chain (Chain).
The node always treats the longest chain as the correct chain and continues to work and extend it. If there are two nodes broadcasting different versions of the new chunks at the same time, the other nodes will have a difference when they receive the chunk. When this happens, they will work on the block that is first received, but also retain another chain to prevent the latter from becoming the longest chain. The deadlock (tie) breaks, until the next workload proof is found, and one of the chains is proven to be a longer one, then the nodes working on the other branch chain will convert the camp and start working on the longer chain.
The function of a Bitcoin wallet is dependent on the confirmation of the blockchain, and an effective check is called a confirmation. A transaction is usually performed with several confirmations. Lightweight (SPV) [3] Bitcoin wallet, where clients only need to store data related to user-discretionary transactions locally, without storing the full blockchain.
Blockchain technology is the core of many encrypted digital currencies, including Bitcoin, Ethereum, Wright coins, dog coins, and more. The way to maintain the blockchain, there is proof of work (proof-of-work), Proof of Rights (Proof-of-stake) and so on.
Second, blockchain system core advantages
The core benefits of blockchain architecture include:
- Any node can create a transaction, after a period of confirmation, it can be reasonable to confirm whether the transaction is valid, blockchain can effectively prevent the occurrence of double flower problem.
- The cost is very high for trying to rewrite or modify a transaction.
- The blockchain implements two types of records: Trading (transactions) and chunks (blocks). Trading is the actual data that is stored on the blockchain, and the chunks are the records that confirm when, and in what order, some of the transactions are part of a blockchain database. Transactions are created by the participants using the system during normal process (in the case of cryptocurrency, a transaction is created by Bob sending tokens to Alice), and chunks are created by the units we call Miners (miners).
Three, the block chain working principle 3.1 what is a chunk?
Data is permanently recorded on a digital currency network through a file called a block. They are like a stock trading ledger. New chunks are added to the end of the record (blockchain) and are difficult to modify or remove once written.
3.2. Block structure
| size |
Field |
Description |
| 4 bytes |
Chunk size |
The chunk size after the field in bytes |
| 80 bytes |
Block size |
Several fields that make up a chunk header |
| 1-9 (Variable integer) |
Trading counter |
Number of transactions |
| Variable- |
Transaction |
Transaction information recorded in the Block |
3.3 Block Head
The block size consists of three blocks of chunk metadata. The first is a set of data that refers to the hash value of the parent chunk, which is used to connect the chunk to the previous chunk in the blockchain. The second set of metadata, difficulty, timestamp, and nonce, is related to mining competition. The third set of metadata is the Merkle root [4], a data structure used to effectively summarize all transactions in a chunk.
3.4 Block Head structure
| size |
Field |
Description |
| 4 bytes |
Version |
Version number for tracking software/protocol updates |
| 32 bytes |
Parent Chunk Hash Value |
Referencing the hash value of a parent chunk in a chunk chain |
| 32 bytes |
Merkle Root |
The hash value of the Merkle root of the transaction in this chunk |
| 4 bytes |
Time stamp |
Approximate time generated by this chunk (Unix timestamp in seconds) |
| 4 bytes |
Difficulty target |
The difficulty target of the block workload proving algorithm |
| 4 bytes |
Nonce |
Counters for the workload proof algorithm |
3.4 Founding Blocks
The first chunk of the Bitcoin blockchain, created in 2009, is called the Genesis block. It is the common ancestor of all the chunks in the Bitcoin blockchain, which means that you can go back from any chunk and follow the chain, and eventually you will reach the Genesis block.
Each node "knows" the hash value of the Genesis block, the structure, the time it was created, and a transaction inside it. As a result, each node takes the chunk as the first chunk of the blockchain, thus constructing a secure, trusted root of the block chain.
In Chainparams.cpp you can see that the Genesis block is programmed into the bitcoin core client.
The hash value of the Genesis block is:
0000000000 19d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
You can search for this chunk hash, such as chunk element (Blockmeta), in any chunk browsing site, and you'll find a page that describes the chunk content with a link containing this hash value:
http://blockmeta.com/block/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
Use the Bitcoin core client on the command line:
$ bitcoindgetblock 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f{ "hash":"000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f", "confirmations":308321, "size":285, "height":0, "version":1, "merkleroot":"4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b", "tx":["4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"], "time":1231006505, "nonce":2083236893, "bits":"1d00ffff", "difficulty":1.00000000, "nextblockhash":"00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048"}
The Genesis block contains a hidden message. Include such a sentence in the input of its Coinbase transaction
"The Times 03/jan/2009 Chancellor on brink of second bailout for banks"
"The Chancellor is on the verge of a second bailout bank."
This sentence is the front page headline of the Times day, quoting this sentence, both as a description of the time of the block, and as a semi-joking reminder of the importance of an independent monetary system, while telling people that with the development of Bitcoin, an unprecedented world monetary revolution will take place. The message was embedded in the creation block by the creator of Bitcoin.
Four, blockchain fork
Honest miners only create the newest chunks on the longest effective chain. Length refers to the cumulative calculation difficulty of the blockchain, not the number of chunks. When all the blocks included in the chain and the trades are valid, and are the chains that start from the Genesis block, we are the effective blockchain that we recognize.
For any chunk in the blockchain, there is only one path to the Genesis block. However, starting from the Genesis block, there will be a bifurcation situation. When creating two chunks with a time difference of only a few seconds, a forked [5] chunk is often created. When this happens, the nodes create chunks on the block that they first receive. No matter which chunk is included in the next chunk, it will become part of the main chain because it is longer.
Chunks in a short chain (invalid chain) have little effect. When the bitcoin client switches to another longer blockchain, all active trading blocks in the short chain are added back into the sequence trading pool and are included in the next chunk. Block rewards in short chains do not appear in the longest blockchain, so they actually have a loss, which is why it takes a network to force 100 chunks of maturity time to make a presence.
In short-chain chunks, we often call it "orphan blocks" (orphans). This is because, in the long chain, this generated transaction does not have a parent block because these generated transactions are shown as orphans in the transactions in the PRC list. Some pools misunderstand this information and claim that their chunks are "orphans". In fact, these blocks have a parent block and may even have sub-systems.
Five, blockchain derivative concept 5.1 public blockchain
Public chain refers to a consensus blockchain that can be read, sent, and validated by anyone in the world. The safety of the public chain is maintained by means of the work proof mechanism (POW) or the proof of equity mechanism (POS). They exist in a combination of economic incentives and cryptographic digital verification, and follow general principles: the economic rewards that each person can derive from them are proportional to the contribution to the consensus process. These blockchain is generally considered to be "completely centralized".
5.2 Community Blockchain: (Consortium blockchains)
Community blockchain refers to the blockchain in which the consensus process is controlled by a pre-selected node; For example, 15 financial institutions comprise a community, each of which operates a node, and the confirmation of 10 of them is required to make each chunk effective. The blockchain may allow everyone to read, or only be limited to participants, or take a hybrid route, such as a chunk's root hash and its API (application interface) exposed externally, the API allows the outside world to make a limited number of queries and about the state of the blockchain. These blockchain can be thought of as "partial de-centering".
5.3 Private chain (private blockchain), also known as no token blockchain (token-less blockchain)
A fully private blockchain is a blockchain whose write permissions are only in the hands of an organization. Read permissions are either open to the outside, or are arbitrarily limited. Related applications include database management, auditing, and even a company, but in many cases, public readability is not necessary.
There is still a lot of controversy about whether a system without native tokens can be called a blockchain. Some people think that the blockchain without tokens can exist in the form of a distributed multi-version concurrency control (MVCC) database [6]. Multi-version concurrency control prevents two transactions from modifying a single column in the database, while a blockchain is a single output that blocks two transactions in the blockchain.
Vi. features of the public and private chains
The community blockchain, which combines the "low trust" of the public chain with the "single High trust" of the private chain, provides a mixed pattern, and the private chain can be more accurately described as a traditional centralized system with some degree of digital encryption and manageable (permissioned).
Features of the public chain:
- Neutral, open, and centralized;
- Cannot be changed, irrevocable;
- Have a network effect.
- High anti-censorship;
Private chain Features:
- Rules are easy to modify (trades, balances, etc.);
- Low transaction costs (transactions can only be verified by a few trusted nodes);
- Restricted Read permission;
Vii. Blockchain Development and application
Blockchain technology, the underlying technology of digital money, has attracted much attention in the financial world, including Goldman Sachs, JPMorgan Chase, HSBC, Citibank, Bank of New York Mellon, Barclays, UBS, Royal Bank of Scotland, Morgan Stanley, and many other financial institutions, all working with blockchain companies, Research the application of blockchain technology in financial market. The World Economic Forum is also bold in predicting that 10% of world GDP by 2027 will be stored on the blockchain network [7].
Currently, blockchain-related applications and companies, including but not limited to:
Notarized security: Notarial Pass (Factom), Monegraph, Stampery, Bitproof, Uproov, chronicled, Blockai;
Smart contracts: Color coins (coloredcoin), Lightning Networks (lightning-network), Side chains (Sidechain), Tendermint, chronicled, SuperNET, Blocknet, Tezos, Openchain, Crypti, Rubix, Multichain, Super Ledger (Hyperledger), the DAO (The-dao), WAVES, Synereo, WINGS;
Internet of Things: ADEPT, filament, Tilepay, slock.it (slock-it);
Authentication: Blockscore, Shocard, Launchkey, bitnation;
Forecast market: Augur, Truthcoin, Futarchy;
Asset transactions: Openledger, Medici, Setl, Symbiont, DAH, setl, small ants (antshares), SWARM, Koinify, Lighthouse, Safe Cash (Safe-cash), Tø (t0), Linq, Colu, Yuan (metaverse), Rui-chain finance (Reitschain);
E-commerce: Openbazaar, Eris, Bitxbay, Bitmarkets, Skuchain, Purse;
Social communication: Gems, Codius, Bitsin (bitmessage), Twister, Clucker, Diaspora;
File storage: MaidSafe, Enigma, Filecoin, notary Pass (Factom), Storj, Tau, Bitcloud, IPFs, Mediachain;
Data api:coinalytics, Blocktrail, Blockcypher, Tradeblock, Scorechain, Gem;
Other: Tierion, Safe Cash (Safe-cash), Bitwage, Crypti, IPFs, DECENT, Billion books (Ebookchain);
Bank settlement: R3cev;
Notes(↵returns to text)
- Blockchain in English wiki: https://en.wikipedia.org/wiki/Block_chain_ (database) ↵
- Zumbenzonbitt White Paper: Http://www.8btc.com/wiki/bitcoin-a-peer-to-peer-electronic-cash-system↵
- SPV, SPV and SPV Wallet: Http://www.8btc.com/spv_spv_node_and_spv_wallet↵
- Mastering Bitcoin: Http://8btc.com/topic-mastering-bitcoin.html↵
- Http://blockchain.hk/category/blockchain/↵
- Does the blockchain have value without tokens: Http://www.multichain.com/blog/2015/07/bitcoin-vs-blockchain-debate/↵
- World Economic Forum predicts blockchain: Http://www.coindesk.com/world-economic-forum-governments-blockchain/↵
Blockchain (Blockchain)