Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Startup error with bitcoin core 23.0 #266

Closed
waage opened this issue Apr 25, 2022 · 8 comments · Fixed by #273
Closed

Startup error with bitcoin core 23.0 #266

waage opened this issue Apr 25, 2022 · 8 comments · Fixed by #273

Comments

@waage
Copy link

waage commented Apr 25, 2022

INFO:2022-04-25 17:11:27,328: Synchronizing mempool . . .
Traceback (most recent call last):
  File "/home/norbert/.local/bin/electrum-personal-server", line 8, in <module>
    sys.exit(main())
  File "/home/norbert/.local/lib/python3.8/site-packages/electrumpersonalserver/server/common.py", line 494, in main
    run_electrum_server(rpc, txmonitor, config)
  File "/home/norbert/.local/lib/python3.8/site-packages/electrumpersonalserver/server/common.py", line 121, in run_electrum_server
    mempool_sync.initial_sync(logger)
  File "/home/norbert/.local/lib/python3.8/site-packages/electrumpersonalserver/server/mempoolhistogram.py", line 57, in initial_sync
    self.poll_update(-1)
  File "/home/norbert/.local/lib/python3.8/site-packages/electrumpersonalserver/server/mempoolhistogram.py", line 111, in poll_update
    fee_rate = 1e8*mempool_tx["fee"] // mempool_tx["vsize"]
KeyError: 'fee'
@mhooSec
Copy link

mhooSec commented Apr 25, 2022

I get exactly the same error after upgrading Bitcoin Core to 23.0

@hMsats
Copy link

hMsats commented Apr 25, 2022

Same error

@hMsats
Copy link

hMsats commented Apr 25, 2022

I found a work around for now:

In /home/user/.local/lib/python3.8/site-packages/electrumpersonalserver/server/mempoolhistogram.py

I changed line 108:

mempool_tx = self.rpc.call("getmempoolentry", [txid])

into

mempool_tx = self.rpc.call("getmempoolentry -deprecatedrpc=fees", [txid])

and EPS was working again. This was changed in version 23 of Bitcoin Core

- - The top-level fee fields `fee`, `modifiedfee`, `ancestorfees` and `descendantfees`
  returned by RPCs `getmempoolentry`,`getrawmempool(verbose=true)`,
  `getmempoolancestors(verbose=true)` and `getmempooldescendants(verbose=true)`
  are deprecated and will be removed in the next major version (use
  `-deprecated=fees` if needed in this version).

@chris-belcher
Copy link
Owner

chris-belcher commented Apr 26, 2022

As well as what @hMsats wrote, you can also fix this by adding deprecatedrpc=fees to your bitcoin.conf file and then restarting Bitcoin Core.

The same kind of thing happened with this other issue: #247

@Liongrass
Copy link
Contributor

Ah awesome, that config worked for me too

@hMsats
Copy link

hMsats commented May 16, 2022

I get the impression that my proposed solution above (changing line 108 in mempoolhistogram.py) increases the cpu usage of EPS considerably. It’s now often at the top of the Unix top command and also my measure of general cpu usage of my server has gone up a lot.

@andrewtoth
Copy link
Contributor

@hMsats indeed it would. A better approach would be 008d9ac, which you can try until that patch gets merged.

@hMsats
Copy link

hMsats commented Jun 10, 2022

@andrewtoth Thanks a lot. EPS is working fine now, without the high cpu usage! I switched to adding deprecatedrpc=fees to bitcoin.conf but have removed that now. Electrum connected only to my EPS server is also working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants