ordhook icon indicating copy to clipboard operation
ordhook copied to clipboard

Can not store data in ordinal-api from ordhook

Open louisdangw3 opened this issue 1 year ago • 7 comments

I have a ordhook and ordinal API . i write docker compose.yml for API but when i run http://localhost:3456/ordinals/v1/brc-20/tokens the result is {"limit":20,"offset":0,"total":0,"results":[]} .please help me for this bug

123 234234 4234234 Capture

louisdangw3 avatar Mar 17 '24 10:03 louisdangw3

hi @rafaelcr . this is my ordhook node running 23123

louisdangw3 avatar Mar 17 '24 10:03 louisdangw3

@louisdv7192 can you share your API logs to see if it's receiving block data from ordhook correctly?

rafaelcr avatar Mar 18 '24 18:03 rafaelcr

From your images, I suspect the API is not reaching ordhook. Make sure ORDHOOK_NODE_RPC_PORT matches the open port you have on ordhook (usually should be port 20456)

rafaelcr avatar Mar 18 '24 18:03 rafaelcr

image image this is my Ordhook.toml [storage] working_dir = "ordhook"

The Http Api allows you to register / deregister

dynamically predicates.

Disable by default.

[http_api] http_port = 20456

[network] mode = "testnet" bitcoind_rpc_url = bitcoind_rpc_username = bitcoind_rpc_password =

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 = "tcp://172.17.0.1:18555"

but stacks can also be used:

stacks_node_rpc_url = "http://0.0.0.0:20443"

[resources] ulimit = 2048 cpu_core_available = 16 memory_available = 32 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

louisdangw3 avatar Mar 19 '24 02:03 louisdangw3

And this is my log in Ordinal-api image

louisdangw3 avatar Mar 19 '24 02:03 louisdangw3

@louisdangw3 did you find a fix, I'm having the same issue

endangurura avatar Apr 03 '24 12:04 endangurura

@louisdangw3 apologies for the delay in getting back to you here.

Are you running both containers on the same machine? I suggest you make the following changes to your API's ENV:

  • EXTERNAL_HOSTNAME: 127.0.0.1 if both ordhook and API are running on the same machine
  • ORDHOOK_NODE_RPC_HOST: 127.0.0.1 same as above
  • ORDHOOK_NODE_RPC_PORT: 20456 this should equal your http_port setting in Ordhook.toml

Settings above will allow you to run service start in ordhook and have the API register the predicate for you. Keep in mind that ordhook accepts predicate registrations once it has caught up with bitcoin chain tip so you might have to wait a bit for that to happen before launching the API

rafaelcr avatar Jun 26 '24 15:06 rafaelcr

Marking this as completed since the config updates have been shared. Feel free to reopen the issue if further issues appear.

ASuciuX avatar Jul 03 '25 19:07 ASuciuX