Skip to content

feat: handle exited/exiting validators during top up - #6880

Merged
ensi321 merged 3 commits into
electra-forkfrom
nc/exit-validator
Jun 21, 2024
Merged

feat: handle exited/exiting validators during top up#6880
ensi321 merged 3 commits into
electra-forkfrom
nc/exit-validator

Conversation

@ensi321

@ensi321 ensi321 commented Jun 13, 2024

Copy link
Copy Markdown
Member

Handle deposit for exiting and exited validators:

  • If the validator is exiting, move the deposit to the end of state.pendingBalanceDeposits via depositsToPostpone
  • If the validator is already exited, directly increase its balance without consuming churn (state.depositBalanceToConsume)

Spec PR: ethereum/consensus-specs#3776

@ensi321
ensi321 requested a review from a team as a code owner June 13, 2024 08:53
if (processedAmount + amount > availableForProcessing) {
break;
const {amount, index: depositIndex} = deposit;
const validator = state.validators.get(depositIndex);

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.

Suggested change
const validator = state.validators.get(depositIndex);
const validator = state.validators.getReadOnly(depositIndex);

@ensi321 ensi321 Jun 19, 2024

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@twoeths Caught this during spec testing. Fixed in #6892 馃憤

@ensi321
ensi321 force-pushed the nc/exit-validator branch from 4d389e1 to 9d37448 Compare June 21, 2024 16:32
@ensi321
ensi321 merged commit 8cc86f9 into electra-fork Jun 21, 2024
@ensi321
ensi321 deleted the nc/exit-validator branch June 21, 2024 16:32
g11tech pushed a commit that referenced this pull request Jun 25, 2024
* Handle exiting validataor

* lint

* Add todo
g11tech pushed a commit that referenced this pull request Jun 25, 2024
* Handle exiting validataor

* lint

* Add todo
g11tech pushed a commit that referenced this pull request Jul 1, 2024
* Handle exiting validataor

* lint

* Add todo
g11tech pushed a commit that referenced this pull request Jul 30, 2024
* Handle exiting validataor

* lint

* Add todo
g11tech pushed a commit that referenced this pull request Jul 31, 2024
* Handle exiting validataor

* lint

* Add todo
g11tech pushed a commit that referenced this pull request Aug 2, 2024
* Handle exiting validataor

* lint

* Add todo
g11tech pushed a commit that referenced this pull request Aug 9, 2024
* Handle exiting validataor

* lint

* Add todo
g11tech pushed a commit that referenced this pull request Aug 9, 2024
* Handle exiting validataor

* lint

* Add todo
g11tech pushed a commit that referenced this pull request Aug 23, 2024
* Handle exiting validataor

* lint

* Add todo
g11tech pushed a commit that referenced this pull request Aug 27, 2024
* Handle exiting validataor

* lint

* Add todo
philknows pushed a commit that referenced this pull request Sep 3, 2024
* Handle exiting validataor

* lint

* Add todo
@wemeetagain

Copy link
Copy Markdown
Member

馃帀 This PR is included in v1.22.0 馃帀

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