Skip to content

fix: include the PoX sunset burn in mainnet staking reward totals - #2709

Merged
rafa-stacks merged 2 commits into
mainfrom
sunset-burn
Oct 7, 2026
Merged

rafa-stacks merged 2 commits into
mainfrom
sunset-burn

Conversation

@rafa-stacks

@rafa-stacks rafa-stacks commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

GET /extended/v3/staking/rewards left out the 2.0-era PoX sunset-ramp surcharge (bitcoin blocks ~766050-781551) from burn_amount, because the node never reported those burns in its /new_burn_block events. This PR adds a fixed historical total of 489352064 sats to burn_amount, and so to total_amount, on mainnet only.

@rafa-stacks
rafa-stacks requested a balanced review from Copilot October 7, 2026 04:14
@rafa-stacks rafa-stacks changed the title feat: include the PoX sunset burn in mainnet staking reward totals fix: include the PoX sunset burn in mainnet staking reward totals Oct 7, 2026
@rafa-stacks
rafa-stacks marked this pull request as ready for review October 7, 2026 04:15
@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Patch % Lines
src/datastore/v3/pg-store-v3.ts 80.00% 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.

Copilot review overview

🟡 Changes recommended

The surcharge is applied before its historical period is ingested, and the public schema still documents its exclusion.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds the historical PoX sunset burn surcharge to mainnet staking reward totals.

Changes:

  • Adds 489,352,064 sats to mainnet burn and total amounts.
  • Adds mainnet-specific endpoint coverage.
File Description
src/​api/​routes/​v3/​staking-rewards.ts Applies the mainnet surcharge.
tests/​api/​burnchain/​staking-rewards.test.ts Tests adjusted mainnet totals.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/api/routes/v3/staking-rewards.ts Resolved
@rafa-stacks
rafa-stacks merged commit acee246 into main Oct 7, 2026
26 checks passed
@rafa-stacks
rafa-stacks deleted the sunset-burn branch October 7, 2026 13:40

This branch was successfully deployed

1 active deployment
Production — 52346fe2 Deployed Oct 7, 2026 by rafa-stacks via build-publish #3822
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.

3 participants