区块链应用技术规则有哪些,区块链应用技术规则是什么
请查看相关英文文档
1. Are there 7 core technologies for blockchain operation that you should know?
How many of the 7 core technologies for blockchain operation do you know?< br>1. Blockchain links
As the name suggests, blockchain is a chain composed of blocks. Each block is divided into two parts: block header and block body (including transaction data). The block header includes the hash (PrevHash) value (also called hash value) of the previous block used to implement block linking and the random number (nonce) used to calculate the mining difficulty. The hash value of the previous block is actually the hash value of the header of the previous block, and the rules for calculating random numbers determine which miner can obtain the power to record the block.
2. Consensus Mechanism
Blockchain was born with Bitcoin and is the basic technical architecture of Bitcoin. Blockchain can be understood as a decentralized accounting system based on the Internet. Decentralized digital currency systems like Bitcoin require blockchain to ensure the consistency of accounting by honest nodes without a central node. Therefore, the core of blockchain technology is a consensus mechanism that reaches consensus on the legality of transactions among individuals who have no basis for trust in each other without central control.
There are currently four main categories of blockchain consensus mechanisms: PoW, PoS, DPoS, and distributed consensus algorithms.
3. Unlocking scripts
Scripts are an important technology for automatic verification and automatic execution of contracts on the blockchain. Each output of each transaction does not strictly point to an address, but to a script. A script is like a set of rules that govern how the recipient can spend the assets locked on this output.
The legality verification of transactions also relies on scripts. Currently it relies on two types of scripts: locking scripts and unlocking scripts. The locking script is a condition added to the output transaction, implemented through a script language, and is located at the output of the transaction. The unlocking script corresponds to the locking script. Only if the conditions required by the locking script are met, the corresponding assets on this script can be spent, which is located at the input of the transaction. Many flexible items can be expressed through scripting language. The interpretation script is similar to a "virtual machine" in our programming field, which is distributed and runs on every node in the blockchain network.
4. Transaction Rules
Blockchain transactions are the basic units that constitute blocks, and are also the actual effective content that the blockchain is responsible for recording. A blockchain transaction can be a transfer or other transactions such as the deployment of smart contracts.
In the case of Bitcoin, a transaction refers to a payment transfer. The trading rules are as follows:
1) The input and output of the transaction cannot be empty.
2) For each input of the transaction, if its corresponding UTXO output can be found in the current transaction pool, the transaction will be rejected. Because the current transaction pool is a transaction that has not been recorded in the blockchain, and each input of the transaction should come from a confirmed UTXO. If found in the current transaction pool, it is a double spend transaction.
3) In transactionFor each input, its corresponding output must be a UTXO.
4) Each input unlocking script must work with the corresponding output locking script to verify the compliance of the transaction.
5. Transaction Priority
The priority of blockchain transactions is determined by the blockchain protocol rules. For Bitcoin, the priority of a transaction being included in a block is determined by the time it takes for the transaction to be broadcast to the network and the size of the transaction. As the time it takes for a transaction to be broadcast to the network increases and the chain age of the transaction increases, the priority of the transaction is increased and will eventually be included in the block. For Ethereum, the priority of a transaction is also related to the transaction fee that the publisher of the transaction is willing to pay. The higher the transaction fee that the publisher is willing to pay, the higher the priority of the transaction being included in the block.
6.Merkle proof
The original application of Merkle proof is the Bitcoin system (Bitcoin), which was described and created by Satoshi Nakamoto in 2009. The Bitcoin blockchain uses Merkle proofs in order to store transactions in every block. This makes the transaction unable to be tampered with and makes it easy to verify whether the transaction is included in a specific block.
7.RLP
RLP (Recursive Length Prefix, recursive length prefix encoding) is a main encoding method for object serialization in Ethereum. Its purpose is to encode any nested sequence of binary virtual data. Lu Ji
2. What are the core blockchain technologies of blockchain technology?
I don’t need to tell you what is the hottest topic on the Internet right now. Yes, it is blockchain technology, but many friends have only heard of this technology and do not have much in-depth understanding of it. So what are the blockchain technologies? Below we will bring you an introduction to the core technology of blockchain for your reference.
What are the core elements of blockchain technology?
Blockchain technology can be a public ledger (visible by anyone) or a permissioned network (visible only by those authorized), which solves supply chain challenges , because it is an immutable record that is shared among network participants and updated in real time.
Blockchain technology----data layer: designing the data structure of the ledger
Core technology 1. Block + chain:
Technically speaking, block is a data structure that records transactions. Reflects the flow of funds for a transaction. The blocks of transactions that have been reached in the system are connected together to form a main chain, and all nodes participating in the calculation record the main chain or part of the main chain.
Each block consists of a block header and a block body. The block body is only responsible for recording all transaction information in the previous period, mainly including the number of transactions and transaction details; the block header encapsulates the current version number, previous A block address, timestamp (noteRecord the time when the block was generated, accurate to the second), random number (record the value of the answer to the math question related to the block), the target hash value of the current block, the root value of the Merkle number and other information. From a structural point of view, most functions of the blockchain are implemented by the block header.
Core technology 2. Hash function:
The hash function can convert data of any length into a set of fixed-length codes through the Hash algorithm. The principle is based on a cryptographic one-way hash function. This kind of function is easy to verify, but difficult to crack. Usually, the industry uses y=hash(x) to represent it. This hash function implements operations on x to calculate a hash value y.
Commonly used hash algorithms include MD5, SHA-1, SHA-256, SHA-384 and SHA-512, etc. Taking the SHA256 algorithm as an example, inputting any string of data into SHA256 will result in a 256-bit Hash value (hash value). Its characteristics: the same data input will get the same result. As long as the input data changes slightly (for example, a 1 becomes a 0), a completely different result will be obtained, and the result cannot be predicted in advance. Forward calculation (calculating the corresponding Hash value from the data) is very easy. Reverse calculation (cracking) is extremely difficult and is considered impossible under current technological conditions.
Core technology 3. Merkle tree:
Merkle tree is a hash binary tree, which can be used to quickly verify the integrity of large-scale data. In the blockchain network, the Merkle tree is used to summarize all transaction information in a block, and ultimately generates a unified hash value of all transaction information in the block. Any change in transaction information in the block will cause Merkle tree changes.
Core technology 4. Asymmetric encryption algorithm:
Asymmetric encryption algorithm is a key secret method that requires two keys: public key and private key. The public key and the private key are a pair. If the public key is used to encrypt data, only the corresponding private key can be used to decrypt it, thereby obtaining the corresponding data value; if the private key is used to sign the data, then only the corresponding public key can be used to sign the data. In order to verify the signature, the sender of the verification information is the holder of the private key.
Because encryption and decryption use two different keys, this algorithm is called an asymmetric encryption algorithm, while symmetric encryption uses the same key in the encryption and decryption processes.
Blockchain technology----network layer: realize the decentralization of accounting nodes
Core technology 5. P2P network:
P2P network (peer-to-peer network), also known as point-to-point technology, is no Central server, Internet system that relies on user groups to exchange information. Unlike a centralized network system with a central server, each client in a peer-to-peer network acts as both a node and a server. Domestic Xunlei software uses P2P technology. The P2P network has the characteristics of decentralization and robustness.
Blockchain technology----Consensus layer: allocating the task load of accounting nodes
Core technology 6. Consensus mechanism:
The consensus mechanism is how all accounting nodes reach a consensus to determine the validity of a record. This is both a means of identification and a means of preventing tampering. There are currently four main types of consensus mechanisms: PoW, PoS, DPoS and distributed consensus algorithms.
PoW (Proof of Work, proof of work): PoW mechanism, which is like Bitcoin’s mining mechanism, miners package existing transactions that have not been recorded by the network into a block, and then continue to traverse and try to find a random number , so that the hash value of the new block plus the random number meets certain difficulty conditions. Finding a random number that meets the conditions is equivalent to determining the latest block of the blockchain, and is also equivalent to obtaining the current round of accounting rights of the blockchain. Miners broadcast blocks that meet the mining difficulty conditions in the Yuanfu network. After verifying that the block meets the mining difficulty conditions and that the transaction data in the block meets the protocol specifications, other nodes in the entire network will each Blocks are linked to their own version of the blockchain, thereby forming a network-wide consensus on the current network state.
PoS (ProofofStake, Proof of Stake): PoS mechanism requires nodes to provide proof of a certain number of tokens to obtain a distributed consensus mechanism for competing for blockchain accounting rights. If you rely solely on the token balance to determine the bookkeeper, you will inevitably make the rich win, which will lead to the centralization of bookkeeping rights and reduce the fairness of the consensus. Therefore, different PoS mechanisms use different methods to increase the amount of money based on the proof of equity. The randomness of accounting rights avoids centralization. For example, in the PeerCoin PoS mechanism, the Bitcoin with the longest chain age has a greater chance of obtaining accounting rights. NXT and Blackcoin use a formula to predict the next accounting node. The more tokens you own, the greater the probability of being selected as an accounting node. In the future, Ethereum will also switch from the current PoW mechanism to a PoS mechanism. Judging from the information currently available, Ethereum's PoS mechanism will use nodes to place bets on the next block. The winner of the bet will receive an additional Ethereum currency award. Those who do not win will be deducted Ether coins to reach consensus on the next block.
DPoS (DelegatedProof-Of-Stake, share authorization certificate): DPoS is easy to understand and is similar to the modern corporate board of directors system. The DPoS mechanism adopted by BitShares is that shareholders vote to select a certain number of witnesses. Each witness has two seconds of authority to generate blocks in order. If the witness cannot generate a block within the given time slice, The block generation authority is given to the witness corresponding to the next time slice. Shareholders can replace these witnesses at any time by voting. This design of DPoS makes the generation of blocks faster and more energy-saving.
Distributed Consistency Algorithm: Distributed Consistency Algorithm is based on traditional distributed consistency technology. Among them are Byzantine fault-tolerant algorithms that solve the Byzantine Generals problem, such as PBFT (Byzantine fault-tolerant algorithm). In addition, points to solve non-Byzantine problemsDistributed consensus algorithm (Pasox, Raft), the detailed algorithm is not explained in this article. This type of algorithm is currently a commonly used consensus mechanism in alliance chain and private chain scenarios.
Taken together, POW is suitable for public chains. If you build a private chain, it is more suitable to use POS because there is no trust problem in verification nodes; and because there are untrustworthy local nodes in the alliance chain, it is more suitable to use DPOS.
Blockchain technology----Incentive layer: Develop a "salary system" for accounting nodes
Core technology 7. Issuance mechanism and incentive mechanism:
Take Bitcoin as an example. Bitcoins are initially rewarded by the system to miners who create new blocks, and this reward is halved approximately every four years. At the beginning, miners were rewarded with 50 Bitcoins for each new block recorded, and this reward is halved approximately every four years. By analogy, by around AD 2140, newly created blocks will no longer receive rewards from the system. By then, the total number of Bitcoins will be approximately 21 million. This is the total number of Bitcoins, so it will not increase indefinitely.
Another source of incentives is transaction fees. When there are no system rewards for newly created blocks, the miners' income will change from system rewards to transaction fees. For example, when you transfer, you can specify 1% of it as a handling fee to be paid to the miner who records the block. If the output value of a transaction is less than the input value, the difference is the transaction fee, which will be added to the incentive for that block. As long as a given amount of electronic currency has entered circulation, the incentive mechanism can gradually be converted to rely entirely on transaction fees, so there is no need to issue new currency.
Blockchain technology----Contract layer: giving the ledger programmable features
Core technology 8. Smart contract:
Smart contract is a set of programmed rules and logic that respond to scenarios. Implemented by decentralized, trusted shared script code deployed on the blockchain. Normally, after the smart contract is signed by all parties, it is attached to the blockchain data in the form of program code, and is recorded in a specific block of the blockchain after being propagated through the P2P network and verified by nodes. Smart contracts encapsulate a number of predefined states and transition rules, scenarios that trigger contract execution, response actions under specific scenarios, etc. The blockchain can monitor the status of smart contracts in real time, and activate and execute the contract by checking external data sources and confirming that specific trigger conditions are met.
The above is what blockchain technologies the editor has brought to you? All content introduced to the core technology of blockchain.
3. Blockchain Information Service Management Regulations
According to the relevant laws of our country, blockchain information service providers shall adopt the regulations within ten working days from the date of providing services. The Blockchain Information Service Registration and Management Department of the State Internet Information Office handles the registration procedures.
Blockchain filing means that according to the "Blockchain Information Service Management Regulations", information services provided to the public through Internet sites, applications, etc. based on blockchain technology or systems need to be registered and filed. "Blockchain Information Service Management Regulations" issued by the National Internet InformationIt was reviewed and approved at the office affairs meeting and will come into effect on February 15, 2019.
Whether it is a public chain, a consortium chain, or a private chain, it is theoretically within the scope of registration; "information services" refer to blockchain media, market information, community and other services that are not based on blockchain technology or system operation. , does not fall within the scope of filing. Blockchain registration is only a registration of the subject’s blockchain information services and does not represent recognition of its institutions, products and services. No institution or individual may use it for any commercial purpose.
As long as they are based on blockchain technology or systems and provide information services to the public through Internet websites, applications, etc., including BaaS platforms, Yuanverse, digital collections, and NFT services, they also belong to the blockchain. Blockchain information service registration is required.
Blockchain registration process:
1. Enter the official website of the registration system, register an account, fill in the basic information, and after the registration is completed, you can log in to the registration system with your mobile phone number.
2. After logging into the filing system, the applicant should gradually fill in the application subject information, person in charge information and service information according to the system guidance, upload the materials and pictures required by the filing system, and then submit.
3. Wait for the review by the Cyberspace Administration of China and receive a reply within twenty working days.
4. After passing the office review, obtain the registration number. Blockchain information service providers that have completed archiving should display their archiving number in conspicuous locations on their Internet websites, applications, etc.
Legal basis:
"Blockchain Information Service Management Regulations"
Article 11 Blockchain information service providers shall pass the National Internet Information Office District within ten working days from the date of providing services. The blockchain information service registration management system fills in the service provider's name, service category, service form, application field, server address and other information, and performs the registration procedures.
If a blockchain information service provider changes its service items, platform URL and other matters, it shall go through the change procedures within five working days from the date of change.
If a blockchain information service provider terminates its services, it shall go through the cancellation procedures thirty working days before terminating its services and make appropriate arrangements.
Article 12 After receiving the filing materials submitted by the filing party, the national and provincial, autonomous region, and municipality Internet Information Offices shall, if the materials are complete, file the filing within twenty working days, issue a filing number, and submit the filing through the National Internet The Blockchain Information Service Registration Management System of the Information Office publishes the registration information to the public; if the materials are incomplete, the registration will not be granted, and the filing party will be notified within twenty working days and the reasons will be explained.
4. What are the technological innovations and applications of blockchain?
1. Blockchain system
As the underlying technology of Bitcoin, blockchain The system generally consists of data layer, network layer, consensus layer, incentive layer, contract layer and application layer.
1. Data layer
The data layer encapsulates the underlying data blocks and related data encryption and timestamps, etc.Basic data and basic algorithms mainly describe the physical form of the blockchain, which is the chain structure starting from the genesis block on the blockchain. It includes the block data and chain structure of the blockchain, as well as the random numbers, timestamps, public and private key data on the blocks, etc. It is the underlying data structure in the entire blockchain technology.
2. Network layer
The network layer mainly implements distributed network mechanisms through P2P technology, including P2P networking mechanisms, data dissemination mechanisms and data verification mechanisms. Therefore, in essence, the blockchain is a P2P network with an automatic networking mechanism, and nodes maintain communication by maintaining a common blockchain structure.
3. Consensus layer
The consensus layer includes consensus algorithms and consensus mechanisms. The consensus layer allows highly dispersed nodes to efficiently reach consensus on the validity of block data in a decentralized blockchain network. It is one of the core technologies of the blockchain and is also the governance mechanism of the blockchain community. There are currently dozens of consensus mechanism algorithms, including proof of work, proof of equity, proof of equity authorization, proof of burning, proof of importance, etc.
4. Incentive layer
The incentive layer mainly includes the issuance system and distribution system of economic incentives. Its function is to provide certain incentives to encourage nodes to participate in the security of the blockchain. Verification work, and incorporating economic factors into the blockchain technology system, incentivizing nodes that abide by the rules to participate in accounting, and punishing nodes that do not abide by the rules.
5. Contract layer
The contract layer mainly includes scripts, codes, algorithm mechanisms and smart contracts, and is the basis for blockchain programmability. It embeds code into the blockchain or token, and can implement customized smart contracts. When certain constraints are reached, it can be automatically executed without going through a third party, which is the basis for trustless blockchains.
6. Application layer
The application layer encapsulates various application scenarios and cases, similar to applications on computer operating systems, portals on Internet browsers, search Engine, e-mall or APP on mobile phone. It deploys blockchain technology applications on Ethereum, EOS, QTUM, etc., and implements them in real life scenarios. In the future, programmable finance and programmable society will be built on the application layer.
The data layer, network layer and consensus layer are necessary elements to build blockchain technology. Without any layer, it cannot be called blockchain technology in the true sense; the incentive layer, contract layer and The application layer is not a necessary factor for every blockchain application, and some blockchain applications do not completely include this three-layer structure.
From a business perspective, blockchain technology has its own characteristics, that is, it is sufficiently digital, it is cross-border, cross-time and space, and cross-organization. dataFlow has no boundaries, so the blockchain is distributed at the same time, it is self-organizing and decentralized.
So the origin of blockchain and the application of any new disruptive technology have always had two routes, or two methods. One way is to regard it as a tool and use it to improve the traditional business model and obtain an improvement in marginal benefits. The other is to treat it as a system to reconstruct the underlying logic of business.
There is a good example of these two application methods in the past few years. When Internet companies are promoting "Internet +", we also see many traditional business organizations saying that it is not "Internet +" but "+Internet". So where are those people who shout "+Internet" now? Some people think that the Internet is just a technology used to improve traditional things, and some Internet technologies can be added to traditional things. For example, if you use the Internet as email, you build an email system and think it is the Internet. But some people treat the Internet as a system and reconstruct the business from the bottom up. In the end, you will find that you are unemployed.
The second is decentralization. Why go to the center? Regional center technology in business has brought about business decentralization, which is an inevitable trend in history. Where is this trend? I think there are two points. One is economic globalization and entering version 2.0. Now through the Internet, it is no longer the company that is globalizing, nor the company turning itself into a multinational company, but the Internet is empowering any individual, so that it can sell its products through the Internet in a small county in China. worldwide. When economic globalization develops to personal globalization, solving point-to-point transactions and point-to-point services becomes a prominent issue. Then the real-time clearing and settlement and point-to-point transaction settlement brought by blockchain technology can just help the globalization of personal business activities.
The third is the digitalization of the economy. When data is collected to a certain extent, its circulation is basically across time and space. The demand for financial payments from commercial activities is carried with them anytime and anywhere, and it is impossible to provide scenario-based and virtualized payment settlement anytime, anywhere and on demand. Services will eventually be eliminated by technology and the market.
#BTC[超话]# #digital currency# #欧易OKEx#
5. What is blockchain technology? What exactly is blockchain and what is a block? Chain
In a narrow sense, blockchain is a chain data structure that combines data blocks in a sequential manner in chronological order, and is cryptographically guaranteed to be non-tamperable and non-tamperable. Unforgeable distributed ledger.
Broadly speaking, blockchain technology uses block chain data structures to verify and store data, uses distributed node consensus algorithms to generate and update data, and uses cryptography to ensure data transmission and access. A type of security that utilizes smart contracts composed of automated script code to program and manipulate dataA new distributed infrastructure and computing method.
[Infrastructure]
Generally speaking, the blockchain system consists of data layer, network layer, consensus layer, incentive layer, contract layer and application layer composition. Among them, the data layer encapsulates the underlying data blocks and related basic data and algorithms such as data encryption and timestamps; the network layer includes distributed networking mechanisms, data dissemination mechanisms, and data verification mechanisms; the consensus layer mainly encapsulates network nodes Various consensus algorithms; the incentive layer integrates economic factors into the blockchain technology system, mainly including the issuance mechanism and distribution mechanism of economic incentives; the contract layer mainly encapsulates various scripts, algorithms and smart contracts, and is the core of the blockchain The basis of programmable features; the application layer encapsulates various application scenarios and cases of the blockchain. In this model, the chain block structure based on timestamps, the consensus mechanism of distributed nodes, economic incentives based on consensus computing power, and flexible programmable smart contracts are the most representative innovations of blockchain technology.
Extended information:
[Blockchain core technology]
Blockchain mainly solves the trust and security issues of transactions, so it addresses this issue Four technological innovations:
1. Distributed ledger means that transaction accounting is completed by multiple nodes distributed in different places, and each node records a complete account, so they all Can participate in supervising the legality of transactions and can also jointly testify for them.
The uniqueness of blockchain’s distributed storage is mainly reflected in two aspects: First, each node of the blockchain stores complete data according to the block chain structure. Traditional distributed storage generally stores The data is divided into multiple parts for storage according to certain rules. Second, the storage of each node in the blockchain is independent and of equal status, relying on the consensus mechanism to ensure storage consistency, while traditional distributed storage generally synchronizes data to other backup nodes through the central node.
No node can record ledger data independently, thus avoiding the possibility of a single bookkeeper being controlled or bribed to record false accounts. Also because there are enough accounting nodes, theoretically, unless all nodes are destroyed, the accounts will not be lost, thus ensuring the security of the accounting data.
2. Asymmetric encryption and authorization technology. Transaction information stored on the blockchain is public, but account identity information is highly encrypted and can only be accessed with authorization from the data owner. , thus ensuring data security and personal privacy.
3. The consensus mechanism is how all accounting nodes reach a consensus to determine the validity of a record. This is both a means of identification and a means of preventing tampering. Blockchain proposes four different consensus mechanisms, which are suitable for different application scenarios and strike a balance between efficiency and security.
The consensus mechanism of the blockchain has the characteristics of "the minority obeys the majority" and "everyone is equal". Among them, "the minority obeys the majority" does not entirely refer to the number of nodes, but also to computing power,Equity count or other characteristic quantity that a computer can compare. "Everyone is equal" means that when a node meets the conditions, all nodes have the right to give priority to the consensus result, which will be directly recognized by other nodes and may eventually become the final consensus result.
4. Smart contracts. Smart contracts are based on these trustworthy and non-tamperable data and can automatically execute some predefined rules and terms. Take insurance as an example. If everyone's information (including medical information and risk occurrence information) is true and trustworthy, it will be easy to automate claims settlement in some standardized insurance products.
In the daily business of insurance companies, although transactions are not as frequent as those in the banking and securities industries, the reliance on trusted data continues unabated. Therefore, the author believes that using blockchain technology from the perspective of data management can effectively help insurance companies improve their risk management capabilities. Specifically speaking, it is mainly divided into risk management of policyholders and risk supervision of insurance companies.
Blockchain-Network
6. How to apply blockchain How to apply blockchain
1. Financial field:
Blockchain It has potentially huge application value in financial fields such as international exchange, letters of credit, equity registration and stock exchanges. The application of blockchain technology in the financial industry can eliminate the need for third-party intermediaries and achieve direct point-to-point connection, thereby greatly reducing costs and quickly completing transaction payments.
2. Internet of Things and Logistics Fields:
Blockchain can also be naturally combined in the Internet of Things and logistics fields. Through blockchain, logistics costs can be reduced, the production and delivery process of items can be traced, and the efficiency of supply chain management can be improved. This field is considered a promising application direction of blockchain.
3. Public service field:
Blockchain is closely related to people’s production and life in public management, energy, transportation and other fields. However, the centralized nature of these fields also brings some problems. Blockchain can be used chain to transform. The decentralized, fully distributed DNS service provided by the blockchain can realize domain name query and resolution through point-to-point data transmission services between various nodes in the network, and can be used to ensure that the operating system and firmware of an important infrastructure are not Tampered, you can monitor the status and integrity of the software, detect bad tampering, and ensure that the data transmitted by systems using IoT technology has not been tampered with.
4. Digital copyright field:
Through blockchain technology, works can be authenticated, proving the existence of text, video, audio and other works, and ensuring the authenticity and uniqueness of ownership. After the rights of the work are confirmed on the blockchain, subsequent transactions will be recorded in real time, realizing the full life cycle management of digital copyright and also serving as a technical guarantee in judicial evidence collection. For example, MineLabs, a startup company in New York, USA, has developed a blockchain-based metadata protocol. This system called Mediachain uses the IPFS file system to protect the copyright of digital works, mainly for digital images.Film copyright protection applications.
5. Insurance field:
In terms of insurance claims, insurance institutions are responsible for fund collection, investment, and claims settlement, and often have high management and operating costs. Through the application of smart contracts, Can Thanh Orange does not require the policy holder to apply or the insurance company to approve it. As long as the claim settlement conditions are triggered, the policy will realize automatic claim settlement. A typical application case is LenderBot, which was launched in 2016 by the blockchain company Stratumn, Deloitte and the payment service provider Lemonway. It allows people to register customized micro-insurance products through the chat function of Facebook Messenger to provide insurance services between individuals. The high-value items exchanged are insured, and the blockchain replaces the third-party role in the loan contract.
6. Public welfare field:
The data stored on the blockchain is highly reliable and cannot be tampered with, so it is naturally suitable for use in social welfare scenarios. Relevant information in the public welfare process, such as donation projects, fundraising details, fund flows, recipient feedback, etc., can be stored on the blockchain and transparently and publicly disclosed conditionally to facilitate social supervision.
7. Blockchain technology concept
Blockchain technology concept
Blockchain technology concept, nowadays, blockchain has become the In the field of concern, many companies have already studied the technology in depth, but there are still people who don’t know much about it. Below I will share an article about the concept of blockchain technology.
Blockchain technology concept 1Basic concepts and working principles of blockchain
1. Basic concepts
Blockchain is a distributed data storage, point-to-point New application models of computer technologies such as transmission, consensus mechanisms, and encryption algorithms. The so-called consensus mechanism is a mathematical algorithm that establishes trust and obtains rights and interests between different nodes in the blockchain system.
Blockchain is an important concept of Bitcoin. It is essentially a decentralized database and serves as the underlying technology of Bitcoin. The blockchain is a series of data blocks generated using cryptographic methods. Each data block contains information about a Bitcoin network transaction, which is used to verify the validity of the information, prevent counterfeiting, and generate the next block.
In a narrow sense, blockchain is a chain data structure that combines data blocks in a sequential manner in chronological order, and is cryptographically guaranteed to be non-tamperable and non-transformable. Fake distributed ledger.
Broadly speaking, blockchain technology uses block chain data structures to verify and store data, uses distributed node consensus algorithms to generate and update data, and uses cryptography to ensure data transmission and access. It is a new distributed infrastructure and computing method that uses smart contracts composed of automated script codes to program and operate data securely.
2. Working principle
The blockchain system consists of data layer, network layer, consensus layer, incentive layer, contract layer and application layer. Among them, the data layer encapsulates the underlying data blocks and related basic data and algorithms such as data encryption and timestamps; the network layer includes distributed networking mechanisms, data dissemination mechanisms, and data verification mechanisms; the consensus layer mainly encapsulates network nodes Various consensus algorithms; the incentive layer integrates economic factors into the blockchain technology system, mainly including the issuance mechanism and distribution mechanism of economic incentives; the contract layer mainly encapsulates various scripts, algorithms and smart contracts, and is the core of the blockchain The basis of programmable features; the application layer encapsulates various application scenarios and cases of the blockchain. In this model, the chain block structure based on timestamps, the consensus mechanism of distributed nodes, economic incentives based on consensus computing power, and flexible programmable smart contracts are the most representative innovations of blockchain technology.
Blockchain mainly solves the trust and security issues of transactions, so it proposes four technological innovations to address this issue:
1. Distributed The ledger means that transaction accounting is completed by multiple nodes distributed in different places, and each node records a complete account, so they can all participate in supervising the legality of the transaction and can also jointly testify for it.
Different from traditional distributed storage, the uniqueness of blockchain distributed storage is mainly reflected in two aspects: First, each node of the blockchain stores complete data according to the block chain structure. For data, traditional distributed storage generally divides the data into multiple parts for storage according to certain rules. Second, the storage of each node in the blockchain is independent and of equal status, relying on the consensus mechanism to ensure storage consistency, while traditional distributed storage generally synchronizes data to other backup nodes through the central node. [8]
No node can record ledger data independently, thus avoiding the possibility of a single bookkeeper being controlled or bribed to record false accounts. Also because there are enough accounting nodes, theoretically, unless all nodes are destroyed, the accounts will not be lost, thus ensuring the security of the accounting data.
2. Asymmetric encryption and authorization technology. Transaction information stored on the blockchain is public, but account identity information is highly encrypted and can only be accessed with authorization from the data owner. , thus ensuring data security and personal privacy.
3. The consensus mechanism is how all accounting nodes reach a consensus to determine the validity of a record. This is both a means of identification and a means of preventing tampering. Blockchain proposes four different consensus mechanisms, which are suitable for different application scenarios and strike a balance between efficiency and security.
The consensus mechanism of the blockchain has the characteristics of "the minority obeys the majority" and "everyone is equal". "The minority obeys the majority" does not entirely refer to the number of nodes, but can also be the computing power and the number of shares. Or other characteristic quantities that the computer can compare."Everyone is equal" means that when a node meets the conditions, all nodes have the right to give priority to the consensus result, which will be directly recognized by other nodes and may eventually become the final consensus result. Taking Bitcoin as an example, it uses proof of work. Only when more than 51% of the accounting nodes in the entire network are controlled, it is possible to forge a non-existent record. When there are enough nodes joining the blockchain, this is basically impossible, thus eliminating the possibility of fraud.
4. Smart contracts. Smart contracts are based on these trustworthy and non-tamperable data. Some predefined rules and terms can be automatically executed. Take insurance as an example. If everyone's information, including medical information and risk occurrence information, is true and trustworthy, it will be easy to implement automated claims settlement in some standardized insurance products.
3. Others
The Internet exchanges information, and the blockchain exchanges value. Human history and the history of the Internet can be understood in eight words: if they are divided for a long time, they must be combined. For a long time, they must be combined. In the era of long-term separation, all network information is scattered on the Internet. It is very difficult for everyone to mine information. At this time, platforms such as Google and Facebook will appear. , the only thing it does is recombine all our information. In the Internet era, what the monopoly giants reorganize is information, rather than generating their own information. The information generated is entirely our own. Once the information is reorganized, a new monopoly giant will emerge, so it will be an era of long-lasting separation. Now, due to the emergence of blockchain technology, it has entered an era of long-term integration and inevitable division. It is a new multi-centralization. After the new multi-centralization, new value will be generated. These data will be in our own hands, and personal data will generate value. It belongs to oneself. This is the most exciting era of this era.
What is the value of blockchain? A low-cost mechanism to establish trust, establish data rights, and resolve data property rights.
At present, blockchain technology continues to develop, including the current development of single chains to multi-chains, and the technology can be further expanded. I think there may still be disruptions in the future, especially in transactions and other aspects. , especially many disruptive scenarios for existing industries.
The essence of blockchain is to establish trusted information exchange on untrustworthy networks.
One Belt, One Road + One Chain. The bigger thing about blockchain is not to create trust, but to allow trust to be transmitted losslessly, reducing the friction cost of society as a whole, thereby improving the overall efficiency.
The blockchain itself is still in its initial stage, so it includes the information transmission and encryption of the blockchain. Quantum encryption and other encryption appear in this process, which actually attacks the encryption algorithm used by the blockchain itself. This phenomenon also occurs from time to time. Including blockchain is also a recognition of assets, a recognition of digital assets, but now many of us use cryptographic algorithms, or as the key for us to decrypt, but if you forget the password, it is very likely that your current assets will be lost. Lost, you cannot get back your original assets, so it should be said that there are still some hidden dangers in asset management, including information transmission and some security. Of course, from a technical perspective, the processing speed of our blockchain itself, or its scalability, is because from the perspective of the working mechanism, the entire ledger must be copied to all participants, so in the blockchain Its operational efficiency and scalability are still relatively limited. We feel that these still need further development in terms of technology.
The underlying technologies of the blockchain platform also form blockchain wallets, blockchain browsers, node elections, mining machines, mining pools, development components, development modules, technical communities and project communities. and a series of ecosystems. The perfection of these ecosystems directly determines the efficiency and effectiveness of the underlying platform of the blockchain.
4. Mundell’s Impossible Triangle
It is impossible to achieve the ultimate in decentralization, efficiency, and security at the same time.
Blockchain technology concept 2The essence of blockchain is a distributed accounting technology, as opposed to centralized accounting technology, which is widely used in our current lives. exist. Blockchain is a new application model of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
Blockchain is an important concept of Bitcoin. It is essentially a decentralized database. At the same time, as the underlying technology of Bitcoin, it is a series of related cryptographic methods. Each data block contains a batch of Bitcoin network transaction information, which is used to verify the validity and anti-counterfeiting of the information and generate the next block.
In a narrow sense, blockchain is a chain data structure that combines data blocks in a sequential manner in chronological order, and is cryptographically guaranteed to be non-tamperable and non-transformable. Fake distributed ledger.
Broadly speaking, blockchain technology uses block chain data structures to verify and store data, uses distributed node consensus algorithms to generate and update data, and uses cryptography to ensure data transmission and access. It is a new distributed infrastructure and computing method that uses smart contracts composed of automated script codes to program and operate data securely.
The popular understanding of blockchain technology is: connecting the front, back, left and right blocks of "things" into a chain using one technology, but each block The original data of the block cannot be tampered with. It is a "linked module" technology in the field of Internet of Things that allows participants to trust. The application of blockchain technology is inseparable from the Internet and the Internet of Things. It is based on the integration and interaction of the two, but allows participants to remain independent, decentralized, and work together. With this set of value chain co-construction and sharing, technology.
Characteristics of blockchain: decentralization, openness, autonomy, information cannot be tampered with, and anonymity.
Blockchain is a network that can deliver value. The demand for a network that can deliver value is an important reason for the emergence of blockchain technology. Blockchain emerged driven by the need to protect information with ownership or other value. Through public and private key cryptography, distributed storage and other technical means, the blockchain ensures on the one hand the efficient transmission of valuable information, and on the other hand ensures that this information will not be easily copied and tampered with during the transmission process.
Understand the connotation of blockchain from the inevitability of its birth. Blockchain is a distributed accounting technology that solves the shortcomings of centralized accounting and solves the problem of distributed consistency. It is also a The connected Internet is upgraded to a value network that ensures the safe and efficient transmission of valuable information.
Blockchain Technology Concept 3Blockchain: Blockchain is like a globally unique account book, or database, which records the history of all transactions in the network.
Ethereum Virtual Machine (EVM): It allows you to write more powerful programs on Ethereum and script programs on Bitcoin. It is also sometimes used to refer to the Ethereum blockchain, which is responsible for executing smart contracts and everything.
Node: You can run a node to read and write to the Ethereum blockchain, that is, using the Ethereum Virtual Machine. Full nodes require downloading the entire blockchain. Light nodes are still under development.
Miner: Mining, that is, the node that processes blocks on the blockchain. You can see some of the currently active Ethereum miners on this page: stats.ethdev.com.
Proof of Work: Miners are always competing to solve some mathematical problem. The first one to solve the problem (calculate the next block) will be rewarded with Ether coins. All nodes then update their own blockchain. All miners who want to figure out the next block have an incentive to stay in sync with other nodes and maintain the same blockchain, so the entire network can always reach consensus. (Note: Ethereum is planning to move to a proof-of-stake system (POS) without miners, but that is beyond the scope of this article.)
Ethereum: Abbreviation ETH. A true digital currency that you can buy and use. Here is a chart from one of the exchanges where you can trade Ethereum. At the time of writing, 1 Ether is worth 65 cents.
Gas: Executing programs and saving data on Ethereum consumes a certain amount of Ethereum. Gas is converted from Ethereum. This mechanism is used to ensure efficiency.
DApp: The Ethereum community calls applications based on smart contracts decentralized applications (Decentralized App). The goal of a DApp is (or should be) to have a friendly interface for your smart contracts, plus some extras, such as IPFS, a decentralized network that can store and read data, not from Ethereumteam but with a similar spirit). DApp can run on a centralized server that can interact with Ethereum nodes, or it can run on any Ethereum equal node. (Take a minute to think about this: Unlike ordinary websites, DApps cannot run on ordinary servers. They need to submit transactions to the blockchain and read important data from the blockchain rather than a centralized database. Compared to typical users When logging into the system, the user may be represented as a wallet address and other user data is stored locally. Many things will be structured differently from current web applications.)
Ethereum client, smart contract language
p>Writing and deploying smart contracts does not require you to run an Ethereum node. Browser-based IDEs and APIs are listed below. But if you are just learning, you should still run an Ethereum node to understand the basic components, and running a node is not difficult.
Clients available for running Ethereum nodes
Ethereum has many client implementations in different languages, that is, multiple methods of interacting with the Ethereum network, , including C++, Go, Python, Java, Haskell, etc. Why do we need so many implementations? Different implementations can meet different needs. For example, the goal of Haskell implementation is to be mathematically verifiable, to make Ethereum more secure, and to enrich the entire ecosystem.
At the time of writing this article, I am using the client geth (go-ethereum) implemented in the Go language. At other times, I also use a tool called testrpc, which uses the Python client pyethereum. Later examples will use these tools.
About mining: Mining is fun, a bit like caring for your houseplant, but also a way to learn about the entire system. Although the current price of Ethereum may not even cover the electricity bill, who knows in the future. People are creating many cool DApps that may make Ethereum more and more popular.
Interactive console: Once the client is running, you can synchronize the blockchain, create a wallet, and send and receive Ethereum. One way to use geth is through the Javascript console. In addition, you can use cURL-like commands to interact with the client through JSON RPC. The goal of this article is to take you through the process of DApp development, so I won’t go into details about this. But we should remember that these command line tools are useful for debugging, configuring nodes, and using wallets.
Running the node on the test network: If you run the geth client on the official network, it will take quite a while to download the entire blockchain and synchronize with the network. You can determine if synchronization has occurred by comparing the last block number printed in the node logs with the latest block listed on stats.ethdev.com. ) OtherOne problem is that running smart contracts on the official network requires actual Ethereum. Running the node on the test network does not have this problem. At this time, there is no need to synchronize the entire blockchain. Just create your own private chain, which saves time for development.
Testrpc: Use geth to create a test network. Another faster way to create a test network is to use testrpc. Testrpc can help you create a bunch of test accounts with funds at startup. It also runs faster and is therefore better suited for development and testing. You can start with testrpc, and then as the contract slowly takes shape, move to the test network created by geth - the startup method is very simple, you only need to specify a networkid: geth --networkid "12345". Here is the code repository for testrpc, we will talk about it again below.
Next, let’s talk about the available programming languages, and then we can start the real programming. Solidity is the programming language used to write smart contracts.
There are several languages to choose from for writing smart contracts: Solidity, which is somewhat similar to Javascript, has a file extension of .sol. Serpent, which is similar to Python, has a file name ending in .se. There is also a Lisp-like LLL. Serpent has been popular for a while, but now the most popular and stable one is Solidity, so just use Solidity. I heard you like Python? Use Solidity.
solc compiler: After writing the smart contract with Solidity, you need to use solc to compile it. It is a component from a C++ client implementation. Again, different implementations complement each other. Here is how to install it. If you don't want to install solc, you can also use a browser-based compiler, such as Solidity real-time compiler or Cosmo. The programming sections below will assume you have solc installed.
web3.js API. After the Solidity contract is compiled and sent to the network, you can use Ethereum's web3.js JavaScript API to call it and build web applications that can interact with it.