Can anybody assist me to debug this subject?
What I Am Attempting to Do
I’m trying to run a bitcoind regtest node and join it to electrumx_server
The Downside
Once I run electrumx_server, it connects to bitcoind efficiently but it surely crashes when it begins to learn the primary block giving this error:
RuntimeError: truncated block file
Setting Particulars
Working System: Ubuntu 22.04
ElectrumX Model: 1.20.2
bitcoind Model: v27.0
These are the logs after I run electrumx_server
command:
INFO:electrumx:ElectrumX server beginning
WARNING:Env:lowered most periods from 1,000 to 674 as a result of your open file restrict is 1,024
INFO:electrumx:logging degree: INFO
INFO:Controller:Python model: 3.10.12 (primary, Nov 6 2024, 20:22:13) [GCC 11.4.0]
INFO:Controller:software program model: ElectrumX 1.20.2
INFO:Controller:aiorpcX model: 0.22.1
INFO:Controller:supported protocol variations: 1.4-1.4.2
INFO:Controller:occasion loop coverage: None
INFO:Controller:reorg restrict is 8,000 blocks
INFO:Daemon:daemon #1 at 127.0.0.1:18443/ (present)
INFO:DB:switching present listing to /residence/omarosman23/.electrumx/db
INFO:DB:utilizing leveldb for DB backend
INFO:DB:opened UTXO DB (for sync: True)
INFO:DB:UTXO DB model: 8
INFO:DB:coin: BitcoinSV
INFO:DB:community: regtest
INFO:DB:peak: 0
INFO:DB:tip: 0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206
INFO:DB:tx rely: 1
INFO:DB:chain measurement: 0 GB (285 bytes)
INFO:DB:flushing DB cache at 1,200 MB
INFO:Historical past:historical past DB model: 1
INFO:Historical past:flush rely: 1
INFO:BlockProcessor:scanning block listing meta/blocks...
INFO:BlockProcessor:deleted 1 stale block information, whole measurement 285 bytes
INFO:BlockProcessor:catching as much as daemon peak 101 (101 blocks behind)
INFO:BlockProcessor:peak 1 of 101 6962336134cc551e47876c1bcc436986489b8c0d9b6008c34b8781f87bbf3544 2024-12-04 01:07:08 0.000GB 1 txs chain 0GB
INFO:SessionManager:stopping servers
INFO:SessionManager:closing connections...
INFO:SessionManager:connections closed
ERROR:BlockProcessor:error prefetching 0610f78b45cdcb8f3acc06bb6c0fa976ef79e824360058ef1ba76ee119c7cc21: Session is closed
ERROR:BlockProcessor:error prefetching 11575e4c2dd2b786ffe24ab0439f7fec21a6860d9485b63a06273401a37d9f32: 'NoneType' object has no attribute 'get'
ERROR:BlockProcessor:error prefetching 60c69f7f4fd78479c376cd06163c198aa5e45df053ac90918e9f90b43d69f73a: 'NoneType' object has no attribute 'get'
ERROR:BlockProcessor:error prefetching 359d3818b64039b05e6552f272c1fb6c98fb713b6f4d3ba8e736dde9e159d0cd: 'NoneType' object has no attribute 'get'
ERROR:BlockProcessor:error prefetching 46a16268710b51639eec8173bd8cb90ed20bdc45c067824f3c14ccb8941d1bf9: 'NoneType' object has no attribute 'get'
INFO:Controller:shutting down
INFO:Controller:shutdown full
ERROR:BlockProcessor:error prefetching 55b9ba7f176fdcdd90be70816b12e7e387e2c301993d7190833410d63e910af4: 'NoneType' object has no attribute 'get'
ERROR:BlockProcessor:error prefetching 70a1e31ab0606cb04a3972005ce708c933a47c39678585de9c7a5a762c40fb19: 'NoneType' object has no attribute 'get'
ERROR:BlockProcessor:error prefetching 0cecb7ba4ffec37b3da27536c5ef35b87946fe09a6551e515f9a7f09b0896023: 'NoneType' object has no attribute 'get'
ERROR:BlockProcessor:error prefetching 641e359e27b8d10d4c11b316fab5935dfaa26cc073aeb68a4117005013a1e176: 'NoneType' object has no attribute 'get'
ERROR:BlockProcessor:error prefetching 208ab8575cb81cee12fdaf920656eb37e3bf1202a80a208bb3dcf9490280bc4d: 'NoneType' object has no attribute 'get'
ERROR:BlockProcessor:error prefetching 071e7faf308ed9b5d10700bd10aba36f483b08410ba95ccc7bf5ca4120211e00: 'NoneType' object has no attribute 'get'
ERROR:BlockProcessor:error prefetching 38fc7e85297feb287d1fdcc142976a925611bed841b2aceebe7aa27394759c97: 'NoneType' object has no attribute 'get'
ERROR:BlockProcessor:error prefetching 2602d075e6764d6f111ab702658d7663746d4c30ab43258d0baf3523d28fac6b: 'NoneType' object has no attribute 'get'
ERROR:BlockProcessor:error prefetching 78b3b683bd21f3ef3bdba8e6af1b8d331e6b70f5062549a2df4371c92ac1dc33: 'NoneType' object has no attribute 'get'
ERROR:electrumx:ElectrumX server terminated abnormally
Traceback (most up-to-date name final):
File "/residence/omarosman23/.native/bin/electrumx_server", line 35, in primary
asyncio.run(controller.run())
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(primary)
File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.outcome()
File "/residence/omarosman23/.native/lib/python3.10/site-packages/electrumx/lib/server_base.py", line 125, in run
await server_task
File "/residence/omarosman23/.native/lib/python3.10/site-packages/electrumx/lib/server_base.py", line 98, in serve
await self.serve(shutdown_event)
File "/residence/omarosman23/.native/lib/python3.10/site-packages/electrumx/server/controller.py", line 143, in serve
activity.outcome()
File "/residence/omarosman23/.native/lib/python3.10/site-packages/electrumx/server/block_processor.py", line 758, in fetch_and_process_blocks
await self.advance_blocks(hex_hashes)
File "/residence/omarosman23/.native/lib/python3.10/site-packages/electrumx/server/block_processor.py", line 476, in advance_blocks
await self.run_with_lock(advance_and_maybe_flush(block))
File "/residence/omarosman23/.native/lib/python3.10/site-packages/electrumx/server/block_processor.py", line 320, in run_with_lock
return await asyncio.defend(run_locked())
File "/residence/omarosman23/.native/lib/python3.10/site-packages/electrumx/server/block_processor.py", line 319, in run_locked
return await coro
File "/residence/omarosman23/.native/lib/python3.10/site-packages/electrumx/server/block_processor.py", line 466, in advance_and_maybe_flush
await run_in_thread(self.advance_block, block)
File "/residence/omarosman23/.native/lib/python3.10/site-packages/aiorpcx/curio.py", line 57, in run_in_thread
return await get_event_loop().run_in_executor(None, func, *args)
File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
outcome = self.fn(*self.args, **self.kwargs)
File "/residence/omarosman23/.native/lib/python3.10/site-packages/electrumx/server/block_processor.py", line 510, in advance_block
for tx, tx_hash in block.iter_txs():
File "/residence/omarosman23/.native/lib/python3.10/site-packages/electrumx/server/block_processor.py", line 113, in iter_txs
uncooked = uncooked[cursor:] + self._read(self.chunk_size)
File "/residence/omarosman23/.native/lib/python3.10/site-packages/electrumx/server/block_processor.py", line 71, in _read
increase RuntimeError(f'truncated block file for block {self.hex_hash} '
RuntimeError: truncated block file for block 6962336134cc551e47876c1bcc436986489b8c0d9b6008c34b8781f87bbf3544 peak 1
Configuration Particulars
ElectrumX Configuration (config):
DB_DIRECTORY = /residence/omarosman23/.electrumx/db
DB_ENGINE = rocksdb
DAEMON_URL = http://rpcuser:[email protected]:18443
COIN = BitcoinSVRegtest
NET= regtest
SSL_CERTFILE = /residence/omarosman23/.electrumx/electrumx.crt
SSL_KEYFILE = /residence/omarosman23/.electrumx/electrumx.key
Bitcoin Daemon Configuration (bitcoin.conf):
server=1
txindex=1
rpcuser=rpcuser
rpcpassword=rpcpassword
rpcallowip=0.0.0.0/0
[regtest]
rpcbind=0.0.0.0
rpcport=18443
Anticipated Habits
The electrumx_server ought to connect with the bitcoind node, scans the blocks and doesn’t crash