3

Bitcoin 0.11 on a Raspberry Pi 2:

https://github.com/jgarzik/python-bitcoinrpc

I am using this RPC auth proxy to talk to bitcoind from Python. I have a script that requests getmempoolinfo every 1 second. Occasionally given user input a new address is needed, and the script requests getnewaddress. This RPC-call often times out.

Sometimes the time-out causes even weirder behavior in other RPC calls until python is interrupted and the script killed: for example, getmempoolinfo returns the same information every time it is called until the script is restarted. Even querying bitcoind from the command line in a separate terminal window bitcoin-cli getmempoolinfo indicates that the mempool is not growing at all until the script that timed-out calling getnewaddress is terminated.

I also notice from the command line bitcoin-cli getnewaddress can take up to 30 seconds, without any python scripts running or other in-progress RPC calls.

I thought bitcoind is just retrieving a new address from wallet.dat, what is taking so long? It's not decrypting the wallet, it's not generating a whole new address from entropy... yet this specific RPC call is causing me lots of downstream problems.

10
  • 1
    How large is your wallet, in keys/transactions/megabytes? Commented Feb 8, 2016 at 11:13
  • 101 keys, 0 transactions. I wonder if it's disk io? The wallet and the blockchain are both on the same USB flash drive. Commented Feb 8, 2016 at 15:17
  • Wallet.dat is 294 kb. Interesting, command line dumpwallet works instantly. Commented Feb 8, 2016 at 15:23
  • Please report this as a bug in that case: github.com/bitcoin/issues. Commented Feb 8, 2016 at 15:28
  • github.com/bitcoin/bitcoin/issues/7486 Commented Feb 9, 2016 at 0:05

1 Answer 1

0

The problem has to do with other processes on the computer with too high CPU priority:

https://raspberrypi.stackexchange.com/q/42474/39301

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.