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

Configuration issue / how to avoid local building of ordhook state #314

Closed 4ker-dep closed 4 months ago

4ker-dep commented 4 months ago

Hello. I'm using ordhook with the following environment:

OS: linux (amd64)
OS Image: Amazon Linux 2
Kernel version: 5.10.199-190.747.amzn2.x86_64
Container runtime: containerd://1.7.2
Kubelet version: v1.24.17-eks-e71965b

trying to run hirosystems/ordhook:2.2.0 (which is an upgrade from v2.1.0) image with the configuration in use described below:

[storage]
working_dir = "/opt/ordhook"

# The Http Api allows you to register / deregister
# dynamically predicates.
# Disable by default.
#
 [http_api]
 http_port = 20456
 database_uri = "xxx"

[network]
mode = "mainnet"
bitcoind_rpc_url = "xxx"
bitcoind_rpc_username = "xxx"
bitcoind_rpc_password = "xxx"
# Bitcoin block events can be received by Chainhook
# either through a Bitcoin node's ZeroMQ interface,
# or through the Stacks node. Zmq is being
# used by default:
bitcoind_zmq_url = "xxx"
# but stacks can also be used:
# stacks_node_rpc_url = "xxx"

[resources]
ulimit = 2048
cpu_core_available = 4
memory_available = 30
bitcoind_rpc_threads = 4
bitcoind_rpc_timeout = 15
expected_observers_count = 1

# Disable the following section if the state
# must be built locally
 [snapshot]
 download_url = "https://archive.hiro.so/mainnet/ordhook/mainnet-ordhook-sqlite-latest"

[logs]
ordinals_internals = true
chainhook_internals = true

The received errors logs are:

{"msg":"Starting service (git_commit = )...","level":"INFO","ts":"2024-06-11T08:06:10.847426318Z"}
{"msg":"Indexing inscriptions from block #846923 to block #847460","level":"INFO","ts":"2024-06-11T08:06:10.926178535Z"}
{"msg":"Processing 3 blocks","level":"INFO","ts":"2024-06-11T08:06:13.994116666Z"}
{"msg":"Inscriptions data computation for block #846923 started","level":"INFO","ts":"2024-06-11T08:06:14.008127445Z"}
{"msg":"Number of inscriptions in block #846923 to process: 6 (L1 cache hits: 0, queue: [846924, 846925], L1 cache len: 0, L2 cache len: 0)","level":"INFO","ts":"2024-06-11T08:06:14.008622373Z"}
{"msg":"Completed ordinal number retrieval for Satpoint 0x879868b141ca70c176d1133a638e9a1822c497deacb5ba2dc4e68a5e7f785c7e:0:0 (block: #369445:2485662596, transfers: 87, progress: 1/6, priority queue: true, thread: 1)","level":"INFO","ts":"2024-06-11T08:06:14.164122549Z"}
{"msg":"Completed ordinal number retrieval for Satpoint 0x812fa9cd8bbb0b823c88b81755f9861c9f5b123591b3ebffaf85930999871418:0:0 (block: #743938:43021825, transfers: 2275, progress: 2/6, priority queue: true, thread: 0)","level":"INFO","ts":"2024-06-11T08:06:16.060177464Z"}
{"msg":"Completed ordinal number retrieval for Satpoint 0x1ea48984c71c3a3ff7bb5ea3114772af1877ef798f462636be02a25d1c1fa4f1:0:0 (block: #116279:2185832628, transfers: 475, progress: 3/6, priority queue: true, thread: 0)","level":"INFO","ts":"2024-06-11T08:06:17.01884076Z"}
{"msg":"Number of inscriptions in block #846923 to pre-process: 8","level":"INFO","ts":"2024-06-11T08:06:17.019098145Z"}
{"msg":"Completed ordinal number retrieval for Satpoint 0x55064483b0c21a05e1e5a2ca57cae49cff2e518ee4e369109ca9dd15a77d2211:0:0 (block: #369445:2485663142, transfers: 88, progress: 4/6, priority queue: true, thread: 0)","level":"INFO","ts":"2024-06-11T08:06:17.027687972Z"}
{"msg":"Completed ordinal number retrieval for Satpoint 0xf6af31734da0d06fe672fe8279ed702f439c365e1c9e02fd1356b913b3d8a20c:0:0 (block: #67332:143258148, transfers: 2381, progress: 5/6, priority queue: true, thread: 1)","level":"INFO","ts":"2024-06-11T08:06:18.313711084Z"}
{"msg":"Completed ordinal number retrieval for Satpoint 0x2fc865ea32ae18ba8d99e7b05566bec1abf513640054e62872f9011474ce86aa:0:0 (block: #783998:357535676, transfers: 78, progress: 6/6, priority queue: true, thread: 1)","level":"INFO","ts":"2024-06-11T08:06:18.481483636Z"}
{"msg":"Inscriptions data computation for block #846923 collected","level":"INFO","ts":"2024-06-11T08:06:18.482159439Z"}
{"msg":"Inscriptions data computation for block #846923 ended","level":"INFO","ts":"2024-06-11T08:06:18.482689709Z"}
{"msg":"Inscription 812fa9cd8bbb0b823c88b81755f9861c9f5b123591b3ebffaf85930999871418i0 (#71446696) detected on Satoshi 1908711293021825 (block #846923, 2275 transfers)","level":"INFO","ts":"2024-06-11T08:06:18.487645685Z"}
{"msg":"Inscription f6af31734da0d06fe672fe8279ed702f439c365e1c9e02fd1356b913b3d8a20ci0 (#71446697) detected on Satoshi 336660143258148 (block #846923, 2381 transfers)","level":"INFO","ts":"2024-06-11T08:06:18.487994845Z"}
{"msg":"Inscription 879868b141ca70c176d1133a638e9a1822c497deacb5ba2dc4e68a5e7f785c7ei0 (#71446698) detected on Satoshi 1448614985662596 (block #846923, 87 transfers)","level":"INFO","ts":"2024-06-11T08:06:18.488337277Z"}
{"msg":"Inscription 55064483b0c21a05e1e5a2ca57cae49cff2e518ee4e369109ca9dd15a77d2211i0 (#71446699) detected on Satoshi 1448614985663142 (block #846923, 88 transfers)","level":"INFO","ts":"2024-06-11T08:06:18.488458484Z"}
{"msg":"Inscription 1ea48984c71c3a3ff7bb5ea3114772af1877ef798f462636be02a25d1c1fa4f1i0 (#71446700) detected on Satoshi 581397185832628 (block #846923, 475 transfers)","level":"INFO","ts":"2024-06-11T08:06:18.488850674Z"}
{"msg":"Inscription 2fc865ea32ae18ba8d99e7b05566bec1abf513640054e62872f9011474ce86aai0 (#71446701) detected on Satoshi 1933749107535676 (block #846923, 78 transfers)","level":"INFO","ts":"2024-06-11T08:06:18.489145827Z"}
{"msg":"unable to prepare query \n        SELECT inscription_id, inscription_number, ordinal_number, block_height, tx_index, tick, address, avail_balance, trans_balance, operation\n        FROM ledger\n        WHERE ordinal_number = ? AND operation = 'transfer'\n            AND NOT EXISTS (\n                SELECT 1 FROM ledger WHERE ordinal_number = ? AND operation = 'transfer_send'\n            )\n        LIMIT 1\n    : no such table: ledger","level":"WARN","ts":"2024-06-11T08:06:32.183457955Z"}
{"msg":"unable to prepare query \n        SELECT inscription_id, inscription_number, ordinal_number, block_height, tx_index, tick, address, avail_balance, trans_balance, operation\n        FROM ledger\n        WHERE ordinal_number = ? AND operation = 'transfer'\n            AND NOT EXISTS (\n                SELECT 1 FROM ledger WHERE ordinal_number = ? AND operation = 'transfer_send'\n            )\n        LIMIT 1\n    : no such table: ledger","level":"WARN","ts":"2024-06-11T08:06:37.183680032Z"}
{"msg":"unable to prepare query \n        SELECT inscription_id, inscription_number, ordinal_number, block_height, tx_index, tick, address, avail_balance, trans_balance, operation\n        FROM ledger\n        WHERE ordinal_number = ? AND operation = 'transfer'\n            AND NOT EXISTS (\n                SELECT 1 FROM ledger WHERE ordinal_number = ? AND operation = 'transfer_send'\n            )\n        LIMIT 1\n    : no such table: ledger","level":"WARN","ts":"2024-06-11T08:06:42.183859615Z"}
{"msg":"unable to prepare query \n        SELECT inscription_id, inscription_number, ordinal_number, block_height, tx_index, tick, address, avail_balance, trans_balance, operation\n        FROM ledger\n        WHERE ordinal_number = ? AND operation = 'transfer'\n            AND NOT EXISTS (\n                SELECT 1 FROM ledger WHERE ordinal_number = ? AND operation = 'transfer_send'\n            )\n        LIMIT 1\n    : no such table: ledger","level":"WARN","ts":"2024-06-11T08:06:47.18405057Z"}
{"msg":"unable to prepare query \n        SELECT inscription_id, inscription_number, ordinal_number, block_height, tx_index, tick, address, avail_balance, trans_balance, operation\n        FROM ledger\n        WHERE ordinal_number = ? AND operation = 'transfer'\n            AND NOT EXISTS (\n                SELECT 1 FROM ledger WHERE ordinal_number = ? AND operation = 'transfer_send'\n            )\n        LIMIT 1\n    : no such table: ledger","level":"WARN","ts":"2024-06-11T08:06:52.184238098Z"}
{"msg":"unable to prepare query \n        SELECT inscription_id, inscription_number, ordinal_number, block_height, tx_index, tick, address, avail_balance, trans_balance, operation\n        FROM ledger\n        WHERE ordinal_number = ? AND operation = 'transfer'\n            AND NOT EXISTS (\n                SELECT 1 FROM ledger WHERE ordinal_number = ? AND operation = 'transfer_send'\n            )\n        LIMIT 1\n    : no such table: ledger","level":"WARN","ts":"2024-06-11T08:06:57.184430424Z"}
{"msg":"unable to prepare query \n        SELECT inscription_id, inscription_number, ordinal_number, block_height, tx_index, tick, address, avail_balance, trans_balance, operation\n        FROM ledger\n        WHERE ordinal_number = ? AND operation = 'transfer'\n            AND NOT EXISTS (\n                SELECT 1 FROM ledger WHERE ordinal_number = ? AND operation = 'transfer_send'\n            )\n        LIMIT 1\n    : no such table: ledger","level":"WARN","ts":"2024-06-11T08:07:02.184619221Z"}
{"msg":"unable to prepare query \n        SELECT inscription_id, inscription_number, ordinal_number, block_height, tx_index, tick, address, avail_balance, trans_balance, operation\n        FROM ledger\n        WHERE ordinal_number = ? AND operation = 'transfer'\n            AND NOT EXISTS (\n                SELECT 1 FROM ledger WHERE ordinal_number = ? AND operation = 'transfer_send'\n            )\n        LIMIT 1\n    : no such table: ledger","level":"WARN","ts":"2024-06-11T08:07:07.184802894Z"}

Would using the snapshot solve this so I won't have the synchronise ordhook from beginning? What configuration changes do I need to get out of this Sisyphus cycle?

GuutBoy commented 4 months ago

Logs look similar to my issue #324

4ker-dep commented 4 months ago

Logs look similar to my issue #324

Thanks @GuutBoy but we're abandoned the idea of self-hosting our own ordhook instance so I can't verify this method. Big thanks nevertheless. I'll be closing this issue.