Compare commits

..

2 Commits

Author SHA1 Message Date
Jim McDonald
0bdf68edf6 Do not fetch future states. 2022-06-01 12:42:40 +01:00
Jim McDonald
b24341b7da Do not fetch future states. 2022-06-01 12:42:12 +01:00
3 changed files with 9 additions and 2 deletions

View File

@@ -1,3 +1,6 @@
1.23.1:
- do not fetch future state for chain eth1votes
1.23.0:
- do not fetch sync committee information for epoch summaries prior to Altair
- ensure that "attester inclusion" without validator returns appropriate error

View File

@@ -38,7 +38,11 @@ func (c *command) process(ctx context.Context) error {
}
// Need to fetch the state from the last slot of the epoch.
state, err := c.beaconStateProvider.BeaconState(ctx, fmt.Sprintf("%d", c.chainTime.FirstSlotOfEpoch(epoch+1)-1))
fetchSlot := c.chainTime.FirstSlotOfEpoch(epoch+1) - 1
if fetchSlot > c.chainTime.CurrentSlot() {
fetchSlot = c.chainTime.CurrentSlot()
}
state, err := c.beaconStateProvider.BeaconState(ctx, fmt.Sprintf("%d", fetchSlot))
if err != nil {
return errors.Wrap(err, "failed to obtain state")
}

View File

@@ -24,7 +24,7 @@ import (
// ReleaseVersion is the release version of the codebase.
// Usually overridden by tag names when building binaries.
var ReleaseVersion = "local build (latest release 1.23.0)"
var ReleaseVersion = "local build (latest release 1.23.1)"
// versionCmd represents the version command
var versionCmd = &cobra.Command{