Testnets

使用合約是否需要埠轉發?

  • September 9, 2016

我正在按照此處所述的創建使用者服務的指南進行操作。當我將urlfetcher.py文件放在**~/.config/pyethapp/contrib**目錄中並重新啟動 pyethapp 時:

$ pyethapp 執行

我收到以下(循環)網路錯誤:

Starting URL translator service
INFO:p2p.peermgr    starting peermanager 
INFO:p2p.peermgr    starting listener addr=('0.0.0.0', 30303)
INFO:p2p.discovery  starting discovery 
INFO:p2p.discovery  starting listener host=0.0.0.0 port=30303
INFO:jsonrpc    starting IPCRPCServer ipcpath=/tmp/pyethapp.ipc
INFO:jsonrpc    starting JSONRPCServer port=4000
INFO:p2p.peermgr    waiting for bootstrap 
INFO:p2p.peer   received hello client_version=Geth/v1.4.4-stable-94ad694a/linux/go1.6.2 version=4 capabilities=(('eth', 63), ('eth', 62), ('eth', 61))
INFO:eth.sync.task  spawning new synctask 
INFO:p2p.peer   received hello client_version=pyethapp/v1.1.1/linux2/py2.7.10 version=55 capabilities=(('eth', 61), ('p2p', 4))
INFO:p2p.peer   received hello client_version=Geth/eth-peer-dal09-4/v1.3.5-34b622a2/linux/go1.6 version=4 capabilities=(('eth', 63), ('eth', 62), ('eth', 61), ('shh', 2))
WARNING:eth.chainservice    invalid network id remote_network_id=996787477 expected_network_id=1
WARNING:protocol    protocol exception, stopping error=wrong network_id
INFO:p2p.peer   received hello client_version=Gshift/Explorer/v2.5.0-1d1c88f2/linux/go1.6.1 version=4 capabilities=(('shift', 63), ('shift', 62), ('shift', 61))
WARNING:eth.sync.task   syncing hashchain timed out 
WARNING:eth.sync.task   syncing failed with all peers num_protos=1
WARNING:eth.sync.task   syncing failed 
INFO:eth.sync.task  spawning new synctask 
INFO:p2p.peer   received hello client_version=Gexp/v1.3.5-fa6fc40f/linux/go1.5 version=4 capabilities=(('exp', 63), ('exp', 62), ('exp', 61))
INFO:p2p.peer   received hello client_version=Geth/v1.4.0-unstable/linux/go1.5.1 version=4 capabilities=(('eth', 63), ('eth', 62), ('eth', 61), ('shh', 2))
WARNING:eth.chainservice    invalid network id remote_network_id=161 expected_network_id=1
WARNING:protocol    protocol exception, stopping error=wrong network_id
INFO:p2p.peer   received hello client_version=Geth/v1.4.4-stable-94ad694a/linux/go1.6.2 version=4 capabilities=(('eth', 63), ('eth', 62), ('eth', 61))
Traceback (most recent call last):
 File "/usr/local/lib/python2.7/dist-packages/gevent-1.1.0-py2.7-linux-x86_64.egg/gevent/greenlet.py", line 534, in run
   result = self._run(*self.args, **self.kwargs)
 File "/usr/local/lib/python2.7/dist-packages/devp2p-0.7.2-py2.7.egg/devp2p/peer.py", line 230, in _run_decoded_packets
   self._handle_packet(self.mux.packet_queue.get())  # get_packet blocks
 File "/usr/local/lib/python2.7/dist-packages/devp2p-0.7.2-py2.7.egg/devp2p/peer.py", line 202, in _handle_packet
   cmd_id], protocol=protocol.name, orig_cmd_id=packet.cmd_id)
KeyError: 6
<Greenlet at 0x7f5b56bb0d70: <bound method Peer._run_decoded_packets of <Peer('120.25.154.157', 19999) >>> failed with KeyError

INFO:p2p.peer   received hello client_version=Geth/v1.4.4-stable-8f5a9d44/linux/go1.6.2 version=4 capabilities=(('eth', 63), ('eth', 62), ('eth', 61))
WARNING:eth.chainservice    invalid network id remote_network_id=9895666 expected_network_id=1
WARNING:protocol    protocol exception, stopping error=wrong network_id
INFO:p2p.peer   received hello client_version=Geth/eth-peer-tok02-1/v1.3.5-34b622a2/linux/go1.6 version=4 capabilities=(('eth', 63), ('eth', 62), ('eth', 61), ('shh', 2))
WARNING:eth.chainservice    invalid network id remote_network_id=996787477 expected_network_id=1
WARNING:protocol    protocol exception, stopping error=wrong network_id
INFO:p2p.peer   received hello client_version=Gexp/v1.3.5-12b0652e/linux/go1.5.1 version=4 capabilities=(('exp', 63), ('exp', 62), ('exp', 61))
INFO:p2p.peer   received hello client_version=Geth/v1.4.3-stable-dd083aa3/linux/go1.5 version=4 capabilities=(('eth', 63), ('eth', 62), ('eth', 61))
WARNING:eth.chainservice    invalid network id remote_network_id=1123 expected_network_id=1
WARNING:protocol    protocol exception, stopping error=wrong network_id
INFO:p2p.peer   received hello client_version=Geth/eth-peer-lon02-3/v1.3.5-34b622a2/linux/go1.6 version=4 capabilities=(('eth', 63), ('eth', 62), ('eth', 61), ('shh', 2))
WARNING:eth.chainservice    invalid network id remote_network_id=996787477 expected_network_id=1
WARNING:protocol    protocol exception, stopping error=wrong network_id
INFO:p2p.peer   received hello client_version=Geth/eth-peer-dal09-7/v1.3.5-34b622a2/linux/go1.6 version=4 capabilities=(('eth', 63), ('eth', 62), ('eth', 61), ('shh', 2))
WARNING:eth.chainservice    invalid network id remote_network_id=996787477 expected_network_id=1
WARNING:protocol    protocol exception, stopping error=wrong network_id
INFO:p2p.peer   received hello client_version=Gshift/Explorer/v2.5.0-1d1c88f2/linux/go1.6.1 version=4 capabilities=(('shift', 63), ('shift', 62), ('shift', 61))
INFO:p2p.peer   received hello client_version=Gexp/v1.3.5-12b0652e/linux/go1.5.1 version=4 capabilities=(('exp', 63), ('exp', 62), ('exp', 61))
INFO:p2p.peer   received hello client_version=Geth/v1.3.6-8723cd74/linux/go1.5.1 version=4 capabilities=(('eth', 63), ('eth', 62), ('eth', 61))
WARNING:eth.chainservice    invalid genesis hash remote_id=<ETHProtocol <Peer('37.59.24.15', 41303) Geth/v1.3.6-8723cd74>> genesis=5157cbd8975669bdb52c8ba7073bf08fd868946a9f70db197e74097b4342050e
WARNING:protocol    protocol exception, stopping error=wrong genesis block
INFO:p2p.peer   received hello client_version=Gexp/v1.4.4-stable-b118fdab/linux/go1.5 version=4 capabilities=(('exp', 63), ('exp', 62), ('exp', 61))
INFO:p2p.peer   received hello client_version=Geth/v1.5.0-unstable/linux/go1.5.1 version=4 capabilities=(('eth', 63), ('eth', 62), ('eth', 61))
WARNING:eth.chainservice    invalid network id remote_network_id=100558 expected_network_id=1
WARNING:protocol    protocol exception, stopping error=wrong network_id
INFO:p2p.peer   received hello client_version=Geth/v1.3.6-9e323d65/linux/go1.5 version=4 capabilities=(('eth', 63), ('eth', 62), ('eth', 61))
WARNING:eth.chainservice    invalid network id remote_network_id=1123 expected_network_id=1
WARNING:protocol    protocol exception, stopping error=wrong network_id
INFO:p2p.peer   received hello client_version=Geth/eth-peer-lon02-6/v1.3.5-34b622a2/linux/go1.6 version=4 capabilities=(('eth', 63), ('eth', 62), ('eth', 61), ('shh', 2))
WARNING:eth.chainservice    invalid network id remote_network_id=996787477 expected_network_id=1
WARNING:protocol    protocol exception, stopping error=wrong network_id
INFO:p2p.peer   received hello client_version=Geth/eth-peer-dal09-5/v1.3.5-34b622a2/linux/go1.6 version=4 capabilities=(('eth', 63), ('eth', 62), ('eth', 61), ('shh', 2))
WARNING:eth.chainservice    invalid network id remote_network_id=996787477 expected_network_id=1
WARNING:protocol    protocol exception, stopping error=wrong network_id
INFO:p2p.peer   received hello client_version=Gexp/v1.4.4-stable-b118fdab/linux/go1.5 version=4 capabilities=(('exp', 63), ('exp', 62), ('exp', 61))
INFO:p2p.peer   received hello client_version=Ged/v1.3.6-f653a5ce/linux/go1.6.2 version=4 capabilities=(('eth', 63), ('eth', 62), ('eth', 61))
WARNING:eth.chainservice    invalid network id remote_network_id=88 expected_network_id=1
WARNING:protocol    protocol exception, stopping error=wrong network_id
INFO:p2p.peer   received hello client_version=Geth/v1.3.5/linux/go1.5.1 version=4 capabilities=(('eth', 63), ('eth', 62), ('eth', 61))
WARNING:eth.chainservice    invalid network id remote_network_id=100558 expected_network_id=1
WARNING:protocol    protocol exception, stopping error=wrong network_id
INFO:p2p.peer   received hello client_version=Geth/v1.4.0-unstable/linux/go1.5.1 version=4 capabilities=(('eth', 63), ('eth', 62), ('eth', 61))
INFO:p2p.peer   received hello client_version=Geth/v1.5.0-unstable/linux/go1.5.1 version=4 capabilities=(('eth', 63), ('eth', 62), ('eth', 61))
INFO:p2p.peer   received hello client_version=Geth/eth-peer-dal09-1/v1.3.5-34b622a2/linux/go1.6 version=4 capabilities=(('eth', 63), ('eth', 62), ('eth', 61), ('shh', 2))
WARNING:eth.chainservice    invalid network id remote_network_id=996787477 expected_network_id=1
WARNING:protocol    protocol exception, stopping error=wrong network_id
INFO:p2p.peer   received hello client_version=Geth/eth-atm-lon02-1/v1.3.5-34b622a2/linux/go1.6 version=4 capabilities=(('eth', 63), ('eth', 62), ('eth', 61), ('shh', 2))
WARNING:eth.chainservice    invalid network id remote_network_id=996787477 expected_network_id=1
WARNING:protocol    protocol exception, stopping error=wrong network_id
INFO:p2p.peer   received hello client_version=Geth/v1.4.4-stable-8f5a9d44/linux/go1.6.2 version=4 capabilities=(('eth', 63), ('eth', 62), ('eth', 61))
WARNING:eth.chainservice    invalid network id remote_network_id=9895888 expected_network_id=1
WARNING:protocol    protocol exception, stopping error=wrong network_id
INFO:p2p.peer   received hello client_version=Gexp/v1.4.4-stable-b118fdab/linux/go1.5 version=4 capabilities=(('exp', 63), ('exp', 62), ('exp', 61))
INFO:p2p.peer   received hello client_version=Geth/eth-atm-lon02-1/v1.3.5-34b622a2/linux/go1.6 version=4 capabilities=(('eth', 63), ('eth', 62), ('eth', 61), ('shh', 2))
WARNING:eth.chainservice    invalid network id remote_network_id=996787477 expected_network_id=1
WARNING:protocol    protocol exception, stopping error=wrong network_id

這個問題是否與在沒有埠轉發的情況下在 NAT 後面執行**pyethapp有關?**我在主網上執行範例(未指定 testnet 參數)。

如此處所述https://github.com/ethereum/pyethapp/issues/113這似乎是由於 pyethapp 不知道的更高級別的協議。如果你等待它最終會起作用。

引用自:https://ethereum.stackexchange.com/questions/4481