以太坊的测试网络分为两种:本地测试网络、公网测试网络
公有测试网络
这些测试网络是存在和公开的。这些网络上的以太币仅用于测试目的,没有货币价值。由于这些网络是公有的,所以货币是免费的,开发人员在最终部署以太坊应用程序到主网之前,需要使用它们测试。
1. Ropsten:由以太坊基金会创建的官方测试网络。
2. Kovan:一种使用“权威证明(Proof of Authority)”共识方法的公有测试网络。这意味着其交易由选定人员进行验证,从而只需要4秒的出块时间。此测试环境上的以太币供应也受到控制,以减轻垃圾内容的攻击。这个链条的信息是公开的。 Kovan 是由 Parity 科技创建的,需要他们的 Parity 以太坊客户端。
3 Rinkeby:一个同样使用权威证明的官方测试网络。 任何以太坊客户端都可以访问,由以太坊基金会创建。
官方网站:https://www.rinkeby.io/ 与以太坊的官方网站类似
我研究的是Rinkeby,因为其他两种在国内没有找到比较好的资料。
Rinkeby资料主要来源与:
官网:https://www.rinkeby.io/
操作步骤网站:https://www.mobilefish.com/developer/blockchain/blockchain_quickguide_rinkeby_testnet.html主要操作步骤:
1、新建geth,通过https://www.rinkeby.io/获取rinkeby.json并进行创世。
2、https://www.rinkeby.io/介绍了四种启动方式,轻量级、全节点、嵌入等四种。
我使用的是轻量级,每种启动方式在https://www.rinkeby.io/的自选项卡
Connect Yourself – Go Ethereum: Geth都有介绍
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 |
2、接下来就是漫长的等待,同步测试块大约需要一个多小时。
3、获取测试环境的以太币
由于在在早期的测试网络存在黑客行为,导致以太币获取难度很大,故有此方法。
需要创建github账户,并新建glist。具体方法参考
|
<a href="../../cache/comments/blockchain_quickguide_rinkeby_testnet.html">Posted comments</a>
<a href="../../customer/tmp/poll/poll.html">Poll</a>
Footer