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

searchrawtransactions does not get my unconfirmed tx #20

Closed
zono opened this issue May 20, 2017 · 7 comments
Closed

searchrawtransactions does not get my unconfirmed tx #20

zono opened this issue May 20, 2017 · 7 comments

Comments

@zono
Copy link

zono commented May 20, 2017

Hi, I'm always thankful for your patch. I'm looking into why my tx is not showed the result of searchrawtransactions.

My tx is this below, which is unconfirmed now. Blockchain.info shows it normally.

https://blockchain.info/tx/90e225e60dc36f3d323ffcf6897858e056681b8a9e015ee4371558c7b1f0241f

My bitcoind also shows the tx correctly.

$ bitcoin-cli getrawmempool | grep 90e225e60dc36f3d323ffcf6897858e056681b8a9e015ee4371558c7b1f0241f
  "90e225e60dc36f3d323ffcf6897858e056681b8a9e015ee4371558c7b1f0241f", 

However, searchrawtransactions does not show the tx.

$curl --user 'xxx:xxx' --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"searchrawtransactions","params":["12sWrxRY7E7Nhmuyjbz4TtGE9jRewGqEZD", 1, 0, 100000]}' -H 'content-type:text/plain;' http://127.0.0.1:xxxx | grep 90e225e60dc36f3d323ffcf6897858e056681b8a9e015ee4371558c7b1f0241f

I'm sure it showed unconfirmed txes too before. It might the current high mempool can be the cause. I'm so appreciated if you could share how to debug it.

Few days ago, I increased maxmempool size to 1G in bitcion.conf due to the high mempool usage and restart bitcoind.

The addrindex patch version is bitcoin-0.13.2 and bitcoin-0.12.1 linux 64bit (I've confirmed the both version)

Anyways, how can I call bitcoin-cli searchrawtransactions with options (unconfirmed, size)?

$ bitcoin-cli searchrawtransactions 12sWrxRY7E7Nhmuyjbz4TtGE9jRewGqEZD 1
error code: -1
error message:
JSON value is not an integer as expected
@zono
Copy link
Author

zono commented May 21, 2017

I found this issue. #10
This issue mentions about -dbcache. Is it related? My setting is default, 300MB.

@unsystemizer
Copy link

unsystemizer commented May 23, 2017

If mempool is full then you may see different results depending on when you run the command.
If you run with debug=mempool you could debug, but I doubt it's worth it.

For RPC help, maybe you can check the upstream RPC documentation and previous issues such as #11 (comment)

@zono
Copy link
Author

zono commented May 23, 2017

@unsystemizer Thank you for your comment. I will restart with debug=mempool.

The RPC help and #11 (comment) do not help for me. I will read the source code.

$ bitcoin-cli help | grep searchrawtransactions
searchrawtransactions <address> [verbose=1] [skip=0] [count=100]

@zono zono changed the title It does not retrieve my unconfirmed tx searchrawtransactions does not get my unconfirmed tx May 23, 2017
@zono
Copy link
Author

zono commented May 23, 2017

After I restarted bitcoind with maxmempool=1G option, searchrawtransactions command showed the unconfirmed tx for a while. However, 2 or 3 days later the tx disappeared from the result of searchrawtransactions.

I added the two new bitcoin options: dbcache=16384(maximum value), mempoolexpiry=336(two weeks, the previous setting was 3 days as default) then I restarted it again.

Before the restart again, I confirmed the getrawmempool result. There was the unconfirmed tx. Thus, I'm not sure that my issue will be solved or not.

$ bitcoin-cli getrawmempool | grep 90e225e60dc36f3d323ffcf6897858e056681b8a9e015ee4371558c7b1f0241f
  "90e225e60dc36f3d323ffcf6897858e056681b8a9e015ee4371558c7b1f0241f", 

@zono
Copy link
Author

zono commented May 23, 2017

I found the same case on another tx. This tx was labeled as REMOVED / EXPIRED on blocktrail. My guess is that once my bitcoind node receives the tx, the index will be added. After remove or expired, the index will be also removed. If the tx come into the node again from another nodes, the index won't be added..?

https://www.blocktrail.com/BTC/tx/dae322b9bf43ff45c19b39a1f8e8dc5258cda906c6eea40e47df68b351f9815b

@zono
Copy link
Author

zono commented May 24, 2017

Regarding "bitcoin-cli searchrawtransactions" command, I found my bitcoin-cli was v0.12.1-addrindex instead of v0.13.2. I will update bitcoin-cli and try it again.

@zono
Copy link
Author

zono commented May 26, 2017

I will close this issue, while I don't find the solutions. I will let you know when I find a way to reproduce the issue.

@zono zono closed this as completed May 26, 2017
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

No branches or pull requests

2 participants