Skip to content

v1.3.0

Compare
Choose a tag to compare
@github-actions github-actions released this 08 Feb 21:45
· 120 commits to main since this release

1.3.0 (2024-02-08)

Thanks for using Chainhook! See our README for instructions on installing the latest version. This release is mostly comprised of fixes that will add some stability when using Chainhook as a service or when scanning predicates. Thank you to @ryanwaits and @Xarek-Wizard who opened issues that were fixed in this release!

✨ New Features ✨

feat: optionally serve Prometheus metrics (#473)

This feature adds the option to serve Prometheus metrics for the Chainhook service. This may be helpful for those of you who are running a long-standing Chainhook service; a Prometheus scraper can be set up to gain insights into the health of your Chainhook node. This will be particularly helpful for us to have early detection of any service degradation in the Hiro Platform's hosted Chainhook service.

The feature can be used by specifying the --prometheus-port XXXX option in the CLI, or by adding the following to your config:

[monitoring]
prometheus_monitoring_port = 1111

Chainhook will behave as usual with this flag ommitted - metrics can still be retrieved via the observer's /ping endpoint, but they will not be formatted for ingestion by a Prometheus client.

Bug Fixes 🐛

fix: validate predicate start_block and end_block (#489)

Last week, we discovered a bug that could potentially cause Chainhook to use a massive amount of memory, which could crash a running node. This bug had to do with how we handle the start_block and end_block being set in a predicate, so we revamped the logic for this whole section of code:

  • start_block is now optional in a predicate and will have a default of 0 if omitted
  • we now require end_block to be greater than start_block
  • we now require the difference between end_block and start_block to be no more than 1_000_000. This is longer than both the Stacks and Bitcoin chains, so hopefully this isn't too limiting for our users 😅
  • BONUS FEATURE: we now allow a future start_block. If you set a predicate to have a start_block that is beyond the chain tip of the network, the predicate will be registered to Chainhook and will start being evaluated once the chain tip catches up

Some other fixes

  • adjust ordinal_number entry in ts client inscription transfer event, add new reveal data (#476) (28bf5c4)
  • remove early return for event evaluation (#484) (98f9e86), closes #469
  • remove unreachable panic; return instead (#490) (abe0fd5)
  • use cli feature for cargo chainhook-install (#486) (32f4d4e)