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

Handle AttesterSlashingElectra everywhere in the codebase #14823

Merged
merged 2 commits into from
Jan 28, 2025

Conversation

rkapka
Copy link
Contributor

@rkapka rkapka commented Jan 23, 2025

What type of PR is this?

Feature

What does this PR do? Why is it needed?

Updates several pieces of the codebase for Electra slashing support:

  • Tests cases in several packages
  • Bug fix in transition.go, where the maximum number of slashings in a block was always the Phase0 config value
  • Add electra key check for attestation encoding/decoding in SlasherDB
  • Support for Electra slashings in Beacon API events
  • Enable slashing protection check in the VC

Acknowledgements

@rkapka rkapka requested a review from a team as a code owner January 23, 2025 14:48
@rkapka rkapka added the Electra electra hardfork label Jan 23, 2025
@@ -395,3 +395,149 @@ func TestProcessAttesterSlashings_AppliesCorrectStatusCapella(t *testing.T) {
require.Equal(t, uint64(31000000000), newState.Balances()[1])
require.Equal(t, uint64(32000000000), newState.Balances()[2])
}

func TestProcessAttesterSlashings_AppliesCorrectStatusDeneb(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

There is a lot of copy pasted code with equivalent functions from other forks.
Could this be factorized?

@rkapka rkapka force-pushed the eip-7549-slasher-pt2 branch from c83b17f to 1dceaa8 Compare January 28, 2025 11:58
@rkapka rkapka added this pull request to the merge queue Jan 28, 2025
Merged via the queue into develop with commit 9cf6b93 Jan 28, 2025
17 checks passed
@rkapka rkapka deleted the eip-7549-slasher-pt2 branch January 28, 2025 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Electra electra hardfork
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants