Position: Home page » Blockchain » Blockchain development code learning 6
Blockchain development code learning 6
Publish: 2021-05-28 01:53:27
1. Go full stack + blockchain course:
a total of 22 weeks, divided into five stages,
the first stage is 4 weeks, go language foundation and network concurrency, learning the introctory go language,
the second stage is 4 weeks, go language practical web development, crawler development, cryptography, consensus algorithm, realizing lightweight public chain, learning the website and crawler that can develop golang, Achieve lightweight blockchain
stage 3, 4-week Ethereum source code analysis and smart contract DAPP development, master Ethereum core and smart contract development, as well as blockchain,
stage 4, 4-week super ledger, bitcoin EOS, source code analysis and smart contract practice, master super ledger development, cat bitcoin, bifurcated EOS after learning, As well as DAPP development of smart contract
phase 5, 6-week project practice, five enterprise level projects, and one year of blockchain project experience after learning
from the characteristics of the language itself, go is a very efficient language, which highly supports concurrency. Go language itself pays more attention to distributed system, and concurrency processing is relatively good, such as advertising and search, That kind of high concurrency server
go language advantages:
excellent performance, can be directly compiled into machine code, does not rely on other libraries, go is extremely fast. Its performance is similar to Java or C + +
concurrency is supported at the language level, which is the biggest feature of go. It is born to support concurrency, and go is the concurrency supported in gene, which can make full use of multi-core and make it easy to use concurrency
the built-in runtime supports garbage collection, which is one of the features of dynamic language. Although GC is not perfect at present, it is enough to cope with most of the situations we can encounter, especially GC after go1.1
it's easy to learn. The authors of go language all have the gene of C, so go naturally has the gene of C. There are 25 go keywords, but the expressive ability is very strong. It almost supports most of the features you've seen in other languages: inheritance, overloading, object, etc
rich standard libraries, go has built a large number of libraries, especially the network library, which is also my favorite part< As like as two peas, br / > built-in powerful tools, Go language is built with many tools chain, the best should be gofmt tools, automatic formatting code, make team review become so simple, code format is exactly the same, it is very difficult to think differently.
cross platform compilation and fast compilation. Compared with the sluggish compilation speed of Java and C + +, the fast compilation time of go is a major efficiency advantage
disadvantages of go language:
package management: package management of go language is absolutely not perfect. By default, it has no way to make a specific version of the dependency library, nor can it create replicable builds. In contrast, python, node and Ruby all have better package management systems. However, with the right tools, the package management of go language can also perform well
lack of development framework: go language does not have a major framework, such as Ruby's rails framework, Python's Django framework or PHP's laravel. This is a heated discussion in the go language community, because many people think that we should not start with using frameworks. This is true in many cases, but if you just want to build a simple crud API, it's much easier to use Django / djrf, rails laravel, or Phoenix
exception handling: go language can help developers deal with compilation errors by simply returning errors (or call stack) through functions and expected calling codes. Although this method is effective, it is easy to lose the scope of the error, so it is difficult to provide meaningful error information to users. Error package can solve this problem by allowing us to add context and stack trace to return error
another problem is that we may forget to handle errors. Static analysis tools such as errcheck and megacheck can avoid these errors. Although these solutions are very effective, they may not be the right way.
a total of 22 weeks, divided into five stages,
the first stage is 4 weeks, go language foundation and network concurrency, learning the introctory go language,
the second stage is 4 weeks, go language practical web development, crawler development, cryptography, consensus algorithm, realizing lightweight public chain, learning the website and crawler that can develop golang, Achieve lightweight blockchain
stage 3, 4-week Ethereum source code analysis and smart contract DAPP development, master Ethereum core and smart contract development, as well as blockchain,
stage 4, 4-week super ledger, bitcoin EOS, source code analysis and smart contract practice, master super ledger development, cat bitcoin, bifurcated EOS after learning, As well as DAPP development of smart contract
phase 5, 6-week project practice, five enterprise level projects, and one year of blockchain project experience after learning
from the characteristics of the language itself, go is a very efficient language, which highly supports concurrency. Go language itself pays more attention to distributed system, and concurrency processing is relatively good, such as advertising and search, That kind of high concurrency server
go language advantages:
excellent performance, can be directly compiled into machine code, does not rely on other libraries, go is extremely fast. Its performance is similar to Java or C + +
concurrency is supported at the language level, which is the biggest feature of go. It is born to support concurrency, and go is the concurrency supported in gene, which can make full use of multi-core and make it easy to use concurrency
the built-in runtime supports garbage collection, which is one of the features of dynamic language. Although GC is not perfect at present, it is enough to cope with most of the situations we can encounter, especially GC after go1.1
it's easy to learn. The authors of go language all have the gene of C, so go naturally has the gene of C. There are 25 go keywords, but the expressive ability is very strong. It almost supports most of the features you've seen in other languages: inheritance, overloading, object, etc
rich standard libraries, go has built a large number of libraries, especially the network library, which is also my favorite part< As like as two peas, br / > built-in powerful tools, Go language is built with many tools chain, the best should be gofmt tools, automatic formatting code, make team review become so simple, code format is exactly the same, it is very difficult to think differently.
cross platform compilation and fast compilation. Compared with the sluggish compilation speed of Java and C + +, the fast compilation time of go is a major efficiency advantage
disadvantages of go language:
package management: package management of go language is absolutely not perfect. By default, it has no way to make a specific version of the dependency library, nor can it create replicable builds. In contrast, python, node and Ruby all have better package management systems. However, with the right tools, the package management of go language can also perform well
lack of development framework: go language does not have a major framework, such as Ruby's rails framework, Python's Django framework or PHP's laravel. This is a heated discussion in the go language community, because many people think that we should not start with using frameworks. This is true in many cases, but if you just want to build a simple crud API, it's much easier to use Django / djrf, rails laravel, or Phoenix
exception handling: go language can help developers deal with compilation errors by simply returning errors (or call stack) through functions and expected calling codes. Although this method is effective, it is easy to lose the scope of the error, so it is difficult to provide meaningful error information to users. Error package can solve this problem by allowing us to add context and stack trace to return error
another problem is that we may forget to handle errors. Static analysis tools such as errcheck and megacheck can avoid these errors. Although these solutions are very effective, they may not be the right way.
2. Do you want to learn blockchain development technology or just want to know what blockchain is? If it is the former, you can look at the code of other blockchain projects and learn about it first. If it is the latter, we can pay attention to some good blockchain we media. Blockchain is an emerging instry. There is no ready-made training course. It depends on self exploration and understanding.
3. There are six hierarchical structures in the blockchain, which are from bottom to top: data layer, network layer, consensus layer, incentive layer, contract layer and application layer
1. Data layer
the data layer is the lowest layer in the six hierarchies of the blockchain. We can understand the data layer as a database, but for the blockchain, this database is a tamperable and distributed database, which is what we call "distributed ledger"
in the data layer, that is, the "distributed ledger", the data information on the blockchain is stored, and the blockchain structure, asymmetric encryption technology, hash algorithm and other technical means of the block are encapsulated to ensure the security of the data in the case of the whole network being open. The specific method is:
in the blockchain network, nodes use consensus algorithm to maintain the consistency of data layer (that is, the distributed database), and use asymmetric encryption and hash algorithm in cryptography to ensure the non usurpation and traceability of the distributed database
This constitutes the bottom data structure of blockchain technology. However, it is not enough to have a distributed database. We also need to let the data information in the database be shared and exchanged. Next, we will introce the upper layer of the data layer - the network layer
Second, network layer
the network system of blockchain is essentially a P2P (point-to-point) network. Point to point means that there is no need for an intermediate link or centralized server to control the system. All resources and services in the network are distributed in the hands of each node, and the transmission of information is also a direct communication between the two nodes. However, it should be noted that P2P
(peer-to-peer) was not invented by Nakamoto, and the blockchain only integrates this technology
therefore, the network layer of blockchain is actually a particularly powerful point-to-point network system. In this system, each node can not only proce information, but also receive information, just like sending e-mail. You can write your own e-mail, and you can also receive the e-mail sent to you by others
in the blockchain network, nodes need to jointly maintain the blockchain system. Every time a node creates a new block, it needs to notify other nodes in the form of broadcast. After receiving the information, other nodes verify the block, and then create a new block on the basis of the block. In this way, the whole network can jointly maintain and update the general ledger of the blockchain system
however, what rules should the whole network follow to maintain and update the general ledger of the blockchain system? This involves the so-called "laws and regulations" (rules), which we will introce next: the consensus layer
Third, consensus layer
in the world of blockchain, consensus simply means that the whole network should maintain and update the general ledger of blockchain system according to a unified and agreed rule, which is similar to the rule of updating data. It is one of the core technologies of blockchain and the governance mechanism of blockchain community to let highly dispersed nodes reach consensus efficiently in the decentralized blockchain network
at present, the mainstream consensus mechanism algorithms include: proof of work of bitcoin (POW), proof of rights and interests of Ethereum (POS), proof of rights and interests of EOS (dpos), etc
we now introce the data layer, network layer and consensus layer. These three layers ensure that there are data, networks and rules for updating data on the network. However, there is no free lunch in the world. How can nodes actively participate in the maintenance of the blockchain system? Here is the incentive layer, which we will introce next: incentive layer< 4. Incentive layer
incentive layer is the so-called mining mechanism, which can be understood as incentive mechanism: you can get as much reward as you contribute to the blockchain system. With this incentive mechanism, the whole network nodes can be encouraged to participate in the data recording and maintenance on the blockchain
mining mechanism and consensus mechanism are actually the same truth. Consensus mechanism can be understood as the company's general rules and regulations, while mining mechanism can be understood as the reward rules for what you do well in the general rules and regulations
just like the consensus mechanism POW of bitcoin, it stipulates that more work pays more. Whoever can find the correct hash value first can get a certain amount of bitcoin reward
and Ethereum's POS stipulates that the older the holder is, the more likely he or she will be rewarded
it should be noted that the incentive layer is generally only available for the public chain, because the public chain must rely on the nodes of the whole network to jointly maintain data, so there must be a set of incentive mechanism to encourage the nodes of the whole network to participate in the construction and maintenance of the blockchain system, so as to ensure the security and reliability of the blockchain system
the blockchain is safe and reliable, and it is not intelligent enough, right? The contract layer we will introce next can make the blockchain system more intelligent
v. contract layer
Contract layer mainly includes various scripts, codes, algorithm mechanisms and smart contracts, which is the basis of block chain programming. What we call "smart contract" is at the contract level
if the bitcoin system is not intelligent enough, the "smart contract" proposed by Ethereum can meet many application scenarios. The principle of the contract layer is to embed the code into the blockchain system, in this way to realize the smart contract that can be customized. In this way, on the blockchain system, once the terms of the smart contract are triggered, the system can automatically execute commands< Finally, the application layer. The application layer is very simple. As the name suggests, it is a variety of application scenarios and cases of blockchain. What we now call "blockchain +" is the so-called application layer. At present, the blockchain applications that have been implemented are mainly various blockchain applications built on
eth, EOS and other public chains. There are more applications of gambling and games, and the real practical applications have not yet appeared.
1. Data layer
the data layer is the lowest layer in the six hierarchies of the blockchain. We can understand the data layer as a database, but for the blockchain, this database is a tamperable and distributed database, which is what we call "distributed ledger"
in the data layer, that is, the "distributed ledger", the data information on the blockchain is stored, and the blockchain structure, asymmetric encryption technology, hash algorithm and other technical means of the block are encapsulated to ensure the security of the data in the case of the whole network being open. The specific method is:
in the blockchain network, nodes use consensus algorithm to maintain the consistency of data layer (that is, the distributed database), and use asymmetric encryption and hash algorithm in cryptography to ensure the non usurpation and traceability of the distributed database
This constitutes the bottom data structure of blockchain technology. However, it is not enough to have a distributed database. We also need to let the data information in the database be shared and exchanged. Next, we will introce the upper layer of the data layer - the network layer
Second, network layer
the network system of blockchain is essentially a P2P (point-to-point) network. Point to point means that there is no need for an intermediate link or centralized server to control the system. All resources and services in the network are distributed in the hands of each node, and the transmission of information is also a direct communication between the two nodes. However, it should be noted that P2P
(peer-to-peer) was not invented by Nakamoto, and the blockchain only integrates this technology
therefore, the network layer of blockchain is actually a particularly powerful point-to-point network system. In this system, each node can not only proce information, but also receive information, just like sending e-mail. You can write your own e-mail, and you can also receive the e-mail sent to you by others
in the blockchain network, nodes need to jointly maintain the blockchain system. Every time a node creates a new block, it needs to notify other nodes in the form of broadcast. After receiving the information, other nodes verify the block, and then create a new block on the basis of the block. In this way, the whole network can jointly maintain and update the general ledger of the blockchain system
however, what rules should the whole network follow to maintain and update the general ledger of the blockchain system? This involves the so-called "laws and regulations" (rules), which we will introce next: the consensus layer
Third, consensus layer
in the world of blockchain, consensus simply means that the whole network should maintain and update the general ledger of blockchain system according to a unified and agreed rule, which is similar to the rule of updating data. It is one of the core technologies of blockchain and the governance mechanism of blockchain community to let highly dispersed nodes reach consensus efficiently in the decentralized blockchain network
at present, the mainstream consensus mechanism algorithms include: proof of work of bitcoin (POW), proof of rights and interests of Ethereum (POS), proof of rights and interests of EOS (dpos), etc
we now introce the data layer, network layer and consensus layer. These three layers ensure that there are data, networks and rules for updating data on the network. However, there is no free lunch in the world. How can nodes actively participate in the maintenance of the blockchain system? Here is the incentive layer, which we will introce next: incentive layer< 4. Incentive layer
incentive layer is the so-called mining mechanism, which can be understood as incentive mechanism: you can get as much reward as you contribute to the blockchain system. With this incentive mechanism, the whole network nodes can be encouraged to participate in the data recording and maintenance on the blockchain
mining mechanism and consensus mechanism are actually the same truth. Consensus mechanism can be understood as the company's general rules and regulations, while mining mechanism can be understood as the reward rules for what you do well in the general rules and regulations
just like the consensus mechanism POW of bitcoin, it stipulates that more work pays more. Whoever can find the correct hash value first can get a certain amount of bitcoin reward
and Ethereum's POS stipulates that the older the holder is, the more likely he or she will be rewarded
it should be noted that the incentive layer is generally only available for the public chain, because the public chain must rely on the nodes of the whole network to jointly maintain data, so there must be a set of incentive mechanism to encourage the nodes of the whole network to participate in the construction and maintenance of the blockchain system, so as to ensure the security and reliability of the blockchain system
the blockchain is safe and reliable, and it is not intelligent enough, right? The contract layer we will introce next can make the blockchain system more intelligent
v. contract layer
Contract layer mainly includes various scripts, codes, algorithm mechanisms and smart contracts, which is the basis of block chain programming. What we call "smart contract" is at the contract level
if the bitcoin system is not intelligent enough, the "smart contract" proposed by Ethereum can meet many application scenarios. The principle of the contract layer is to embed the code into the blockchain system, in this way to realize the smart contract that can be customized. In this way, on the blockchain system, once the terms of the smart contract are triggered, the system can automatically execute commands< Finally, the application layer. The application layer is very simple. As the name suggests, it is a variety of application scenarios and cases of blockchain. What we now call "blockchain +" is the so-called application layer. At present, the blockchain applications that have been implemented are mainly various blockchain applications built on
eth, EOS and other public chains. There are more applications of gambling and games, and the real practical applications have not yet appeared.
4. Depending on your basic level, if you have a certain technical foundation for development, it is relatively easy to learn
"chainman College" offers short weekend technical training courses for colleges with a certain programming foundation. You can investigate them and ask about your situation.
"chainman College" offers short weekend technical training courses for colleges with a certain programming foundation. You can investigate them and ask about your situation.
5. Recommend an introctory book, blockchain, written by Zhang Jian, and then you can read more information about blockchain. In fact, you can understand the current market. If you want to speculate in money, you can download a blockchain app store first, which collects all the necessary software for money speculation in the market, including trading house, wallet, information, community and other software. It is not particularly convenient for users who want to get started. You can search the Internet for beestore.
6. Blockchain is a new application mode of distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and other computer technologies. The so-called consensus mechanism is a mathematical algorithm for building trust and acquiring rights and interests between different nodes in the blockchain system.
blockchain is an important concept of bitcoin, which is essentially a decentralized database and serves as the underlying technology of bitcoin. Blockchain is a series of data blocks generated by cryptography. Each data block contains the information of a bitcoin network transaction, which is used to verify the validity of the information (anti-counterfeiting) and generate the next block
in a narrow sense, blockchain is a kind of chained data structure that combines data blocks in chronological order in a sequential way, and it can not be tampered with and forged by cryptography
broadly speaking, blockchain technology uses blockchain data structure to verify and store data, uses distributed node consensus algorithm to generate and update data, and uses cryptography to ensure the security of data transmission and access A new distributed infrastructure and computing method for programming and operating data by using intelligent contract composed of automated script code
go language + blockchain training course:
1 What are the advantages of go
advantages of go
1: performance
2: language performance is very important
3: developer efficiency & don't be too innovative
4: concurrency & Channel
5: fast compile time
6: team building ability
7: powerful ecosystem
8: gofmt, Mandatory code format
9: grpc and protocol buffers
can be directly compiled into machine code, independent of other libraries. Glibc version has certain requirements, and deployment is completed by throwing a file
static type language has the feeling of dynamic language. Static type language can check out most hidden problems when compiling, while dynamic language has the feeling that there are many packages that can be used and the efficiency of writing is very high.
blockchain is an important concept of bitcoin, which is essentially a decentralized database and serves as the underlying technology of bitcoin. Blockchain is a series of data blocks generated by cryptography. Each data block contains the information of a bitcoin network transaction, which is used to verify the validity of the information (anti-counterfeiting) and generate the next block
in a narrow sense, blockchain is a kind of chained data structure that combines data blocks in chronological order in a sequential way, and it can not be tampered with and forged by cryptography
broadly speaking, blockchain technology uses blockchain data structure to verify and store data, uses distributed node consensus algorithm to generate and update data, and uses cryptography to ensure the security of data transmission and access A new distributed infrastructure and computing method for programming and operating data by using intelligent contract composed of automated script code
go language + blockchain training course:
1 What are the advantages of go
advantages of go
1: performance
2: language performance is very important
3: developer efficiency & don't be too innovative
4: concurrency & Channel
5: fast compile time
6: team building ability
7: powerful ecosystem
8: gofmt, Mandatory code format
9: grpc and protocol buffers
can be directly compiled into machine code, independent of other libraries. Glibc version has certain requirements, and deployment is completed by throwing a file
static type language has the feeling of dynamic language. Static type language can check out most hidden problems when compiling, while dynamic language has the feeling that there are many packages that can be used and the efficiency of writing is very high.
7. Go language + blockchain training course:
why should we learn go language and what are the advantages of go
1. What are the advantages of go
1: performance
2: language performance is very important
3: developer efficiency & don't be too innovative
4: concurrency & Channel
5: fast compile time
6: team building ability
7: powerful ecosystem
8: gofmt, Mandatory code format
9: grpc and protocol buffers
can be directly compiled into machine code, independent of other libraries. Glibc version has certain requirements, and deployment is completed by throwing a file
static type language has the feeling of dynamic language. Static type language can check out most hidden problems when compiling, while dynamic language has the feeling that there are many packages that can be used and the efficiency of writing is very high.
why should we learn go language and what are the advantages of go
1. What are the advantages of go
1: performance
2: language performance is very important
3: developer efficiency & don't be too innovative
4: concurrency & Channel
5: fast compile time
6: team building ability
7: powerful ecosystem
8: gofmt, Mandatory code format
9: grpc and protocol buffers
can be directly compiled into machine code, independent of other libraries. Glibc version has certain requirements, and deployment is completed by throwing a file
static type language has the feeling of dynamic language. Static type language can check out most hidden problems when compiling, while dynamic language has the feeling that there are many packages that can be used and the efficiency of writing is very high.
8. Go language is the mainstream language of blockchain
according to the data survey of boss Research Institute, go and C + + are the mainstream languages of blockchain Posts currently recruited. The early blockchain system and application
programs are mainly implemented in C + +, and now most companies will use go language to
build public chain systems<
C + + is suitable for the development of local programs.
go language is suitable for the development of network programs and local programs.
compared with C + + go, it has the following advantages:
garbage collection
clear meaning
unified format
disadvantages:
efficiency is not as high as C + + at present, but for desktop programs, efficiency is not a big problem, Because hardware is fast growing.
C + + is the mainstream language at present, and I believe it will become a classic just like C.
to become a classic means that people who learn it can get a good salary, but it is only good for themselves.
in the future network world, go will have a big chance to get hot, I think it has a bright future.
the developers of go, including the founders of UNIX and C language, are the first generation of hackers, and I believe they will do a good job.
now the go stack + blockchain market is out of an unprecedented gale, and the situation is gratifying.
according to the data survey of boss Research Institute, go and C + + are the mainstream languages of blockchain Posts currently recruited. The early blockchain system and application
programs are mainly implemented in C + +, and now most companies will use go language to
build public chain systems<
C + + is suitable for the development of local programs.
go language is suitable for the development of network programs and local programs.
compared with C + + go, it has the following advantages:
garbage collection
clear meaning
unified format
disadvantages:
efficiency is not as high as C + + at present, but for desktop programs, efficiency is not a big problem, Because hardware is fast growing.
C + + is the mainstream language at present, and I believe it will become a classic just like C.
to become a classic means that people who learn it can get a good salary, but it is only good for themselves.
in the future network world, go will have a big chance to get hot, I think it has a bright future.
the developers of go, including the founders of UNIX and C language, are the first generation of hackers, and I believe they will do a good job.
now the go stack + blockchain market is out of an unprecedented gale, and the situation is gratifying.
9. Go straight down to the source code
Hot content