Skip to content

fix(api): deprecate v2 block and burn-block endpoints in favor of v3 - #2733

Merged
rafa-stacks merged 1 commit into
mainfrom
work/deprecate-v2-blocks-bbf340
Oct 25, 2026
Merged

rafa-stacks merged 1 commit into
mainfrom
work/deprecate-v2-blocks-bbf340

Conversation

@rafa-stacks

Copy link
Copy Markdown
Collaborator

Deprecates the v2 block and burn-block endpoints that have a v3 counterpart (they now return a Warning header pointing at the v3 path), while exempting them and GET /extended/v2/blocks/{height_or_hash}/transactions from the ENABLE_DEPRECATED_ENDPOINTS sunset so they keep serving after v1 is disabled. v1 block endpoint descriptions now point at the v3 operations.

@codecov

codecov Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.95918% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/api/deprecation-plugin.ts 94.11% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

Static review found no blocking issues in the scoped exemption logic, migration guidance, or regression coverage; tests were not executed.

No open issues 🎉

What changed in this PR

Deprecates v2 block and burn-block endpoints in favor of v3 while keeping them available when deprecated v1 endpoints are disabled.

Changes:

  • Adds a sunset exemption that preserves deprecation warnings without returning 410 Gone.
  • Adds v3 migration messages to affected v2 routes and updates v1 block descriptions.
  • Adds regression tests for warnings, exempt routes, and continued v1 shutdown behavior.
File Description
tests/​api/​blocks/​v2-blocks-deprecation.test.ts Tests warning headers and sunset behavior.
src/​api/​routes/​v2/​burn-blocks.ts Deprecates three routes with v3 guidance and sunset exemptions.
src/​api/​routes/​v2/​blocks.ts Adds deprecation metadata and exemptions to affected block routes.
src/​api/​routes/​v1/​block.ts Updates descriptions to reference v3 operations.
src/​api/​init.ts Documents sunset exemptions in the registration comment.
src/​api/​deprecation-plugin.ts Defines and honors the sunset exemption flag.

Review effort: Balanced

@rafa-stacks
rafa-stacks marked this pull request as ready for review October 25, 2026 23:31
@rafa-stacks
rafa-stacks merged commit b039adb into main Oct 25, 2026
27 checks passed
@rafa-stacks
rafa-stacks deleted the work/deprecate-v2-blocks-bbf340 branch October 25, 2026 23:39
@github-project-automation github-project-automation Bot moved this to ✅ Done in API Board Oct 25, 2026

This branch was successfully deployed

1 active deployment
Production — 8f32c245 Deployed Oct 25, 2026 by rafa-stacks via build-publish #3868
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants