Skip to content

Commit

Permalink
Ignore rewards-v2 testing ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmcgary committed Dec 12, 2024
1 parent 3436ce6 commit aa3a6b2
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,24 +297,6 @@ func (c *Config) GetOperatorRestakedStrategiesStartBlock() uint64 {
return 0
}

func (c *Config) ShouldSkipRewardsGeneration(blockNumber uint64) bool {
switch c.Chain {
case Chain_Preprod:
// During this period we deployed the rewards-v2 contracts before updating the sidecar.
// This results in missed events which have to be filled by some means. To fill them in,
// we needed to manually delete delete blocks >= 2871534 and re-index. The trouble here
// is that re-indexing introduces new state which was not present at the original process time.
if blockNumber >= 2871534 && blockNumber <= 2909856 {
return true
}
case Chain_Holesky:
// Skip rewards generation for holesky
case Chain_Mainnet:
// Skip rewards generation for mainnet
}
return false
}

func (c *Config) IsRewardsV2EnabledForCutoffDate(cutoffDate string) (bool, error) {
forks, err := c.GetForkDates()
if err != nil {
Expand Down Expand Up @@ -347,6 +329,11 @@ func (c *Config) CanIgnoreIncorrectRewardsRoot(blockNumber uint64) bool {
if blockNumber == 2812052 {
return true
}

// ignore rewards-v2 deployment/testing range
if blockNumber > 2877938 && blockNumber <= 2909856 {
return true
}
case Chain_Holesky:
// roughly 2024-08-01
if blockNumber < 2046020 {
Expand Down

0 comments on commit aa3a6b2

Please sign in to comment.