diff --git a/CHANGELOG.md b/CHANGELOG.md index b872203..03a1a47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ dev: +1.39.1: + - refactor sync committee to use slot endpoint rather than epoch query param + 1.39.0: - support Fulu diff --git a/cmd/synccommittee/members/process.go b/cmd/synccommittee/members/process.go index 06fc0bf..6d8c2ad 100644 --- a/cmd/synccommittee/members/process.go +++ b/cmd/synccommittee/members/process.go @@ -35,9 +35,13 @@ func process(ctx context.Context, data *dataIn) (*dataOut, error) { return nil, err } + state := "head" + if data.epoch != "" { + slot := data.chainTime.FirstSlotOfEpoch(epoch) + state = fmt.Sprintf("%d", slot) + } syncCommitteeResponse, err := data.eth2Client.(eth2client.SyncCommitteesProvider).SyncCommittee(ctx, &api.SyncCommitteeOpts{ - State: "head", - Epoch: &epoch, + State: state, }) if err != nil { return nil, errors.Wrap(err, "failed to obtain sync committee information") diff --git a/cmd/version.go b/cmd/version.go index f37f5c1..5b60fc4 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -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.39.0)" +var ReleaseVersion = "local build (latest release 1.39.1)" // versionCmd represents the version command. var versionCmd = &cobra.Command{