Skip to content

BM-3058: fix(cli): list-staking-rewards shows full claimable history#2042

Open
capossele wants to merge 1 commit into
mainfrom
angelo/list-staking-rewards-full-range
Open

BM-3058: fix(cli): list-staking-rewards shows full claimable history#2042
capossele wants to merge 1 commit into
mainfrom
angelo/list-staking-rewards-full-range

Conversation

@capossele

Copy link
Copy Markdown
Contributor

Problem

boundless rewards list-staking-rewards under-reported unclaimed staking rewards because it only looked at a recent window:

  1. start_epoch defaulted to end_epoch - 5, so by default only the last 5 epochs were shown.
  2. get_reward_delegation_history fetched only the first page of the indexer's reward-delegation endpoint (default 50 entries, newest-first), so older epochs had no data even when a wider --start-epoch was passed.

The claim command (claim-staking-rewards) was already correct — it scans the full epoch range — so this was a reporting-only bug (no stranded funds), but it could mislead users into thinking they have less to claim.

Fix

  • get_reward_delegation_history now pages through the entire history instead of the default first page.
  • start_epoch defaults to the address's first participating epoch (from the delegation history) rather than end − 5.

claim-staking-rewards is unaffected.

Follow-up (out of scope)

  • The command fetches per-epoch staking summaries sequentially in two loops, so a full-history listing now makes more indexer calls. Could be sped up by fetching each epoch once into a map. Not required for correctness.

@github-actions github-actions Bot changed the title fix(cli): list-staking-rewards shows full claimable history BM-3058: fix(cli): list-staking-rewards shows full claimable history Jun 16, 2026
@linear

linear Bot commented Jun 16, 2026

Copy link
Copy Markdown

BM-3058

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants