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 GetAttesterSlashingV2 #8466

Merged
merged 5 commits into from
Jul 25, 2024

Conversation

gfukushima
Copy link
Contributor

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

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

@gfukushima gfukushima marked this pull request as ready for review July 25, 2024 01:47
@gfukushima gfukushima requested a review from rolfyone July 25, 2024 01:47
Copy link

@greptile-apps greptile-apps bot left a 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

@gfukushima gfukushima enabled auto-merge (squash) July 25, 2024 04:58
@gfukushima gfukushima merged commit 22131b9 into Consensys:master Jul 25, 2024
16 checks passed
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.

2 participants