-
Notifications
You must be signed in to change notification settings - Fork 299
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 GetAttesterSlashingV2 #8466
Merged
gfukushima
merged 5 commits into
Consensys:master
from
gfukushima:GetAttesterSlashingV2
Jul 25, 2024
Merged
Add GetAttesterSlashingV2 #8466
gfukushima
merged 5 commits into
Consensys:master
from
gfukushima:GetAttesterSlashingV2
Jul 25, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
...src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v2/beacon/GetAttesterSlashingsV2.java
Dismissed
Show dismissed
Hide dismissed
rolfyone
reviewed
Jul 24, 2024
.../test/java/tech/pegasys/teku/beaconrestapi/handlers/v2/beacon/GetAttesterSlashingV2Test.java
Outdated
Show resolved
Hide resolved
rolfyone
reviewed
Jul 24, 2024
...ources/tech/pegasys/teku/beaconrestapi/beacon/schema/GetPoolAttesterSlashingsV2Response.json
Show resolved
Hide resolved
Signed-off-by: Gabriel Fukushima <[email protected]>
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.
PR Summary
Introduced the GetAttesterSlashingV2
method to the Beacon REST API, adding a new endpoint and associated schema for retrieving attester slashings with future-proofing for different attesting_indices
array sizes.
- Added
data/beaconrestapi/src/integration-test/resources/tech/pegasys/teku/beaconrestapi/beacon/paths/_eth_v2_beacon_pool_attester_slashings.json
for new endpoint definition. - Added
data/beaconrestapi/src/integration-test/resources/tech/pegasys/teku/beaconrestapi/beacon/schema/GetPoolAttesterSlashingsV2Response.json
to define response schema. - Modified
data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/JsonTypeDefinitionBeaconRestApi.java
to include the new endpoint. - Added
data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v2/beacon/GetAttesterSlashingsV2.java
for the new endpoint handler. - Added
data/beaconrestapi/src/test/java/tech/pegasys/teku/beaconrestapi/handlers/v2/beacon/GetAttesterSlashingsV2Test.java
for unit tests of the new handler.
6 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings
...src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v2/beacon/GetAttesterSlashingsV2.java
Show resolved
Hide resolved
rolfyone
approved these changes
Jul 25, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Description
This PR introduces the skeleton of the new method GetAttesterSlashingV2. Note though that as of now this differ minimally from the V1 as Teku currently doesn't not make a distinction of Electra.IndexedAttestation and Phase0.IndexedAttestation since the only difference is the size limit of the
attesting_indices
array.This implementation does not make us 100% complaint with the spec but should result in the right json result after all.
Fixed Issue(s)
Part of
Documentation
doc-change-required
label to this PR if updates are required.Changelog