From 443544d08936669f72527480d193384a7a9ba179 Mon Sep 17 00:00:00 2001 From: Ryan Waits Date: Fri, 11 Aug 2023 10:59:39 -0500 Subject: [PATCH 1/5] update generated config with additional comments --- components/chainhook-cli/src/config/generator.rs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/components/chainhook-cli/src/config/generator.rs b/components/chainhook-cli/src/config/generator.rs index 074bc328f..132b3b51c 100644 --- a/components/chainhook-cli/src/config/generator.rs +++ b/components/chainhook-cli/src/config/generator.rs @@ -19,12 +19,15 @@ mode = "{network}" bitcoind_rpc_url = "http://localhost:8332" 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. The Stacks node is -# used by default: + +# Chainhook must be able to receive Bitcoin block events. +# These events can originate from either a Stacks node or a Bitcoin node's ZeroMQ interface. + +# By default, the service is set to receive Bitcoin block events from the Stacks node (via burnchain): stacks_node_rpc_url = "http://localhost:20443" -# but zmq can be used instead: + +# However, events can also be received directly from a Bitcoin node. +# To achieve this, comment out the `stacks_node_rpc_url` line and uncomment the following line: # bitcoind_zmq_url = "tcp://0.0.0.0:18543" [limits] @@ -36,6 +39,9 @@ max_number_of_processing_threads = 16 max_number_of_networking_threads = 16 max_caching_memory_size_mb = 32000 +# If you don't require historical data for your predicates or wish to avoid downloading +# the archive data every time, you may comment out the `tsv_file_url` line. +# [[event_source]] tsv_file_url = "https://archive.hiro.so/{network}/stacks-blockchain-api/{network}-stacks-blockchain-api-latest" "#, From af2adfd3f99b181e7cdc20f91be25cf2d295eb06 Mon Sep 17 00:00:00 2001 From: Ryan Waits Date: Sat, 12 Aug 2023 09:21:36 -0500 Subject: [PATCH 2/5] change copy --- components/chainhook-cli/src/config/generator.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/chainhook-cli/src/config/generator.rs b/components/chainhook-cli/src/config/generator.rs index 132b3b51c..cfd743aaa 100644 --- a/components/chainhook-cli/src/config/generator.rs +++ b/components/chainhook-cli/src/config/generator.rs @@ -39,8 +39,7 @@ max_number_of_processing_threads = 16 max_number_of_networking_threads = 16 max_caching_memory_size_mb = 32000 -# If you don't require historical data for your predicates or wish to avoid downloading -# the archive data every time, you may comment out the `tsv_file_url` line. +# The TSV file is required for downloading historical data for your predicates. If this is not a requirement, you can comment out the `tsv_file_url` line. # [[event_source]] tsv_file_url = "https://archive.hiro.so/{network}/stacks-blockchain-api/{network}-stacks-blockchain-api-latest" From fb10cb9c6e3c37484c266f41a428cec2592e0df3 Mon Sep 17 00:00:00 2001 From: Ryan Waits Date: Sat, 12 Aug 2023 09:22:33 -0500 Subject: [PATCH 3/5] remove wording around burnchain --- components/chainhook-cli/src/config/generator.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/chainhook-cli/src/config/generator.rs b/components/chainhook-cli/src/config/generator.rs index cfd743aaa..bc164814d 100644 --- a/components/chainhook-cli/src/config/generator.rs +++ b/components/chainhook-cli/src/config/generator.rs @@ -23,7 +23,7 @@ bitcoind_rpc_password = "devnet" # Chainhook must be able to receive Bitcoin block events. # These events can originate from either a Stacks node or a Bitcoin node's ZeroMQ interface. -# By default, the service is set to receive Bitcoin block events from the Stacks node (via burnchain): +# By default, the service is set to receive Bitcoin block events from the Stacks node: stacks_node_rpc_url = "http://localhost:20443" # However, events can also be received directly from a Bitcoin node. From 37f98d9e4e7055578ceaee185ad7bf60743ab0ec Mon Sep 17 00:00:00 2001 From: Max Efremov <51917427+mefrem@users.noreply.github.com> Date: Wed, 16 Aug 2023 11:51:44 -0500 Subject: [PATCH 4/5] Update generator.rs Added @MicaiahReid's suggestions. --- components/chainhook-cli/src/config/generator.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/chainhook-cli/src/config/generator.rs b/components/chainhook-cli/src/config/generator.rs index bc164814d..19a277f2e 100644 --- a/components/chainhook-cli/src/config/generator.rs +++ b/components/chainhook-cli/src/config/generator.rs @@ -6,9 +6,9 @@ pub fn generate_config(network: &BitcoinNetwork) -> String { r#"[storage] working_dir = "cache" -# The Http Api allows you to register / deregister -# dynamically predicates. -# Disable by default. +# The HTTP API allows you to register / deregister +# predicates dynamically. +# This is disabled by default. # # [http_api] # http_port = 20456 From b39c5cce7fac6c47a117621481ffa4a5f5273835 Mon Sep 17 00:00:00 2001 From: Ludo Galabru Date: Mon, 23 Oct 2023 11:12:04 -0400 Subject: [PATCH 5/5] Update components/chainhook-cli/src/config/generator.rs Co-authored-by: Micaiah Reid --- components/chainhook-cli/src/config/generator.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/chainhook-cli/src/config/generator.rs b/components/chainhook-cli/src/config/generator.rs index 19a277f2e..2ce72fcbb 100644 --- a/components/chainhook-cli/src/config/generator.rs +++ b/components/chainhook-cli/src/config/generator.rs @@ -39,8 +39,8 @@ max_number_of_processing_threads = 16 max_number_of_networking_threads = 16 max_caching_memory_size_mb = 32000 -# The TSV file is required for downloading historical data for your predicates. If this is not a requirement, you can comment out the `tsv_file_url` line. -# +# The TSV file is required for downloading historical data for your predicates. +# If this is not a requirement, you can comment out the `tsv_file_url` line. [[event_source]] tsv_file_url = "https://archive.hiro.so/{network}/stacks-blockchain-api/{network}-stacks-blockchain-api-latest" "#,