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

fix: add event index to transaction events #495

Merged
merged 4 commits into from
Feb 14, 2024

Conversation

MicaiahReid
Copy link
Contributor

@MicaiahReid MicaiahReid commented Feb 12, 2024

(this PR is just cherry-picking the relevant commits from @janniks in PR #417, which I apparently mucked up with some bad merging)


Note: Any users running a Chainhook node (i.e. chainhook service start ...) will not have transaction event positions stored in the database, so all event position will have a value of:

"position": {
  "index": 0
}

To rebuild the database with this data filled in:

  • Upgrade to the latest version of Chainhook
  • Delete the stacks.rocksdb folder inside the working_dir set in your Chainhook.toml
  • Rerun Chainhook

This will rebuild your Stacks database from scratch.

@MicaiahReid MicaiahReid merged commit 26a0c5b into develop Feb 14, 2024
7 of 9 checks passed
@MicaiahReid MicaiahReid deleted the transaction-event-metadata-clean branch February 14, 2024 19:26
MicaiahReid added a commit that referenced this pull request Feb 14, 2024
(this PR is just cherry-picking the relevant commits from @janniks in PR
#417, which I apparently mucked up with some bad merging)

- closes #387 
- adds a position struct to the event and renames the event to payload
(with enum type)
- updates occurences.json to include the expected serialized position
for testing

---

**Note**: Any users running a Chainhook node (i.e. `chainhook service
start ...`) will not have transaction event positions stored in the
database, so all event position will have a value of:
``` JSON
"position": {
  "index": 0
}
```
To rebuild the database with this data filled in:
 - Upgrade to the latest version of Chainhook
- Delete the `stacks.rocksdb` folder inside the `working_dir` set in
your `Chainhook.toml`
 - Rerun Chainhook

This will rebuild your Stacks database from scratch.

---------

Co-authored-by: janniks <[email protected]>
github-actions bot pushed a commit that referenced this pull request Feb 14, 2024
## [1.3.1](v1.3.0...v1.3.1) (2024-02-14)

### Bug Fixes

* add event index to transaction events ([#495](#495)) ([d67d1e4](d67d1e4)), closes [#417](#417) [#387](#387)
* correctly determine PoX vs PoB block commitments ([#499](#499)) ([50dd26f](50dd26f)), closes [#496](#496)
vabanaerytk added a commit to vabanaerytk/chainhook that referenced this pull request Aug 7, 2024
## [1.3.1](hirosystems/chainhook@v1.3.0...v1.3.1) (2024-02-14)

### Bug Fixes

* add event index to transaction events ([#495](hirosystems/chainhook#495)) ([2d2760d](hirosystems/chainhook@2d2760d)), closes [#417](hirosystems/chainhook#417) [#387](hirosystems/chainhook#387)
* correctly determine PoX vs PoB block commitments ([#499](hirosystems/chainhook#499)) ([6816e76](hirosystems/chainhook@6816e76)), closes [#496](hirosystems/chainhook#496)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

return event_index in Stacks transaction event metadata
2 participants