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: support tenure change transactions in rosetta #2128

Merged
merged 2 commits into from
Oct 21, 2024

Conversation

rafaelcr
Copy link
Collaborator

@rafaelcr rafaelcr commented Oct 20, 2024

Adds support for a tenure_change transaction in Rosetta endpoints and reports it as an operation:

{
  "operation_identifier": {
    "index": 0
  },
  "type": "tenure_change",
  "status": "success",
  "metadata": {
    "tenure_consensus_hash": "0x2fedd90a5f318ed8cec419fd1c6656b5af452497",
    "prev_tenure_consensus_hash": "0x5104aae6d442b49c8e8d2031df7f40b67528e654",
    "burn_view_consensus_hash": "0x2fedd90a5f318ed8cec419fd1c6656b5af452497",
    "previous_tenure_end": "0xb77b061202b1e6dce889ba1633efa969d3c24679d32a7542d29015ee94e8a860",
    "previous_tenure_blocks": 9,
    "cause": "block_found",
    "pubkey_hash": "0x62b4273562dfa3825496094507564bf2b30c8b11"
  }
}

Fixes #2127

Copy link

codecov bot commented Oct 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

Copy link

github-actions bot commented Oct 20, 2024

Vercel deployment URL: https://stacks-blockchain-k33lpenjj-hirosystems.vercel.app 🚀

@rafaelcr rafaelcr linked an issue Oct 20, 2024 that may be closed by this pull request
Copy link
Member

@zone117x zone117x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a test for the behavior, LGTM!

Copy link
Member

@zone117x zone117x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw when merging, the commit message should start with fix(rosetta): ... so that it shows up the changelog/release notes clearly for exchanges

@rafaelcr rafaelcr merged commit bfbf65c into master Oct 21, 2024
27 checks passed
@rafaelcr rafaelcr deleted the fix/rosetta-tenure-change branch October 21, 2024 13:33
blockstack-devops pushed a commit that referenced this pull request Oct 21, 2024
## [8.1.2](v8.1.1...v8.1.2) (2024-10-21)

### Bug Fixes

* **rosetta:** support tenure change transactions ([#2128](#2128)) ([bfbf65c](bfbf65c))
* **rosetta:** use Nakamoto block timestamps for epoch3/Nakamoto block responses ([#2132](#2132)) ([bd13962](bd13962))
@blockstack-devops
Copy link

🎉 This PR is included in version 8.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Rosetta /block API cannot retrieve tenure_change blocks
3 participants