ord icon indicating copy to clipboard operation
ord copied to clipboard

Index inscriptions by address

Open markovichecha opened this issue 11 months ago • 5 comments

Added an address to inscriptions index and address endpoint with inscriptions. Resolves: #2619

image

Address index relies on transactions index, how should we handle this? Fail to startup if there are no --index-transactions flag?

markovichecha avatar Mar 25 '24 21:03 markovichecha

@raphjaph actively harassing to check on this PR as were suggested on stream, thanks

markovichecha avatar Mar 27 '24 22:03 markovichecha

Address index relies on transactions index, how should we handle this? Fail to startup if there are no --index-transactions flag?

I don't think it should fail, I implemented the address index onto my own branch a while ago without the transaction index. Users shouldn't need to double up on storing tx information as it is already done with -txindex.

Perhaps use it if it is available otherwise use the rpc getTransaction.

https://github.com/ynohtna92/ord-litecoin/blob/30825f67ccca4921c8f96e6a7d212cd3660f1f70/src/index/updater/inscription_updater.rs#L413-L419

ynohtna92 avatar Apr 12 '24 21:04 ynohtna92

Hello @markovichecha ! I’m experimenting with your version when indexing testnet (I launched Ord in Docker with the command “ord --data-dir /index-data --index-transactions --index-addresses server”). And I encountered this behavior:

[2024-04-18T11:37:24Z INFO  ord::index::updater] Block 2441766 at 2023-07-14 03:35:26 UTC with 21 transactions…
[2024-04-18T11:37:24Z INFO  ord::index::updater] Block receiver disconnected: sending on a closed channel
[2024-04-18T11:37:24Z INFO  ord::index] script is not a p2pkh, p2sh or witness program
[2024-04-18T11:37:24Z WARN  ord::subcommand::server] Updating index: script is not a p2pkh, p2sh or witness program

after that, the indexer starts scanning a few days before the specified date, and again hits the same block, and so on in a circle. Have you seen this kind of behavior?

Klyaus avatar Apr 18 '24 11:04 Klyaus

Hey @Klyaus. I haven't met this error, but may be it was due to not indexing testnet. I'll return to this PR soon and will change transaction index behavior and try to fix this issue.

markovichecha avatar Apr 19 '24 15:04 markovichecha

Hey @Klyaus. I haven't met this error, but may be it was due to not indexing testnet. I'll return to this PR soon and will change transaction index behavior and try to fix this issue.

Great! Thanks for the answer. I also think this is due to the fact that this is a testnet.

Klyaus avatar Apr 19 '24 19:04 Klyaus