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 implementation #8471

Merged
merged 11 commits into from
Jul 26, 2024

Conversation

gfukushima
Copy link
Contributor

@gfukushima gfukushima commented Jul 25, 2024

PR Description

This PR adds the implementation of the handle for the GetAttesterSlashingV2 method of the beacon API.

Fixed Issue(s)

Fixes #8122

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.

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
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

Implemented the GetAttesterSlashingV2 method for the beacon API, including endpoint definition, handler, and tests.

  • Added data/beaconrestapi/src/integration-test/resources/tech/pegasys/teku/beaconrestapi/beacon/paths/_eth_v2_beacon_pool_attester_slashings.json for OpenAPI spec.
  • Implemented data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v2/beacon/GetAttesterSlashingsV2.java for the new endpoint.
  • Updated data/provider/src/main/java/tech/pegasys/teku/api/NodeDataProvider.java to include getAttesterSlashingsAndMetaData method.
  • Added unit tests in data/beaconrestapi/src/test/java/tech/pegasys/teku/beaconrestapi/handlers/v2/beacon/GetAttesterSlashingsV2Test.java.
  • Included test data files getAttesterSlashingsElectra.json and getAttesterSlashingsPhase0.json for different spec milestones.

9 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Copy link
Contributor

@rolfyone rolfyone left a comment

Choose a reason for hiding this comment

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

will approve, just 1 nit

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
# Conflicts:
#	data/beaconrestapi/src/integration-test/resources/tech/pegasys/teku/beaconrestapi/beacon/schema/GetPoolAttesterSlashingsV2Response.json
#	data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v2/beacon/GetAttesterSlashingsV2.java
#	data/beaconrestapi/src/test/java/tech/pegasys/teku/beaconrestapi/handlers/v2/beacon/GetAttesterSlashingsV2Test.java
@gfukushima gfukushima enabled auto-merge (squash) July 26, 2024 01:44
@gfukushima gfukushima merged commit 1c86e4e into Consensys:master Jul 26, 2024
16 checks passed
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.

Add the new GetAttesterSlashing v2 API
2 participants