Skip to content

Cranker: Retry stake pool update with no_merge on failure - #68

Merged
aoikurokawa merged 1 commit into
masterfrom
ak/crank
Aug 26, 2026
Merged

aoikurokawa merged 1 commit into
masterfrom
ak/crank

Conversation

@aoikurokawa

@aoikurokawa aoikurokawa commented Aug 26, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The testnet stake pool is currently in a state where the update cannot complete with
merging enabled. UpdateValidatorListBalance fails on the merge of transient stake
accounts, and because that failure aborts the whole update, the cranker never finishes
the epoch update at all — last_update_epoch stays behind the current epoch, which in
turn blocks deposits and withdrawals against the pool until someone manually runs the
update with --no-merge.

Merging is the failure-prone part of the update (a transient stake account that is still
activating/deactivating cannot be merged), but it is also the optional part: the
balance and state update for every validator is what actually needs to land each epoch.

Change

If the first pass (no_merge = false) fails, the cranker now retries once with
no_merge = true, so the balance/state update still lands even when transient stake
accounts cannot be merged. The Slack notification distinguishes the two success paths, so
it is visible when an epoch was cranked without merging rather than silently succeeding.

No config or CLI changes — the retry is automatic.

Notes

  • The retry re-runs the full parallel_execute_stake_pool_update: it re-fetches the pool
    and validator list and re-sends every UpdateValidatorListBalance chunk, not just the
    failed ones. force: true bypasses the last_update_epoch early return, and repeated
    updates within an epoch are idempotent, so this is safe — the cost is a second full
    pass of transactions and fees on the failure path.
  • Transient stake accounts left unmerged are picked up by a later epoch's update once
    they finish activating/deactivating.

Test plan

  • Testnet, where the merge path currently fails: confirm the first attempt fails, the
    retry with no_merge succeeds, last_update_epoch advances to the current epoch, and
    the Slack message reports the no-merge path.
  • Mainnet: unchanged in the normal case — the first attempt succeeds and the retry never
    runs.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a fallback stake-pool update that disables merging after the initial attempt fails.

Changes:

  • Retries failed updates with no_merge.
  • Adds outcome-specific Slack notifications.

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

Comment thread cranker/src/main.rs
@aoikurokawa aoikurokawa changed the title Cranker: Crank with no_merge if failed to update with no_merge true Cranker: Retry stake pool update with no_merge on failure Aug 26, 2026
@aoikurokawa
aoikurokawa merged commit 20eab52 into master Aug 26, 2026
6 checks passed
@aoikurokawa
aoikurokawa deleted the ak/crank branch August 26, 2026 17:51
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.

3 participants