以太坊的测试网络分为两种:本地测试网络、公网测试网络html
公有测试网络node
这些测试网络是存在和公开的。这些网络上的以太币仅用于测试目的,没有货币价值。因为这些网络是公有的,因此货币是免费的,开发人员在最终部署以太坊应用程序到主网以前,须要使用它们测试。git
1. Ropsten:由以太坊基金会建立的官方测试网络。
2. Kovan:一种使用“权威证实(Proof of Authority)”共识方法的公有测试网络。这意味着其交易由选定人员进行验证,从而只须要4秒的出块时间。此测试环境上的以太币供应也受到控制,以减轻垃圾内容的攻击。这个链条的信息是公开的。 Kovan 是由 Parity 科技建立的,须要他们的 Parity 以太坊客户端。
3 Rinkeby:一个一样使用权威证实的官方测试网络。 任何以太坊客户端均可以访问,由以太坊基金会建立。
官方网站:https://www.rinkeby.io/ 与以太坊的官方网站相似github
我研究的是Rinkeby,由于其余两种在国内没有找到比较好的资料。web
Rinkeby资料主要来源与:
官网:https://www.rinkeby.io/
操做步骤网站:https://www.mobilefish.com/developer/blockchain/blockchain_quickguide_rinkeby_testnet.html主要操做步骤:
一、新建geth,经过https://www.rinkeby.io/获取rinkeby.json并进行创世。
二、https://www.rinkeby.io/介绍了四种启动方式,轻量级、全节点、嵌入等四种。
我使用的是轻量级,每种启动方式在https://www.rinkeby.io/的自选项卡
Connect Yourself – Go Ethereum: Geth都有介绍
json
A light node synchronizes the blockchain by downloading and verifying only the chain of headers from the genesis block to the current head, without executing any transactions or retrieving any associated state. As no state is available locally, any interaction with the blockchain relies on on-demand data retrievals from remote nodes. Initial processing required to synchronize is light, as it only verifies the validity of the headers; similarly required disk capacity is small, tallying around 500 bytes per header. Low end machines with arbitrary storage, weak CPUs and 512MB+ RAM should cope well. To run a light node, download rinkeby.json and start Geth with: geth --datadir=$HOME/.rinkeby --light init rinkeby.json geth --networkid=4 --datadir=$HOME/.rinkeby --syncmode=light --ethstats='yournode:Respect my authoritah!@stats.rinkeby.io' --bootnodes=enode://a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf@52.169.42.101:30303?discport=30304 |
二、接下来就是漫长的等待,同步测试块大约须要一个多小时。
三、获取测试环境的以太币
因为在在早期的测试网络存在黑客行为,致使以太币获取难度很大,故有此方法。
须要建立github帐户,并新建glist。具体方法参考api
|
<a href="../../cache/comments/blockchain_quickguide_rinkeby_testnet.html">Posted comments</a>app
<a href="../../customer/tmp/poll/poll.html">Poll</a>ide