区块链毕业设计必读论文【2020-5】

资讯 2024-07-12 阅读:41 评论:0
美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

从入门到精通,干货篇。

From entry to master & #xff0c; dry section.

必读,如果你:

#xff0c; if you #xff1a;

  • 是一个专业的程序员
  • 如果你想了解以太坊当前可以做到什么程度,通过什么,如何做到。

预备知识:

Preparatory knowledgexff1a;

  1. 你需要知道区块链的概念及实现一个无需信任的电子货币的运作原理。可以先看看长版,如果你觉得太长,可以看看短版。但我还是建议,看那个长的视频。
  2. 如果你是一名软件工程师,拥有软件开发的经验。能知道从系统、架构角度学一个东西,其实能倍增学习效果。
  3. 如果有一周的空闲时间。好了,下面开始就不再是废话了。
  4. 你需要了解merkle tree的基本概念,看他是如何做到防止信息篡改,以及信息自校验的?

不用必须读白皮书,只需要了解一些基本概念。但说实话,如果不读,不会相信这些概念,从而不能真正明白这些概念,所以读白皮书也许仍然是最快的方式。

There is no need to read the white paper xff0c; there are just some basic concepts. But to be honest xff0c; not to read xff0c; not to believe these concepts xff0c; not to really understand them xff0c; so reading the white paper may still be the fastest way.

我建议你完整的读一下本文,从一个较高的层面了解一下,然后再挑感兴趣的,一一钻研,也许要花几天时间哦。

I suggest you read it in its entirety; learn from a higher level & #xff0c; then pick interested & #xff0c; one drill & #xff0c; maybe a few days.

你最后会发现,区块链就是建立在朴实无华的基本技术之上,一点也不神奇。虽然最近各种ICO把它炒得非常热。每个人都是站在巨人的肩膀上,如果你是程序员,你能对这些项目和技术,理解得更深。所以不要因为其它一些糟粕,而失去了一个提升自己的机会。

You end up finding xff0c; the block chain is based on simple basic technology xff0c; it's not amazing. Though the different ICOs have been very hot lately. Everyone is standing on the shoulders of giants xff0c; if you're a programmer xff0c; you can understand these projects and technologies xff0c; you can understand them better. So don't lose a chance to upgrade yourself because of some other xff0c;

以太坊,Ethereum是一个分布式的计算机,有许多的节点,其中的每一个节点,都会执行字节码(其实就是智能合约),然后把结果存在区块链上。由于整个网络是分布式的,且应用就是一个个的状态组成,存储了状态就有了服务;所以它就能永不停机,没有一个中心化的结点(没有任何一个节点说了算,去中心化的),任何第三方不能干预。

is a distributed computer xff0c; there are many nodes xff0c; each of these nodes xff0c; it executes bytes ff08; there is no central node xff09; xff0c; there is no single node xff09; xff0c; xff0c; no third party can intervene.

显然上面这一段话,直接解释了以太坊是什么。但你可能有非常多的问题。可以先读一下以太坊的白皮书。或者看下这个视频,25分钟理解以太坊。(译者注:以太坊入门,确实没有什么好的办法,就是看白皮书最好,最快)

Obviously the above phrase xff0c; direct explanation of what is in Etheria. But you may have a lot of questions. You can first read of the White Paper in Etheria. or look at this video xff0c; 25 minutes to understand it as . xff08; Translator note #xff1a; #xff0c; there is really no good way to read xff0c; it is best to read the White Paper xff0c; xff09; xff09; xff09;

智能合约与平时的代码其实没有什么区别,只是运行于一个以太坊这样的分布式平台上而已。这个运行的平台,赋予了这些代码不可变,确定性,分布式和可自校验状态等特点。代码运行过程中状态的存储,是不可变的。每一个人,都可以开一个自己的节点,重放整个区块链,将会获得同样的结果(译者注:能控制所有节点都达到一致状态,就是所谓的共识)。

Smart contracts do not really differ from normal-time codes xff0c; they just run on a distributed platform like the Taiwan. This running platform xff0c; gives these codes immutable xff0c; certainty xff0c; distributional and self-verifiable status features. Storage xff0c of the status in the operation of the code is immutable. Each person xff0c; can open his or her own node xff0c; replay the entire block chain xff0c; will have the same result xff08; translator ff1a; enable control of all nodes to achieve consistency xff0c; so-called consensus xff09;

在以太坊中,每个合约都有一个唯一的地址来标识它自己(由创建者的哈希地址和曾经发送过的交易的数量推算出来)。客户端可以与这个地址进行交互,可以发送ether,调用函数,查询当前的状态等。

In xff0c, each contract has a single address to identify itself xff08; derived from the founder's Hash address and the number of transactions that have been sent xff09;. The client can interact with this address xff0c; send another xff0c; call function xff0c; query the current state, etc.

智能合约,本质上来说就是代码,以及代码运行后存储到区块链上的状态两个元素组成。比如,你用来收发ETH的钱包,本质上就是一个智能合约,只是外面套了一个界面。

Smart contracts & #xff0c; in essence code & #xff0c; and the composition of two elements of the state stored on the block chain after the code runs. For example & #xff0c; your wallet used to send and receive ETH & #xff0c; in essence, a smart contract & #xff0c; just an interface set up outside.

概念非常强大,而我相信你已经看完了。而你在看相关的新闻,经常听到这个非常有潜力,经常听到资产/权利管理,分权自治组织(DAO),身份,社交网络等炫酷。但他本质就是这些。

The concept is very powerful xff0c; and I believe you've seen it. And you're watching the news xff0c; you hear it often with great potential xff0c; you hear frequently about asset/right management xff0c; decentralized self-government xff08; DAOxff09; xff0c; identity xff0c; social networking, that's what he really is.

智能合约,就是一些代码,运行整个分布式网络中。由于网络中的每一个节点都是一个全节点。这样的好处是容错性强,坏处是效率低,消耗资源与时间(译者注:原来只在一个节点执行一次就行,现在所有节点中每一个,都要执行一模一样的运算)。因为执行计算要花钱,而要执行的运算量与代码直接相关。所以,每个在网络运行的底层操作都需要一定量的。只是一个名字,它代表的是执行所需要花费的成本(译者注:由于以太坊是图灵完备的,随便一个死循环就将导致网络不可用,所以引入了的概念)。整个分布式网络引入了强制限制,来避免停机问题。因此如果你写一个死循环,当耗尽后,网络就会拒绝执行接下来的操作,并且回滚你之前的所有操作。

xff0c; smart contracts xff0c; code xff0c; running the entire distributed network. Because every node in the network is a full node. The benefits are faulty xff0c; bad is inefficient xff0c; consumed resources and time xff08; interpreter xff1a; originally implemented only once at one node xff0c; now every node xff0c; executed the same calculation xff09; executed the calculation cost xff0c; directly related to the code.

的价格由市场决定,类似于比特币的交易费机制。如果你的价格高,节点则将优先因为利益问题打包你的交易。

The price is determined by the market xff0c; it's a bitcoin-like transaction fee mechanism. If your price is high xff0c; the node will prioritize your transaction because of interest issues.

一般来说,在Ethereum中计算和存储东西比在传统环境中做的更为昂贵,但是,Ethereum为您的代码提供了上述我们讨论过的那些好的属性,这可能是一样有价值的。

In general xff0c; calculating and storing things in Etherum is more expensive than doing them in a traditional environment xff0c; but xff0c; Etheeum provides your code with the good attributes we discussed above xff0c; this may be equally valuable.

一般来说,在以太坊网上读取状态是免费的,只有写入状态是收费的。下面这个文章是概念的一些深度解析

In general, xff0c; xff0c is free of charge in Etheria; only writing status is fee-based. The following article is some of the concepts .

一个分布式App是指,服务端运行于以太坊网络上一个或多个智能合约。

A distributed App means & #xff0c; the service end runs one or more smart contracts on the Etherms network.

一个分布式的App不用将所有状态都存储在区块链上,或者在链上进行所有计算(译者注:比如图形渲染),这样就太花了。所以一个分布式App把需要大家共同信任的状态存在区块链上就好了。许多的分布式应用使用后面提到的技术,如IPFS和Gelem,在链下进行分布式存储和计算。虽然没在以太坊上,但仍使用的是区块链技术。

A distributed App does not have to store all states on the block chain xff0c; or does all calculations on the chain xff08; translator note xff1a; e.g. graphic rendering xff09; xff0c; that's too expensive. So a distributed App uses the technology xff0c; e.g. IPFS and Gelemxff0c; stores and calculates distributions under the chain. Although not in the community xff0c; it still uses block chain technology.

我不知道谁开始在D上使用这个小小的缺点,是看起来酷,但会影响搜索。 你可以自由使用,但尽量方便别人的搜索。

I don't know who started using this little defect on D; it looks cool, but it affects the search. You can use it freely, but as easily as possible.

以太坊的github上,有一个dapp-bin的目录,有一些文档和示例。使用前,你需要看看文件最近的状态,因为他们将很可能已经被淘汰。

There is a directory of , there are some documents and examples. Before xff0c; you need to see the latest status of the document xff0c; they are likely to be eliminated.

大多数的分布式应用都通过一些用户友好的前端提供服务,因为不是所有人都愿意通过命令行,通过自己手动组装哈希串和操作指令码进行交易。

Most distributed applications provide services through user-friendly front-ends xff0c; not all are willing to trade through command lines xff0c; and through their own manual assembly of Hashi strings and operational command codes.

一个DApp与传统的开发中的,客户端或前端是类似,区别仅在于它们与以太坊的区块链进行交互(也可以同时与其它服务交互)。这些客户端往往用JS编写,因为当前还暂时没有完成全部的向NodeJS的转换。

xff0c; the client or front end is similar to xff0c; the distinction is only between them interacting with the Ether's block chain xff08; it can also interact with other services xff09; these clients often use JS to write xff0c; not all conversions to NodeJS have been completed for the time being.

另外,大多数的Dapp客户端使用JS的原因,是因为它可以在浏览器中运行,因为大家都有浏览器,这样每个人都可以运行了。由于有更多的go语言的开发工具,使用go语言来写客户端的也不少。在现在这个激烈的发展期,这意味着,除非你有自己的偏好,否则可能要从go和JS(也许还有,Rust)来选择一种语言,来与以太坊区块链,以及基于以太坊开发的协议进行交互了。

Also xff0c; the reason for the use of JS by most Dapp clients xff0c; because it can run xff0c in browsers; because everyone has browsers xff0c; so everyone can run. Because there are more Go-language development tools xff0c; there are plenty of go-language writing clients xff0c; xff0c; xff0c; xff0c; unless you have your own preferences xff0c; xff0c; xff0c; Rustxff09; selecting a language xff0c; xff0c; xff0c; to interact with the Ether district chain xff0c; and on the basis of an agreement developed by the Taiwan.

以太坊的一个核心开发者,写了一篇关于使用Meteor工具来创建Dapp的文章,这意味着Meteor已经成为Dapp客户端开发的新标准。这绝对是基于JS建立全栈应用时的一个首选方法。但需要注意的是Meteor只是提供了一个开发工具,与DApp客户端并不等同,DApp客户端也完全可以由其它方式开发。(译者注:还有一些其它的开发工具,如Truffle,也是非常不错的哦)。

xff0c; & #xff0c; this means that Meteor has become a new standard developed by Dapp clients. This is definitely based on a preferred method for the creation of a full-scale application by JS. But what needs to be noted is that Meteor simply provides a development tool xff0c; does not match the DApp client xff0c; the Dapp client can also be developed in other ways. #xff08; Translator #xff1a; some other development tools xff0c; like Truffle#xff0c; very good #xff09;

因为围绕Meteor和DApp开发的活跃,有非常多的包在,它提供了许多常见的操作,如帐户管理,从区块链中获得最新的50个区块等等。

Because of the dynamic xff0c developed around Meteor and Dapp; with a very large number of packages at xff0c; it provides many common operations xff0c; e.g. account management xff0c; getting the most recent 50 blocks from the block chain, etc.

一个DApp浏览器,正如它字面所表达的,用来让DApp客户端(常常使用JS与以太坊的智能合约进行交互)的使用更加容易。

A DApp browser & #xff0c; xff0c, as it literally says; used to make DApp client xff08; often used to interact with Ether's smart contracts xff09; used easier.

DApp浏览器的主要目的是:

The main purpose of the DApp browser is xff1a;

  1. 提供到一个以太坊节点的连接(或者连接到一个本地节点或者远程节点),和一个方便的切换不同节点(甚至是不同的网络)。
  2. 提供一个帐户(或者一个钱包)来方便用户与DApp交互。

Mist是以太坊官方的DApp浏览器。一个漂亮的界面来与以太坊节点交互,与智能合约发、收交易。

is a DApp browser in Taiku. A beautiful interface to interact with the Ether node #xff0c; deals with smart contracts.

Status是一个手机上可以使用的DApp浏览器。

MetaMask是一个Google浏览器扩展,把Chrome变成了一个DApp浏览器。它的核心特性是注入以太坊提供的js客户端库,到每一个界面,来让DApp连接到MetaMask提供的以太坊节点服务。不过这个Chrome扩展,可以允许你管理你的钱包,以及连接到不同的以太坊网络(译者注:包括本地的开发网络)。

is a Google browser extension & #xff0c; it transforms Chrome into a DApp browser. Its core characteristic is to inject the js client library & #xff0c; to every interface #xff0c; to connect DApp to the service provided by Metamask for the taupule node. But this Chrome extension xff0c; to allow you to manage your wallet xff0c; and to connect to different Etheria networks #xff08; Translator note #xff1a; including local development networks #xff09;

Parity是一个以太坊客户端(也是一个全节点的实现),集成到了Web浏览器,并使之成为一个DApp浏览器。

与比特币的节点类似。每个节点都存储了整个区块链的数据,并重放所有的交易以验证结果的状态。你可以通过geth来运行一个全节点(官方的节点,go语言),或者parity来运行一个轻节点,它是第三方的,Rust语言写的。

Similar to Bitcoin's nodes. Each node stores data from the entire block chain xff0c; and resets all transactions to verify the state of results. You can run a full node xff08; official node xff0c; Go xff09; xff0c; or to run a light node xff0c; it is written in third party xff0c; Rust language.

你的节点需要知道从哪个区块链下载数据,以及与哪些节点交互,后面会说明一些常见的网络。

Your node needs to know from which block chain the data xff0c; and which node interacts xff0c; some common networks are described later.

你也许可以运行下所有这些节点客户端。如果你不想自己运行一个这样的节点,有第三方的网关服务,比如Infura可以选择。另外还有专门用于测试和开发的,本地版本的节点,后面会提到。

You may be able to run all these nodes. If you don't want to run a node xff0c; there's a third party gateway service xff0c; for example , you can choose. There are also nodes xff0c dedicated to testing and development; local nodes xff0c; referred to later.

如果你正在开发一个DApp的客户端,你并不总是需要主动提供连接到以太坊的节点。因为DApp的浏览器一般会提供对应的连接(译者注:话说这样,那使用这个,还得额外安装一个DApp浏览器呀)。

If you're developing a DApp client & #xff0c; you don't always have to offer connections to Ether. Because DApp's browser usually provides corresponding connections & #xff08; translator & #xff1a; say xff0c; use this xff0c; install an additional DApp browser xff09;

现在你应该知道我们可以通过写智能合约,并将状态存到区块链上了?那如果,在状态这块,我们存的是一个Map类型,键是地址,值是整数。然后我们将这些整数值叫做余额,谁的余额呢?它就是我们要说的代币(译者注:代币的数据结构就是这样简单,存的就是某个用户,它当前的余额)。

Now you should know that we can write smart contracts xff0c; and put the status on the block chain xff1f; if xff0c; if xff0c; in the state xff0c; we have a Map type xff0c; the key xff0c; the value is integer. Then we call these integer values xff0c; whose balance xff1f; that's what we're talking about xff08; that's the translator xff1a; that's the simple #xff0c; that's the data structure of the token xff0c; that's a user xff0c; that's the current balance #xff09;

是的,所有你刚才听到的代币,只是一些数据,存储在一个哈希表里,通过api或者所谓的协议,来进行增删改查。这是一个简单的基本合约

Yes xff0c; all the tokens you have just heard xff0c; just some data xff0c; stored in a Hashi table xff0c; checked by api or so-called agreement xff0c; ethereum的创建一个众筹合约的官方教程。你将会发现它仅仅是一个合约(Crowdsale)与另一个合约(MyToken)交互,和前面的基本合约类似。并没有什么神奇的地方。

You can see the official tutorial for creating a public contract . You will find that it is just a contract xff08; Crowdsale) with another contract xff08; MyToken) interactive #xfff0c; and there is nothing amazing about it.

人们使用代币来做各种各样的事情,阻拦大家如何使用的只有想像力。代币常常用来激励用户与某个协议进行交互,或者证明对某个资产的所有权,投票权等等。Coinbase的Fred有一个很好的关于代币,为什么存在,如何使用的文章

People use tokens to do a variety of things xff0c; only imagination prevents people from using them. Currency is often used to motivate users to interact with an agreement xff0c; or to prove ownership of an asset xff0c; voting rights etc. Coinbase's Fred has a good article about the token xff0c; why xff0c; how to use it .

Ethereum的创始人Vitalik最近有一个关于代币发售模型,也是一篇不错的文章

Etheium's founder, Vitalik, recently has a model for the sale of currencies xff0c; it's also a good article .

每个人都开始定义自己与代币的交互协议,但这些很快显得陈旧,所以一些人开始集结起来,创建了ERC20代币接口标准。大概意思是说,我们定义这些接口,这样大家可以相互统一调用,比如转帐定义为,第一个参数为要转去的帐户地址,第二个参数为要发送的ether的数量。

Everyone started defining their own interactive protocols with the tokens xff0c; these quickly appeared old xff0c; so some started to assemble xff0c; . Probably means xff0c; we define these interfaces xff0c; so you can use xff0c; for example, transfer is defined as xff0c; the first parameter is the account address to be transferred xff0c; the second parameter is the number of eths to be sent.

有些人觉得ERC20协议过于复杂了,所以他们提议了ERC197,稍微简单一点。

Some feel that the ERC20 agreement is too complicated xff0c; so they propose ERC197, a little simpler.

由于在ERC20中存在的一个小问题,有人提议了一个新的ERC23。ERC23是向后兼容ERC20的。如果你已经创建了一个代币合约,可以尝试来支持ERC23。

Because of a minor problem in ERC20 xff0c; a new ERC23. The ERC23 is backward compatible with ERC20. If you have created a currency contract xff0c; you can try to support ERC23.

看起来ERC223和ERC23是相同的概念;ERC的值是223,但是当引用时,作者和所有的其它人误写成了ERC23非常多次,它现在也还是这样引用的。如果一句话说清楚的话,ERC223是规范号,代币说明时称为ERC23代币就好了。

It appears that ERC223 and ERC23 are the same concepts & #xff1b; the ERC values are 223, but when quoted & #xff0c; the author and all others misspelled the ERC23 very many times & #xff0c; it is still so quoted. If one sentence is clear & #xff0c; the ERC223 is the norm & #xff0c; it is better called ERC23 in the token.

协议代币为用来激励对某个协议的使用。比如,REP,Augur的声誉代币,用来鼓励对Augur去中心化预测协议的使用。大多数的以太坊的ERC20/ERC23代币都是协议代币,比如Golem的GNT,ICONOMI,BAT等等。

For example, & #xff0c; REP, Augur's reputational token & #xff0c; and to encourage the use of Augur's decentralisation prediction protocols. Most of the Etherm's ERC20/ERC23 are protocols & #xff0c; for example, Golem's GNT, ICONOMI, BAT, etc.

App币则是用来激励对某个特定DApp或客户端的使用,而不是因为其使用的协议提供的价值。其中一个例子是Status的SNT代币,可以用来在应用内获得价值(比如,进行消息推送,投票权,获得用户名等等)。

App notes are used to stimulate the use of a particular Dapp or client xff0c; not because of the value provided by the agreement used. One example is SNT in Status xff0c; they can be used to get value in application xff08; e.g. xff0c; to carry out a message xff0c; xff0c; to vote xff0c; to get a user name, etc. xff09;

这种范式的转变是,我们可以开始投资协议代币而不是应用程序代币,因为我们可以建立在它们之上(任何人都可以在协议之上构建一个dapp,或为实现该协议的Dapp构建一个Dapp客户端)。

This paradigm shift is xff0c; we can start investment agreement tokens rather than application tokens xff0c; because we can build on them xff08; anyone can build a dapp, on agreements; or a Dapp client xff09 to achieve the agreement.

之前,这并不可能,因为加密代币,以及接下来的协议创新的时代,为了实现货币化,你自己可以在协议之上创建一个应用,并实现赢利。因为你自己可以实现协议的货币化,大家可以在未来更好的协作。

Before xff0c; this is not possible xff0c; because of encryption tokens xff0c; and the following xfff0c; to monetize xff0c; to create an application on the agreement yourself xff0c; and to achieve profitability. Because you can monetize the agreement #xff0c; you can all collaborate better in the future.

?

你与智能合约的交互(也称做调用函数和读取状态)通过连接到某个以太坊节点,并执行操作码。当前有各种各样的以太坊客户端,可以方便进行开发。Geth和parity都提供了控制台或浏览器的方式来更好的与智能合约交互。

Your interaction with an intelligent contract xff08; also known as the call function and reading status xff09; connecting to an e-port node xff0c; and executing the code. There are a variety of e-port clients xff0c; development is easy. Geth and parity provide control tables or browsers in a way that better interacts with intellectual contracts.

如果你想要一个程序的库用来与智能合约交互的接口,也有这样的客户端实现。对于JS语言,可以使用web3.js。以于go语言,可以使用在go-ethereum中的的程序,提供了go包,用来与智能合约交互。

If you want a program library to interact with an intelligent contract interface xff0c; this is also the case for a client. For JS languages xff0c; for web3.js. In Go languages xff0c; for >go-ethelum #xff0c; for interaction with smart contracts.

如果只是用来测试和开发,可以使用ethereumjs-testrpc来运行一个本地节点(译者注:这个节点压短区块时间等,可以方便打整的开发与测试)。

If only used to test and develop xff0c;

当你部署了一个智能合约,你实际进行的操作是向地址发送了一个交易,使用当前合约内容作为参数,一个以太坊交易详解

When you deploy an intelligent contract xff0c; the operation you actually perform is to send a transaction xff0c to an address; use the current contract content as a parameter xff0c; a tae-pane transaction details .

一旦你开始写智能合约,你会重复做大量的操作,比如编译源码为字节码和abi,部署到网络,测试然后部署合约等等。你也许希望更关注于你想要实现的东西。

Once you start writing smart contracts xff0c; you repeat a lot of operations xff0c; e.g. compile the source code by bytes and bixff0c; deploy to the network xff0c; test and deploy the contract. You might want to focus more on what you want to do.

Truffle和Embark框架,标准化和自动化了这些琐碎的工作。它们提供了一个好的开发,部署,以及更为重要的,测试智能合约的体验。

The Truffle and Embark framework & #xff0c; standardized and automated these trivial tasks. They provide a good development & #xff0c; deployment & #xff0c; and, more importantly, #xff0c; testing the experience of smart contracts.

你可以查看这个文章来开启使用Truffle的旅程。

You can view this article at to start the trip using Truffle.

这篇文章,提供了使用Truffle来部署以及与智能合约交互的文章。

Embark提供了类似的,帮助开发者组织工程的稍有些不同的工具。

Embark provides similar xff0c; slightly different tools to help developers organize their work.

当你一开始接触智能合约这块时,应该尽量不要使用框架。直到你明白了使用框架能带来的价值时,才应该开始使用,正如你不应该通过来学习HTML语言一样。

When you first touch the smart contract, xff0c; you should try not to use the frame. xff0c; you should not start using xff0c; just like you shouldn't learn HTML by learning it.

分享是关心,所以ETHPM是一个去中心化的智能合约包管理资源库。使用ETHPM,你可以关联或连接到某个著名的合约或库,减少代码重复,尽可能理想的为未来的开发提供好的基础。

Sharing is about xff0c; so ETHPM is a decentralised repository of smart contract management . Use ETHPM, you can connect or connect to a famous contract or library xff0c; reduce code repetition xff0c; and provide the best possible basis for future development.

这里的这个规范,详细的说明了相关的信息以及背景。Truffle和Embark均可与之集成,并创造一个愉快的开发体验。

/a> & #xff0c; details of relevant information and background.

Mainnet-以太坊主网,通常是所有客户端的默认网络。

Mainnet - Ethio Homenet & #xff0c; usually the default network for all clients.

Ropsten?- 以太坊使用工作量证明的主测试网络。这个网络,因为低的计算量,容易遭到DDOS攻击,分片,或者其它问题。垃圾邮件攻击后被暂时放弃,最近才恢复使用。

Ropsten? - Use the main testing network as proof of workload. This network xff0c; due to low computing xff0c; vulnerable to DDOS attacks xff0c; #xff0c; or other problems.

Kovan-parity客户端组成的测试网络,使用授权证明来提升对垃圾邮件攻击的抗扰度,并且持续4秒的阻塞时间。

Kovan-parity client testing networkxff0c; use of authorization certificate to increase resistance to spam attacks xff0c; and four-second block time.

Rinkeby-geth客户端组成的测试网络,使用集团共识,尽管计算量低,但是对恶意行为者更有弹性。

-Geth client network xff0c; use group consensus xff0c; use xff0c; although low calculation xff0c; but are more resilient to malicious actors.

你可以自己搭建你自己的测试网络,也许使用kubernetes或者docker-compose,但也许你将很快就可以不需要花什么时间。

You can build your own testing network xff0c; use kubernetes or docker-compose, but perhaps you will not need much time soon.

一个以太坊帐户就是一个私钥和公钥地址对。它们可以用来存储ether,创建时不需要花费gas。

An Etheraya account is a private key and a public key address. They can be used to store each other & #xff0c; there is no need to spend gas at the time of creation.

钱包则是用来管理ether的智能合约(一些代码)。这里是使用solidity写的一个钱包,运行于Mist浏览器。他们可以有许多的特性,比如多用户签名,纸?等等。

The wallets are smart contracts used to manage each other & #xff08; some codes & #xff09; . They have many properties xff0c; e.g. multi-user signatures xff0c; paper #xff1f; etc.

这样,我们就正确的定义了两个名词,前面看到其它人对这两个术语的困惑,并把所有能存ether的都叫作Wallet。

So #xff0c; we have correctly defined the two terms #xff0c; we have seen other people's confusion about the terms #xff0c; and we have called all those who can save each other Wallet.

在每个全节点网络上运行的智能合约代码在EVM内执行。这是您的标准虚拟机,执行一些字节码,除了这个vm与网络,文件系统,进程等隔离。没有人想要编写字节码,所以我们有一些更高级别的语言编译为EVM字节码。

The smart contract code running on each full node network is executed in EVM. This is your standard virtual machine & #xff0c; executes some bytes & #xff0c; separates this vm from the network & #xff0c; file system & #xff0c; processes. No one wants to write byte & #xff0c; so we have some higher-level language compiled into EVM bytes.

Solidity

Solidity是第一批的描述智能合约的语言。当前是最流行的语言,因此也有最多的例子,文档,和教程。你应该学习这个,除非你有要学习其它的理由。

Solidity is the first language to describe intelligence contracts. The most popular language is xff0c; so there are also the most examples xff0c; xff0c; and lessons. You should learn this xff0c; unless you have other reasons to study.

你可以使用基于浏览器的Remix IDE来进行快速验证。

You can use a browser-based Remix IDE for rapid validation.

下面是一个Solidity的合约:

Here's a Solidity contract #xff1a;

 
 

LLL,是一门Lisp风格的底层编程语言,就像语言名称看到的这样。虽然以太坊官方并没有将它作为主要需要支持的语言,但它仍旧持续进行着更新,且与solidity在同一个资源库

LLL, is a bottom programming language like Lip & #xff0c; as can be seen from the name of the language. Although it is not used as the main language to support & #xff0c, it continues to be updated & #xff0c; and with .

这是一个使用LLL语言写的一个ERC20代币的合约

LLL示例如下:

Examples of LLL are as follows: xff1a;

 

如果你正在学习,也许不是那么的容易习惯LLL语言的写法。

If you're learning #xff0c; maybe it's not that easy to get used to LLL.

Serpent

Serpent是一个类Python的高级语言,最终也会被编译为EVM字节码。它主要被Augur团队使用。

Serpent is an advanced language of Python xff0c; it will also eventually be compiled as an EVM byte code. It is mainly used by the Augur team.

但最近Zeppelin Solution团队发现其编译器有一个严重的bug,在这个问题被修复之前都不建议继续使用。

But recently Zeppelin Solution team found that its compiler had a serious bug, it was not recommended to continue until the issue was repaired.

如果你对Augur如何解决这些漏洞感兴趣,你可以阅读Zeppelin Solution的这篇文章

If you are interested in how Augur solves these loopholes xff0c; you can read the article .

Serpent的合约看起来如下:

Serpent's contract looks like #xff1a;

 

其它

在各种可用性和发展状态中还有一堆其他的高级语言,而且无疑将会被开发出来。 为了广泛采用,语言和编译器必须经过彻底的审查和测试,这当然需要时间。

There are many other advanced languages xff0c in various availability and development situations; and they will undoubtedly be developed. To be widely used xff0c; languages and compilers must be thoroughly reviewed and tested xff0c; of course, this will take time.

智能合约反编译/Disassembly

可以通过prosity来反编译以太坊智能合约的字节码,可以使用evmdis来Disassembly。

prosity is available to reverse the byte code of the Taiyo Smart Contract xff0c; is available for Disassembly.

一旦一个智能合约部署到了以太坊的网络上,它将是永不可变的,且将永久存在。如果你写了一个bug,你将不能下架这个有问题的版本,你只能在后续的版本中修复。

Once an intelligent contract is deployed on the Etherkom network xff0c; it will be immutable xff0c; and it will be permanent. If you write a bugxff0c; you will not be able to get off this problematic version xff0c; you can only fix it in a subsequent version.

由于许多工程师开发的Ethereum和其他智能合同平台来自于Web开发,所以这个概念实在是太新,而且是疯狂的。

Because the Etherum and other smart contract platforms developed by many engineers come from Web Development & #xff0c; the concept is so new & #xff0c; it is crazy.

ConsenSys有一个非常棒的资源叫智能合约的最佳实践,你应该深入的理解一下。

ConsenSys has a great resource called , which is called the best practice of smart contracts & #xff0c; you should understand it in depth.

一个Parity的钱包被黑的解释

a Paris wallet is blacked .

在你部署你的智能合约的时候,由于你管理的是真正的资金,你应该先开一个赏金计划,并尽量保证它完整的测试过。

When you deploy your smart contract xff0c; since you manage real money xff0c; you should start a bounty program #xff0c; and try to ensure that it is fully tested.

Whisper是一个集成进以太坊的消息系统。它允许DApp发布小量的信息来进行非实时的消息通信。

Whisper is an integrated message system in Ethio. It allows DApp to release a small amount of information for non-real-time messaging.

它使用协议。

It uses protocols.

尽管它已经有段时间没有更新了,这是一个使用Whisper协议实现一个聊天客户端的例子

Although it has not been updated for some time xff0c; .

这是一个组织(就像,一群人),其中,使用代码来保证最终的强制执行,而不是使用传统的法律文件。这群人使用智能合约来做常见组织做的所有的事情,比如在某件事上进行投票,比如决定是否对什么进行投资等等。

This is an organization xff08; like xff0c; a group of people xff09; xff0c; xff0c; using codes to ensure final enforcement xff0c; instead of using traditional legal documents. These groups use smart contracts to do everything that a common organization does xff0c; for example, to vote on something xff0c; for example, to decide whether to invest in something.

副作用是决策,管理,以及对什么进行投资的结果将会不可改变的存储在区块链上。

The side effects are decision-making & #xff0c; management & #xff0c; and the results of investment in what will be irreversibly stored on the block chain.

之前slock.it创建了标准的DAO框架来说明这个理念。在这里有对DAO概念的总览,以及如何使用框架来实现一个自己的DAO(译者注:这个项目由于bug被黑客攻击了)。

Previously, slock.it created a standard DAO framework to illustrate this idea. At there is a general overview of DAO concepts xff0c; how to use the framework to achieve one of its own DAO( interpreter xff1a; the project was hacked by ff09;

Aragon也正在应对挑战,设计一个根据智能合约逻辑运作的公司,重点是创建一个可以接受投资,处理会计,支付雇员,分配股权,正如我们现在知道的完成每天的公司的业务。他们也实现了漂亮的DApp客户端来让他们的协议使用起来更为简单。

Aragon is also responding to the challenge & #xff0c; designing a company operating on the logic of smart contracts xff0c; focusing on creating an acceptable investment xff0c; processing xff0c; paying employees xff0c; distributing shares xff0c; just as we now know doing business with companies every day. They have also made it easier for them to use their agreements.

查看这里Aragon核心合约来更多的理解它是如何做的。

Look here at Aragon Core Contract to understand how it works.

IPFS(星际文件系统)是一个协议,用来分发文件。你可以认为它是一个基于和这样概念的一个文件系统,文件可以定位,且是不可变的。IPFS以IPLD数据模型存储信息,它非常有趣,提供了一些特别的特性,你可以通过下面的说明了解一些。

( interstellar file systemxff09; a protocol xff0c; distributed documents. You can think of it as a document system based on and based on this concept xff0c; documents can locate xff0c; and they are immutable.

这是一个新的协议,它有一个http的网关和文件系统适配器,这让你可以通过http,挂载整个互联网文件系统到你本地的盘。IPFS还提供了一个寻址服务IPNS(星际命名空间),它允许可变的状态(需要注意的是在IPFS里的所有东西都是不可变的)。你甚至可以使用DNS TXT记录来定位到你的IPNS客户端,允许你生成用户友好的链接来指向到对应的数据。

This is a new protocol xff0c; it has a http gateway and file system adapter xff0c; this allows you to load the entire Internet file system to your local disk via httpxff0c; IPFS also provides an address-seeking service IPNS( interstellar naming space xff09; xff0c; it allows variable state xff08; what needs to be noted is that everything in IPFS is immutable xff09; you can even locate your IPNS client xff0c using DNS TXT records; you are allowed to generate user-friendly links to point to the corresponding data.

FileCoin是Protocol Lab为创建一个去中心化的基于IPFS的存储市场的努力结果,也就是向整个网络提供存储资源的激励层。FileCoin的共识协议没有使用浪费资源的工作量证明,而是使用了和来保证每片数据被复制某个特定的拷贝数量且存储某个特定的时间。

is the result of Protocol Lab's efforts to create a decentralised IPFS-based storage market xff0c; that is, to provide incentives for storage resources to the entire network. FileCoin's consensus agreement does not use wasteful resource workload proof xff0c; rather, it uses and ensures that each piece of data is copied in a given number of copies and stored at a given time.

你应该读一下IPFS的白皮书FileCoin的白皮书,以及IPLD的规范

You should read the IPFS White Paper ; .

由于当前FileCoin还没有上线,你可以使用当前的IPFS存储网络来运行html/css/js,并把作为一个类似orbit-db的数据库。

Since currently FileCoin is not online & #xff0c; you can run html/css/js, using the current IPFS storage network; and will be used as a database similar to orbit-db.

Swarm是一个去中心化的存储网络,集成于以太坊生态系统,作为第一阵营的项目,看看这里关于IPFS与这个项目的比较和优劣。但本质上,基本上是一样的,除了它们有不同的哲学,并在底层使用稍微不同的协议。

Swarm is a decentralised storage network & #xff0c; integrated into Ether ecosystem & #xff0c; project & #xff0c as camp 1 ; see here . But in essence xff0c; basically the same xff0c; apart from their different philosophy #xff0c; and using slightly different protocols at the bottom.

Augur

Augur是一个去中心化的预测市场,让大家对于某个现实世界的事件进行对赌。一方面,用户在某个具体可以发生的事件上投注,一旦结果成真,它们赢得的代币有真正的价值。为了实现这个,你需要实现一个去中心化的先知协议,来输入现实世界中的信息,它使用REP协议代币来进行经济激励

is a decentralised predictive market xff0c; lets people bet on events in a real world. On the one hand, xff0c; users bet xff0c; xff0c; once the results have come true xff0c; the money they win has real value. To achieve this xff0c; you need to achieve a decentralized prophet agreement xff0c; to enter information xff0c in a real world; it uses .

你可以看看Augur项目的合约代码,以及了解下Augur Master Plan

you can see the contract code for the Augur project & #xff0c; and get to know Augur Master Plan.

Gnosis

Gnosis与Augur有类似的理念,也是一个去中心化的预测市场。这是项目的白皮书,以及与Augur项目的对比

Gnosis has a similar concept xff0c; it is also a decentralised forecast market. xff0c; and a comparison with project

Golem

Golem是一个分布式的算力市场,以与IPFS一样的方式构建了一整套的提供算力市场。

is a distributed power market xff0c; a set of power-providing markets is constructed in the same way as IPFS.

你可以看看FAQ来更好的理解。

You can see FAQ for a better understanding.

0xProject

0xProject创建了一个交换代币的协议,以及一个DApp来实现这个协议。开发者可以创建一个基于它们自己的分布式应用创建交易所(技术上叫中继层),而用户也不用信任这些app就可完成交易,结算在区块链上完成。0x协议旨在使用离线的第三方来广播交易和管理订单(可以创建/更新/删除订单,而不用直接向Ethereum发送缓慢/昂贵的交易),但最终会使用Ethereum进行结算。

0xProject created an exchange agreement & #xff0c; and a DApp to achieve this. Developers can create an exchange based on their own distributional applications & #xff08; technologically called a relay & #xff09; & #xff0c; and users do not have to trust these apps to complete a transaction & #xff0c; settle on a block chain. The 0x protocol is designed to use offline third parties to broadcast transactions and manage orders & #xff08; create/update/ remove orders #xff0c; do not send slow/exceedable transactions directly to Etheum #xff09; #ff0c; but eventually use Etheum for settlement.

它们实现了场外交易,一个DApp使用这个协议来在用户之间直接交换代币。你可以在github上查看他们的合约

They achieve , a DApp uses this protocol to exchange money directly between users. 直接阅读FAQ

You can also skip these cool concepts #xff0c; .

ConsenSys的Swap协议也是非常类似的,但更专注于p2p的直接交易(而不是基于订单表),这里有一个白皮书,可以看看,这里有一个关于Swap协议的介绍

Swap also has a very similar white paper xff0c; see also 󿼈 instead of a direct transaction based on an order form xff09; xff0c; xfff0c; here is an introduction to Bancor是一个协议,可以让你的代币1)可以根据订单自动给予价格2)可以通过持有其它的代币作为抵押器来即时创造流动性。

Bancor is an agreement xff0c; allows for 1xff09 of your token; allows automatic price 2xff09 to be granted on the basis of an order; immediate liquidity can be created by holding other currencies as collateral.

查看这里的白皮书

以太坊区块链管理的代币价值往往会有巨大的波动。这个特性在现实生活中则非常不好,比如你的目标是用来保值。

The value of the tokens that are managed in the Tetha block chain is often highly volatile. This is a very bad feature in real life xff0c; for example, your goal is to preserve the value.

Maker DAO是一个DAO来管理Dai稳定币。Dai现在还不存在,但他们已经发布了一个alpha的版本叫Sai来展示这门技术。

is a DAO managing Dai stabilizer. Dai does not yet exist xff0c; but they have already to demonstrate the technology.

这里是DAI的白皮书

This is .

如果我们要向智能合约中输入一些信息,比如纽约今天的天气,我也许需要实现一个去中心化的先知协议询问一批人(花费高且慢),但如果写一个服务以中心化的方式来提供信息,又违背了去中心化应用的理念。

If we are to enter some information into an intelligent contract xff0c; for example, today's weather in New York xff0c; I may need to achieve a decentralised prophet agreement to ask a group of people xff08; expensive and slow xff09; xff0c; xff0c; if a service is written to provide information xff0c in a centralized way; and contrary to the idea of decentralizing application.

Oraclize尝试用以下方式来解决问题1)从一个外部数据源向你的智能合约发送数据。2)提供一个证明,数据来自某个数据源,且没有被修改过。由此如果你信任random.org,你可以使用Oraclize来提供一个随机数生成合约。

Oraclicize attempts to solve problem 1) send data from an external data source to your smart contract. 2) provide a certificate xff0c; data from a data source xff0c; and have not been modified. So if you trust oracle, you can use Oracle to generate a random number of contracts.

他们的集成非常强大; 您可以获取URL,解析JSON和XPATH,查询Wolfram Alpha等。

Their integration is very strong; you can get URLs #xff0c; parsing JSON and XPATH, query Wolfram Alpha et cetera.

BTCRelay作为比特币区块链交易的先知机制,这意味着你可以在以太坊上编写智能合约来响应比特币区块链上的某个交易,进行触发后续的操作。比如,你可以让人通过BTC为你的服务付费,使用BTCRelay在以太坊上校验付款成功后,继而在以太坊上提供对应的服务。

BTCRelay as the Prophet's mechanism for dealing in the Bitcoin block chain xff0c; this means that you can write smart contracts in the district to respond to a transaction on the Bitcoin block chain xff0c; perform triggering follow-up operations. e.g. xff0c; you can get people to pay for your services through the BTC xff0c; use BTCRelay to provide corresponding services in the district after successful payment testing by the colonel in the district xff0c; and then use BTCRelay to provide corresponding services in the district.

Zeppelin Solutions是一个科技公司,在这个领域内正完成一些伟大,而且专业的事。它们实在做了太多事,太难一一说清了。

Zeppelin Solutions is a technology company #xff0c; it's doing some great #xff0c; and it's a professional thing. They've done too much #xff0c; it's too hard to explain.

他们管理了Open Zeppelin,一系列经过审查的,最佳的智能合约实践,你可以继承并应用于你自己的DApp中。你可以查看他们的github资源来学习更多。你应该读一下里面的每一个合约。

They manage , a series of reviewed xff0c; best intellectual contract practices xff0c; you can inherit and apply to your own Dapp. You can read

他们坚持代码复用的理念,然后进一步创建了Zeppelin OS。你可以忽略OS,它不是传统意义上的操作系统的概念。zeppelinOS特性,工具和服务的集合,旨在提供稳固的开发人员体验,同时最大限度地提高智能合同安全性。

They insisted on the concept of re-use of the code xff0c; they further created Zeppelin OS. You can ignore OS& #xff0c; it is not the concept of a traditional operating system.

zeppelinOS中的其中一部分是“zeppelinOS Kernel”。其实他们不是传统意义上的核心,而且是一组它们是通过库模型实现的可升级的智能合约,可以在出现安全问题时独立的进行更新。因为你在合约内包含的代码更少,部署也将花费更少的gas,而开发者也减少了代码的重复。

One of the components of ŽepelinOS is “Zeppelinos Kernel”. They are not the core of xff0c in the traditional sense; they are a group of . , which is an upgraded smart contract through a bank model #xff0c; it can be updated independently when security issues arise.

zeppelinOS还有一些其他整齐的规划,比如调度程序(智能合约的异步执行,因为默认合同一般不会主动触发某个行为),市场级的协议和链下开发者体验工具。

ŽepelinOS also has other well-structured planning xff0c; e.g. scheduler xff08; asymptomatic execution of smart contracts xff0c; because default contracts typically do not proactively trigger an act xff09; xff0c; market-level agreements and chain developers experience tools.

ENS是一个去中心化的名称注册服务。并有一个描述性的项目名称。

is a decentralised name registration service.

BAT尝试去中心化广告系统,通过监控大家的注意力,并在内容提供商,广告商和用户之间分发收益,切掉中间人。

BAT tried to decentralize the advertising system xff0c; by monitoring everyone's attention xff0c; and by distributing the proceeds xff0c between the advertiser and the user; cutting off the middleman.

Brave和BAT由JS创始人Brendan Eich创建,同时他也是Mozilla的联合创始人。

Brave and Bat were founded by the founder of JS, Brendan Eich, and co-founder of Mozilla.

uPort在解决去中心化的身份识别问题。

addressing decentralised identification issues.

district0x是一个更高层级的去中心化的市场和社区。核心是通过一系列的智能合约来管理用户发布信息,搜索,过滤信息,在社区内维护信誉,管理支付等等。它可以用来建议如EthlanceNameBazaar这样的市场。

is a higher-level decentralised market and community. The core is to manage user-distributed information xff0c; search xff0c; filter information xff0c; maintain credibility in the community xff0c; manage payments etc. It can be used to recommend markets such as Ethlance and .

他们有非常棒的视觉设计。

They have great visual design.

Steem是区块链上的reddit,它使用协议代币(STEEM)来激励这个社交社区的参与度。

Steem is a reddit, on the block chain; it uses protocol tokens xff08; STEEM) to stimulate the participation of this social community.

在这里查看白皮书

有一些关于Steemit块链如何启动以及支持组织如何运作的反应

There are a number of responses on how the Steemit chain is activated and how the organization is supported to function .

ConsenSys(有点像共识,但作为一个公司名称;它很聪明,巧妙的把改成了,但我一般念为“con-SEn-SIS”,避免读错)是一个“风险投资和产品工作室”。他们是一个(其实非常大)伞形组织,它赞助了一大堆项目核心组件的开发。值得一提的是,它们资助了Truffle,Infura,MetaMask,Gnosis和uPort。

ConsenSys( somewhat like a consensus xff0c; but as a company name; it is smart xff0c; smartly changed to xff0c; but I generally say “con-SEN-SIS” xff0c; avoids misreading xff09; is a “risk investment and product workshop”. They are xff08; actually very large xff09; Umbrella xff0c; it sponsors a number of core components and .

美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址
文字格式和图片示例

注册有任何问题请添加 微信:MVIP619 拉你进入群

弹窗与图片大小一致 文章转载注明

分享:

扫一扫在手机阅读、分享本文

发表评论
平台列表
美化布局示例

欧易(OKX)

  全球官网 大陆官网

币安(Binance)

  官网

火币(HTX)

  官网

Gate.io

  官网

Bitget

  官网

deepcoin

  官网
热门文章
  • 0.00003374个比特币等于多少人民币/美金

    0.00003374个比特币等于多少人民币/美金
    0.00003374比特币等于多少人民币?根据比特币对人民币的最新汇率,0.00003374比特币等于2.2826 1222美元/16.5261124728人民币。比特币(BTC)美元(USDT)人民币(CNY)0.00003374克洛克-0/22216.5261124728比特币对人民币的最新汇率为:489807.72 CNY(1比特币=489807.72人民币)(1美元=7.24人民币)(0.00003374USDT=0.0002442776 CNY)。汇率更新于2024...
  • 134 USD toBTC Calculator -

    134                            USD                        toBTC                        Calculator -
    For the week (7 days) Date Day 134 USD to BTC Changes Changes % June...
  • 0.00006694个比特币等于多少人民币/美金

    0.00006694个比特币等于多少人民币/美金
    0.00006694比特币等于多少人民币?根据比特币对人民币的最新汇率,0.00006694比特币等于4.53424784美元/32.5436 16人民币。比特币(BTC)美元(USDT)人民币(CNY)0.000066944.53424784【比特币密码】32.82795436 16比特币对人民币的最新汇率为:490408.64 CNY(1比特币=490408.64人民币)(1美元=7.24人民币)(0.00006694USDT=0.0004846456 CNY)汇率更新时...
  • 12年怎么购买比特币?比特币投资,轻松掌控

    12年怎么购买比特币?比特币投资,轻松掌控
    12年怎么购买比特币?买卖比特币可以通过以下交易所进行购买,分别是:欧易官网平台、ZG交易所、艾戴克斯交易所、C2CX交易软件、BaseFEX交易APP、波网交易平台、安银交易所、BitMart交易软件、紫牛币交所交易APP和澳网(AOMEX)交易平台等等十大平台下载,高效安全的数字货币交易平台。How do you buy bitcoins in 12 years? Bitcoins can be purchased through ten major platforms...
  • 0.00015693个比特币等于多少人民币/美金

    0.00015693个比特币等于多少人民币/美金
    0.000 15693比特币等于多少人民币?根据比特币对人民币的最新汇率,0.000 15693比特币等于10.6 1678529美元/76.86554996人民币。比特币(BTC)【比特币价格翻倍】美元(USDT)人民币(CNY)0.000/克洛克-0/5693【数字货币矿机】10.6 167852976.8655254996比特币对人民币的最新汇率为:489,807.72 CNY(1比特币= 489,807.72人民币)(1美元=7.24人民币)(0.00015693 U...
标签列表