-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Implement ListPoolProposerSlashings and ListPoolVoluntaryExits in the beacon API #8508
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #8508 +/- ##
==========================================
Coverage ? 58.14%
==========================================
Files ? 458
Lines ? 32813
Branches ? 0
==========================================
Hits ? 19080
Misses ? 10839
Partials ? 2894 |
beacon-chain/rpc/beaconv1/pool.go
Outdated
if err != nil { | ||
return nil, status.Errorf(codes.Internal, "Could not get head state: %v", err) | ||
} | ||
sourceSlashings := bs.SlashingsPool.PendingProposerSlashings(ctx, headState, true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sourceSlashings := bs.SlashingsPool.PendingProposerSlashings(ctx, headState, true) | |
sourceSlashings := bs.SlashingsPool.PendingProposerSlashings(ctx, headState, true /* unlimited return slashings */) |
beacon-chain/rpc/beaconv1/pool.go
Outdated
return nil, status.Errorf(codes.Internal, "Could not get head state: %v", err) | ||
} | ||
|
||
sourceExits := bs.VoluntaryExitsPool.PendingExits(headState, headState.Slot(), true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same. A comment after true
will be nice
@@ -93,3 +93,45 @@ func V1Alpha1AttSlashingToV1(v1alpha1Slashing *ethpb_alpha.AttesterSlashing) *et | |||
Attestation_2: V1Alpha1IndexedAttToV1(v1alpha1Slashing.Attestation_2), | |||
} | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some tests for the new functions below this line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the migration
package doesn't have any tests... Would it be OK if I create a separate PR with tests for the whole package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good 👍
What type of PR is this?
Feature
What does this PR do? Why is it needed?
This PR implements beacon API's
ListPoolProposerSlashings
andListPoolVoluntaryExits
methods according to the spec: https://ethereum.github.io/eth2.0-APIs/#/BeaconWhich issues(s) does this PR fix?
Part of #7510
Other notes for review
Very similar to #8492