Skip to content

fix: reset builder withdrawable epoch only if balance swept - #9609

Merged
nflaig merged 1 commit into
nc/alpha.12from
nc/alpha.12-builder-deposit-reset-swept
Jul 7, 2026
Merged

fix: reset builder withdrawable epoch only if balance swept#9609
nflaig merged 1 commit into
nc/alpha.12from
nc/alpha.12-builder-deposit-reset-swept

Conversation

@ensi321

@ensi321 ensi321 commented Jul 7, 2026

Copy link
Copy Markdown
Member

…s-specs #5384)

process_builder_deposit_request now resets withdrawable_epoch only when the
exited builder's balance is 0, before adding the deposit amount.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ensi321
ensi321 requested a review from a team as a code owner July 7, 2026 06:24

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request updates the processBuilderDepositRequest function to ensure that an exited builder's withdrawable epoch is only reset if their balance is zero (fully swept). To support this, the balance increment now occurs after the epoch reset check. Corresponding unit tests have been updated and added to cover both fully-swept and non-swept exited builder scenarios. There are no review comments, so no feedback is provided.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

});

it("resets the withdrawable epoch when topping up an exited builder", () => {
it("resets the withdrawable epoch when topping up an exited, fully-swept builder", () => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I meant to remove these in the other PR to upgrade to alpha.11, I think these unit tests are mostly useless, spec tests already cover this

let's clean them up separately though

@nflaig
nflaig merged commit 0564b96 into nc/alpha.12 Jul 7, 2026
14 of 16 checks passed
@nflaig
nflaig deleted the nc/alpha.12-builder-deposit-reset-swept branch July 7, 2026 07:17
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