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 POST /eth/v2/beacon/pool/attester_slashings #14480

Merged
merged 15 commits into from
Oct 15, 2024

Conversation

saolyn
Copy link
Contributor

@saolyn saolyn commented Sep 25, 2024

What type of PR is this?

Other

What does this PR do? Why is it needed?

Beacon API Electra alignment, add missing endpoint for POST /eth/v2/beacon/pool/attester_slashings.
As described in the spec https://ethereum.github.io/beacon-APIs/?urls.primaryName=dev#/Beacon/submitPoolAttesterSlashingsV2

Which issues(s) does this PR fix?

Part of #14476

Other notes for review

Acknowledgements

  • I have read CONTRIBUTING.md.
  • I have made an appropriate entry to CHANGELOG.md.
  • I have added a description to this PR with sufficient context for reviewers to understand this PR.

@saolyn saolyn marked this pull request as ready for review September 30, 2024 17:04
@saolyn saolyn requested a review from a team as a code owner September 30, 2024 17:04
func (s *Server) attesterSlashing(
w http.ResponseWriter,
ctx context.Context,
slot primitives.Slot,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why pass the slot when we can get it from slashing?

Copy link
Contributor Author

@saolyn saolyn Oct 10, 2024

Choose a reason for hiding this comment

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

Well I had to make the slashing type useable by both Electra and non electra and using the slot from this slashing would be:
slashing.FirstAttestation().GetData().Slot
It seemed simpler to just pass the slot

@rkapka rkapka enabled auto-merge October 15, 2024 12:07
@rkapka rkapka added this pull request to the merge queue Oct 15, 2024
Merged via the queue into develop with commit f307a36 Oct 15, 2024
17 of 18 checks passed
@rkapka rkapka deleted the add-submitAttesterSlashingsV2 branch October 15, 2024 12:34
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