Ethereum and blockchain smart contract
what is Ethereum:
Ethereum is an innovation based on the application of technologies and concepts in bitcoin to computers. Ethereum itself imitates a lot of bitcoin technology to maintain the computer platform. blockchain technology is one of them
Ethereum platform can safely run any program users want
advantages of Ethereum over other competitive currencies before Ethereum appeared, some digital currencies imitated bitcoin. However, these projects have their own shortcomings, they can only support one or several specific applications at the same time< However, the reason why Ethereum can surpass the limitations of these projects in the past is because of the core idea of Ethereum
what Ethereum wants to implement is a blockchain protocol with built-in programming language. Since it supports programming language, in theory, any blockchain application can be defined with this language, and then run on Ethereum's blockchain protocol as an application
The design of Ethereum is very flexible and adaptable
Ethereum target sets the advantages of blockchain technology, in order to add the advantages of blockchain, such as decentralization, openness and security, to almost all computing fields
blockchain applications of Ethereum
Ethereum has many blockchain applications, such as digital applications of gold and stocks, financial derivatives applications, DNS and digital authentication, etc
Ethereum has achieved more than 100 blockchain applications by many start-ups
Ethereum has also been closely watched by some financial institutions, banking consortia (such as R3), as well as large companies like Samsung, Deloitte, RWE and IBM. As a result, a number of blockchain applications such as simplified and automated financial transactions, merchant loyalty index tracking, and gift cards designed to achieve decentralization of electronic transactions have emerged
the relationship between Ethereum and blockchain:
Ethereum is a programmable blockchain
Ethereum does not give users a series of preset operations (such as bitcoin transaction), but allows users to create complex operations according to their own wishes
in this way, Ethereum can be used as a platform for various types of decentralized blockchain applications, including but not limited to cryptocurrency
like other blockchains, Ethereum also has a peer-to-peer network protocol. Ethereum blockchain database is maintained and updated by many nodes connected to the network. Each network node runs the Ethereum simulator and executes the same instructions. Therefore, people sometimes call Ethereum "world computer"
although the pow mining mechanism is adopted, the block out mechanism of Ethereum is different from that of bitcoin. Due to the short block time of Ethereum, Ethereum is easy to form isolated blocks. Isolated blocks refer to the blocks that are not on the longest chain. Bitcoin's isolated blocks have no block rewards, but in Ethereum, isolated blocks can be referenced. The referenced isolated blocks are called "Uncle blocks", and their packaged data will also be recorded in the blockchain. Unlike bitcoin, Ethereum's TERT block has a reward, and each TERT block can get a reward of 4.375 Ethernet coins at most
Ethereum is a programmable and Turing complete blockchain development platform, which is equivalent to a decentralized global computer. In a programming system, there are usually some virtual machines to compile and execute. Java has JVM. In Ethereum, there is also Ethereum's virtual machine EVM, which can execute any complex algorithm code. Developers can use existing programming languages such as JavaScript or Python to create their own applications on Ethereum. Through Ethereum's virtual machine, you can easily issue digital assets, write smart contracts, set up and run decentralized applications, and set up decentralized autonomous organizations
eth is also known as the internal fuel of Ethereum. Unlike currency digital assets, Ethereum is not only used for transfer, but also for payment of smart contracts
in order to prevent the Ethereum blockchain from being full of junk contracts and junk applications, and to establish and run smart contracts on Ethereum, you must use eth to pay for smart contracts. For example, when you transfer your newly created digital assets on the Ethereum blockchain, you need to use eth to pay the handling fee instead of your newly created digital assets.
Blockchain 1.0 era usually refers to the development stage of blockchain application represented by bitcoin from 2009 to 2014. They are mainly committed to solving the problem of decentralization of currency and means of payment; After 2014, developers pay more and more attention to solve the technical and scalability problems of bitcoin. At the end of 2013, vitalik buterin released Ethereum white paper "Ethereum: next generation smart contract and decentralized application platform", which introced smart contract into blockchain and opened the application of blockchain outside the currency field, thus opening the era of blockchain 2.0< The so-called smart contract is actually a kind of computer contract that can be automatically executed based on prescribed trigger rules. It can also be regarded as a digital version of traditional contract. It was proposed by interdisciplinary legal scholar and cryptography researcher Nick Szabo more than 20 years ago. This technology was once not used in the actual instry because of the lack of programmable digital system and related technologies, until the emergence of blockchain technology and Ethereum provided a trusted execution environment for it
compared with bitcoin, Ethereum is a complete scripting language of Turing, which supports developers to create and publish arbitrary decentralized applications on the platform. Since its birth, there have been more than 200 decentralized applications based on Ethereum in the world
the chief researcher of bitwindow blockchain said: in the era of blockchain 2.0 represented by Ethereum, blockchain technology has graally expanded from the field of currency and payment to the field of finance. With the development of technology and the wider application of blockchain, the era of blockchain 3.0 beyond the monetary and financial fields will be around the corner. This article is excerpted from bitwindow. China's professional blockchain and digital currency instry analyzes the media, and adheres to a neutral, objective and dialectical attitude to understand and interpret the latest trends of blockchain and digital currency
Thank you for your recommendation. Here I would like to share with you the following:
forsage international crowdfunding, the revolutionary smart contract technology of the new generation platform, originated from the development of Russian technical team, provides distributed market participants with the ability to directly engage in personal and commercial transactions. The smart contract of forsage distributed global shared matrix project is open and can always be viewed on the Ethereum blockchain. These are real smart contracts, which will be implemented on the Ethereum public chain forever without any third party tampering. The global shared matrix project is completely decentralized, aiming to preach Ethereum, so that more players can know Ethereum, smart contracts and forsage code btshijie
what is Ethereum
Ethereum is often compared with bitcoin, but the situation is different. Bitcoin is a kind of cryptocurrency and distributed payment network, which allows bitcoin to be transferred between users
the Ethereum project has a bigger goal. As Ethereum said, "Ethereum is a distributed platform running smart contracts.". These smart contracts run on "Ethereum virtual machine", a distributed computing network composed of all devices running Ethernet nodes
"distributed platform" means that anyone can set up and run an Ethereum node just as anyone can run a bitcoin node. Anyone who wants to run "smart contracts" on nodes must pay the operators of these nodes in ether, which is a cryptocurrency related to Ethereum. Therefore, the person running the Ethernet node provides computing power and gets paid in the Ethernet, which is similar to the way that the person running the bitcoin node provides hash power and pays in bitcoin
in other words, although bitcoin is only a blockchain and payment network, Ethereum is a distributed computing network, and its blockchain can be used for many other things. Details are provided in the Ethereum white paper
what is smart contract
smart contracts are applications that run on Ethereum virtual machines. This is a distributed "world computer" with computing power provided by all Ethereum nodes. Any node providing computing power will pay in ether digital currency as a resource
they are named smart contracts because you can write "contracts" that execute automatically when you meet the requirements
for example, imagine building a KickStarter like crowdfunding service on Ethereum. Someone can set up an Ethereum smart contract to pool funds to others. The smart contract can be written as follows: when $100000 of currency is added to the pool, it will be sent to the recipient. Or, if the $100000 threshold is not reached within a month, all currencies will be returned to the original holder of the currency. Of course, this would use ether instead of dollars
all this will be done according to the smart contract code, which can automatically execute the transaction without the need for a trusted third party to hold the currency and sign the transaction. For example, KickStarter charges 5% above the 5% payment processing fee, which means it will charge $8000 to $10000 for a $100000 crowdfunding project. Smart contracts don't have to pay a fee to a third party like KickStarter
smart contracts can be used for many different things. Developers can create smart contracts to provide functions for other smart contracts, similar to the way software libraries work. Alternatively, smart contracts can simply be used as applications to store information on the Ethereum blockchain
in order to really execute the smart contract code, someone has to send enough Ethernet tokens as the transaction fee - how much depends on the required computing resources. This costs the Ethereum nodes to participate and provide computing power. The global shared matrix project, which is completely decentralized, aims to preach Ethereum and let more players know Ethereum, smart contracts and forsage code btshijie
although bitcoin can also write smart contracts, the syntax supported by bitcoin is only related to transactions, and there are limited things it can do
therefore, when it comes to writing smart contracts, it usually refers to Ethereum blockchain that supports the execution of Turing complete programs.
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.
what is Ethereum
Ethereum is often compared with bitcoin, but the situation is different. Bitcoin is a kind of cryptocurrency and distributed payment network, which allows bitcoin to be transferred between users
related: what is bitcoin? How does it work
Ethereum has a bigger goal. As Ethereum says, "Ethereum is a distributed platform running smart contracts.". These smart contracts run on "Ethereum virtual machine", a distributed computing network composed of all devices running Ethernet nodes
"distributed platform" means that anyone can set up and run an Ethereum node just as anyone can run a bitcoin node. Anyone who wants to run "smart contracts" on nodes must pay the operators of these nodes in ether, which is a cryptocurrency related to Ethereum. Therefore, the person running the Ethernet node provides computing power and gets paid in the Ethernet, which is similar to the way that the person running the bitcoin node provides hash power and pays in bitcoin
in other words, although bitcoin is only a blockchain and payment network, Ethereum is a distributed computing network, and its blockchain can be used for many other things. Details are provided in the Ethereum white paper
what is ether
Ethernet is a digital token (or cryptocurrency) related to Ethereum blockchain. In other words, Ethereum is the token and Ethereum is the platform. But now people often use these terms alternately. For example, coinbase allows you to buy Ethereum, which stands for Ethereum
this is technically "altcoin", which actually means a non bitcoin cryptocurrency. Like bitcoin, ether is supported by distributed blockchain - in this case, Ethereum blockchain
developers who want to create applications or Ethereum smart contracts on Ethereum blockchain need Ethernet token to pay for nodes to host it, while users of Ethereum based applications may need Ethernet to pay for services in these applications. People can also sell services outside the Ethereum network and accept Ethernet payments, or they can sell Ethernet tokens in cash - just like bitcoin
blockchain 1.0 mainly refers to bitcoin. Blockchain 2.0 extends to all assets, while blockchain 3.0 goes beyond currency, finance, even commerce, and all areas of our lives, including politics, social relations, ecation, medical care, etc. According to the prediction and conception of people in the instry, the era of blockchain 3.0 will be realized in the next five years. At that time, blockchain will be recognized and accepted by all the public like the Internet, thus completely subverting our lives
McKinsey has submitted a technical report on blockchain to the Federal Insurance Advisory Committee of the United States. The report calls 2009-2016 the "Dark Age" and believes that all blockchain solutions ring this period are based on bitcoin, and the new era of blockchain will begin in 2016. At that time, the application of blockchain will become unprecedented. Applying an original sentence in McKinsey report: Based on the current development speed of blockchain, we believe that blockchain solutions may realize their full potential in the next five years.