bestinslot-xyz / OPI

Open Protocol Indexer, OPI, is the best-in-slot open-source indexing client for meta-protocols on Bitcoin.
Apache License 2.0
202 stars 110 forks source link

Couldn't receive txs failed to fetch raw transaction: code -5 message No such mempool or blockchain transaction. Use gettransaction for wallet transactions. error: failed to get transaction for #29

Closed veryyoung closed 7 months ago

veryyoung commented 7 months ago

The main_index always reports an error and is stuck in the 767437 block.

The error log is as follows.

[2024-03-02T06:23:59Z ERROR ord::index::updater] Couldn't receive txs failed to fetch raw transaction: code -5 message No such mempool or blockchain transaction. Use gettransaction for wallet transactions. error: failed to get transaction for 113a114c8bf57e8bc317591c458c0546a71805a3b536760f32abb26e68e21ff7

Txhash may be any one in this block.

I can use the bitcoin command line to find the correct raw transaction.

image

My Bitcoin node has been fully synchronized and txindex is enabled. The following is my Bitcoin node configuration. [main] server=1 rpcuser=veryyoung rpcpassword= txindex=1

Can you help me solve this problem? Thanks

veryyoung commented 7 months ago

The getindexinfo command returns { "txindex": { "synced": true, "best_block_height": 832891 } } synced is true, and the best_block_height is the current latest block height

samedcildir commented 7 months ago

This shouldn't happen if txindex is synced. Can you make sure that you do not have another bitcoin node without txindex that ord is trying to connect to? Also, can you double check the network in main_index is set to mainnet?

nathanddrake commented 7 months ago

Hey @veryyoung does this solve the issue?

veryyoung commented 7 months ago

@samedcildir @nathanddrake Hi, thank you for your replies. My node data was downloaded from the Internet and may lack the index of previous data. I am running the bitcoin client with the -reindex parameter and it may take a day or two to complete. I'll test how things go after everything is done.

Thanks

Thanks

veryyoung commented 7 months ago

@samedcildir @nathanddrake Hi, thank you for your replies. My node data was downloaded from the Internet and may lack the index of previous data. I am running the bitcoin client with the -reindex parameter and it may take a day or two to complete. I'll test how things go after everything is done.

Thanks

Thanks

Problem solved, thanks for you help!