Closed lorenz10 closed 3 years ago
Electrum and peercoind aren't bound to the same network, so you'll have a bad time trying to reach a hostname (user:pass@peercoind).
You should be using docker-compose.
ok now Testnet started, however the blockchain does not syncronize.
"verificationprogress": 1.002227318266335e-06,
"initialblockdownload": true,
ERROR:Prefetcher:ignoring unexpected exception
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/e_x-1.16.0-py3.8.egg/electrumx/server/block_processor.py", line 64, in main_loop
if not await self._prefetch_blocks():
File "/usr/local/lib/python3.8/site-packages/e_x-1.16.0-py3.8.egg/electrumx/server/block_processor.py", line 134, in _prefetch_blocks
blocks[0] = self.coin.genesis_block(blocks[0])
File "/usr/local/lib/python3.8/site-packages/e_x-1.16.0-py3.8.egg/electrumx/lib/coins.py", line 159, in genesis_block
raise CoinError(f'genesis block has hash {header_hex_hash} '
electrumx.lib.coins.CoinError: genesis block has hash 00000001f757bb737f6596503e17cd17b0658ce630cc727c0cca81aec47c9f06 expected 0000000032fe677166d54963b62a4677d8957e87c508eaa4fd7eb1c880cd27e3
could it be because of this error in electrumx?
you're running the wrong coin on electrum. here is my docker-compose.yaml
version: '3.5'
services:
peercoind-testnet:
image: peercoin/peercoind:latest
restart: always
environment:
- RPC_USER=bitcoinrpc
- RPC_PASSWORD=asdf
volumes:
- type: bind
source: /opt/testnet-electrum/peercoin/
target: /data
command:
-nominting
-printtoconsole
-testnet
-rpcbind=0.0.0.0
logging:
driver: "json-file"
options:
max-size: 100m
ports:
- "9903:9903"
electrumx-testnet:
image: peercoin/electrumx:latest
environment:
- DAEMON_URL=bitcoinrpc:asdf@peercoind-testnet:9904
- COIN=PeercoinTestnet
- NET=testnet
- DB_DIRECTORY=/data
- CACHE_MB=400
- SERVICES=tcp://:50007,ssl://:50008,wss://:50009
- DONATION_ADDRESS=PPXMXETHJE3E8k6s8vmpDC18b7y5eKAudS
- SSL_CERTFILE=/data/fullchain.pem
- SSL_KEYFILE=/data/privkey.pem
volumes:
- type: bind
source: /opt/testnet-electrum/db/
target: /data
ports:
- "50007:50007" # comment out to disable TCP port (plaintext)
# - "0.0.0.0:50001:50001" # comment out to disable TCP port (plaintext)
- "50008:50008"
# - "0.0.0.0:50002:50002"
- "50009:50009"
# - "0.0.0.0:50004:50004"
# - "8000:8000"
restart: always
logging:
driver: "json-file"
options:
max-size: 100m
depends_on:
- peercoind-testnet
Quick side note: You will need valid SSL certs for the WSS connection to work.
1) The chain still does not sync.
INFO:PeerManager:accepted new peer electrum.peercoinexplorer.net from coins.py
INFO:PeerManager:no proxy detected, will try later
INFO:PeerManager:[electrum.peercoinexplorer.net:50002 SSL]
INFO:PeerManager:[electrum.peercoinexplorer.net:50002 SSL] [Errno -2] Name does not resolve
INFO:MemPool:0 txs 0.00 MB touching 0 addresses
INFO:MemPool:0 txs 0.00 MB touching 0 addresses
is this due to your quick note?
Quick side note: You will need valid SSL certs for the WSS connection to work.
2) And before going on solving problems, given what you said about valid SSL certs, is it possible for me to setup on my pc peercoind + electrumx and contact them using my wallet peercoin_flutter or do I need a server with a domain name, static IP etc. ?
peercoin_flutter will enforce a valid SSL cert and I don't think we should change that.
I'm not saying you should change it, I'm just tring to understand how everything works since I am a student and I have no experience in this... My goal is to fork my own blockchain from Peercoin, so what I had planned to do was: first forking peercoin_flutter, then setup on my pc my own electrumx + peercoind kind of server and finally change the parameters of peercoind (genesis block for example) to have my own new blockchain. Do you think this is feasible ? Or do I need a "real" server ?
No it's certainly possible that you run this from home. You don't need a static IP address for SSL to work properly.
I use letsencrypt certs for this and I think you can too.
ok thanks, I'll try to figure it out.
I'm successfully running docker-peercoind with testnet (curl test provides a result):
but when I try to run also electrumx-docker:
I get this error: