hirosystems / chainhook

Extract transactions from Stacks and Bitcoin and build event driven re-org resistant indexers and databases.
GNU General Public License v3.0
158 stars 65 forks source link

Can I run Chainhook without a Stacks node? #283

Closed luannguyenicsc closed 1 year ago

luannguyenicsc commented 1 year ago

Hi Is there any help to run chainhook without a stacks node?. I tried to run chainhook with both of bitcoind url on stacks_node_rpc_url and bitcoind_rpc_url but it get some bugs. this is my config

[storage] driver = "redis" redis_uri = "redis://localhost:6379/" cache_path = "cache"

[http_api] http_port = 20456 database_uri = "redis://localhost:6379/"

[chainhooks] max_stacks_registrations = 500 max_bitcoin_registrations = 500

[network] mode = "mainnet" bitcoind_rpc_url = "http://127.0.0.1:19333" bitcoind_rpc_username = "bitcoin" bitcoind_rpc_password = "bitcoin12345!" stacks_node_rpc_url = "http://0.0.0.0:19333"

[limits] max_number_of_bitcoin_predicates = 100 max_number_of_concurrent_bitcoin_scans = 100 max_number_of_stacks_predicates = 10 max_number_of_concurrent_stacks_scans = 10 max_number_of_processing_threads = 16 max_number_of_networking_threads = 16 max_caching_memory_size_mb = 32000

and my predicate { "chain": "bitcoin", "uuid": "1", "name": "Wrap BTC", "version": 1, "networks": { "mainnet": { "if_this": { "scope": "ordinals_protocol", "operation": "inscription_feed" }, "then_that": { "http_post": { "url": "http://0.0.0.0:3000", "authorization_header": "Bearer cn389ncoiwuencr" } }, "start_block": 790000 } } }

this is some bugs

Jun 13 02:04:03.016 INFO Unable to retrieve cached inscription data for inscription 0x027d20a9ef2f1bf046544d06f202d28cb60258a4b2082039418ae80f337d3c29 Jun 13 02:04:03.016 INFO Unable to retrieve cached inscription data for inscription 0x7c730184a3b9a0964e198cf774877471545680959f58b9c52ae54d220211a529 Jun 13 02:04:03.016 INFO Unable to retrieve cached inscription data for inscription 0x3d1a1da56b3ac8b701e38298d9737ea9f8982a694d6b195c05869321b821b929 Jun 13 02:04:03.016 ERRO slog-async: logger dropped messages due to channel overflow, count: 27 Jun 13 02:04:03.016 INFO Unable to retrieve cached inscription data for inscription 0xedf1bc3d77297bb7689480ce1b0b217e6d85276665497a72550f0bcfac012b44 Jun 13 02:04:03.016 ERRO slog-async: logger dropped messages due to channel overflow, count: 42 Jun 13 02:04:03.016 INFO Unable to retrieve cached inscription data for inscription 0xa1564334a9107560a4ce236a623ecc06ef3a10b67042762d2e74546fe66a6456 Jun 13 02:04:03.016 INFO Unable to retrieve cached inscription data for inscription 0x490cd4cfc36cca789bcb1529516d8506133e21d42dc7cb94bf316f20b68cfe62 Jun 13 02:04:03.016 ERRO slog-async: logger dropped messages due to channel overflow, count: 69 Jun 13 02:04:03.016 ERRO slog-async: logger dropped messages due to channel overflow, count: 29 Jun 13 02:04:03.016 ERRO slog-async: logger dropped messages due to channel overflow, count: 29

Thank you so much for your help. I really appreciate it

smcclellan commented 1 year ago

@luannguyenicsc Yes -- we will be documenting this process. /cc @LakshmiLavanyaKasturi

lgalabru commented 1 year ago

The process for running chainhook with bitcoind without a stacks node is now fully documented here https://docs.hiro.so/chainhook/how-to-guides/how-to-run-chainhook-as-a-service-using-bitcoind. Feel free to open a new issue or re-open this one some additional details are required. For ordinals indexing, I'll invite you to check https://github.com/hirosystems/hord.