diff --git a/pkg/clientapi/block.go b/pkg/clientapi/block.go index 63bf952..aaa1362 100644 --- a/pkg/clientapi/block.go +++ b/pkg/clientapi/block.go @@ -48,7 +48,7 @@ func (s *APIClient) RequestBeaconBlock(slot phase0.Slot) (*local_spec.AgnosticBl if errors.Is(err, context.DeadlineExceeded) { ticker := time.NewTicker(utils.RoutineFlushTimeout) - log.Warnf("retrying request: %s", routineKey) + log.Warnf("retrying request for beacon block at slot %d: %s", slot, routineKey) <-ticker.C } } @@ -141,7 +141,7 @@ func (s *APIClient) CreateMissingBlock(slot phase0.Slot) *local_spec.AgnosticBlo }) proposerValIdx := phase0.ValidatorIndex(0) if err != nil { - log.Errorf("could not request proposer duty: %s", err) + log.Errorf("could not request proposer duty for slot %d: %s", slot, err) } else { for _, duty := range duties.Data { if duty.Slot == phase0.Slot(slot) { diff --git a/pkg/clientapi/rewards.go b/pkg/clientapi/rewards.go index 9559ee4..25da27e 100644 --- a/pkg/clientapi/rewards.go +++ b/pkg/clientapi/rewards.go @@ -27,7 +27,7 @@ func (s *APIClient) RequestBlockRewards(slot phase0.Slot) (spec.BlockRewards, er err = json.Unmarshal(body, &rewards) if err != nil { - log.Warnf("error parsing block rewards response boyd %s: %s", string(body), err) + log.Warnf("error parsing block rewards for slot %d, response response body %s: %s", slot, string(body), err) } return rewards, err diff --git a/pkg/clientapi/state.go b/pkg/clientapi/state.go index 6727ea6..bd2913b 100644 --- a/pkg/clientapi/state.go +++ b/pkg/clientapi/state.go @@ -36,12 +36,12 @@ func (s *APIClient) RequestBeaconState(slot phase0.Slot) (*local_spec.AgnosticSt }) if newState == nil { - return nil, fmt.Errorf("unable to retrieve Beacon State from the beacon node, closing requester routine. nil State") + return nil, fmt.Errorf("unable to retrieve beacon state for slot %d from the beacon node, closing requester routine. nil State", slot) } if errors.Is(err, context.DeadlineExceeded) { ticker := time.NewTicker(utils.RoutineFlushTimeout) - log.Warnf("retrying request: %s", routineKey) + log.Warnf("retrying request to retrieve beacon state for slot %d: %s", slot, routineKey) <-ticker.C } @@ -74,9 +74,9 @@ func (s *APIClient) RequestStateRoot(slot phase0.Slot) *phase0.Root { }) if err != nil { if response404(err.Error()) { - log.Warningf("could not find the state root at %d: %s", slot, err) + log.Warningf("could not find the state root at slot %d: %s", slot, err) } else { - log.Errorf("error for state root at %d: %s", slot, err) + log.Errorf("error for state root at slot %d: %s", slot, err) } } else { return root.Data @@ -95,7 +95,7 @@ func (s *APIClient) GetFinalizedEndSlotStateRoot() (phase0.Slot, *phase0.Root) { }) if err != nil { - log.Panicf("could not determine the current finalized checkpoint") + log.Panicf("could not determine the current finalized checkpoint (head)") } finalizedSlot := phase0.Slot(currentFinalized.Data.Finalized.Epoch*local_spec.SlotsPerEpoch - 1)