Closed duyquoc1508 closed 4 months ago
We have identified the issue lying within the sequence_metadata
table in the sqplite database restored from the archive.
It appears that the sequence_metadata
table consistently lacks a record for the last block (n - 1), regardless of the database version. This deficiency causes ordhook to increment the jubilee_inscription_number
based on the preceding block (n - 2), as block (n - 2) is currently recognized as the latest block. However, the correct behavior should involve the existence of a record for block (n - 1), which represents the latest block height.
As a result, the incorrect numbering of inscription numbers occurs due to this discrepancy in the database.
I've also discovered discrepancies in the HIRO API and the archive database, specifically regarding inscription numbering from block 837927 onwards. I suspect that the underlying issue mentioned earlier may be the root cause. This suspicion arises from the observation that the sequence_metadata
table also lacks a record at block 837926.
To further illustrate this point, I conducted a small comparison exercise. I randomly selected an inscription ID from block 837930 (after 837927) and queried it against several other indexers. Here are the results:
Inscription ID: b3f51c7634e85f1c95d8f3c7fed0dabc8cb20b2dfafe495509bb6c6b51aeaa62i0
These findings reinforce the possibility that the inconsistencies stem from the missing record in the sequence_metadata
table at block 837926.
Your inscription number is less than other indexer system 6248 and 6248 is also the number inscription of block 837926.
I hope this additional information helps in further investigating and resolving the issue
Thanks for the investigation @duyquoc1508, I'll look into this today.
@duyquoc1508 you may have an email from in your spam folder :)
Hi @lgalabru , I apologize for missing your email. I'm curious to know if the results of your investigation align with my analysis above? Thanks!
This issue is being addressed https://github.com/hirosystems/ordhook/pull/312
Addressed with latest!
Description:
I encountered an issue while running ordhook on my server. The problem arises with the archive database obtained from the link https://archive.hiro.so/.
After downloading the latest version of the ordhook archive (rocksdb + sqlite) and running it, I noticed that while the number of blocks increases as expected, the inscription numbering does not start from the end of the previous block (n - 1). Instead, it starts from the end of the previous two blocks (n - 2). Consequently, all inscription numbers for the following blocks become incorrect.
I downloaded the database from April 1, 2024, and encountered this issue. Below is a log snippet after starting the service:
Expected Behavior:
The inscription numbering should start from the end of the previous block (n - 1) as per the standard behavior.
Steps to Reproduce:
Additional Information:
Version of ordhook archive used: mainnet-ordhook-sqlite-24-alpine-20240401.tar.gz Date of database download: April 1, 2024
Screenshots/Logs:
Environment:
Note: I would appreciate any assistance or insights into resolving this issue. Thank you!