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

Use Custom Type ValidatorIndex Across Prysm #8478

Merged
merged 21 commits into from
Feb 23, 2021
Merged

Conversation

terencechain
Copy link
Member

@terencechain terencechain commented Feb 19, 2021

What type of PR is this?

Feature

What does this PR do? Why is it needed?

Use eth2 type ValidtorIndex across Prysm

Which issues(s) does this PR fix?

Part of #8205

Other notes for review

N/A

@farazdagi farazdagi mentioned this pull request Feb 19, 2021
14 tasks
@terencechain terencechain marked this pull request as ready for review February 19, 2021 19:42
@terencechain terencechain requested a review from a team as a code owner February 19, 2021 19:42
@terencechain terencechain self-assigned this Feb 19, 2021
beacon-chain/cache/proposer_indices_test.go Outdated Show resolved Hide resolved
beacon-chain/core/helpers/rewards_penalties.go Outdated Show resolved Hide resolved
beacon-chain/core/helpers/shuffle.go Outdated Show resolved Hide resolved
endtoend/evaluators/operations.go Outdated Show resolved Hide resolved
endtoend/evaluators/slashing.go Outdated Show resolved Hide resolved
validator/graffiti/parse_graffiti_test.go Outdated Show resolved Hide resolved
terencechain and others added 5 commits February 19, 2021 12:57
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
@@ -24,8 +24,8 @@ type ReadOnlyDatabase interface {
GetLatestEpochDetected(ctx context.Context) (types.Epoch, error)

// BlockHeader related methods.
BlockHeaders(ctx context.Context, slot types.Slot, validatorID uint64) ([]*ethpb.SignedBeaconBlockHeader, error)
HasBlockHeader(ctx context.Context, slot types.Slot, validatorID uint64) bool
BlockHeaders(ctx context.Context, slot types.Slot, validatorID types.ValidatorIndex) ([]*ethpb.SignedBeaconBlockHeader, error)
Copy link
Contributor

@rkapka rkapka Feb 22, 2021

Choose a reason for hiding this comment

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

Can we change ID to index in this file's interfaces and in some other places? They are not really the same (what would be a validator ID anyway? it's public key?) and we use indexes here. This might be too big of a change for this PR, though.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also I wonder whether it would not be a braking change...

Copy link
Contributor

Choose a reason for hiding this comment

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

it should indeed be validatorIdx or validatorIndex

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good. Will do that in the next PR. It seems out of scope for now

@rauljordan rauljordan changed the title Use ValidtorIndex across Prysm Use Custom Type ValidatorIndex Across Prysm Feb 22, 2021
@terencechain terencechain marked this pull request as draft February 22, 2021 15:29
@terencechain terencechain marked this pull request as ready for review February 22, 2021 16:39
rauljordan
rauljordan previously approved these changes Feb 22, 2021
Copy link
Contributor

@farazdagi farazdagi left a comment

Choose a reason for hiding this comment

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

Amazing work!
Had just couple of minor requests.

Copy link
Contributor

@farazdagi farazdagi left a comment

Choose a reason for hiding this comment

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

lgtm, thank you!

@prylabs-bulldozer prylabs-bulldozer bot merged commit 3edfa8c into develop Feb 23, 2021
@delete-merged-branch delete-merged-branch bot deleted the validator-index branch February 23, 2021 00:14
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