以太坊testnet

以太坊的测试网络分为两种:本地测试网络、公网测试网络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

 

  1. Start the node, type:
    Type: cd ~/tools/ethereum_rinkeby_network
    Type: make start

    You will see:

    geth --datadir=/Users/robertlie/tools/ ethereum_rinkeby_network/datadir --networkid=4 --cache=512 --verbosity 3 --ethstats='yournode:Respect my authoritah!@stats.rinkeby.io' --bootnodes=enode:// a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4a ab0cebea2ae45cb4d375b77eab56516d34bfbd3c1 a833fc51296ff084b770b94fb 9028c4d25ccf@52.169.42.101:30303 --rpc --rpcapi="personal,eth,network" console 2>>/Users/robertlie/tools/ ethereum_rinkeby_network/ethereum.log Welcome to the Geth JavaScript console!

    instance: Geth/v1.6.6-stable-10a45cb5/darwin-amd64/go1.8.3
    coinbase: 0x2b417fe5d262443918358a92868c60922285eda1
    at block: 0 (Wed, 12 Apr 2017 16:59:06 CEST)
    datadir: /Users/robertlie/tools/ ethereum_rinkeby_network/datadir
    modules: admin:1.0 clique:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0
    :
    INFO [06-28|13:04:08] Imported new block headers count=192 elapsed=64.078ms number=274176 hash=d09f4d…f00789 ignored=0
    INFO [06-28|13:04:10] Imported new block receipts count=2 elapsed=11.854ms number=271267 hash=fdcc12…a3cdfa ignored=0
    INFO [06-28|13:04:10] Imported new state entries count=384 flushed=415 elapsed=3.193ms processed=556561 pending=7043 retry=0 duplicate=0 unexpected=0
    :
    INFO [06-28|13:33:57] Imported new state entries count=19 flushed=44 elapsed=3.374ms processed=769550 pending=78 retry=0 duplicate=0 unexpected=0
    INFO [06-28|13:33:57] Imported new state entries count=18 flushed=20 elapsed=4.503ms processed=769568 pending=79 retry=0 duplicate=0 unexpected=0
    INFO [06-28|13:33:58] Imported new state entries count=21 flushed=50 elapsed=2.636ms processed=769589 pending=35 retry=0 duplicate=0 unexpected=0
    INFO [06-28|13:33:58] Imported new state entries count=6 flushed=35 elapsed=344.854µs processed=769595 pending=0 retry=0 duplicate=0 unexpected=0
    INFO [06-28|13:33:58] Imported new block receipts count=1 elapsed=303.91µs number=442278 hash=0a4da2…edd9ef ignored=0
    INFO [06-28|13:33:58] Committed new head block number=442278 hash=0a4da2…edd9ef
    INFO [06-28|13:33:58] Imported new chain segment blocks=216 txs=101 mgas=13.574 elapsed=179.610ms mgasps=75.576 number=442494 hash=cb9c0d…de847a
    INFO [06-28|13:33:58] Imported new chain segment blocks=58 txs=15 mgas=0.731 elapsed=22.650ms mgasps=32.269 number=442552 hash=bfc5f1…c124b9
    INFO [06-28|13:33:58] Fast sync complete, auto disabling
    INFO [06-28|13:34:28] Imported new chain segment blocks=4 txs=0 mgas=0.000 elapsed=2.265ms mgasps=0.000 number=442556 hash=d23a04…b136c1
    INFO [06-28|13:34:43] Imported new chain segment blocks=1 txs=0 mgas=0.000 elapsed=553.646µs mgasps=0.000 number=442557 hash=c303d2…d2be13
    :

    Note:
    It has taken me approx 30 minutes for 442552 blocks.
     
  2. You need a Github account (its free)
    Login to your Github account and press the Gist link or just enter http://gist.github.com .

    Create a gist, for example:

    Gist description: mobilefish_rinkeby_test_account_1
    Filename including extension: mobilefish_rinkeby_test_account_1.txt
    Enter in the text box: 0x2b417fe5d262443918358a92868c60922285eda1

    Enter in the textbox an account number. I have selected the first one.
    DO NOT FORGET TO PREFIX YOUR ACCOUNT WITH: 0x

    Creating a gist

    Press button: Create public gist

    Gist link

    Copy the gist link https://gist.github.com/robertlie/e1015a0e9b016a1c0de9b08ce507d3af
     
  3. Go to https://www.rinkeby.io/ and select link Crypto Faucet.

    Rinkeby crypto faucet

    Paste the gist link https://gist.github.com/robertlie/e1015a0e9b016a1c0de9b08ce507d3af in the textbox

    Paste gist link

    Press button "Give Me Ether". You can select the following funding: 3eth/8h, 7.5eth/1d or 18.75eth/3d.
    After you have pressed the button, you will see a response. I have selected 3eth/8h.

    Crypto faucet response
     
  4. To check if you have ethers received from the Crypto Faucet, goto https://rinkeby.etherscan.io/ and enter the address 2b417fe5d262443918358a92868c60922285eda1

    Before request is submitted:

    Rinkeby Etherscan before

    After request is submitted:

    Rinkeby Etherscan before

     


    Goto Top网络

<a href="../../cache/comments/blockchain_quickguide_rinkeby_testnet.html">Posted comments</a>app

<a href="../../customer/tmp/poll/poll.html">Poll</a>ide

Footer

相关文章
相关标签/搜索