diff --git a/protocol/genesis/ssv/runner/aggregator.go b/protocol/genesis/ssv/runner/aggregator.go index 4833387840..ebea2ed826 100644 --- a/protocol/genesis/ssv/runner/aggregator.go +++ b/protocol/genesis/ssv/runner/aggregator.go @@ -121,7 +121,6 @@ func (r *AggregatorRunner) ProcessPreConsensus(logger *zap.Logger, signedMsg *ge } r.metrics.ContinueDutyFullFlow() - r.metrics.StartConsensus() byts, err := res.MarshalSSZ() if err != nil { return errors.Wrap(err, "could not marshal aggregate and proof") @@ -131,6 +130,8 @@ func (r *AggregatorRunner) ProcessPreConsensus(logger *zap.Logger, signedMsg *ge Version: ver, DataSSZ: byts, } + + r.metrics.StartConsensus() if err := r.BaseRunner.decide(logger, r, input); err != nil { return errors.Wrap(err, "can't start new duty runner instance for duty") } diff --git a/protocol/genesis/ssv/runner/attester.go b/protocol/genesis/ssv/runner/attester.go index da2aa16a32..437ac7322b 100644 --- a/protocol/genesis/ssv/runner/attester.go +++ b/protocol/genesis/ssv/runner/attester.go @@ -4,7 +4,6 @@ import ( "crypto/sha256" "encoding/hex" "encoding/json" - spectypes "github.com/ssvlabs/ssv-spec/types" "time" "github.com/attestantio/go-eth2-client/spec/phase0" @@ -15,11 +14,11 @@ import ( genesisspecssv "github.com/ssvlabs/ssv-spec-pre-cc/ssv" genesisspectypes "github.com/ssvlabs/ssv-spec-pre-cc/types" specqbft "github.com/ssvlabs/ssv-spec/qbft" - "go.uber.org/zap" - + spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/protocol/genesis/qbft/controller" "github.com/ssvlabs/ssv/protocol/genesis/ssv/runner/metrics" + "go.uber.org/zap" ) type AttesterRunner struct { @@ -231,19 +230,18 @@ func (r *AttesterRunner) executeDuty(logger *zap.Logger, duty *genesisspectypes. r.started = time.Now() r.metrics.StartDutyFullFlow() - r.metrics.StartConsensus() attDataByts, err := attData.MarshalSSZ() if err != nil { return errors.Wrap(err, "could not marshal attestation data") } - input := &genesisspectypes.ConsensusData{ Duty: *duty, Version: ver, DataSSZ: attDataByts, } + r.metrics.StartConsensus() if err := r.BaseRunner.decide(logger, r, input); err != nil { return errors.Wrap(err, "can't start new duty runner instance for duty") } diff --git a/protocol/genesis/ssv/runner/sync_committee.go b/protocol/genesis/ssv/runner/sync_committee.go index 0fc0745b32..d3538629c1 100644 --- a/protocol/genesis/ssv/runner/sync_committee.go +++ b/protocol/genesis/ssv/runner/sync_committee.go @@ -4,7 +4,6 @@ import ( "crypto/sha256" "encoding/hex" "encoding/json" - spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/attestantio/go-eth2-client/spec/altair" "github.com/attestantio/go-eth2-client/spec/phase0" @@ -14,11 +13,11 @@ import ( genesisspecssv "github.com/ssvlabs/ssv-spec-pre-cc/ssv" genesisspectypes "github.com/ssvlabs/ssv-spec-pre-cc/types" specqbft "github.com/ssvlabs/ssv-spec/qbft" - "go.uber.org/zap" - + spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/protocol/genesis/qbft/controller" "github.com/ssvlabs/ssv/protocol/genesis/ssv/runner/metrics" + "go.uber.org/zap" ) type SyncCommitteeRunner struct { @@ -211,7 +210,6 @@ func (r *SyncCommitteeRunner) executeDuty(logger *zap.Logger, duty *genesisspect } r.metrics.StartDutyFullFlow() - r.metrics.StartConsensus() input := &genesisspectypes.ConsensusData{ Duty: *duty, @@ -219,6 +217,7 @@ func (r *SyncCommitteeRunner) executeDuty(logger *zap.Logger, duty *genesisspect DataSSZ: root[:], } + r.metrics.StartConsensus() if err := r.BaseRunner.decide(logger, r, input); err != nil { return errors.Wrap(err, "can't start new duty runner instance for duty") } diff --git a/protocol/v2/ssv/runner/runner_state.go b/protocol/v2/ssv/runner/runner_state.go index 11cabe1ff7..8ee08ca936 100644 --- a/protocol/v2/ssv/runner/runner_state.go +++ b/protocol/v2/ssv/runner/runner_state.go @@ -18,7 +18,7 @@ type State struct { RunningInstance *instance.Instance DecidedValue []byte //spectypes.Encoder // StartingDuty is the duty the node pulled locally from the beacon node, might be different - // from the actual duty operators have decided upon. + // from the actual duty operators will have decided upon. StartingDuty spectypes.Duty `json:"StartingDuty,omitempty"` // Finished marked true when the full successful cycle (pre, consensus and post) got quorum. Finished bool