Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename PartialPendingWithdrawal field index to validator_index #4043

Merged

Conversation

lucassaldanha
Copy link
Contributor

TLDR

This PR changes PendingPartialWithdrawal.index to PendingPartialWithdrawal.validator_index. This makes it more aligned with Withdrawal and other places where we refer to ValidatorIndex as validator_index.

Justification

In Capella, we introduced Withdrawal with the following definition:

class Withdrawal(Container):
    index: WithdrawalIndex
    validator_index: ValidatorIndex
    address: ExecutionAddress
    amount: Gwei

And in Electra, we introduced PendingPartialWithdrawal as:

class PendingPartialWithdrawal(Container):
    index: ValidatorIndex
    amount: Gwei
    withdrawable_epoch: Epoch

The fact that we used Withdrawal.validator_index but PendingPartialWithdrawal.index is confusing. And can be misleading given we have Withdrawal.index with a complete different meaning.

Copy link
Member

@jtraglia jtraglia left a comment

Choose a reason for hiding this comment

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

I totally support this change. Thank you! Just a couple nits.

specs/electra/beacon-chain.md Outdated Show resolved Hide resolved
specs/electra/beacon-chain.md Outdated Show resolved Hide resolved
@lucassaldanha lucassaldanha changed the title Rename PartialPendintWithdrawal field index to validator_index Rename PartialPendingWithdrawal field index to validator_index Dec 8, 2024
@jtraglia jtraglia mentioned this pull request Dec 9, 2024
13 tasks
Copy link
Member

@ppopth ppopth left a comment

Choose a reason for hiding this comment

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

LGTM

@jtraglia jtraglia merged commit 83a8042 into ethereum:dev Dec 9, 2024
27 checks passed
@lucassaldanha lucassaldanha deleted the rename-pending-withdrawal-field branch December 9, 2024 22:52
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.

4 participants