konradkonrad / docker-pyeth-cluster Goto Github PK
View Code? Open in Web Editor NEWpyethapp private cluster with docker-compose
License: MIT License
pyethapp private cluster with docker-compose
License: MIT License
pyethapp
inside a virtualenvpyethapp should connect to the bootstrap node running inside docker. Similarly, pyethapp should also be able to connect to a standalone bootstrap node
pyethapp tries to bind to the listening socket and throws a socket busy exception (in both instances; standalone and through docker):
Launching bootstrap node:
$ pyethapp --data-dir pyethapp_server_bootstrap/ -c eth.network_id=1337 -c node.privkey_hex=091bd6067cb4612df85d9c1ff85cc47f259ced4d4cd99816b14f35650f59c322 -b 'enode://288b97262895b1c7ec61cf314c2e2004407d0a5dc77566877aad1f2a36659c8b698f4b56fd06c4a0c0bf007b4cfb3e7122d907da3b005fa90e724441902eb19e@localhost:30303' -c eth.genesis=custom_genesis_block.json -m 1000 run
Launching client node:
pyethapp --data-dir pyethapp_client/ -c eth.network_id=1337 -b 'enode://288b97262895b1c7ec61cf314c2e2004407d0a5dc77566877aad1f2a36659c8b698f4b56fd06c4a0c0bf007b4cfb3e7122d907da3b005fa90e724441902eb19e@localhost:30303' -c eth.genesis=custom_genesis_block.json run (--fake) # tried both options with and without fake
gives:
INFO:p2p.peermgr starting listener addr=('0.0.0.0', 30303)
Traceback (most recent call last):
File "/usr/local/bin/pyethapp", line 9, in <module>
load_entry_point('pyethapp', 'console_scripts', 'pyethapp')()
File "/usr/local/lib/python2.7/dist-packages/click-6.6-py2.7.egg/click/core.py", line 716, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click-6.6-py2.7.egg/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click-6.6-py2.7.egg/click/core.py", line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click-6.6-py2.7.egg/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click-6.6-py2.7.egg/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click-6.6-py2.7.egg/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/mg13/Work/3dtrust/Topics/BlockchainsIn3DPrinting/Apps/pyethapp/pyethapp/app.py", line 232, in run
app.start()
File "/usr/local/lib/python2.7/dist-packages/devp2p-0.7.2-py2.7.egg/devp2p/app.py", line 37, in start
service.start()
File "/usr/local/lib/python2.7/dist-packages/devp2p-0.7.2-py2.7.egg/devp2p/peermanager.py", line 152, in start
self.server.start()
File "/usr/local/lib/python2.7/dist-packages/gevent-1.1.0-py2.7-linux-x86_64.egg/gevent/baseserver.py", line 291, in start
self.init_socket()
File "/usr/local/lib/python2.7/dist-packages/gevent-1.1.0-py2.7-linux-x86_64.egg/gevent/server.py", line 80, in init_socket
self.socket = self.get_listener(self.address, self.backlog, self.family)
File "/usr/local/lib/python2.7/dist-packages/gevent-1.1.0-py2.7-linux-x86_64.egg/gevent/server.py", line 91, in get_listener
return _tcp_listener(address, backlog=backlog, reuse_addr=self.reuse_addr, family=family)
File "/usr/local/lib/python2.7/dist-packages/gevent-1.1.0-py2.7-linux-x86_64.egg/gevent/server.py", line 177, in _tcp_listener
sock.bind(address)
File "<string>", line 1, in bind
socket.error: [Errno 98] Address already in use: ('0.0.0.0', 30303)
Is it possible to specify the listening port?
As-is the code is not currently working.
This helped me:
ethereum/pyethapp#241
Revise Dockerfile
to:
# build with `docker build -t localethereum/client-python .`
FROM python:2.7.11
RUN pip install pyethapp==1.5.1a0
ENTRYPOINT ["/usr/local/bin/pyethapp"]
Then make setup
and the errors outlined below should be replaced with a successful start:
docker-compose up --scale bootstrap=1 --scale miner=2 --scale eth=3
Creating simple_eth_1 ...
Creating simple_eth_2 ...
Creating simple_eth_3 ...
Creating simple_eth_1 ... done
Creating simple_eth_2 ... done
Creating simple_eth_3 ... done
Creating bootstrap ...
Creating bootstrap ... done
Creating simple_miner_1 ...
Creating simple_miner_2 ...
Creating simple_miner_1 ... done
Creating simple_miner_2 ... done
BUT recurrent:
| Traceback (most recent call last):
| File "/usr/local/bin/pyethapp", line 7, in <module>
| from pyethapp.app import app
| File "/usr/local/lib/python2.7/site-packages/pyethapp/app.py", line 19, in <module>
| from ethereum import blocks
| ImportError: cannot import name blocks
bootstrap exited with code 1
and
docker-compose ps
Name Command State Ports
----------------------------------------------------------------
bootstrap /usr/local/bin/pyethapp -c ... Exit 1
debug /usr/local/bin/pyethapp -c ... Exit 1
simple_eth_1 /usr/local/bin/pyethapp -c ... Exit 1
simple_eth_2 /usr/local/bin/pyethapp -c ... Exit 1
simple_eth_3 /usr/local/bin/pyethapp -c ... Exit 1
simple_miner_1 /usr/local/bin/pyethapp -c ... Exit 1
simple_miner_2 /usr/local/bin/pyethapp -c ... Exit 1
when i enter into with-netstats, and docker-compose scale bootstrap=1 miner=2 eth=10 statsmon=1
which will broke errors, as follows
Building statsmon
Step 1 : FROM iojs
Pulling repository docker.io/library/iojs
ERROR: for statsmon
ERROR: Service 'statsmon' failed to build: Network timed out while trying to connect to https://index.docker.io/v1/repositories/library/iojs/images. You may want to check your internet connection or if you are behind a proxy.
Hi,
I would like to edit the python client with some improvements. Where can I find the client's source code and what should I change in the dovker setup for this?
Thanks for an awesome bit of work!
Mac OSX, installed the dockerfile, all runs well on the ethereum front,
https://www.dropbox.com/s/sqgaobsw5h84e1z/Screenshot%202015-09-17%2021.59.34.png?dl=0
but no netstats visible in browser from the statsmon instance - does netstats visualiser need to be started separately / is there an instruction missing here?
Thanks in advance,
Jon
I'm on ubuntu, I can open my browser to 127.0.0.1:3000 and see the netstats page. No data is being recorded there, however.
What is the basic chain of commands, like you listed in the readme for the simple version, that I need to get this one running correctly?
I'm not 100% sure how to actually access each node that docker created. I'm trying to use the commands you listed for "Interactive container" section of your readme but it's not connecting to all nodes or mining.
Did you suggest in another issue to see if the containers are set up by default to work with a different port? So should I try and stop/rm statsmon, change the localhost url as you suggested, and then start another statsmon?
Thanks!
WARNING:eth.chainservice known block block=<TransientBlock(#449 6c65537b)>
miner_2 | Traceback (most recent call last):
miner_2 | File "/usr/local/lib/python2.7/site-packages/gevent/greenlet.py", line 534, in run
miner_2 | result = self._run(_self.args, *_self.kwargs)
miner_2 | File "/usr/local/lib/python2.7/site-packages/pyethapp/eth_service.py", line 295, in _add_blocks
miner_2 | if self.chain.add_block(block, forward_pending_transactions=self.is_mining):
miner_2 | File "/usr/local/lib/python2.7/site-packages/ethereum/chain.py", line 320, in add_block
miner_2 | self._update_head(block, forward_pending_transactions)
miner_2 | File "/usr/local/lib/python2.7/site-packages/ethereum/chain.py", line 199, in _update_head
miner_2 | self.new_head_cb(block)
miner_2 | File "/usr/local/lib/python2.7/site-packages/pyethapp/eth_service.py", line 180, in _on_new_head
miner_2 | self._on_new_head_candidate() # we implicitly have a new head_candidate
miner_2 | File "/usr/local/lib/python2.7/site-packages/pyethapp/eth_service.py", line 185, in _on_new_head_candidate
miner_2 | cb(self.chain.head_candidate)
miner_2 | File "/usr/local/lib/python2.7/site-packages/pyethapp/pow_service.py", line 146, in on_new_head_candidate
miner_2 | difficulty=block.difficulty)))
miner_2 | File "/usr/local/lib/python2.7/site-packages/gipc/gipc.py", line 748, in put
miner_2 | self._write(struct.pack("!i", len(bindata)) + bindata)
miner_2 | File "/usr/local/lib/python2.7/site-packages/gipc/gipc.py", line 716, in _write
miner_2 | bytes_written = _write_nonblocking(self._fd, bindata)
miner_2 | File "/usr/local/lib/python2.7/site-packages/gevent/os.py", line 111, in nb_write
miner_2 | return _write(fd, buf)
miner_2 | OSError: [Errno 32] Broken pipe
miner_2 | <Greenlet at 0x7f02c0a372d0: <bound method ChainService._add_blocks of <ChainService at 0x7f02c381e0f0>>> failed with OSError
system info:
root@linux-ubuntu-3:/home/mime# free -m
total used free shared buffers cached
Mem: 3009 2787 221 3 14 66
-/+ buffers/cache: 2706 302
Swap: 1021 1021 0
root@linux-ubuntu-3:/home/mime#
can't create new account with
docker run -it --rm --link bootstrap:bootstrap -v /tmp/pyethapp:/root/.config localethereum/client-python -c eth.network_id=1337 -b 'enode://288b97262895b1c7ec61cf314c2e2004407d0a5dc77566877aad1f2a36659c8b698f4b56fd06c4a0c0bf007b4cfb3e7122d907da3b005fa90e724441902eb19e@bootstrap:30303' -m 50 -c eth.genesis_hash=283bd9430c5f3114872f93beefe99d6626980b3a4a18a44ddd27749cd89688f2 account new
fixed with #9
I get this error when trying to run the with-netstats
setup. This is running on an AWS EC2 Ubuntu 14.04 instance.
ERROR: Service 'bootstrap' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y curl git-core && curl -sL https://deb.nodesource.com/setup | bash - && apt-get update && apt-get install -y nodejs' returned a non-zero code: 1
Here's the whole log if you'd like to see it:
Σ:~/ethereum-cluster/docker-pyeth-cluster/with-netstats$ sudo docker-compose scale bootstrap=1 miner=2 eth=10 statsmon=1
WARNING: The "bootstrap" service specifies a port on the host. If multiple containers for this service are created on a single host, the port will clash.
Creating and starting bootstrap ...
Building bootstrap
Step 1 : FROM ethereum/client-python
latest: Pulling from ethereum/client-python
e5ad7970bc69: Pull complete
a3ed95caeb02: Pull complete
0a7eeedff1c5: Pull complete
bbe5878d8681: Pull complete
1df3bb332f6a: Pull complete
9b26172f72dc: Pull complete
66827c4496e3: Pull complete
d53e9c58fa7d: Pull complete
9b17be6e2a41: Pull complete
667f7559b8f7: Pull complete
3cb99d002509: Pull complete
8cb930eca1f0: Pull complete
eb93cf4ba8bc: Pull complete
bbdb17f4e286: Pull complete
bd5661131733: Pull complete
b20f9a854d53: Pull complete
d97aa8e8ee15: Pull complete
b77ac10b88bf: Pull complete
197993d2de75: Pull complete
d35b63a73b82: Pull complete
05e4cd38daa8: Pull complete
1b08ec3eb780: Pull complete
Digest: sha256:aa1da3dc2f88140df4ef5cfdd95f4d75670308f2e1c554d7c50da016b9171f48
Status: Downloaded newer image for ethereum/client-python:latest
---> 1723d972bbea
Step 2 : RUN apt-get update && apt-get install -y curl git-core && curl -sL https://deb.nodesource.com/setup | bash - && apt-get update && apt-get install -y nodejs
---> Running in 4768a10aa4a1
Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
Get:2 http://security.debian.org jessie/updates/main amd64 Packages [300 kB]
Ign http://httpredir.debian.org jessie InRelease
Get:3 http://httpredir.debian.org jessie-updates InRelease [142 kB]
Get:4 http://httpredir.debian.org jessie Release.gpg [2373 B]
Get:5 http://httpredir.debian.org jessie-updates/main amd64 Packages [9283 B]
Get:6 http://httpredir.debian.org jessie Release [148 kB]
Get:7 http://httpredir.debian.org jessie/main amd64 Packages [9034 kB]
Fetched 9700 kB in 14s (669 kB/s)
Reading package lists...
W: Size of file /var/lib/apt/lists/httpredir.debian.org_debian_dists_jessie_main_binary-amd64_Packages.gz is not what the server reported 9033871 9035431
Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
file gir1.2-freedesktop gir1.2-gdkpixbuf-2.0 gir1.2-glib-2.0 gir1.2-rsvg-2.0
javascript-common libcairo-gobject2 libcairo-script-interpreter2 libcdt5
libcgraph6 libcroco3 libdjvulibre-dev libelfg0 libexif-dev libexif12
libexpat1-dev libfontconfig1-dev libfreetype6-dev libgd3
libgirepository-1.0-1 libglib2.0-bin libgraphviz-dev libgvc6 libgvpr2
libice-dev libice6 libilmbase-dev libjasper-dev libjbig-dev libjs-excanvas
libjs-jquery liblcms2-dev liblqr-1-0-dev libltdl-dev liblzo2-2 libmagic1
libmagickcore-6-arch-config libmagickcore-6-headers libmagickwand-6-headers
libopenexr-dev libpathplan4 libpcre3-dev libpcrecpp0 libpixman-1-dev
libpng12-dev libpthread-stubs0-dev librsvg2-2 librsvg2-common libsm-dev
libsm6 libtiff5-dev libtiffxx5 libtool libvpx1 libwmf-dev libx11-dev
libx11-doc libxau-dev libxcb-render0-dev libxcb-shm0-dev libxcb1-dev
libxdmcp-dev libxdot4 libxext-dev libxpm4 libxrender-dev libxt-dev libxt6
mime-support pkg-config x11-common x11proto-core-dev x11proto-input-dev
x11proto-kb-dev x11proto-render-dev x11proto-xext-dev xorg-sgml-doctools
xtrans-dev
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libcurl3 libcurl4-openssl-dev
Suggested packages:
libcurl4-doc libcurl3-dbg libidn11-dev libkrb5-dev libldap2-dev librtmp-dev
libssh2-1-dev
The following packages will be upgraded:
curl git-core libcurl3 libcurl4-openssl-dev
4 upgraded, 0 newly installed, 0 to remove and 114 not upgraded.
Need to get 796 kB of archives.
After this operation, 21.5 kB of additional disk space will be used.
Get:1 http://httpredir.debian.org/debian/ jessie/main libcurl4-openssl-dev amd64 7.38.0-4+deb8u3 [336 kB]
Get:2 http://httpredir.debian.org/debian/ jessie/main curl amd64 7.38.0-4+deb8u3 [200 kB]
Get:3 http://httpredir.debian.org/debian/ jessie/main libcurl3 amd64 7.38.0-4+deb8u3 [259 kB]
Get:4 http://httpredir.debian.org/debian/ jessie/main git-core all 1:2.1.4-2.1+deb8u2 [1496 B]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 796 kB in 0s (1364 kB/s)
(Reading database ... 25744 files and directories currently installed.)
Preparing to unpack .../libcurl4-openssl-dev_7.38.0-4+deb8u3_amd64.deb ...
Unpacking libcurl4-openssl-dev:amd64 (7.38.0-4+deb8u3) over (7.38.0-4+deb8u2) ...
Preparing to unpack .../curl_7.38.0-4+deb8u3_amd64.deb ...
Unpacking curl (7.38.0-4+deb8u3) over (7.38.0-4+deb8u2) ...
Preparing to unpack .../libcurl3_7.38.0-4+deb8u3_amd64.deb ...
Unpacking libcurl3:amd64 (7.38.0-4+deb8u3) over (7.38.0-4+deb8u2) ...
Preparing to unpack .../git-core_1%3a2.1.4-2.1+deb8u2_all.deb ...
Unpacking git-core (1:2.1.4-2.1+deb8u2) over (1:2.1.4-2.1) ...
Setting up libcurl3:amd64 (7.38.0-4+deb8u3) ...
Setting up libcurl4-openssl-dev:amd64 (7.38.0-4+deb8u3) ...
Setting up curl (7.38.0-4+deb8u3) ...
Setting up git-core (1:2.1.4-2.1+deb8u2) ...
Processing triggers for libc-bin (2.19-18) ...
## Installing the NodeSource Node.js 0.10 repo...
## Populating apt-get cache...
+ apt-get update
Hit http://security.debian.org jessie/updates InRelease
Get:1 http://security.debian.org jessie/updates/main amd64 Packages [300 kB]
Hit http://httpredir.debian.org jessie-updates InRelease
Ign http://httpredir.debian.org jessie InRelease
Err http://httpredir.debian.org jessie Release.gpg
Error reading from server. Remote end closed connection [IP: 5.153.231.35 80]
Get:2 http://httpredir.debian.org jessie-updates/main amd64 Packages [9283 B]
Hit http://httpredir.debian.org jessie Release
Get:3 http://httpredir.debian.org jessie/main amd64 Packages [9034 kB]
Fetched 9343 kB in 3s (2854 kB/s)
W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie/Release.gpg Error reading from server. Remote end closed connection [IP: 5.153.231.35 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
Error executing command, exiting
ERROR: for bootstrap
ERROR: Service 'bootstrap' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y curl git-core && curl -sL https://deb.nodesource.com/setup | bash - && apt-get update && apt-get install -y nodejs' returned a non-zero code: 1
State: the current code base builds a container locally -- the upstream container issue (dockerhub/ethereum/client-python) still persists.
Subsequent error appeared solvable but I encountered a further problem and am abandoning this :-(
I took the hint and replaced the values of eth.genesis_hash
through the docker-compose.yaml
replaced: d4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3
with: 283bd9430c5f3114872f93beefe99d6626980b3a4a18a44ddd27749cd89688f2
This got me beyond:
bootstrap | deleting 32047
bootstrap | Initializing chain from provided genesis declaration
bootstrap | INFO:eth.chainservice chain at number=0
bootstrap | Traceback (most recent call last):
bootstrap | File "/usr/local/bin/pyethapp", line 11, in <module>
bootstrap | sys.exit(app())
bootstrap | File "/usr/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
bootstrap | return self.main(*args, **kwargs)
bootstrap | File "/usr/local/lib/python2.7/site-packages/click/core.py", line 697, in main
bootstrap | rv = self.invoke(ctx)
bootstrap | File "/usr/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
bootstrap | return _process_result(sub_ctx.command.invoke(sub_ctx))
bootstrap | File "/usr/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
bootstrap | return ctx.invoke(self.callback, **ctx.params)
bootstrap | File "/usr/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
bootstrap | return callback(*args, **kwargs)
bootstrap | File "/usr/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
bootstrap | return f(get_current_context(), *args, **kwargs)
bootstrap | File "/usr/local/lib/python2.7/site-packages/pyethapp/app.py", line 223, in run
bootstrap | service.register_with_app(app)
bootstrap | File "/usr/local/lib/python2.7/site-packages/devp2p/service.py", line 47, in register_with_app
bootstrap | s = klass(app)
bootstrap | File "/usr/local/lib/python2.7/site-packages/pyethapp/eth_service.py", line 171, in __init__
bootstrap | sce['genesis_hash'], self.chain.genesis.hex_hash)
bootstrap | AssertionError: Genesis hash mismatch.
bootstrap | Expected: 283bd9430c5f3114872f93beefe99d6626980b3a4a18a44ddd27749cd89688f2
bootstrap | Got: d4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3
bootstrap exited with code 1
BUT finally blocked by:
bootstrap | INFO:p2p.peermgr starting listener addr=('0.0.0.0', 30303)
bootstrap | INFO:p2p.discovery starting discovery
bootstrap | INFO:p2p.discovery starting listener host=0.0.0.0 port=30303
bootstrap | Traceback (most recent call last):
bootstrap | File "/usr/local/bin/pyethapp", line 11, in <module>
bootstrap | sys.exit(app())
bootstrap | File "/usr/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
bootstrap | return self.main(*args, **kwargs)
bootstrap | File "/usr/local/lib/python2.7/site-packages/click/core.py", line 697, in main
bootstrap | rv = self.invoke(ctx)
bootstrap | File "/usr/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
bootstrap | return _process_result(sub_ctx.command.invoke(sub_ctx))
bootstrap | File "/usr/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
bootstrap | return ctx.invoke(self.callback, **ctx.params)
bootstrap | File "/usr/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
bootstrap | return callback(*args, **kwargs)
bootstrap | File "/usr/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
bootstrap | return f(get_current_context(), *args, **kwargs)
bootstrap | File "/usr/local/lib/python2.7/site-packages/pyethapp/app.py", line 228, in run
bootstrap | app.start()
bootstrap | File "/usr/local/lib/python2.7/site-packages/devp2p/app.py", line 41, in start
bootstrap | service.start()
bootstrap | File "/usr/local/lib/python2.7/site-packages/devp2p/discovery.py", line 587, in start
bootstrap | nodes = [Node.from_uri(x) for x in self.app.config['discovery']['bootstrap_nodes']]
bootstrap | File "/usr/local/lib/python2.7/site-packages/devp2p/discovery.py", line 123, in from_uri
bootstrap | return cls(pubkey, Address(ip, int(port)))
bootstrap | File "/usr/local/lib/python2.7/site-packages/devp2p/discovery.py", line 75, in __init__
bootstrap | raise e
bootstrap | ipaddress.AddressValueError: 'localhost' does not appear to be an IPv4 or IPv6 address. Did you pass in a bytes (str in Python 2) instead of a unicode object?
bootstrap exited with code 1
I already have pyethapp installed and would just like to open a private network manually. I found the mining command in the simple docker yaml file and am running it in the pyethapp console as follows:
pyethapp -c eth.network_id=1337 -b 'enode://288b97262895b1c7ec61cf314c2e2004407d0a5dc77566877aad1f2a36659c8b698f4b56fd06c4a0c0bf007b4cfb3e7122d907da3b005fa90e724441902eb19e@localhost:30303' -m 50 -c eth.genesis_hash=d4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3 run --fake
I modified the genesis hash to be what pyethapp was expecting but now I'm getting the following error:
ipaddress.AddressValueError: 'localhost' does not appear to be an IPv4 or IPv6 address. Did you pass in a bytes (str in Python 2) instead of a unicode object?
INFO:jsonrpc starting IPCRPCServer ipcpath=/tmp/pyethapp.ipc
INFO:jsonrpc starting JSONRPCServer port=4000
INFO:p2p.peermgr waiting for bootstrap
I've tried replacing bootstrap with localhost and vice versa but get the same error. Could you provide some feedback? Thanks.
Encounter this error when trying to mine. docker run -it --rm --link bootstrap:bootstrap -v /tmp/pyethapp:/root/.config ethereum/client-python -c eth.network_id=1337 -b 'enode://288b97262895b1c7ec61cf314c2e2004407d0a5dc77566877aad1f2a36659c8b698f4b56fd06c4a0c0bf007b4cfb3e7122d907da3b005fa90e724441902eb19e@bootstrap:30303' -m 50 run --fake
INFO:accounts searching for key files directory=/root/.config/pyethapp/keystore
INFO:accounts found account(s) accounts=[<Account(address=222985029f2bab1e31a251f02e9c6f0cd206bb04, id=None)>, <Account(address=4689a81eeff9f84e930814b40fdbc936b41c86dc, id=None)>]
INFO:app registering service service=accounts
INFO:db opening LevelDB path=/root/.config/pyethapp/leveldb max_open_files=128 block_cache_size=8388608 write_buffer_size=4194304
INFO:app registering service service=db
INFO:p2p.discovery NodeDiscovery init
INFO:p2p.discovery starting discovery proto this_enode=enode://ac2b823a713e4a323849123dea68dd7891647d3d78fc14f28971a5c5fe1f29abf9ed0ffdfd3abef582f5ca98107c3fda89e8931210bfa348c182ab504a39e2ba@0.0.0.0:30303
INFO:app registering service service=discovery
INFO:p2p.peermgr PeerManager init
INFO:app registering service service=peermanager
Traceback (most recent call last):
File "/usr/local/bin/pyethapp", line 9, in <module>
load_entry_point('pyethapp==1.0.3', 'console_scripts', 'pyethapp')()
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 700, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 680, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 873, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 508, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/click/decorators.py", line 16, in new_func
return f(get_current_context(), *args, **kwargs)
File "/pyrlp/pydevp2p/pyethereum/pyethapp/pyethapp/app.py", line 189, in run
service.register_with_app(app)
File "/pyrlp/pydevp2p/devp2p/service.py", line 46, in register_with_app
s = klass(app)
File "/pyrlp/pydevp2p/pyethereum/pyethapp/pyethapp/eth_service.py", line 131, in __init__
db_network_id, sce['network_id'])
Exception: This database was initialized with network_id 1 and can not be used when connecting to network_id 1337
Subsequent error appeared solvable but I encountered a further problem and am abandoning this :-(
I took the hint and replaced the values of eth.genesis_hash
through the docker-compose.yaml
replaced: d4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3
with: 283bd9430c5f3114872f93beefe99d6626980b3a4a18a44ddd27749cd89688f2
This got me beyond:
bootstrap | deleting 32047
bootstrap | Initializing chain from provided genesis declaration
bootstrap | INFO:eth.chainservice chain at number=0
bootstrap | Traceback (most recent call last):
bootstrap | File "/usr/local/bin/pyethapp", line 11, in <module>
bootstrap | sys.exit(app())
bootstrap | File "/usr/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
bootstrap | return self.main(*args, **kwargs)
bootstrap | File "/usr/local/lib/python2.7/site-packages/click/core.py", line 697, in main
bootstrap | rv = self.invoke(ctx)
bootstrap | File "/usr/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
bootstrap | return _process_result(sub_ctx.command.invoke(sub_ctx))
bootstrap | File "/usr/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
bootstrap | return ctx.invoke(self.callback, **ctx.params)
bootstrap | File "/usr/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
bootstrap | return callback(*args, **kwargs)
bootstrap | File "/usr/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
bootstrap | return f(get_current_context(), *args, **kwargs)
bootstrap | File "/usr/local/lib/python2.7/site-packages/pyethapp/app.py", line 223, in run
bootstrap | service.register_with_app(app)
bootstrap | File "/usr/local/lib/python2.7/site-packages/devp2p/service.py", line 47, in register_with_app
bootstrap | s = klass(app)
bootstrap | File "/usr/local/lib/python2.7/site-packages/pyethapp/eth_service.py", line 171, in __init__
bootstrap | sce['genesis_hash'], self.chain.genesis.hex_hash)
bootstrap | AssertionError: Genesis hash mismatch.
bootstrap | Expected: 283bd9430c5f3114872f93beefe99d6626980b3a4a18a44ddd27749cd89688f2
bootstrap | Got: d4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3
bootstrap exited with code 1
BUT finally blocked by:
bootstrap | INFO:p2p.peermgr starting listener addr=('0.0.0.0', 30303)
bootstrap | INFO:p2p.discovery starting discovery
bootstrap | INFO:p2p.discovery starting listener host=0.0.0.0 port=30303
bootstrap | Traceback (most recent call last):
bootstrap | File "/usr/local/bin/pyethapp", line 11, in <module>
bootstrap | sys.exit(app())
bootstrap | File "/usr/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
bootstrap | return self.main(*args, **kwargs)
bootstrap | File "/usr/local/lib/python2.7/site-packages/click/core.py", line 697, in main
bootstrap | rv = self.invoke(ctx)
bootstrap | File "/usr/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
bootstrap | return _process_result(sub_ctx.command.invoke(sub_ctx))
bootstrap | File "/usr/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
bootstrap | return ctx.invoke(self.callback, **ctx.params)
bootstrap | File "/usr/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
bootstrap | return callback(*args, **kwargs)
bootstrap | File "/usr/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
bootstrap | return f(get_current_context(), *args, **kwargs)
bootstrap | File "/usr/local/lib/python2.7/site-packages/pyethapp/app.py", line 228, in run
bootstrap | app.start()
bootstrap | File "/usr/local/lib/python2.7/site-packages/devp2p/app.py", line 41, in start
bootstrap | service.start()
bootstrap | File "/usr/local/lib/python2.7/site-packages/devp2p/discovery.py", line 587, in start
bootstrap | nodes = [Node.from_uri(x) for x in self.app.config['discovery']['bootstrap_nodes']]
bootstrap | File "/usr/local/lib/python2.7/site-packages/devp2p/discovery.py", line 123, in from_uri
bootstrap | return cls(pubkey, Address(ip, int(port)))
bootstrap | File "/usr/local/lib/python2.7/site-packages/devp2p/discovery.py", line 75, in __init__
bootstrap | raise e
bootstrap | ipaddress.AddressValueError: 'localhost' does not appear to be an IPv4 or IPv6 address. Did you pass in a bytes (str in Python 2) instead of a unicode object?
bootstrap exited with code 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.