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

chore(release): publish v1.3.0 #493

Merged
merged 7 commits into from
Feb 8, 2024
Merged

chore(release): publish v1.3.0 #493

merged 7 commits into from
Feb 8, 2024

Conversation

MicaiahReid
Copy link
Contributor

No description provided.

rafaelcr and others added 7 commits February 8, 2024 15:45
Previously, the `cargo chainhook-install` script was installing the sdk
version of Chainhook, which logged data in a non-user-friendly way. This
changes our features some and updates the install script to fix those
logs.
### Description

When evaluatin a stacks predicate of type `ft_event` or `nft_event`, we
were returning from a loop of all events after the first loop. We should
only return early if there is a match, and should continue searching all
events if there isn't. This PR implements that fix.

Fixes #469

---

### Checklist

- [x] All tests pass
- [x] Tests added in this PR (if applicable)
This error caused chainhook to crash today. This route can happen if a
predicate is completed, but we're still waiting on block confirmations
for fully expire the predicate, and then the user deletes the predicate.
### Description

Previously, the scanning threads had some validation for the
`start_block` and `end_block` that was incorrect. This PR introduces
validation that does the following:
- We now allow `start_block` to be omitted by the user and we default to
0
- If there are no blocks in the database, we abort the scan and go to
streaming mode rather than erroring (fixes #477)
- If the user provides an `end_block`, we validate that it is greater
than the `start_block`
- If the `start_block` is greater than chain tip, we abort the scan and
go to streaming mode rather than erroring (fixes #464)

This PR also adds some validation to the `BlockHeights` class.
Previously, it was possible to overload the
`BlockHeights::BlockRange(start_block, end_block)` function to allocate
a lot of memory into an empty array. We now have limits on this class.
However, due to the above validation, it should not be possible to pass
through parameters that reach theses limits (with the current usage of
the class) until a chain height is up to `1_000_000`.

---

### Checklist

- [x] All tests pass
- [x] Tests added in this PR (if applicable)
### Description

To enable improved alerts on downtime for Hiro's hosted Chainhook
service, we need Chainhook to provide metrics that can be ingested by
Prometheus. This PR changes some how we track our metrics (that are
served over the `/ping` endpoint of the observer) to enable Prometheus
compatibility, and adds a flag to optionally start a server to supply
metrics to a Prometheus client.


### Example

Starting chainhook with the `--prometheus-port XXXX` flag now enables a
service that can supply Prometheus metrics at `localhost:XXXX/metrics`.

If using a config file, this option can be specified via:
```yaml
[monitoring]
prometheus_monitoring_port = XXXX
```

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.

---

### Checklist

- [X] All tests pass
- [X] Tests added in this PR (if applicable)

Fixes #474, addresses #466
@MicaiahReid MicaiahReid temporarily deployed to Development-mainnet February 8, 2024 21:11 — with GitHub Actions Inactive
@MicaiahReid MicaiahReid temporarily deployed to Development-testnet February 8, 2024 21:11 — with GitHub Actions Inactive
@MicaiahReid MicaiahReid merged commit 21e4b1b into main Feb 8, 2024
13 of 15 checks passed
Copy link

github-actions bot commented Feb 8, 2024

🎉 This PR is included in version 1.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants