kyuupichan/electrumx

Error in Dogecoin electrumx node at a particular block - 3773087

Dinshaw7 opened this issue · 3 comments

Description:
I am running a doge mainnet node. It is working fine and fully synced. Because of load on the node, I want to have an electrumx node on top of the doge node to serve rpc requests.

I am running doge electrumx node like this -

sudo docker run --rm -d -v /path/to/dogecoin_electrumx/:/data -e DAEMON_URL=http://username:password@127.0.0.1:22555 -e COIN=Dogecoin -e CACHE_MB=2048 -e LOG_FORMAT='%(asctime)s:%(levelname)s:%(name)s:%(message)s' -e SERVICES=tcp://:40001,ssl://:40002 -e COST_SOFT_LIMIT=0 -e COST_HARD_LIMIT=0 -e MAX_SESSIONS=2000 --ulimit nofile=4096:16384 --network host --name dogecoin-electrumx lukechilds/electrumx:v1.15.0

Issue:
I am able to run doge electrumx node successfully, but it stucks on fetching a particular block - 3773087 and throws AssertionError like below.

2021-07-12 11:16:20,119:INFO:BlockProcessor:our height: 3,760,887 daemon: 3,809,185 UTXOs 1,667MB hist 192MB
2021-07-12 11:16:50,426:INFO:BlockProcessor:our height: 3,766,187 daemon: 3,809,185 UTXOs 1,681MB hist 221MB
2021-07-12 11:17:20,584:INFO:BlockProcessor:our height: 3,773,087 daemon: 3,809,185 UTXOs 1,701MB hist 253MB
2021-07-12 11:17:32,429:INFO:Prefetcher:cancelled; prefetcher stopping
2021-07-12 11:17:32,430:INFO:Controller:shutting down
2021-07-12 11:17:32,430:INFO:Controller:shutdown complete
2021-07-12 11:17:32,435:ERROR:electrumx:ElectrumX server terminated abnormally
Traceback (most recent call last):
  File "/electrumx/electrumx_server", line 35, in main
    asyncio.run(controller.run())
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
    return future.result()
  File "/electrumx/electrumx/lib/server_base.py", line 125, in run
    await server_task
  File "/electrumx/electrumx/lib/server_base.py", line 98, in serve
    await self.serve(shutdown_event)
  File "/electrumx/electrumx/server/controller.py", line 134, in serve
    await group.spawn(wait_for_catchup())
  File "/usr/local/lib/python3.7/site-packages/aiorpcX-0.18.4-py3.7.egg/aiorpcx/curio.py", line 242, in __aexit__
    await self.join()
  File "/usr/local/lib/python3.7/site-packages/aiorpcX-0.18.4-py3.7.egg/aiorpcx/curio.py", line 211, in join
    raise task.exception()
  File "/electrumx/electrumx/server/block_processor.py", line 682, in fetch_and_process_blocks
    await group.spawn(self._process_prefetched_blocks())
  File "/usr/local/lib/python3.7/site-packages/aiorpcX-0.18.4-py3.7.egg/aiorpcx/curio.py", line 242, in __aexit__
    await self.join()
  File "/usr/local/lib/python3.7/site-packages/aiorpcX-0.18.4-py3.7.egg/aiorpcx/curio.py", line 211, in join
    raise task.exception()
  File "/electrumx/electrumx/server/block_processor.py", line 643, in _process_prefetched_blocks
    await self.check_and_advance_blocks(blocks)
  File "/electrumx/electrumx/server/block_processor.py", line 212, in check_and_advance_blocks
    for n, raw_block in enumerate(raw_blocks)]
  File "/electrumx/electrumx/server/block_processor.py", line 212, in <listcomp>
    for n, raw_block in enumerate(raw_blocks)]
  File "/electrumx/electrumx/lib/coins.py", line 256, in block
    header = cls.block_header(raw_block, height)
  File "/electrumx/electrumx/lib/coins.py", line 293, in block_header
    return deserializer.read_header(cls.BASIC_HEADER_SIZE)
  File "/electrumx/electrumx/lib/tx.py", line 309, in read_header
    self.read_auxpow()
  File "/electrumx/electrumx/lib/tx.py", line 297, in read_auxpow
    return self._read_nbytes(end - start)
  File "/electrumx/electrumx/lib/tx.py", line 166, in _read_nbytes
    assert self.binary_length >= end
AssertionError

I tried fetching this particular block from my daemon node, and it works well.
Why electrumx is unable to fetch this block ?

They did a hard fork. ElectrumX only supports BSV; you should run the one provided by spesmilo on github

Thanks for your response @kyuupichan. I will surely check spesmilo repo. Also, can you please redirect me some credible source where I can read about this hard fork. I am unable to find one.
I really appreciate your effort here. Thanks.

I was using docker image - lukechilds/electrumx:v1.15.0. Now that you are suggesting spesmilo, can you please tell me which docker image uses this.