以太坊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

相關文章
相關標籤/搜索