Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend auto-download of missing cache/hord.sqlite when using hord as a service #152

Open
ryanwaits opened this issue Aug 14, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@ryanwaits
Copy link
Contributor

description

the single binary hord scan works as expected by downloading the cache/hord.sqlite if it does not exist, but when trying to spin up hord as a service and stream ordinal activity for the first time (if the file does not exist yet) we get an error

"FATAL: could not find cache/hord.sqlite"

the current workaround for anyone trying to stream ordinal activity is to first run the default binary, something like hord scan blocks 767430 767753 --mainnet which will download the cache/hord.sqlite if it does not exist yet.

expected behavior

run the hord service start commands and if cache/hord.sqlite does not exist auto-download - if it does exist, use it.

actual results

error: "FATAL: could not find cache/hord.sqlite"

@ryanwaits ryanwaits added the bug Something isn't working label Aug 14, 2023
@smcclellan smcclellan added enhancement New feature or request and removed bug Something isn't working labels Aug 15, 2023
@chresko
Copy link

chresko commented Aug 21, 2023

@lgalabru Thoughts on this one?

@smcclellan smcclellan added this to the Q3-2023 milestone Aug 21, 2023
@csgui
Copy link

csgui commented Aug 29, 2023

Hello @ryanwaits !

The hord.sqlite db file is generated upon the start of hord as a service. An empty file is created to make possible the service running.

Can you please detail which branch are you using? Or if possible, can you please update your code and try to run the service again. Thanks!

@smcclellan smcclellan modified the milestones: Q3-2023, Q1-2024 Jan 16, 2024
@GopherJ
Copy link

GopherJ commented Apr 3, 2024

@csgui I'm on v2.1.0 (latest release), I can still reproduce this error

@GopherJ
Copy link

GopherJ commented Apr 3, 2024

ordhook scan blocks --post-to=http://localhost:1337/api/events --config-path=./Ordhook.toml  --interval 1:10
[storage]
working_dir = "ordhook"

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

[network]
mode = "devnet"
bitcoind_rpc_url = "http://127.0.0.1:18443"
bitcoind_rpc_username = "devnet"
bitcoind_rpc_password = "devnet"
# 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://127.0.0.1:30001"
# 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
max_caching_memory_size_mb = 1024

# 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

@smcclellan smcclellan removed this from the Q1-2024 milestone Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 📋 Backlog
Development

No branches or pull requests

5 participants