Skip to content

Commit

Permalink
Revert "reduce min-epoch for surrounding slashing calculation"
Browse files Browse the repository at this point in the history
This reverts commit 01ea1fe.
  • Loading branch information
pk910 committed Mar 25, 2024
1 parent 09b490c commit 93f05e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/coordinator/tasks/generate_slashings/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ func (t *Task) generateSurroundAttesterSlashing(validatorIndex uint64, validator
clPool := t.ctx.Scheduler.GetServices().ClientPool().GetConsensusPool()

slot, epoch, _ := clPool.GetBlockCache().GetWallclock().Now()
if epoch.Number() < 2 {
return nil, fmt.Errorf("current epoch too low (require epoch >= 2)")
if epoch.Number() < 4 {
return nil, fmt.Errorf("current epoch too low (require epoch >= 4)")
}

specs := clPool.GetBlockCache().GetSpecs()
Expand All @@ -290,7 +290,7 @@ func (t *Task) generateSurroundAttesterSlashing(validatorIndex uint64, validator
slot2 := slot1 - specs.SlotsPerEpoch - 2

targetEpoch1 := slot1 / specs.SlotsPerEpoch
sourceEpoch1 := targetEpoch1 - 2
sourceEpoch1 := targetEpoch1 - 3

targetEpoch2 := slot2 / specs.SlotsPerEpoch
sourceEpoch2 := targetEpoch2
Expand Down

0 comments on commit 93f05e7

Please sign in to comment.