Optimize processing of slashings (#14990)

* Calculate max epoch and churn for slashing once

* calculate once for proposer and attester slashings

* changelog <3

* introduce struct

* check if err is nil in ProcessVoluntaryExits

* rename exitData to exitInfo and return from functions

* cleanup + tests

* cleanup after rebase

* Potuz's review

* pre-calculate total active balance

* remove `slashValidatorFunc` closure

* Avoid a second validator loop

    🤖 Generated with [Claude Code](https://claude.ai/code)

    Co-Authored-By: Claude <noreply@anthropic.com>

* remove balance parameter from slashing functions

---------

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: potuz <potuz@prysmaticlabs.com>
This commit is contained in:
Radosław Kapka
2025-09-10 20:14:11 +02:00
committed by GitHub
parent 5c348dff59
commit 3f5c4df7e0
27 changed files with 374 additions and 147 deletions

View File

@@ -35,8 +35,8 @@ Here is how it should be used:
package main
import (
"github.com/sirupsen/logrus"
prefixed "github.com/prysmaticlabs/prysm/runtime/logging/logrus-prefixed-formatter"
"github.com/sirupsen/logrus"
)
var log = logrus.New()