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

Add validator index with Withdrawal pb #11563

Merged
merged 5 commits into from
Oct 22, 2022
Merged

Conversation

terencechain
Copy link
Member

@terencechain terencechain commented Oct 20, 2022

What type of PR is this?

Spec change

What does this PR do? Why is it needed?

In ethereum/consensus-specs#3050, the validator index with added to Withdrawal so we need to follow. I don't think withdraw_balance function has been implemented so no change there. This is an early version of the consensus container definition so frequent changes are expected. This is not used through out consensus yet

@terencechain terencechain self-assigned this Oct 20, 2022
@terencechain terencechain marked this pull request as ready for review October 20, 2022 21:20
@terencechain terencechain requested a review from a team as a code owner October 20, 2022 21:20
Copy link
Contributor

@potuz potuz left a comment

Choose a reason for hiding this comment

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

I think the tests in state-native/setters_withdrawal_tests.go and similar need to be changed to account for this field

Comment on lines +135 to 143
// Validator index for the withdrawal
uint64 validator_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v3/consensus-types/primitives.ValidatorIndex"];

// The execution address receiving the funds
bytes execution_address = 2 [(ethereum.eth.ext.ssz_size) = "20"];
bytes execution_address = 3 [(ethereum.eth.ext.ssz_size) = "20"];

// The withdrawn amount in Gwei
uint64 amount = 3;
uint64 amount = 4;
}
Copy link
Member

Choose a reason for hiding this comment

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

Do not change IDs. This is not going to be backwards compatible with the previous version.

Copy link
Contributor

Choose a reason for hiding this comment

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

what do you mean? there's no previous version, the spec is in flux

Copy link
Member

Choose a reason for hiding this comment

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

What I mean is that we should not be changing proto IDs. In this case, it seems like we can call it out as something that has not be implemented yet so it is safe to change, but it has to be explicit so that we don't develop the habit of changing proto IDs like this.

@prestonvanloon prestonvanloon dismissed their stale review October 21, 2022 17:56

Discussed offline

@prylabs-bulldozer prylabs-bulldozer bot merged commit c24016f into develop Oct 22, 2022
@delete-merged-branch delete-merged-branch bot deleted the add-validator-index branch October 22, 2022 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants