-
Notifications
You must be signed in to change notification settings - Fork 11
Description
My Guess About Why I'm Getting “get_raw_mempool failed” :
I suspect the problem is that the checkpoint file listed in the [utxo] section of my config.toml doesn’t match the listed block:
[utxo]
checkpoint = "./utxo-checkpoints/QmXkBQJrMKkCKNbwv4m5xtnqwU9Sq7kucPigvZW8mWxcrv"
block_height = 707182
block_hash = "000000000000000001fe4e387cd24ba8f5d268848f8686c297a952350cb82d6f"
checkpoint_load = false
checkpoint_save = false
GS++ wasn't working with the default height of 543375 and all zeros for the hash last night. I looked up and inserted the latest block which was 707182 and its hash. I didn't change the checkpoint argument. Not sure if that's right.
Edit: After further investigation, I'm beginning to suspect the checkpoint isn't the problem.
More Details:
When I run “./gs++ config.toml” I get the following:
[2021-09-28 18:49:21.153] [info] hello
[2021-09-28 18:49:21.155] [info] processed mempool (0) [0]
[2021-09-28 18:49:21.164] [info] gs++ listening on 45.128.156.146:50051
It then processes zmq-tx's for several minutes
- It throws occasional warnings about invalid transactions. Probably nothing to worry about.
- Last night it was taking 3 minutes, today it took 18 then 36. Probably making junk someplace.
[2021-09-28 19:26:36.610] [info] processed block 707183 (0) [0/2451]
terminate called after throwing an instance of 'std::runtime_error'
what(): get_raw_mempool failed
Aborted (core dumped)
Code Diving
I searched for the string "get_raw_mempool failed" in the source code and found it on line 915 of server/gs++.cpp.
It happens when the first element of the pair object returned by function rpc.get_raw_mempool() is false.
Looking at that function on line 147 of src/rpc.cpp, I see that false indicates there was a problem with the response.
Either:
- the response pointer is just 0
- the response status isn't 200
- the json body is size 0 (probably didn't parse)
- the json body contains an element called "error"
So now I'm guessing it's a problem with the remote procedure call.
I'll keep digging.
More Helpful Data:
Here is the full text of my config.toml file (the bitcoind user and pass have been replaced):
[cache]
dir = "/tmp/gs++/cache"
[grpc]
host = "45.128.156.146"
port = 50051
[bitcoind]
host = "45.128.156.146"
port = 8332
user = "--MYUSER--"
pass = "--MYPASS--"
zmq_port = 28332
[utxo]
checkpoint = "./utxo-checkpoints/QmXkBQJrMKkCKNbwv4m5xtnqwU9Sq7kucPigvZW8mWxcrv"
block_height = 707182
block_hash = "000000000000000001fe4e387cd24ba8f5d268848f8686c297a952350cb82d6f"
checkpoint_load = false
checkpoint_save = false
[zmqpub]
bind = "tcp://127.0.0.1:29069"
[graphsearch]
private_key = "0000000000000000000000000000000000000000000000000000000000000000"
max_exclusion_set_size = 5
[services]
graphsearch = false
graphsearch_rpc = false
zmq = true
grpc = true
utxosync = false
cache = true
zmqpub = true