ordhook icon indicating copy to clipboard operation
ordhook copied to clipboard

Not working from scratch

Open GuutBoy opened this issue 1 year ago • 5 comments

Starting the ordinals service does not work when when started from scratch (i.e., with empty dbs).

Specifically, running

bitcoin-indexer ordinals service start --config-path Indexer.toml

results in a panic here https://github.com/hirosystems/bitcoin-indexer/blob/d3588f30cc9bb6a59e6eabd0faa75178620cff8b/components/ordinals/src/lib.rs#L208 due to the chain_tip table being empty.

I tried to manually insert the genesis block as the chain tip. This avoids the above issue but then fails to read a file tmp/hord.rocksdb/CURRENT

GuutBoy avatar Aug 11 '25 11:08 GuutBoy

I believe this is already addressed for the next release cut but we'll investigate and confirm. Thanks for the report

rafaelcr avatar Aug 22 '25 19:08 rafaelcr

Nice, any plans on when the next release will be?

GuutBoy avatar Aug 25 '25 09:08 GuutBoy

The next release will likely happen once the recently discovered bugs in Runes are resolved. This issue https://github.com/hirosystems/bitcoin-indexer/issues/541 triggered additional findings. I’ll also ping on this thread once the release goes live.

ASuciuX avatar Sep 01 '25 15:09 ASuciuX

i hit this as well, attempted to insert a chain tip into the db. then getting error with the rocksdb

WARN Unable to open db: unable to read hord.rocksdb: IO error: No such file or directory: While opening a file for sequentially reading: /indexer/tmp/hord.rocksdb/CURRENT: No such file or directory. Retrying in 10s

willwooten avatar Sep 02 '25 18:09 willwooten

Trying out the indexer - had the same issue it seems that #463 removes the NOT NULL constraint on block_height for the chain_tip table and then proceeds to SET it to 'location'.'block_height' which is has no entry on startup. I only looked briefly but it seems None values are accounted for except for here where you unwrap a possible None value. For a temporary solution I just handle it as an error rather than unwrapping which is probably not safe in this context.

For rocksdb I made sure that when its first opened its opened with readwrite on. And I made sure the image built with RUN cargo build --release (unsure if that was important). Before it would create the hord.rocksdb dir but rocksdb would fail to initialize leaving the directory empty. ordianls/lib.rs:L170

oobiora avatar Oct 31 '25 18:10 oobiora