hirosystems / ordhook

Build indexers, standards and protocols on top of Ordinals and Inscriptions (BRC20, etc).
Apache License 2.0
190 stars 56 forks source link

ordhook db sync exit and core dump #317

Closed phill-beyond closed 4 months ago

phill-beyond commented 4 months ago

ordhook db sync --config-path=./Ordhook.toml ... Jun 15 01:42:41.829 INFO Completed ordinal number retrieval for Satpoint 0x389d5116ab9e10dac380f8ffb430986f03483287e9ecb0178a655a5cddf298ea:0:0 (block: #760123:269079131, transfers: 2266, progress: 323/5464, priority queue: true, thread: 7) Jun 15 01:42:41.830 ERRO fatal: unable to retrieve tx ancestor 54ddefd3a8b6646f in block 2821150 (satpoint 58208ba896fc161536f3cdd579af31cefc76a2a9383f9ffb60c3172ac881ce41:0) pthread lock: Invalid argument Aborted (core dumped)

I quickly checked: // isolate the target transaction let tx_bytes_cursor = match block_cursor.find_and_serialize_transaction_with_txid(&txid) { Some(entry) => entry, None => { ctx.try_log(|logger| { error!( logger, "fatal: unable to retrieve tx ancestor {} in block {ordinal_block_number} (satpoint {}:{inscription_input_index})", hex::encode(txid), transaction_identifier.get_hash_bytes_str(), ) }); std::process::exit(1); } };

Is there anyway, we can let the process ignore the issue and continue processing? Instead of just exit? Thanks!

lgalabru commented 4 months ago

Hi @phill-beyond! Thanks for opening this issue. I'll close your issue - Testnet support is already tracked here https://github.com/hirosystems/ordhook/issues/292.

Is there anyway, we can let the process ignore the issue and continue processing? Instead of just exit? Thanks!

You could patch this locally, but this solution would lead to an incorrect view of the inscriptions state.